No Code Attached Yet
avatar joomdonation
joomdonation
23 Jan 2021

Steps to reproduce the issue

Use the below code to create tab

echo JHtml::_('bootstrap.startTabSet', 'tab', ['active' => 'tab1']);
echo JHtml::_('bootstrap.addTab', 'tab', 'tab1', 'Tab 1 Title');
echo 'Tab 1 Content';
echo JHtml::_('bootstrap.endTab');
echo JHtml::_('bootstrap.addTab', 'tab', 'tab2', 'Tab 2 Title');
echo 'Tab 2 Content';
echo JHtml::_('bootstrap.endTab');
echo JHtml::_('bootstrap.endTabSet');

Expected result

Tabs displayed

Actual result

Tabs are not being displayed

System information (as much as possible)

Joomla 4 nightly build

Additional comments

Maybe we need to wait for PR #31990 merged to have it works ?

avatar joomdonation joomdonation - open - 23 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jan 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Jan 2021
avatar joomdonation joomdonation - change - 23 Jan 2021
Title
[4.0]Bootstrap is broken
[4.0]Bootstrap tab is broken
avatar joomdonation joomdonation - edited - 23 Jan 2021
avatar HLeithner HLeithner - change - 23 Jan 2021
Title
[4.0]Bootstrap tab is broken
[4.0][BS5]Bootstrap tab is broken
avatar HLeithner HLeithner - edited - 23 Jan 2021
avatar wilsonge wilsonge - change - 23 Jan 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-01-23 10:40:09
Closed_By wilsonge
avatar wilsonge wilsonge - close - 23 Jan 2021
avatar joomdonation
joomdonation - comment - 24 Jan 2021

@wilsonge I tried again with nightly build today and the issue is still not fixed yet.

avatar wilsonge wilsonge - change - 24 Jan 2021
Status Closed New
Closed_Date 2021-01-23 10:40:09
Closed_By wilsonge
avatar wilsonge wilsonge - reopen - 24 Jan 2021
avatar dgrammatiko
dgrammatiko - comment - 24 Jan 2021

@joomdonation I think the selector needs to be a CSS selector and you're passing a string (which will result to an element tag tab which obviously doesn't exist)

The example code should make it clear what's broken here: https://github.com/dgrammatiko/bs5/blob/cbd103ddb7e28632d563bdec0a3af6fee4a813f9/test_component/site/tmpl/tab/default.php#L19-L33

avatar joomdonation
joomdonation - comment - 24 Jan 2021

@dgrammatiko The selector actually becomes part of id of the Tabset. We have been using it for years, see the code from staging https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/views/article/tmpl/edit.php#L65

(and just for information, that code has been working at least until recently)

avatar dgrammatiko
dgrammatiko - comment - 24 Jan 2021

@joomdonation but does it work if you pass it as a class? The B/C break is something new after the Bootstrap V5 and it might be reverted or patched in a way that will be B/C (undecided at this point).

avatar joomdonation
joomdonation - comment - 24 Jan 2021

@dgrammatiko Yes. If I pass a class selector, then it works

echo JHtml::_('bootstrap.startTabSet', '.tab', ['active' => 'tab1']);
echo JHtml::_('bootstrap.addTab', '.tab', 'tab1', 'Tab 1 Title');
echo 'Tab 1 Content';
echo JHtml::_('bootstrap.endTab');
echo JHtml::_('bootstrap.addTab', '.tab', 'tab2', 'Tab 2 Title');
echo 'Tab 2 Content';
echo JHtml::_('bootstrap.endTab');
echo JHtml::_('bootstrap.endTabSet');

But this is B/C break and should be fixed.

avatar dgrammatiko
dgrammatiko - comment - 24 Jan 2021

@joomdonation please test #32146

avatar joomdonation joomdonation - change - 24 Jan 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-01-24 15:17:01
Closed_By joomdonation
avatar joomdonation
joomdonation - comment - 24 Jan 2021

Thanks @dgrammatiko . I can confirm that it fixed the reported issue.

avatar joomdonation joomdonation - close - 24 Jan 2021
avatar gostn
gostn - comment - 24 Jan 2021

@joomdonation please mark your test as successfully at https://issues.joomla.org/tracker/joomla-cms/32146

Add a Comment

Login with GitHub to post a comment