23472 Posts in 18941 Topics by 2878 members
|Go to End|
23 April 2011 at 11:48pm
I have an empty _config.php file in a widget folder. This seem to break the CMS and front end of the website. If I look at the source of the CMS everything seems fine, but when I look at how the code gets parsed by browers, it seems like it ends the head earlier than it should.
I've included a screenshot wich shows some weird margin bug at the top of the screen and the code as seen by the browser.
24 April 2011 at 12:37pm
You should perhaps put at least a <?php line inside that file.
The empty space will likely be occurring since you have white space after a ?> tag. This is why our coding conventions recommend against using ?> tags.
24 April 2011 at 1:05pm
Thanks for the reply!
Tha's what I usually do, but then it injects the <?php in the first line of every page.
/admin/Editform now starts with:etc...
$('Form_EditForm').loadActionsFromString('<input class=\"action delete\" id=\"Form_EditForm_action_unpublish\"
When I look at the source of the cms the doctype line now looks like:
<?php<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
It seems to treat the php code as regular text.
When I close the tag again and put <?php ?> in the _config.php file, it doesn't show up in the source, but I get the same error as above because of the whitespace between the tags.
Google Summer of Code Hacker
18 May 2011 at 9:11am
As a follow up: I ran into the same issue today.
If I put "<?php" into the _config.php file of a module, "<?php" is added at the very start of every page, right before the doctype. As soon as I add a newline to the configuration file, everything works as expected.
Not sure if this is a bug or the punishment for wrong usage, but it's definitely annoying and hard to debug...
19 May 2011 at 6:20am
I have the same thing..
I solve it with adding a // on the second line:
|Go to Top|