Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
19 Dec 2011 at 19:56 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
josevitalsoutocode-cleanup-php-blocks.diff queued for re-testing.
Comment #2
pfrenssenLooks good.
Comment #3
tr commentedPorted the patch to D8, since these things need to be fixed in D8 first. I also re-uploaded the patch from the original post with a name change so the D8 testbot will ignore it. D7 patch was already successfully tested by the bot and reviewed in #2.
D7 patch affected Seven and Garland. Garland is out of D8, so D8 patch only touches Seven.
In case anyone's curious, these empty PHP blocks were left over when TGGM stripped out the CVS $Id$ keywords back in February. The top of these template files used to look like:
Which was turned into the following after the migration:
Comment #4
pfrenssenLooks good too.
Comment #5
catch@TR, thanks for explaining how these got in there, glad it's not the fault of a human for a change.
Committed/pushed to 8.x, the 7.x patch looks good to me as well.
Comment #6
jbrown commentedThis is not right. Seven's tpl.php files need to have proper php docblocks at the top like every other tpl.php in core.
http://drupal.org/node/1354#files
Comment #7
David_Rothstein commentedHistorically, I think core themes actually did not put docblocks in their tpl.php files (leaving that to the default tpl.php files to do, since it would mostly be duplicated documentation).
But when Bartik was added to core, it went in with the docblocks. And since then, Garland (which did not have them) has been removed. So now, it's basically Bartik vs. Seven, each of which is following different standards...
That said, maybe it's time to change the standard? There's some value in having the documentation right there in the file. Plus, because of preprocess functions and the like, the theme itself can in theory have different variables available than the default tpl.php implementation does.
Comment #8
tr commentedRe: #6
That may be true, but docblocks have absolutely nothing to do with this issue. Please open another issue if you want to address that.
Resetting issue status/title/version/component to where it was in #5.
Right now we have a patch that's been committed to D8, and a D7 version of the patch that's been marked RBTC but not yet committed.
Comment #9
jbrown commentedDocblocks need the php delimiters, but I guess it doesn't matter if they get removed now. They can be put back when / if someone writes the docblocks.
The D7 patch needs resubmitted to trigger the test bot.
Comment #10
tr commentedThe D7 patch by @vitalsouto in the original post was already successfully tested by the bot (http://qa.drupal.org/pifr/test/205043) and reviewed in #2 and #5, as well as by me in #3.
Nothing has changed since then.
Comment #11
webchickThe patch looks right to me. Committed and pushed to 7.x. Thanks!
Comment #12.0
(not verified) commentedexplanation