Reviewed: https://reviews.mahara.org/6205 Committed: https://git.mahara.org/mahara/mahara/commit/2bd84453159cdb65a7c20470b3adf7564c0053d6 Submitter: Robert Lyon ([email protected]) Branch: 15.10_STABLE
commit 2bd84453159cdb65a7c20470b3adf7564c0053d6 Author: Aaron Wells <[email protected]> Date: Wed Mar 16 19:46:15 2016 +1300 Silence error messages from tagged journal entries ajax script Bug 1557896: When you first click in Select2, it fires off an aqax request with no "q" value (because there's no query string yet). We return a "required parameter missing" error message in a JSON object, which causes a Javascript warning in the browser. Better to just treat it like an empty q, instead of a missing q. behatnotneeded - unable to test for issues in console Change-Id: I81c4cfe77c51fce735cfd2628aaed1e40cc35940 (cherry picked from commit 28fcc277b384c8e1cf25f34399834a18366e3bee) -- 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

