Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Clicking on the "Select Default Widgets" link results in a Whitescreen with the following error message:
Parse error: parse error in C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\dashboard\templates\dashboard-select-defaults.tpl.php on line 33
Comments
Comment #1
dddave CreditAttribution: dddave commentedThis issue is still standing after creating a clean install.
Comment #2
ChrisMiller627 CreditAttribution: ChrisMiller627 commentedComment #3
ChrisMiller627 CreditAttribution: ChrisMiller627 commentedwhat version of drupal are you using?
edit: looks like some form of acquia drupal. I just did a local install of it and couldn't replicate this error. Please provide more information about your installation.
Comment #4
ChrisMiller627 CreditAttribution: ChrisMiller627 commentedComment #5
dddave CreditAttribution: dddave commentedD6.17
php 5.2.9-1
MySQL 5.1.34
It is a multisite install and it happens on each of my three test installs.
What more do you need?
Comment #6
ChrisMiller627 CreditAttribution: ChrisMiller627 commentedI need to know why this isn't working for you. :)
Did you try doing a base install of just drupal, dashboard + dependent modules? trying to narrow down the problem.
Comment #7
codekarate CreditAttribution: codekarate commentedI am getting this same error after a complete uninstall and dev re-install with Drupal 6.17, php 5.3.2-1, mysql 5.1.41.
i have tried this with Garland and Blue Marine.
Comment #8
reaneyk CreditAttribution: reaneyk commentedOops, I created a duplicate for this one: #889242: PHP short tag in dashboard-select-defaults.tpl.php . This has to do with the PHP short tag in the code. On line 30 switch the <? endforeach; ?> to
endforeach;
Comment #9
codekarate CreditAttribution: codekarate commentedAs a follow up I get this error when working on a website with Drupal 6.19, php 5.3, mysql 5.1, and nginx web server. However, this error does not appear (and everything works correctly) using Drupal 6.19, php 5.2, mysql 5.1, and apache web server. I have not determined the exact root cause but I am looking into it.
Comment #10
codekarate CreditAttribution: codekarate commentedI can also confirm that the fix in #8 above works.
Comment #11
nikosnikos CreditAttribution: nikosnikos commentedFix in #8 solved the problem for me too.
Thanks.
Comment #12
vensires CreditAttribution: vensires commentedFix in #8 solved the problem
Comment #13
dddave CreditAttribution: dddave commentedCorrecting status.
This issue is active until code is committed or a patch attached which can be reviewed. Closing the issue doesn't help.
Comment #14
igorik CreditAttribution: igorik commentedis there any maintainer of this module? if solution #8 works, it could be commited.
Comment #15
vensires CreditAttribution: vensires commentedI don't know anything about the maintainer but the solution in #8 works like a charm.
Comment #16
Eranga CreditAttribution: Eranga commentedThankz reaneyk. It fixed this issue.. But we can do the following change to fix all this kind of issues. Some people use Short Open tags for cording.. So we can't always find where the short open tags are and make it correct as above. We can simple do the following change.. It will fix this whatever the open tags are....
1. Go to C:\xampp\php
2.Open the php.ini file
3.Find for short_open_tag
4.If it is like -> short_open_tag = Off
Change it to -> short_open_tag = On
5.Restart apache.
hope this will help you guys...
Comment #17
vensires CreditAttribution: vensires commentedYou are right this is a solution, but definitely not the best one out there. I paste here part of the php.ini file.
This directive determines whether or not PHP will recognize code between <? and ?> tags as PHP source which should be processed as such. It's been recommended for several years that you not use the short tag "short cut" and instead to use the full <?php and ?> tag combination. With the wide spread use of XML and use of these tags by other languages, the server can become easily confused and end up parsing the wrong code in the wrong context. But because this short cut has been a feature for such a long time, it's currently still supported for backwards compatibility, but we recommend you don't use them.
Default Value: On
Development Value: Off
Production Value: Off
http://php.net/short-open-tag
So yes, short_open_tag could have the On value, but this isn't something that drupal developers (and php developers in general) should do. Writing
<?=$foo?>
is smaller and maybe simpler than<?php echo $foo; ?>
but! Check here for more information.Comment #18
ebeyrent CreditAttribution: ebeyrent commentedYou shouldn't need to mess with your php.ini file. Comment #8 is the solution, and the maintainer of this module should fix the code. It's clearly a mistake.
Comment #19
plopesc