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

ddunn’s picture

I'd be interested in hearing about a solution to this also.

acrollet’s picture

I'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()

acrollet’s picture

Status: Active » Needs review
StatusFileSize
new2.14 KB

Patch 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.

pdcarto’s picture

The patch (#3) is working for me. Perhaps not a long-term solution if it bypasses caching though.

acrollet’s picture

I discovered that the previous patch does not work correctly when placing node edit form components in tabs - updated patch attached.

acrollet’s picture

Updated patch with more comments, also fixes a notice generated when saving a node.

acrollet’s picture

Title: Block Cache kills TabTitle » Block cache kills Tab Title

updating issue title to make it more easily searchable.

socialnicheguru’s picture

git 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

acrollet’s picture

updated patch attached, haven't had a chance to review/test it but don't want the update work to be lost.

maximpodorov’s picture

@acrollet, could you test the patch yourself?

jason.fisher’s picture

Status: Needs review » Reviewed & tested by the community

Patch from #9 applied cleanly here with the latest dev and corrected my issues with Panels Hash Cache losing titles.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: panels_tabs-cache_title_when_pane_is_exported-1372800-9.patch, failed testing.

nbennett25’s picture

I'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.

maximpodorov’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

What about 7.x-2.x which is the current development branch?

nbennett25’s picture

Here'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.

loopduplicate’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
Yuri’s picture

Applying 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

socialnicheguru’s picture

creates panels_tabs_patch.module file