Page 1 of 1

[Solved] EOS - Restore Backup not working? (also: emoji issues)

Posted: Mon Jul 06, 2020 10:56 pm
by MisterFlames
On sunday, EOS turned 99% of the emojis in my tease into "?".

Luckily, I have many backups. But whenever I try to recover a backup, it doesn't change anything.

To double check if it's an emoji-exclusive issue, I have tried to change a bit of text on my start page in the .json. The change is not showing after restoring from that file.

Edit:
Tried to apply the backup on a fresh tease. And nothing happens.

Re: EOS - Restore Backup not working? (also: emoji issues)

Posted: Thu Jul 09, 2020 3:10 am
by seraph0x
Sorry about that. :-/

The emoji issue makes sense and I'll make sure it's fixed before making another attempt at launching the new backend.

Regarding the backup issue: Could you send me a link to the backup via direct message? When I try to backup and restore a tease, it seems to work fine, so there is likely something in the tease that is triggering an issue. So to reproduce the problem, I'm probably going to need that backup.

Re: EOS - Restore Backup not working? (also: emoji issues)

Posted: Thu Jul 09, 2020 3:32 am
by MisterFlames
Thanks. Sending you a message right away. :-)

Re: EOS - Restore Backup not working? (also: emoji issues)

Posted: Fri Jul 10, 2020 3:17 am
by MisterFlames
In case anyone is wondering. Did some testing.

While the editor and Save Backup function works fine with it, the Backup Restore system has issues with Unicode 6.0 (2010) and higher. Everything I have tested up to 5.1 (2008) seems to work and gets restored without issues. Not sure about Unicode 5.2.

Would be lovely to get support for a newer Unicode version since we are missing out on stuff like the all-mighty 🍆. But I think that I can get my tease to work again soon. (without having to manually replace 154 insances of 😈 and 💰 inside of the editor which would probably take me a whole day)

Re: EOS - Restore Backup not working? (also: emoji issues)

Posted: Sat Jul 11, 2020 3:40 pm
by seraph0x
Alright, I tracked down the emoji issue and fixed it. I want to give you all a breakdown of what happened. Non-technical folks should skip to the "What it means" section.

Technical breakdown:

Eos is built on top of Milovana's aging PHP codebase (which we'll call the "legacy backend") that is a pain to debug and maintain, so I've been working on a new Node.js based backend, codenamed "Winta".

On Sunday, I briefly rolled out Winta as a backend for Eos Editor only but due to bugs I later rolled it back. As it turns out, the legacy backend saves Unicode characters by escaping them in the JSON. This looks something like this:

Code: Select all

\"label\":\"<p>Saved using old backend<\\/p><p><\\/p><p>\\ud83d\\ude00 \\ud83d\\ude03 \\ud83d\\ude04<\\/p>\"
However, Winta saves it as proper unescaped Unicode. This works fine, except when I rolled back to the legacy backend, it wasn't ready to handle the unescaped Unicode characters, so if you made any changes during that time it just converted those characters to question marks.

I've now fixed the legacy backend, so it can also handle unescaped Unicode characters.

What it means for authors:

Anyone who didn't access the editor on Sunday should be fine.

Anyone who did access the editor on Sunday but didn't make any changes should be fine.

Anyone who did access the editor on Sunday and made changes but didn't make changes since then should be fine.

Anyone who did access the editor on Sunday, made changes, and accessed it again since and made changes again will have certain Unicode characters in their tease converted to question marks.

If you're in that last category, hopefully you have a backup - otherwise, there isn't anything I can do. :-/

MisterFlames: You should now be able to import your backup. If not, please let me know.

Re: EOS - Restore Backup not working? (also: emoji issues)

Posted: Sat Jul 11, 2020 8:53 pm
by MisterFlames
Thanks for your breakdown and the fix.
seraph0x wrote: Sat Jul 11, 2020 3:40 pm MisterFlames: You should now be able to import your backup. If not, please let me know.
It seems to work now. :-D