[themes] All page titles identical
Franz Glauber
franz.glauber at gmail.com
Sun Aug 21 12:01:04 UTC 2011
Agon, for the first 2 errors, you just forgot the ';' at the end of
debugging lines.
Also, it is useful to have the Devel module installed (
http://drupal.org/project/devel) and use dsm() instead of
drupal_set_message(), as it prints arrays in a very pleasant browseable
interface (no need for print_r)
On Sun, Aug 21, 2011 at 8:20 AM, Agon S. Buchholz <asb at kefk.org> wrote:
> Progga wrote:
>
> > Try calling "drupal_set_message(print_r(debug_backtrace(), TRUE))"
> > from inside the drupal_set_title() function at "includes/path.inc,
> > line 206".
>
> Thanks for your patience, but I had no luck with this either.
>
>
> function drupal_get_title() {
> $title = drupal_set_title();
> drupal_set_message(print_r(debug_backtrace(), TRUE))
>
> // during a bootstrap, menu.inc is not included and thus we cannot
> provide a title
> if (!isset($title) && function_exists('menu_get_active_title')) {
> $title = check_plain(menu_get_active_title());
> }
>
> return $title;
> }
>
> and
>
> function drupal_get_title() {
> $title = drupal_set_title();
>
> // during a bootstrap, menu.inc is not included and thus we cannot
> provide a title
> if (!isset($title) && function_exists('menu_get_active_title')) {
> $title = check_plain(menu_get_active_title());
> }
> drupal_set_message(print_r(debug_backtrace(), TRUE))
> return $title;
> }
>
> result in:
>
> Parse error: syntax error, unexpected T_IF in
> /var/www/drupal/includes/path.inc on line 235
>
> respctively
>
> Parse error: syntax error, unexpected T_RETURN in
> /var/www/drupal/includes/path.inc on line 239
>
>
> (is this even "inside the function"?)
>
>
> function drupal_set_title($title = NULL) {
> drupal_set_message(print_r(debug_backtrace(), TRUE))
> static $stored_title;
>
> results in
>
> Parse error: syntax error, unexpected T_STATIC in
> /var/www/drupal/includes/path.inc on line 253
>
>
> function drupal_get_title() {
> $title =
> drupal_set_title(drupal_set_message(print_r(debug_backtrace(), TRUE)));
>
> // during a bootstrap, menu.inc is not included and thus we cannot
> provide a title
> if (!isset($title) && function_exists('menu_get_active_title')) {
> $title = check_plain(menu_get_active_title());
> }
>
> results in lots of debug output all over the first page I', loading, and
> then in
>
> Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to
> allocate 54190338 bytes) in /var/www/drupal/includes/theme.inc on line 1879
>
> (current PHP memory limit: 200M)
>
>
> Sorry, this is too much guesswork as I don't understand enough about PHP
> syntax.
>
> E.g. "inside the function"
> drupal_set_title(check_plain($gallery->name)); probably means somewhere
> inside the first (), or second (), either before, or after
> "check_plain", or either before, or after "$gallery->name".
>
> Greetings, -asb
>
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>
--
Franz
http://ciudaddelpico.com
Sent from my laptop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20110821/b91d3ce3/attachment.html
More information about the themes
mailing list