? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
1 Dec 2016

In PR #13019 (comment) an issue was detected which is technically not related to that PR, thus I do an own one.

If you have a batch modal without a category/position/menu selector but have the copy/move radios, you will get a JavaScript error in the console.
That is because someone introduced that code in a lazy way and added it to the JLayout for the language field, and not for the one rendering the category/position/menu selects with the copy/move radios.
Now if you have your own select with those radios like in the mentioned PR, the JavaScript tries to run with an undefined batchSelector variable.

Summary of Changes

This PR just adds a simple check if the variable has some content, otherwise the code will not do anything.
Another approach would be to move the code to the correct JLayouts, but that can be seen as not B/C.

Testing Instructions

Simplest test would be to apply PR #13019, check the console output in the fields view. You'll see the error. Apply this PR here as well and the error will be gone. Not sure if that is possible with the Patchtester.

Another test is to make sure any batch modals (eg the articles one) still show/hide the copy/move radios when selecting/unselecting a category in the batch modal.

Documentation Changes Required

None.

avatar Bakual Bakual - open - 1 Dec 2016
avatar Bakual Bakual - change - 1 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Dec 2016
Category Layout
avatar ralain
ralain - comment - 1 Dec 2016

I have tested this item successfully on 7802985


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

avatar ralain ralain - test_item - 1 Dec 2016 - Tested successfully
avatar dgt41
dgt41 - comment - 1 Dec 2016

I have tested this item successfully on 7802985


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

avatar dgt41 dgt41 - test_item - 1 Dec 2016 - Tested successfully
avatar dgt41 dgt41 - change - 1 Dec 2016
Status Pending Ready to Commit
avatar dgt41
dgt41 - comment - 1 Dec 2016

RTC


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

avatar Bakual Bakual - change - 1 Dec 2016
Milestone Added:
avatar rdeutz rdeutz - reference | 2627572 - 6 Dec 16
avatar rdeutz rdeutz - merge - 6 Dec 2016
avatar rdeutz rdeutz - change - 6 Dec 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-12-06 22:28:39
Closed_By rdeutz
avatar rdeutz rdeutz - close - 6 Dec 2016
avatar rdeutz rdeutz - merge - 6 Dec 2016
avatar rdeutz rdeutz - close - 6 Dec 2016

Add a Comment

Login with GitHub to post a comment