Elxis CMS Forum

Support => General => Topic started by: Superman859 on May 21, 2007, 18:32:10

Title: Editing HTML Template Files (Actually PHP)
Post by: Superman859 on May 21, 2007, 18:32:10
Moderator: Please move to Technical Support as I feel that may be a better place for this question.  I cannot delete my own posts unfortunately.

I've come across a problem, although I'm not sure if there is an easy solution.

When you view the templates, you can easily edit the HTML or CSS for that template, right? Wrong.  It seems as if errors occur if you edit PHP template files using the edit HTML section.  Since all templates are designed in PHP, this is a problem.

What happens is you edit it, everything looks ok, and click save.  You change the default template, and suddenly the site is not working.  There are T_STRING errors all over the place.

The cause is this:  When you save, it automatically changes single quotes to double quotes for some reason.  I'm not sure if this has to do with magic_quotes being on (as recommended) or not.  Once all the quotes are double quotes, the php code begins to have errors.  Where you have <?php echo "<a href="#">" You've suddenly run across overlapping and errors.  It should be <?php echo '<a href="#">' or vice versa.

So in the end, you cannot use the Edit HTML feature for templates as far as I know, because you are actually editing PHP files and problems arise.  If this has to do with magic_quotes being on, then you could turn them off.  However, if Elxis is not configured to handle quoting situations on it's own (my guess since they recommend turning magic_quotes on) then that is not secure and can have problems all on it's own.

Is there a solution?
Title: Re: Editing HTML Template Files (Actually PHP)
Post by: Ivan Trebješanin on May 21, 2007, 19:44:56
I have been using "Edit HTML" option quite a lot, and never had such problem you described. It is very certain that, as usual, hosting server is not configured well.
Title: Re: Editing HTML Template Files (Actually PHP)
Post by: Superman859 on May 22, 2007, 07:34:50
Do you have magic quotes on? 

From what I know, the server should be set up properly.  I can't think of anything that would be causing this outside of the Elxis interface.
Title: Re: Editing HTML Template Files (Actually PHP)
Post by: Ivan Trebješanin on May 22, 2007, 12:52:49
magic_quotes_gpc   On