? ? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
3 Jun 2017

Summary of Changes

This patch fix an initial call of Joomla.loadOptions() when page do not contain the Script options, which could lead to JavaScript error.

Testing Instructions

Use latest staging,
Add in to index.php of Isis template:

JHtml::_('behavior.core');
$this->addScriptDeclaration('
  try{Joomla.getOptions("blabla");alert("Works!");}catch(e){alert("Error!");};
');

And open "Control panel" page.

Expected result

You see alert "Works!"

Actual result

You see alert "Error!"

Documentation Changes Required

none

avatar Fedik Fedik - open - 3 Jun 2017
avatar Fedik Fedik - change - 3 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jun 2017
Category JavaScript
avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Jun 2017

I have tested this item successfully on 61b334a

works as described


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16488.

avatar andrepereiradasilva andrepereiradasilva - test_item - 3 Jun 2017 - Tested successfully
avatar Fedik Fedik - change - 3 Jun 2017
The description was changed
avatar Fedik Fedik - edited - 3 Jun 2017
avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Jun 2017

@dgt41 (or other tester) please test since there another PRs waiting for this one to get merged
#16452 and #15529

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Jun 2017

@Fedik i'm still getting the error. maybe there's another place you need to do that

avatar andrepereiradasilva andrepereiradasilva - alter_testresult - 3 Jun 2017 - andrepereiradasilva: Tested unsuccessfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Jun 2017

seems the error is here https://github.com/joomla/joomla-cms/blob/staging/media/system/js/core-uncompressed.js#L159

core.js?9398acd…:1 Uncaught TypeError: Cannot read property 'system.keepalive' of null at Object.Joomla.getOptions (core.js?9398acd…:1) at HTMLDocument.<anonymous> (keepalive.js?9398acd…:1) Joomla.getOptions @ core.js?9398acd…:1 (anonymous) @ keepalive.js?9398acd…:1

avatar andrepereiradasilva andrepereiradasilva - test_item - 3 Jun 2017 - Tested unsuccessfully
avatar C-Lodder
C-Lodder - comment - 3 Jun 2017

What happens if you do console.log (key); on the line you linked to in the comment above?

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Jun 2017
console.log(key);
console.log(Joomla.optionsStorage);

results in

system.keepalive
null
avatar Fedik Fedik - change - 3 Jun 2017
Labels Added: ?
avatar Fedik
Fedik - comment - 3 Jun 2017

I found the problem,
should be good now

avatar andrepereiradasilva
andrepereiradasilva - comment - 3 Jun 2017

I have tested this item successfully on 9660d35


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16488.

avatar andrepereiradasilva andrepereiradasilva - test_item - 3 Jun 2017 - Tested successfully
avatar Quy
Quy - comment - 3 Jun 2017

I have tested this item successfully on 9660d35


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16488.

avatar Quy Quy - test_item - 3 Jun 2017 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Jun 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Jun 2017

RTC after two successful tests.

avatar wilsonge wilsonge - change - 8 Jun 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-06-08 21:06:30
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 8 Jun 2017
avatar wilsonge wilsonge - merge - 8 Jun 2017

Add a Comment

Login with GitHub to post a comment