I am using 7.x-3.0-alpha3 of Panels and MiniPanels trying to build a tabbed profile. But I run into problems when I want to cache the first tab:
- The function "render_pane_content" of the panels module doesn't invoke the panels_pane_content_alter-hook used by the Panels Tab module to set the title of the tab
- The render function will try to access the cache function which will return that it can't find the entry and the render function will show "Tab 1" instead of title of the cached tab.
Comments
Comment #1
ddunn commentedI'd be interested in hearing about a solution to this also.
Comment #2
acrollet commentedI'm experiencing this problem as well, in my case because panes don't have a did when they live in code. (exported as a feature.) x-ref: #1370636: No did for exported panels causes wrong get cache in panels_simple_cache_get_id()
Comment #3
acrollet commentedPatch attached, needs review. Pane titles are set correctly using this patch whether or not the panel is in code. I don't know whether or not block caching will affect this. One potential issue: when the panel/panes are in code, the did is 'new' - don't know if this will possibly lead to conflicts in the panels_tabs cache, a workaround could be needed.
Comment #4
pdcarto commentedThe patch (#3) is working for me. Perhaps not a long-term solution if it bypasses caching though.
Comment #5
acrollet commentedI discovered that the previous patch does not work correctly when placing node edit form components in tabs - updated patch attached.
Comment #6
acrollet commentedUpdated patch with more comments, also fixes a notice generated when saving a node.
Comment #7
acrollet commentedupdating issue title to make it more easily searchable.
Comment #8
socialnicheguru commentedgit apply pane*tab*cach*patch
panels_tabs-cache_title_when_pane_is_exported-1372800-6.patch:53: trailing whitespace.
// Many (all) node form pane set the #access property of the original form
warning: 1 line adds whitespace errors.
doesn't apply cleanly
Comment #9
acrollet commentedupdated patch attached, haven't had a chance to review/test it but don't want the update work to be lost.
Comment #10
maximpodorov commented@acrollet, could you test the patch yourself?
Comment #11
jason.fisher commentedPatch from #9 applied cleanly here with the latest dev and corrected my issues with Panels Hash Cache losing titles.
Comment #13
nbennett25 commentedI've modified #9 for 7.x-1.x-dev: removed the last hunk that was failing, and updated to check that $content->content is an array before the foreach on the keys.
Comment #14
maximpodorov commentedWhat about 7.x-2.x which is the current development branch?
Comment #15
nbennett25 commentedHere's a #13 patch for version 7.x-2x. I've been able to apply cleanly, but have not tested it as we're using 7.x-1.x.
Comment #16
loopduplicate commentedComment #19
Yuri commentedApplying the patch in #15 results in a white page with syntax error
Parse error: syntax error, unexpected $end in /home/testsite/public_html/sites/all/modules/panels_tabs/panels_tabs.module on line 101
Comment #20
socialnicheguru commentedcreates panels_tabs_patch.module file