mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #33371
[Bug 1557896] [NEW] Javascript warnings from select2, on tagged blog entries block
Public bug reported:
When you click into the select2 on the tagged blog entries block, but
haven't typed anything in yet, Select2 prints a Javascript warning to
the JS console.
This is because, in this case, select2 requests taggedposts.json.php
without the "q" param that represents a query string. And
taggedposts.json.php tries to retrieve the value of q using
"param_variable()" without a default value, which means that q is
required to be present. When it's not, the script errors out and returns
a JSON object with an error message. This is different from what Select2
expects, and Select2 doesn't try to check for it at all, so it throws a
warning when it tries to access a field in the object which is not
present.
Since this is standard Select2 behavior, we should make it return a non-
error value when "q" is empty.
** Affects: mahara
Importance: Low
Status: In Progress
** Affects: mahara/15.10
Importance: Low
Status: In Progress
** Affects: mahara/16.04
Importance: Low
Status: In Progress
** Also affects: mahara/15.10
Importance: Undecided
Status: New
** Also affects: mahara/16.04
Importance: Undecided
Status: New
** Changed in: mahara/15.10
Milestone: None => 15.10.2
** Changed in: mahara/16.04
Milestone: None => 16.04.1
** Changed in: mahara/15.10
Importance: Undecided => Low
** Changed in: mahara/16.04
Importance: Undecided => Low
** Changed in: mahara/15.10
Status: New => In Progress
** Changed in: mahara/16.04
Status: New => In Progress
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1557896
Title:
Javascript warnings from select2, on tagged blog entries block
Status in Mahara:
In Progress
Status in Mahara 15.10 series:
In Progress
Status in Mahara 16.04 series:
In Progress
Bug description:
When you click into the select2 on the tagged blog entries block, but
haven't typed anything in yet, Select2 prints a Javascript warning to
the JS console.
This is because, in this case, select2 requests taggedposts.json.php
without the "q" param that represents a query string. And
taggedposts.json.php tries to retrieve the value of q using
"param_variable()" without a default value, which means that q is
required to be present. When it's not, the script errors out and
returns a JSON object with an error message. This is different from
what Select2 expects, and Select2 doesn't try to check for it at all,
so it throws a warning when it tries to access a field in the object
which is not present.
Since this is standard Select2 behavior, we should make it return a
non-error value when "q" is empty.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1557896/+subscriptions
Follow ups
-
[Bug 1557896] Re: Javascript warnings from select2, on tagged blog entries block
From: Kristina Hoeppner, 2016-04-30
-
[Bug 1557896] Re: Javascript warnings from select2, on tagged blog entries block
From: Robert Lyon, 2016-04-28
-
[Bug 1557896] Re: Javascript warnings from select2, on tagged blog entries block
From: Aaron Wells, 2016-03-23
-
[Bug 1557896] Re: Javascript warnings from select2, on tagged blog entries block
From: Robert Lyon, 2016-03-19
-
[Bug 1557896] A change has been merged
From: Mahara Bot, 2016-03-19
-
[Bug 1557896] A patch has been submitted for review
From: Mahara Bot, 2016-03-19
-
[Bug 1557896] A change has been merged
From: Mahara Bot, 2016-03-19
-
[Bug 1557896] Re: Javascript warnings from select2, on tagged blog entries block
From: Robert Lyon, 2016-03-19
-
[Bug 1557896] A patch has been submitted for review
From: Mahara Bot, 2016-03-16