• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: "Apply" converts page to UTF-8, despite settings
PostPosted: Wed Mar 19, 2008 11:33 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Mar 19, 2008 12:45 pm
Posts: 10
Hi

Problem I found - if I use ISO-8859-2 encoding (probably any encoding other than UTF-8), clicking "Apply" button when editing page will result in UTF-8 encoded page. Clicking "Submit" button fixes page, bringing ISO-8859-2 encoding back.

I'm pretty sure it's xajax issue. From xajax encoding tutorial (http://xajaxproject.org/wiki/Tutorials: ... _and_xajax):
Quote:
Regardless of the encoding you have set, the data will arrive from your javascript encoded in UTF-8. Use the $xajax->decodeUTF8InputOn() method to enable automatic decoding from UTF-8 to the character encoding you have set.


I tried using decodeUTF8InputOn(), but somehow, it doesn't help.
I tried using it just after xajax object creation in admin/editcontent.php and by setting $this->bDecodeUTF8Input = true; in xajax function declaration in /lib/xajax/xajax.inc.php.

To make things more interesting, editing news works like a charm even without decodeUTF8InputOn(), which looks really strange. (ignore this, I was too tired, news doesn't use (x)ajax). Anyway, I'm not goint to dig any deeper, because ISO-8859-2 breaks other things as well, e.g. version for printing, so it's more complicated issue.


Last edited by pozmu on Fri Mar 21, 2008 12:17 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: "Apply" converts page to UTF-8, despite settings
PostPosted: Fri Mar 21, 2008 5:52 pm 
Offline
Support Guru
Support Guru

Joined: Mon Jul 24, 2006 3:27 pm
Posts: 3693
Location: Paris
Hello pozmu,

if it is an xajax issue don't worry : xajax seems to be removed in 2.0.
See http://blog.cmsmadesimple.org/2008/02/1 ... ong-again/

You have a workaround for 1.2.x but if you want to report the bug, please do it in the forge : the devteam can't track bugs in the forum (too easy to miss a valuable post as yours).

Pierre M.

_________________
-- Pierre, support team member. comodérateur du forum francophone.
Please read "how to submit installation/support requests" before posting. Don't send private messages to ask for support.
Want to contribute to CMSms ? Improve the wiki with your forum account.


Top
 Profile  
 
 Post subject: Re: "Apply" converts page to UTF-8, despite settings
PostPosted: Fri Mar 21, 2008 7:08 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Mar 19, 2008 12:45 pm
Posts: 10
Pierre M. wrote:
Hello pozmu,

if it is an xajax issue don't worry : xajax seems to be removed in 2.0.
See http://blog.cmsmadesimple.org/2008/02/1 ... ong-again/

You have a workaround for 1.2.x but if you want to report the bug, please do it in the forge : the devteam can't track bugs in the forum (too easy to miss a valuable post as yours).

Pierre M.

Well, it's not directly xajax issue, it's something between xajax and CMS Made Simple.

I don't understand what are you talking about workaround?

And yes, I was going to post is as a bug, I was just waiting for activation e-mail.


Top
 Profile  
 
 Post subject: Re: "Apply" converts page to UTF-8, despite settings
PostPosted: Fri Mar 21, 2008 10:00 pm 
Offline
Support Guru
Support Guru

Joined: Mon Jul 24, 2006 3:27 pm
Posts: 3693
Location: Paris
pozmu wrote:
Clicking "Submit" button fixes page, bringing ISO-8859-2 encoding back.


This is what I call "workaround".

Thank you for filing the bug in the forge.

Pierre M.

_________________
-- Pierre, support team member. comodérateur du forum francophone.
Please read "how to submit installation/support requests" before posting. Don't send private messages to ask for support.
Want to contribute to CMSms ? Improve the wiki with your forum account.


Top
 Profile  
 
 Post subject: Re: "Apply" converts page to UTF-8, despite settings
PostPosted: Fri Apr 04, 2008 2:55 pm 
Offline
New Member

Joined: Wed Jan 23, 2008 4:38 pm
Posts: 3
I just recently have experienced something similar with the "Apply" button. I made edits to a template and used the "Apply" button instead of the "Submit" button and now my site doe not even show up. I get a completely blank browser when I visit the URL. Does anyone else have this problem or something similar. Do I need to provide the actual link or more information to get some input?

thanks


Top
 Profile  
 
 Post subject: Re: "Apply" converts page to UTF-8, despite settings
PostPosted: Mon Feb 08, 2010 9:37 am 
Offline
New Member

Joined: Mon Feb 08, 2010 9:27 am
Posts: 1
The bug is still exists in 1.6.6. Here is the solution:

After deep analysis, I found the problem is related with javascript/Ajax in editcontent.php, deletetemplate.php:

Code:
window.Edit_Template_Apply = function(button)
{
   $addlScriptSubmit
   $('Edit_Template_Result').innerHTML = '';
   button.disabled = 'disabled';

   var data = new Array();
...


I just change the code to:

Code:
window.Edit_Template_Apply = function(button)
{
        return true;
   $addlScriptSubmit
   $('Edit_Template_Result').innerHTML = '';
   button.disabled = 'disabled';

   var data = new Array();
...


My solution is skip javascript/Ajax, just use normal Submit routine. I believe to use Ajax.Request, some "encoding" settings must be set before send parameters.


Last edited by acamar on Mon Feb 08, 2010 3:46 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: "Apply" converts page to UTF-8, despite settings
PostPosted: Mon Feb 15, 2010 3:02 pm 
Offline
New Member

Joined: Mon Feb 15, 2010 2:53 pm
Posts: 1
Hi acamar,

I had the same trouble with my content and your solution made it. But I could not figure it out what to do with my template. I searched the "window.xxx_xxx_Apply = function(button)" functions to add "return true;" but still when I submit my template, the problem stays there. Do you have any suggestion?

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner