Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: SDMiller - maaliskuu 25, 2014, 11:27:15 IP

Otsikko: Minor change to language .php crumps server. Help!
Kirjoitti: SDMiller - maaliskuu 25, 2014, 11:27:15 IP
Specifically in QuickSpoiler Mod's english.php, so really is a general .php alteration question... not mod specific per se:

In QuickSpoiler.english.php

I tried to switch
$txt['qs_no_spoiler_sorry'] = 'Sorry you are not allowed to view spoiler contents.';

to

$txt['qs_no_spoiler_sorry'] = 'Only registered users are allowed to view spoiler contents.';

But doing this crashes the server, and causes this error page to display in its place:

LainaaTemplate Pares Error!
It seems something has gone sour on the forum with the template system. This problem should be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Hmm... why would such a small text change in the QuickSpoiler.english.php crunch the whole server?

Fortunately, it was quickly fixed by simply uploading the original QuickSpoiler.english.php back up to the server.

Thinking maybe it was a coincidence, I changed it again, and unfortunately it consistently and reproducibly crunches the server.

What am I doing wrong? Why can't I make a minor change to a .php?

Thanks.

:D

P.S. I've upgraded my server to UTF8... so technically now I'll be trying to make a change to the english-utf8.php... same question really.
Otsikko: Re: Minor change to language .php crumps server. Help!
Kirjoitti: andershz - maaliskuu 26, 2014, 03:18:50 AP
$txt['qs_no_spoiler_sorry'] = 'Only registered users are allowed to view spoiler contents.';
If the line really looked like this, then most likely that's your problem.
The quote characters are not matching.
The string starts with ' but ends with '
Compare
'qs_no_spoiler_sorry'
to
'Only registered users are allowed to view spoiler contents.'
Otsikko: Re: Minor change to language .php crumps server. Help!
Kirjoitti: SDMiller - maaliskuu 26, 2014, 11:11:11 IP
GAH! Those $!#%^& smart quotes... get me all the time!

Thanks.