? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
29 Apr 2021

Pull Request for Issue #33396 replacement for #33397

@dgrammatiko @BrainforgeUK

Summary of Changes

Reemploying the same tactic that the startAccordion method uses to return early and ignore the fact that the method has been called incorrectly, with the same selector, twice by a developer.

Prevents outputting a PHP error message.

Please read the background here #33397 (comment)

For element ID's a safe strategy is to use a pattern like company-product-specifier which should guarantee uniqueness

Testing Instructions

add the code below somewhere on a page you are looking at, refresh and see the error.

\Joomla\CMS\HTML\Helpers\Bootstrap::startTabSet('asd', []);
\Joomla\CMS\HTML\Helpers\Bootstrap::startTabSet('asd', []);

Actual result BEFORE applying this Pull Request

Screenshot 2021-04-29 at 17 57 14

Expected result AFTER applying this Pull Request

The page loads without a PHP error, albeit the developer still needs to fix their code as the second call to startTabSet doesn't actually do anything, but silently returns.

This is by design, because of the history explained in the background here #33397 (comment)

Documentation Changes Required

None.

avatar PhilETaylor PhilETaylor - open - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Apr 2021
Category Libraries
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 29 Apr 2021
avatar Quy Quy - test_item - 31 May 2021 - Tested successfully
avatar Quy
Quy - comment - 31 May 2021

I have tested this item successfully on c7d4c1f


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

avatar PhilETaylor
PhilETaylor - comment - 15 Aug 2021

Not tested by original reporting @BrainforgeUK and no other interest so closing this now.

avatar PhilETaylor PhilETaylor - change - 15 Aug 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-08-15 12:18:29
Closed_By PhilETaylor
Labels Added: ?
avatar PhilETaylor PhilETaylor - close - 15 Aug 2021

Add a Comment

Login with GitHub to post a comment