Page 1 of 1

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

Posted: Sun Aug 10, 2008 7:04 pm
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 :-(

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

Posted: Sun Aug 10, 2008 7:24 pm
by RonnyK
After using the TinyMCE wyiswyg, or without an editor...

Ronny

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

Posted: Sun Aug 10, 2008 7:25 pm
by jmansa
without...

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

Posted: Mon Aug 11, 2008 10:44 am
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...

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

Posted: Mon Aug 11, 2008 11:48 am
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

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

Posted: Mon Aug 11, 2008 1:58 pm
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?

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

Posted: Mon Aug 11, 2008 4:24 pm
by alby
jmansa wrote:
magic_quotes_gpc On On
Try to disable

Alby

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

Posted: Mon Aug 11, 2008 6:25 pm
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 :-)

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

Posted: Fri Sep 26, 2008 5:25 am
by RonnyK
The '\' in the login-template is fixed in SVN... You can remove them from the login-template as well.

Ronny