Posted by jonathanbloom on April 17, 2009 at 4:01pm
Jump to:
| Project: | Panels |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
I'm using the page titles module and I added a title to the panel page. I go to the page titles module and add [page-title] and [title] and the panel title is not being added.
This problem only shows up if the title is hidden in the panel. If it's visible, then all is well.
Comments
#1
I'm afraid I don't know anything about the page titles module so I don't really have any idea what to do about this.
#2
I wanted to let you know that the latest versions have fixed the issue.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
Unfortunately the problem did not go away, though the condition under which it emerges is somewhat tricky.
One way to see how Page Titles / Panel interaction fails is to have any kind of tokenization call while Panel page is loading. In my case, I ran into it trying to implement Meta tags by Path module, but really the title hijack will be triggered by a call to
token_get_valuesfrom anywhere else.This happens because Page Titles relies on [page-title] token, initialization of which is forced by any use of tokens. The Page Title function that populates the token
page_title_get_title()happens to set page's actual title once and for all. Then when Page Panel makes the call todrupal_set_titleit has no effect.I implemented a pretty messy hack to fix the problem on Page Title end #276342: Panels Integration for 5.x. However, this is not a viable solution for the long run, as it relies on copied Panels code that may change in the future. Much better option would be for Panels to implement
hook_page_title_alter()to return the right title.@merlinofchaos: Could you re-use the code from my Page Title hack in Panels? It may need to be fixed since I probably got Panels logic wrong (e.g. no support for mini-Panels).
#5
One more thing to consider.
Removal of HTML Title generation logic into a separate function is also an opportunity to make Panel Page Titles customizeable (which is a task listed as a TODO in Panel's Display UI). In addition to direct token substitution it would be a great idea to let 3rd party modules (providing panes or displays?) to further manipulate the title. Perhaps by a hook mechanism similar to
hook_page_title_alter()?I have a case where I would like to call
drupal_set_titlefrom a pane, though now I know that this would not work with Page Titles enabled.Changing the issue's title to reflect the broader scope.
#6
Having this problem as well. Just a simple node detection and a drupal_set_title() within hook_nodeapi() does not work.
Also, since there is no patch here, marking as simply active.
#7
Ugh. Titles again. I'm starting to wonder if we shouldn't just make title generation into yet another pluggable piece, and let things flow from there.
#8
First, page titles are the job of page manager, not Panels.
Second, the newest release of the pair has a way of allowing a pane to have its title bubble up to the top.
Third, panes should never have real influence on the title of the page, because panes do not know if they're in a page or not. Titles should come from contexts if possible, and bubble up from panes if not.
#9
Do not know if it will be first, second or third or last place ....
The thing is that the titles of the pages was working fine until installing the Panels module 6.x-3.7 and that's when the token [page-title] that uses the Page Title module 6.x-2.3 stopped working. ...
And what I see here in particular, then go find the solution for hours ... that neither a sack xxx.patch