mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #33481
[Bug 1557896] Re: Javascript warnings from select2, on tagged blog entries block
** Changed in: mahara/15.10
Status: In Progress => Fix Committed
--
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:
Fix Committed
Status in Mahara 15.10 series:
Fix Committed
Status in Mahara 16.04 series:
Fix Committed
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
References