Wedge
Public area => The Pub => Bug reports => Topic started by: Nao on May 3rd, 2012, 10:11 AM
-
Was looking into a draft bug (no biggie, presentational issue, I fixed it), and noticed two things in my drafts area.
First of all -- well, I still have recent (yesterday etc) drafts that should have been deleted after I submitted the final post... They're still there. Perhaps it's on my side though -- I have two posts from yesterday, then a post from April 30, then April 27 onwards was due to the earlier bug IIRC.
Secondly, my bug report for the cache key length had this code:
aeva-embed-link-[url=http://www.youtube.com/watch?v=OgCjpA03mOI#ws]B+ Episode 5 - باسم يوسف شو (مع تامر من غمرة) الحلقة ٥[/url]
However, in the draft area, it has this instead:
log_online-updateaeva-embed-link-[url=http://www.youtube.com/watch?v=OgCjpA03mOI#ws]B+ Episode 5 - باسم يوسف شو (مع تامر من غمرة) الحلقة ٥[/url]
I don't know if it's a bug in the draft saving code, or if it's due to my changing the location of weSaveEntities(). (But because it's in editor-func.js, it should be loaded on all topic pages as well...)
It's probably due to drafts not going through weSaveEntities() before saving the post, I guess. Or maybe I'm mistaken...
-
Does it do it if you save the draft manually? Maybe it doesn't call weSaveEntities at all, I can't remember.
-
I don't even know if it can... I mean, doesn't WSE actually modify the textarea to transform entities? In which case you don't wanna do it while you're typing...
(Unless we just rewrite it to do it differently.)
-
It's done onsubmit normally, so it's not like we couldn't pull the content into a variable, modify that in-place and then submit that content via the draft saving mechanism.
But there's also that debate over whether we actually want entities to be converted or not (as we mentioned elsewhere recently)
-
Bumping two bugs with one stone :P
- Entities: reminder, need to fix the fact that Wedge seems to turn & nbsp; into an actual space at post save time.
- Drafts: I thought this was fixed LONG ago, but I just went into my draft section (which I don't visit often, but I was trying to get my earlier bug report which I'd deleted but Safari kindly prevented me from Ctrl-Z'ing it back into life...) (and yes, the draft area didn't have it either...), and it had about 20 messages, most of which were either empty (I thought we didn't save empty drafts...?!), or with the exact same contents as an existing post (such as a New Revs post)... Which should have been deleted at the time it was posted...
So, I'm thinking... Bug still there...? :-/
-
The entity conversion happens at save time, normally... See what saveEntities is doing, whether it's being called etc.
As for drafts, I have two drafts only and judging by the content, they'd been saved just as I pressed send, but possibly before it had returned with a cache id.
-
- weSaveEntities() is doing its work, but APPARENTLY it isn't called in quick reply... Maybe that's here...? But I seem to remember the bug happened in quick edit mode, too... Test é > < – é<>... :edit: Yep, they're not converted... Another test -- quick edit -- > < :edit: Okay, looks like it's in quick reply only.
- I have 14 drafts, 6 of which are completely empty. That's a bug. Has to be... Others MIGHT be due to chance. But the empty drafts... I thought Wedge ensured these didn't get saved?
-
It should be called for quick reply, but maybe not for entities.
If they're completely empty, they shouldn't be saved, certainly in the original implementation they wouldn't be sent in the first place, but I know it changed since then to be triggered by the events of typing something.