Skip to main content
Topic: Preview in PM (Read 4427 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Preview in PM

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

Quote from: Ruth – 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.
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?!?
Thorsten "TE" Eurich
------------------------

Re: Preview in PM

Reply #2

Quote from: TE – Also: 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

Quote from: Ruth – Yes...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)..
Thorsten "TE" Eurich
------------------------

Re: Preview in PM

Reply #4

 emanuele whistles innocently
Bugs creator.
Features destroyer.
Template killer.


Re: Preview in PM

Reply #6

Quote from: TE – 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.
Last Edit: April 18, 2016, 08:11:19 am by Ruth

Re: Preview in PM

Reply #7

Bug can happen if you click preview more than once..

for reference: öäüß
result after preview: öäüß
Thorsten "TE" Eurich
------------------------

Re: Preview in PM öäüß

Reply #8

Looks like the strings (body and subject) are not properly encoded before being sent to the server before the preview.
Bugs creator.
Features destroyer.
Template killer.

Re: Preview in PM

Reply #9

Quote from: Ruth –
 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.
Bugs creator.
Features destroyer.
Template killer.

Re: Preview in PM

Reply #10

I fixed the preview in fcf89327935fb0031e291b6c20e8585bf0cdf81a

The 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?
Bugs creator.
Features destroyer.
Template killer.

Re: Preview in PM

Reply #11

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

No, this is not the time for a xml => json overhaul!! Not at all! :o

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:
42cd7e6308e60bd2178191c1501ea0824fa9e13f
d0233a94b95d08b3d25d58f01647a57e412702ba
3f10aed5c6f924df25d29c61580c46657e3d2063
that would be the same, just in the ajax call for previews.
Bugs creator.
Features destroyer.
Template killer.

Re: Preview in PM

Reply #13

Well I least I said it may be breaking :P

That update to add encodeURIComponent should have taken care of everything .. hummm
Last Edit: April 19, 2016, 06:13:44 pm by Spuds

Re: Preview in PM

Reply #14

I guess we can put it live here and see if it breaks anything. O:-)

Done, hard-refresh is mandatory, though I changed the CACHE_STALE to try force it.

ETA: looks good for the moment. :D
Last Edit: April 19, 2016, 06:22:06 pm by emanuele
Bugs creator.
Features destroyer.
Template killer.