Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Today panels module version 3.7 was released and panels_tabs doesn't work fully with the new rendering pipeline.
If you upgrade a site it should continue working ok, but it will switch panels into legacy mode which does limit some of the new features. It would be great if there was a way to upgrade fully.
The first step to get this upgraded is here:
#865840: How to upgrade a style to be legacy free
However, this does then show a problem due to a change in the way the region rendering now happens:
#865912: Document how to allow region styles to control rendering of panes
Comment | File | Size | Author |
---|---|---|---|
#30 | panels_tabs_5.patch | 931 bytes | smoothify |
#21 | panels_tabs_4.patch | 588 bytes | smoothify |
#17 | panels_tabs_3.patch | 1.41 KB | smoothify |
#12 | panels_tabs_2.patch | 1.12 KB | smoothify |
#6 | panels_tabs.patch | 3.46 KB | smoothify |
Comments
Comment #1
kmv CreditAttribution: kmv commentedsubscribe
Comment #2
dawehnerI tryed to do this.
The problem is that it's not that easy to get the title of a pane as you saw in the other issues.
It's not a problem to remove the title from rendering.
Comment #3
smoothify CreditAttribution: smoothify commentedI made some progress on this today and will try to post a patch for this tomorrow.
merlinofchaos was very helpful, and suggested a way to allow fallback for people running the older versions of panels too.
Comment #4
dawehnerPerhaps it would have been better if we changed some words via irc :)
He suggested to add a deprecated-plugins/tabs.inc to support older versions, too.
Comment #5
pvasener CreditAttribution: pvasener commentedSubscribing
Comment #6
smoothify CreditAttribution: smoothify commentedHere is the patch as promised against the current dev version.
In this version I actually kept a single style, rather than going for the separate deprecated one. (I do check for the version in several places though)
The reason for this is so that it works in the following situations:
1) Previous versions of panels/ctools
2) Latest version of panels/ctools in legacy mode (due to other 'legacy' styles)
3) Latest version of panels/ctools in regular mode
Number 2), is where I believe it would have issues on the separate style method - not only would you have to check for ctools version, you also have to check whether its running in legacy mode.
I have enquired on #865840: How to upgrade a style to be legacy free if its fine to leave both the new 'render region' and the older 'render panel' callbacks inside the one style rather than separate ones. If it is fine then there scope to remove some of the duplicate render code added by my patch.
Comment #7
dawehnerThanks. And commited.
Comment #8
pvasener CreditAttribution: pvasener commentedI updated the module to 6.x-1.0-rc1. I no longer have the panels warning for panels_tabs and I'm still in legacy mode due to another module (skinr). When I try to access a panel page, I now get the following error. All non-panel pages are ok though.
PHP Fatal error: Call to undefined method panels_renderer_legacy::prepare() in /var/www/html/***/sites/all/modules/panels_tabs/panels_tabs.module on line 38,...
Comment #9
dawehnerPlease open new issues.
Which version of ctools and panels are you using. I just want to support the newest version if possible.
Comment #10
pvasener CreditAttribution: pvasener commentedI use Panels 3.7 and Ctools 1.7
Comment #11
dawehnerI need a way to reproduce the problem. Here it works fine
Comment #12
smoothify CreditAttribution: smoothify commentedI have managed to reproduce this issue by installing a style using the old format which put panels into legacy mode. (needed a few cache clears and refreshes though)
The issue seemed to be with the code to check the version, however when I ran an additional check to see if panels was in legacy mode it fixed the errors but the tabs were missing titles.
It seems that if you specify api version 2 as we do, the panels legacy mode, tries to be a bit clever and run the new 'render region' callback anyway. The callback doesn't work because I was relying on the renderer->prepare function which is only in the standard mode in my code.
So in the end, I have rewritten the pre_render hook to work which ever mode panels is in.
Hope this solves things...
Comment #13
bennos CreditAttribution: bennos commentedlast patch works for me
Comment #14
pvasener CreditAttribution: pvasener commentedSame thing, the patch fixed my problem. Thanks a lot.
Comment #15
dawehnerDon't close issues, if the patch is not already commited :)
Comment #16
smoothify CreditAttribution: smoothify commentedJust testing things more, and it seems it doesn't work too well when assigning the tabs style to the whole panel (e.g. when using tabs in mini panels)
Will follow up with a patch once I work out why.
Comment #17
smoothify CreditAttribution: smoothify commentedHere is another patch, based on 1.0 rc1. (this replaces the last patch)
Now it checks to see if the overall panel has a style, and if so it processes the all regions correctly, honoring those that have a separate style.
fingers crossed this time it works fully!
Comment #18
dawehnerAnd commited. Thanks again!!
Comment #19
pvasener CreditAttribution: pvasener commentedI'm testing 1.0-rc2 on my system and I get the following warning on any panel page:
warning: Invalid argument supplied for foreach() in /var/www/html/drupal/***/sites/all/modules/panels_tabs/panels_tabs.module on line 45.
and the titles of the tabs are not displayed on the tabs but in the tab content as a regular title.
Comment #20
smoothify CreditAttribution: smoothify commentedpvasener:
could you tell me which mode panels is running in on the status report - /admin/status/report ?
are you using ctools 1.7 and panels 3.7?
Comment #21
smoothify CreditAttribution: smoothify commentedI managed to reproduce the issue with the titles not showing in the tabs, but not the invalid argument error.
I experienced the titles missing when using mini panels and with the style applied to all the display. I have attached a patch that should this.
pvasener
If this doesn't fix your issue, could you give some more information on whether you are using mini panels and where you are applying the style.
Comment #22
pvasener CreditAttribution: pvasener commentedPanels 3.7 is working in legacy mode with Ctools 1.7. I am not using mini-panels and I applied the 'tabs' style to a region with two custom content panes. I tried patch 4 but the problem persists, sorry.
Comment #23
smoothify CreditAttribution: smoothify commentedpvasener, thanks for the feedback
do you know which style is causing the legacy mode, skinr perhaps? (should tell you in the status report)
I can't reproduce this situation on my setup - could you export your panel so I can try exactly the same one here?
Comment #24
smoothify CreditAttribution: smoothify commentedpvasener,
just to rule out the obvious - have you run update.php since upgrading panels & ctools? also have you cleared caches?
Comment #25
pvasener CreditAttribution: pvasener commentedYes, I'm in legacy mode because of Skinr. And yes, I have 'drush up;drush cc all'-ed before testing :)
Concerning the faulty panel, it's indeed not a panel page but a panel node. I tried to create a new panel page and a new panel node and the bug only occurs on a panel node (Everything is ok on a panel page). I hope this helps to reproduce it.
Comment #26
smoothify CreditAttribution: smoothify commentedah, panel nodes...
I still can't reproduce this error - could you try the following (you need devel installed)
on line 42 of panels_tab.module underneath the $global_style declaration could you add the following :
When you view the page now, you should see a message shown with some debug output, could you paste here?
Thanks
Ben
Comment #27
pvasener CreditAttribution: pvasener commentedHere is the result of your request:
Comment #28
smoothify CreditAttribution: smoothify commentedThanks for the debug information - its very helpful.
I hadn't tested flexible layout in legacy mode, which is what seems to be causing the problem - it may be a panels bug rather than with panels_tabs.
I will investigate this further and see if i can find a work around.
Edit: forgot to mention - with this info I can now reproduce the problem.
Comment #29
pvasener CreditAttribution: pvasener commentedI can also confirm you that it's coming from the 'flexible' layout. I modified the layout to a 2-column one and the problem disappeared. When I reverted to flexible, the problem was back.
Comment #30
smoothify CreditAttribution: smoothify commentedokay,
i found a way round this issue, and for me it now fixes the problems using flexible layout in legacy mode.
This patch applies against RC2, and also contains the change made in patch 4. So if you've applied patch 4 its best to redownload the module and then apply it.
Comment #31
pvasener CreditAttribution: pvasener commentedThis patch fixed my particular problem. Thanks a lot for your efforts in solving it.
Comment #32
smoothify CreditAttribution: smoothify commentedgreat! really pleased it works for you now.
thanks for providing the feedback, made things much easier.
Comment #33
mcpuddin CreditAttribution: mcpuddin commentedThis may or maybe unrelated to the bug but when I applied the patch to RC2, I get the following error when trying to add the tab style to a mini panel ( a regular page via page manager works fine ):
Unable to complete operation. Fatal error in www/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_editor.class.php on line 1674: Function name must be a string
Comment #34
smoothify CreditAttribution: smoothify commentedmcpuddin:
That sounds like the issue with panels I ran into yesterday:
#865704: Fatal error in panels/plugins/display_renderers/panels_renderer_editor.class.php on line 1669: Function name must be a string
That has the patch in there, but it has been commited and released, so you may try downloading the latest panels release.
Comment #35
smoothify CreditAttribution: smoothify commentedCommited!
and new release candidate created...