Code tags content loses newline characters

Support area for phpBB's mChat extension
User avatar
kasimi
mChat developer
Posts: 377
Joined: 06 Oct 2016, 09:56
Contact:

Re: Code tags content loses newline characters

#21

Post by kasimi » 01 Dec 2017, 11:15

Great. :+1:

It failed because, after applying the trim($content) fix, the markup returned from the server has whitespaces between the messages for which jQuery created text elements. When extracting the message ID from these unexpected text elements, it returned NaN which then got passed to all kinds of functions not expecting it. The fix makes Twig remove all whitespaces before sending the HTML to the browser.

The remaining mystery is why I don't need that fix in my local environment. :?


Have a look at Posts merging: https://www.phpbb.com/customise/db/exte ... tsmerging/

nou nou
Donor
Posts: 41
Joined: 10 Oct 2017, 19:38

Re: Code tags content loses newline characters

#22

Post by nou nou » 02 Dec 2017, 03:56

Sweet - I learned something today :)

Yes, that's a weird one. But since my case works, it may be safe to assume everyone else's does, too?

Which takes me to the next inevitable question - is it safe to install mChat 2.0.2 on a live board, now?

And thanks for the link!

Cheers :beer:

User avatar
kasimi
mChat developer
Posts: 377
Joined: 06 Oct 2016, 09:56
Contact:

Re: Code tags content loses newline characters

#23

Post by kasimi » 03 Dec 2017, 09:38

nou nou wrote:
02 Dec 2017, 03:56
is it safe to install mChat 2.0.2 on a live board, now?
It depends on what you mean by safe really. It's as safe as using the Rooms add-on, and, for that matter, any other donors-only extension which haven't gone through a validation phase, just as mChat 2.0.2 hasn't, yet. I'm sure we can find a solution for any bugs you may find. As long as you always have recent backups to fall back to, you're good. :+1:

nou nou
Donor
Posts: 41
Joined: 10 Oct 2017, 19:38

Re: Code tags content loses newline characters

#24

Post by nou nou » 03 Dec 2017, 18:55

I'm the king of backup - no worries there ;)

Sweet! :+1:

nou nou
Donor
Posts: 41
Joined: 10 Oct 2017, 19:38

Re: Code tags content loses newline characters

#25

Post by nou nou » 04 Dec 2017, 18:56

Ran into one issue. To do with a user who had the UCP option for putting mChat on the Index turned on. After the update, he couldn't click to get into the mChatrooms. He could see the room names, and he could post in the default mChat room, but not get into the extra rooms.

I've sorted it by overriding user preferences (I love that feature) in the ACP and get his mChat off the Index. The separate mChat page worked again as expected. Weirdly, turning that option to display mChat on the Index, on again, after the fix, works. It only happened once right after the transition to 2.0.2.

So unfortunately I can't reproduce the issue right now. Unless I rebuild the circumstances from before the update (which I can try to do).

All is well now, though :+1:

nou nou
Donor
Posts: 41
Joined: 10 Oct 2017, 19:38

Re: Code tags content loses newline characters

#26

Post by nou nou » 06 Dec 2017, 17:34

Sound doesn't work in 2.0.2 in the new Firefox. It does in Chrome. It also does on your forum here (though I don't know if that is 2.0.2)

I like your audio icon better than that checkbox in the official release, by the way (hint, hint... :))

nou nou
Donor
Posts: 41
Joined: 10 Oct 2017, 19:38

Re: Code tags content loses newline characters

#27

Post by nou nou » 06 Dec 2017, 18:39

Oh, odd. As soon as I started Chrome, tested the sound (which worked) and went back to FF, it worked in FF.

Odd odd, oddity odd.

User avatar
kasimi
mChat developer
Posts: 377
Joined: 06 Oct 2016, 09:56
Contact:

Re: Code tags content loses newline characters

#28

Post by kasimi » 06 Dec 2017, 20:49

I haven't experienced any of your problems. Both this and the demo board already use mChat 2.0.2. It could have been the user's browser cache that still used outdated assets until you switched the option off and on again.

Please open a new topic if you keep having issues, thanks. :+1:

terry2
Donor
Posts: 53
Joined: 22 Oct 2016, 18:22

Re: Code tags content loses newline characters

#29

Post by terry2 » 07 Dec 2017, 00:00

nou nou wrote:
06 Dec 2017, 17:34
Sound doesn't work in 2.0.2 in the new Firefox. It does in Chrome. It also does on your forum here (though I don't know if that is 2.0.2)

I like your audio icon better than that checkbox in the official release, by the way (hint, hint... :))
Like this ?
Selection_005.png
Selection_005.png (15.68 KiB) Viewed 39 times
Selection_005.png
Selection_005.png (15.68 KiB) Viewed 39 times
Selection_006.png
Selection_006.png (10.44 KiB) Viewed 37 times
Selection_006.png
Selection_006.png (10.44 KiB) Viewed 37 times

nou nou
Donor
Posts: 41
Joined: 10 Oct 2017, 19:38

Re: Code tags content loses newline characters

#30

Post by nou nou » 07 Dec 2017, 07:33

Yes please! :)

And sorry for hijacking the thread (even more now)...

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest