Header Title on pages messed up due to php code error.

illogic-al - March 31, 2008 - 00:10
Project:I Feel Dirty
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The H2 header for this theme contains an error which causes page titles to be too small

<?php
if ($title) { print '<h2'. ($tabs ? ' class="pagetitle with-tabs"' : 'pagetitle') .'>'. $title .'</h2>'; }
?>

needs to be changed to
<?php
if ($title) { print '<h2'. ($tabs ? ' class="pagetitle with-tabs"' : ' class="pagetitle"') .'>'. $title .'</h2>'; }
?>

the ?: (ternary?) expression causes pagetitle to be appended to the h2, creating a new html flag. This also screws up validation on an otherwise fine page. I'd make a patch but the fix is so simple that one's unnecessary. I'd do it myself if I had access to the code :-)

#1

illogic-al - March 31, 2008 - 00:13
Title:Title » Header Title on pages messed up due to php code error.

#2

illogic-al - March 31, 2008 - 00:21
Status:active» needs review

OK, I decided to make a patch. Good thing too because i forgot to say where the error takes place. :-)
It's in the page.tpl.php file. Also the error only shows up when anonymous users view the page, or when users other than the one who created the page views it.

AttachmentSize
page.tpl_.patch 755 bytes

#3

fideaux - April 22, 2008 - 02:02

a big New Jersey THANK YOU to illogic-al.

#4

Kilton Hopkins - September 3, 2008 - 16:53

I second that.

A big Chicago thank-you for illogic-al. You saved me time and that is invaluable.

 
 

Drupal is a registered trademark of Dries Buytaert.