Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Using tabs i.e. as a paragraph type, unique tabs group identifiers can only be generated if the style setting field "tabs group identifier" supports token replacement.
Else it will only work for the first tab paragraph, all following tab paragraphs will not work.
Comment | File | Size | Author |
---|---|---|---|
#7 | token_substitution_not-2864766-7.patch | 4.24 KB | plopesc |
Comments
Comment #2
plopescHello Rudi
Could you please provide the exact steps to reproduce the issue?
Thanks
Comment #3
Rudi Teschner CreditAttribution: Rudi Teschner commentedSure, I'll try to. Thanks for the fast reply. =)
1) Download clean D7 with this module and its dependencies.
2) Download libraries api (which should be added to the info as dependency), the easy-responsive-tabs library along with paragraphs, panelizer and entity.
3) Enable the modules including entity_token
4) Create any paragraph bundle and enable panelizer. Set 'panelize', 'default' and 'provide initial display named Default' for the paragraph bundle.
5) On panelizer settings of paragraph add rendered parapraphs item and use one of the substitutions (i.e. %paragraphs_item:item-id) as value for tab groups identifier
6) add field of type paragraps to article with unlimited values
Great ... after following these steps on a fresh installation it works, but not on my existing project. :)
Looks like one of the other modules I use there is at fault, I'll try to narrow it down next week.
Comment #4
plopescThanks Rudi for your input.
Postponing the issue for now, but feel free to re-activate it in case you find the way to reproduce it :)
Comment #5
Rudi Teschner CreditAttribution: Rudi Teschner commentedYou answer too quick. xD
Question ... I dont know why it works. When I debug the $settings variable in panels_responsive_tabs.inc at row 50, the tabidentify string is not replaced either, and looks the same for all three tab areas.
Shouldnt it be replaced at that point already? Since its in function theme_panels_responsive_tabs_style_render_region?
Comment #6
plopescYes, it should.
I know where to start from :)
Please, let me know if you find anything else.
Comment #7
plopescHello Rudi
Could you test this patch and confirm if works?
Thanks
Comment #8
Rudi Teschner CreditAttribution: Rudi Teschner commentedAwesome reply speed. :D
The first gets processed, the second not. I assume thats because both divs have the same html id:
markup of first tabs area
<div id="tabs-0-center" class="panels-responsive-tabs-processed" style="display: block; width: 100%; margin: 0px;">
markup of second tabs area
<div id="tabs-0-center">
After changing
$tab_id = 'tabs-' . $owner_id . '-' . $region_id;
to
$tab_id = 'tabs-' . panels_responsive_tabs_pane_tabidentifiers($display->did, $region_id);
in panels_responsive_tabs.inc in line 28 in addition to your patch it works. =)
Comment #9
plopescThe purpose of tab_id and tabidentifiers is not exactly the same.
Also, given that tabidentifier field is optional, you'll proposal won't work.
Could you try this code in line 28?
$tab_id = drupal_html_id('tabs-' . $owner_id . '-' . $region_id);
This will be better, I think :)
Comment #10
Rudi Teschner CreditAttribution: Rudi Teschner commentedOk. I've tested it with 5 different tab area paragraphs on one page and everything is looking fine. :)
Comment #12
plopescPatch pushed!
Please use the -dev version. I'll probably roll the new stable version soon.
Thanks for reporting.
Comment #14
Rudi Teschner CreditAttribution: Rudi Teschner commentedI'm sorry that I have to reopen this issue.
I'm running into an empty AJAX 500 error that I didn't notice during the tests in my dev environment when I try to change the panel settings. Since reverting to the unpatched 1.0 release of this module is enough to prevent the 500, I assume its directly related to the patch.
I wonder why the problem hasn't appeared during my earlier tests, because I can assure you that I have modified values after applying the patch.
Comment #15
plopescHi Rudi,
Are you sure that these errors are coming from this module?
Could you please check Drupal/Apache logs to determine the actual error message?
In case that error is related to this module, could you please provide steps to reproduce it?
Thank you