Ouch! Parse error after customizing

Ouch! Parse error after customizing

by John Gone -
Number of replies: 3
Hello Everyone,
I just had to customize my login message and now I receive this message in place of the login instructions:


Parse error: parse error, unexpected T_NEW in d:\inetpub\sites\www.mysite.com\web\moodle\lib\moodlelib.php(947) : eval()'d code on line 3


If anyone knows about this I could sure use a hint about how to repair.


Thanks,
John
Average of ratings: -
In reply to John Gone

Re: Ouch! Parse error after customizing

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You've got a quote or some other funny character in the string you altered. The web-based language editor should catch all these ... did you edit the language files directly?
In reply to Martin Dougiamas

Re: Ouch! Parse error after customizing

by John Gone -
Hello Martin,
I used the language editor only to make several changes, successfully. It was very easy to customize the login page. Found the offending entry: DOUBLE QUOTATATION marks!
I forgot that double quotatations aren't allowed. Gotta read some more of that PHP book.
Problem solved and now I have a shiny new customized login page.
Your remark> The web-based language editor should catch all these...
indicates a mechanism exists to avoid this, I didn't get a reminder of a possible error. Thanks again, John
In reply to John Gone

Re: Ouch! Parse error after customizing

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi,

Usually, a double quote (") gets converted to an escaped version (\\\") when the file is being saved by the web-based language editor. You never see it in the web interface though. At least that's how it is supposed to work! smile