[SOLVED] Adds a "\" when saving templates?!?!

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

[SOLVED] Adds a "\" when saving templates?!?!

Post by jmansa »

I have just installed version 1.4 and it looks great, but... I'm having trouble when trying to alter and save templates for different modules???

I was trying to alter the frontend login template, but when I hit save it inserts "\" into my template, and I get an smarty error at my frontend.

This is how my frontend login template should look like:

Code: Select all

<!-- Login form template -->
 <font size="-2"/>
 {$startform}
 {if $error}
  {$error}<br>
 {/if}
  <p>{$prompt_username} {$input_username} {$prompt_password} 
  {$input_password}<br/>
 {if isset($captcha)}
  {$captcha_title}: {$input_captcha}<br/>
  {$captcha}<br/>
 {/if}
  {if isset($input_rememberme)}
    {$input_rememberme} {$prompt_rememberme}<br/>
  {/if}
  <input type="submit" name="{$feuactionid}submit" value="{$mod->Lang('login')}"><br/>
  <a href="{$url_forgot}" title="{$mod->Lang('info_forgotpw')}">{$mod->Lang('forgotpw')}</a><br/>
  <a href="{$url_lostun}" title="{$mod->Lang('info_lostun')}">{$mod->Lang('lostusername')}</a></p>
{$endform}
  </font>
<!-- Login form template -->
But after save it looks like this:

Code: Select all

<!-- Login form template -->
 <font size=\"-2\"/>
 {$startform}
 {if $error}
  {$error}<br>
 {/if}
  <p>{$prompt_username} {$input_username} {$prompt_password} 
  {$input_password}<br/>
 {if isset($captcha)}
  {$captcha_title}: {$input_captcha}<br/>
  {$captcha}<br/>
 {/if}
  {if isset($input_rememberme)}
    {$input_rememberme} {$prompt_rememberme}<br/>
  {/if}
  <input type=\"submit\" name=\"{$feuactionid}submit\" value=\"{$mod->Lang(\'login\')}\"><br/>
  <a href=\"{$url_forgot}\" title=\"{$mod->Lang(\'info_forgotpw\')}\">{$mod->Lang(\'forgotpw\')}</a><br/>
  <a href=\"{$url_lostun}\" title=\"{$mod->Lang(\'info_lostun\')}\">{$mod->Lang(\'lostusername\')}</a></p>
{$endform}
  </font>
<!-- Login form template -->
At first I thought it was the module which was the problem, but it does the same in all my modules when trying to alter the templates...

Can anybody help... It's tearing me apart :-(
Last edited by jmansa on Mon Aug 11, 2008 6:26 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Adds a "\" when saving templates?!?!

Post by RonnyK »

After using the TinyMCE wyiswyg, or without an editor...

Ronny
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Adds a "\" when saving templates?!?!

Post by jmansa »

without...
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Adds a "\" when saving templates?!?!

Post by jmansa »

Any idea on this... It's a bit anoying. I have uninstalled TimyMCE just in case, but still the same problem... I have with CMSMS all the from 1.1 but have never seen this error before... Is it something in the 1.4? Please help...
alby

Re: Adds a "\" when saving templates?!?!

Post by alby »

jmansa wrote: Any idea on this... It's a bit anoying. I have uninstalled TimyMCE just in case, but still the same problem... I have with CMSMS all the from 1.1 but have never seen this error before... Is it something in the 1.4? Please help...
Check in admin dir with phpinfo() if you have magic_quote enable

Alby
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Adds a "\" when saving templates?!?!

Post by jmansa »

After phpinfo() I have these setting:
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off


What to do?
alby

Re: Adds a "\" when saving templates?!?!

Post by alby »

jmansa wrote:
magic_quotes_gpc On On
Try to disable

Alby
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Adds a "\" when saving templates?!?!

Post by jmansa »

Thank Alby, that did the job. I wasnt able though to go into the phpini file but I solved it within the .htaccess file like this:
php_flag magic_quotes_gpc off
Nice to work again :-)
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: [SOLVED] Adds a "\" when saving templates?!?!

Post by RonnyK »

The '\' in the login-template is fixed in SVN... You can remove them from the login-template as well.

Ronny
Post Reply

Return to “CMSMS Core”