Preview in PM April 18, 2016, 05:22:21 am Not sure, if there is something wrong:I was sending a PM by using the preview a few times, and as I believe each of the previews was sent as a PM. I could not send the final PM, because the limit of 4 PMs per hour was reached.
Re: Preview in PM Reply #1 – April 18, 2016, 05:25:28 am Quote from: Ruth – April 18, 2016, 05:22:21 amI was sending a PM by using the preview a few times, and as I believe each of the previews was sent as a PM. I could not send the final PM, because the limit of 4 PMs per hour was reached.yep, I was the one who got those PMs.. definitely a bug.. Also: german umlauts are cluttered, not sure if you copied your text from another software to ElkArte?!?
Re: Preview in PM Reply #2 – April 18, 2016, 05:31:33 am Quote from: TE – April 18, 2016, 05:25:28 amAlso: german umlauts are cluttered, not sure if you copied your text from another software to ElkArte?!?Yes...there were some quotes from my "broken" SMF-Forum in the PM, TE. Sorry. (Die Umlaute sind da doch teilweise kaputt, die fehlerhafte Anzeige kann auch daher kommen)
Re: Preview in PM Reply #3 – April 18, 2016, 05:35:20 am Quote from: Ruth – April 18, 2016, 05:31:33 amYes...there where some quotes from my "broken" SMF-Forum in the PM, TE. Sorry. (Die Umlaute sind da doch teilweise kaputt, die fehlerhafte Anzeige kann auch daher kommen)No problem, just wanted to make sure this is not another ElkArte related bug.. those broken characters are ISO-8859-1 coded umlauts (and repairable)..
Re: Preview in PM Reply #5 – April 18, 2016, 05:56:02 am Ruth would like to send more than 4 PMs a hour TE, maybe we can talk about the further things about the migration here? http://support.ElkArte-hilfe.de/index.php/topic,167.0.html
Re: Preview in PM Reply #6 – April 18, 2016, 07:55:03 am Quote from: TE – April 18, 2016, 05:35:20 am just wanted to make sure this is not another ElkArte related bug.@TE I did not copy the begin of my PM, just the quotes. So I think, that ä, ö, ü and ß will get broken in PM, if you use the preview first.Edit: And if I use the preview in a reply in a topic I will see them broken too:QuoteSo I think, that ä, ö, ü and à will get broken in PM, if you use the preview first.2. Edit:My account-settings say, that my favorite language is english it has been german before. So maybe the umlaut-mistake is just because all profile settings are now in default?I cannot change my profile, I have forgotten my password.
Re: Preview in PM Reply #7 – April 18, 2016, 09:06:15 am Bug can happen if you click preview more than once..for reference: öäüßresult after preview: öäüÃ
Re: Preview in PM öäüß Reply #8 – April 18, 2016, 11:07:59 am Looks like the strings (body and subject) are not properly encoded before being sent to the server before the preview.
Re: Preview in PM Reply #9 – April 18, 2016, 11:26:47 am Quote from: Ruth – April 18, 2016, 05:56:02 am Ruth would like to send more than 4 PMs a hour I didn't know it was set... But in the meantime I caught a problem with the site, apparently it won't let me change settings in the admin panel, even though locally works fine.There are few other settings to tweak, but at the moment I can't.
Re: Preview in PM Reply #10 – April 19, 2016, 04:47:08 pm I fixed the preview in fcf89327935fb0031e291b6c20e8585bf0cdf81aThe problem with the special characters seems to be the result of the "usual" mixed status the AJAX calls are all around the code.In these AJAX calls (PM previews and posts previews, plus few other places), the texts are converted to 8bit strings before being sent to the server. In 1.0, that string was somehow processed and returned properly to the client, now it is not and the characters result broken.If I understand correctly the problem, I would be tempted to drop entirely the usage of php_to8bit from the codebase, but TBH it's something I'm a little worried about...What do you think? Scrap during beta and if something is broken let's find a solution, or let's find a solution to the preview before facing the "real" issue?
Re: Preview in PM Reply #11 – April 19, 2016, 04:54:08 pm Would you have to update all the xml to json ? I don't know if xml is going to handle all of utf8 stuff so I thought that was why the utf8_encode (on the js side via php_to8bit was done).Anyway for a 1.1 I don't think we should be redoing that, IMO All of that was fine in 1.0 ... I do remember having to update things for some of the 4 byte utf8 items.
Re: Preview in PM Reply #12 – April 19, 2016, 05:49:45 pm No, this is not the time for a xml => json overhaul!! Not at all! From what I read online (e.g. [here] or here), XML has complete support for UTF8.But, looking at the repo, I see you have removed several php_to8bit:42cd7e6308e60bd2178191c1501ea0824fa9e13fd0233a94b95d08b3d25d58f01647a57e412702ba3f10aed5c6f924df25d29c61580c46657e3d2063that would be the same, just in the ajax call for previews.
Re: Preview in PM Reply #13 – April 19, 2016, 06:04:00 pm Well I least I said it may be breaking That update to add encodeURIComponent should have taken care of everything .. hummm
Re: Preview in PM Reply #14 – April 19, 2016, 06:16:49 pm I guess we can put it live here and see if it breaks anything. Done, hard-refresh is mandatory, though I changed the CACHE_STALE to try force it.ETA: looks good for the moment.