I'm using CMS Made Simple 1.2.3. Today I was trying the little module Sendeplan, that I downloaded in tgz format. The installation was easy and all seemed right, apart from some typos in the provided template and translations. As the module provides only English and German versions, I decided to write the Spanish translation. But after uploading the file es_ES.php to my server things went wrong: all module options disappeared from the menus, and when I tried to login in again the whole admin panel was not accessible: a blank page (no HTML received!) was all I got.
At first I thought the reason was file permissions in the server, because I had chmod'ed the modules directory to 777 before uploading and installing the module. After several chmod's and tests I realized file permissions had nothing to do with the problem. The last chance to get a clue was to take a look at the server error log. I downloaded the 500 MB error log file from the control panel of my hosting. It was easy to find out the problem. There were many errors like this one (with different referer pages):
PHP Parse error: syntax error, unexpected T_ARRAY in /var/www/vhosts/MY_DOMAIN/httpdocs/MY_CMSMS_SITE/modules/Sendeplan/lang/ext/es_ES.php on line 75, referer: http://MY_DOMAIN/MY_CMSMS_SITE/admin/login.php
Line 75 was the last line of the file es_ES.php, the line with the final "?>", so it was clear that something was wrong with the PHP syntax.
But nothing seemed wrong: no misplaced quote, no missing semicolon... After isolating parts of the code with block comments, and uploading the file to see the effect, I find out the problem: there was one line longer than 255 characters in the multi line content of the item $lang['help']:
Code: Select all
$lang['help'] = '
<h3>Bla bla bla</h3>
<p>
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
blabla bla bla bla blalabla bla bla <<< more than 255 chars in this line>>> bla bla blabla bla bla bla bla bla
bla bla bla bla bla bla
</p>';
Does CMSMS something to do with that or is it a PHP problem or limitation while assigning multiline strings?
Anyway, It's quite frustating that a such a silly mistake can make it impossible to login in, without a single warning. A bug or not a bug, I hope this report will be useful to people trapped in the same situation.
(By the way, the translation is ready. I will propose it to the module author, with a corrected version of the English one too.)
Cheers
Marcos