"Draft saved" with gibberish
vwrangler
Posts: 4,971
Just wondering, is anyone else having this issue with the forum?
I'll come into a thread, do absolutely nothing but read it, and then the forum suddenly says "Draft saved", even though I haven't tried to do a post. Then, later, when I actually do a post, there's all sorts of code garbage at the bottom of the post. I can't edit it out, because when I go into edit mode, it doesn't appear. (And, in fact, I've gotten more than one "Draft saved" message while typing this, so there's a reasonable chance that the aforementioned code garbage will be in this post.) If anyone else has seen this, how do you get it to stop?
If it doesn't appear in this post, I've got a link to a post where it happened, and there's nothing I can seem to do to fix it:
http://www.daz3d.com/forums/discussion/comment/932044/#Comment_932044
EDIT: And, indeed, it also appears in this post.
(function () { document.daz_gm = {}; document.daz_gm.daz_specials = function() { document.daz_gm.specials_only = true; jQuery('tbody tr').hide(); jQuery($$('.special-price')).each(function(idx, element) { e = jQuery(element) e.parent().parent().parent().show(); }); $('daz-gm-specials').innerText = 'Show Everything'; return false; }; document.daz_gm.daz_normal = function() { document.daz_gm.specials_only = false; jQuery('tbody tr').show(); $('daz-gm-specials').innerText = 'Show Specials'; }; document.daz_gm.daz_toggle = function() { if(document.daz_gm.specials_only) { document.daz_gm.daz_normal(); } else { document.daz_gm.daz_specials(); } }; })();

Comments
We have never seen that before. It has now been reported.
BTW have you noticed that the inverted comma that shows where you have typed There's is displaying strangely. Did you do something different when you put the inverted commas in there.
OK, forget that, you didn't as it is doing the same to me. But I am not getting the added on stuff.
The forum was inserting that extraneous code when I was using the most recent version of Firefox on Windows 7 Professional. I switched to Opera, current version 32 for Windows, and ...
EDIT: ... and code garbage does NOT appear. Since Opera is a Chromium browser, it probably won't appear with Chrome, either, but I don't have that installed on this computer and can't test.
EDIT 2: And if I go to the old post, using Opera, and simply do an Edit, then Save, the code garbage disappears. Which means I screwed up part of the trail for that; I apologize for interfering with the troubleshooting.
Also testing with Waterfox, which is a 64-bit fork of Firefox that uses the same cache and bookmarks locations and files as Firefox itself, if previously installed. And ... (additional text underneath code)
EDIT: ... And Waterfox also inserts code garbage. Specific to the Firefox-type browsers, whatever is going on. With Firefox, edited text appears above the code; with Waterfox, it gets inserted below. Until you edit a second time, and then the text moves. This is just SO weird.)
I've cleared cache more than once and restarted browsers to see if that matters. It doesn't seem to.
(function () { document.daz_gm = {}; document.daz_gm.daz_specials = function() { document.daz_gm.specials_only = true; jQuery('tbody tr').hide(); jQuery($$('.special-price')).each(function(idx, element) { e = jQuery(element) e.parent().parent().parent().show(); }); $('daz-gm-specials').innerText = 'Show Everything'; return false; }; document.daz_gm.daz_normal = function() { document.daz_gm.specials_only = false; jQuery('tbody tr').show(); $('daz-gm-specials').innerText = 'Show Specials'; }; document.daz_gm.daz_toggle = function() { if(document.daz_gm.specials_only) { document.daz_gm.daz_normal(); } else { document.daz_gm.daz_specials(); } }; })();Well, this is a screenshot of what your above post did to the screen. Otherwise, I wasn't getting any of that.
Huh. Well, that's ... different.
Since the last entry, I've cleared cache a couple different ways, shut down my computer and left it off for a while, and ...
EDIT: Yep. Still there. I'll have to use a different browser for now. Not a huge hardship, but I wish I understood what was going on.
(function () { document.daz_gm = {}; document.daz_gm.daz_specials = function() { document.daz_gm.specials_only = true; jQuery('tbody tr').hide(); jQuery($$('.special-price')).each(function(idx, element) { e = jQuery(element) e.parent().parent().parent().show(); }); $('daz-gm-specials').innerText = 'Show Everything'; return false; }; document.daz_gm.daz_normal = function() { document.daz_gm.specials_only = false; jQuery('tbody tr').show(); $('daz-gm-specials').innerText = 'Show Specials'; }; document.daz_gm.daz_toggle = function() { if(document.daz_gm.specials_only) { document.daz_gm.daz_normal(); } else { document.daz_gm.daz_specials(); } }; })();I will add to my report that this is only happening to you on the latest version of firefox. I have given them a link to this thread as well.
I can't seem to replicate this issue, it's very odd. Nor can I find any of that code that gets injected anywhere in our system, which makes it even more difficult to track down.
Can you give me more information:
I get something similar to this if I post while using Maxthon 4's night mode, it changes the color of everything on the forums including anything in the "comment" box.
Can you post a sample of the code that gets auto saved as a draft in your case, Bejaymac?
I'm on a different computer at the moment, so I'll answer this more completely when I get back to my other computer tonight. This is just a partial answer based on information I have available now.
I can't realy cite the specifc tabs; it's an ever changing variety. I don't think Firefox ever has fewer than 20-30 open at a time.
Specific Firefox version is 41.0.2 on Windows 7 Professional.
Plugins, beyond Adblock and Ghostery and Flash, I'm not sure about at the moment. I'll check when I get to that computer.
EDIT: And I've also just confirmed that whatever it is, it's specific to that computer. I used Firefox 41.0.2, also on Windows 7 Pro, on another computer to do this post, and the code junk failed to appear.
Also, for whatever it's worth, I've never gotten the screen break-up that Novica got. If it weren't for the fact that it's not in the "code" box or in that typeface, it looks like ordinary Javascript. (That is Javascript, right?)
Greetings,
Yes, that's JavaScript. I think it's MY javascript. O_O!
That's from the greasemonkey extension from...well, forever ago. It's meant to show up on the old wishlist page, and let you see only things that are discounted, IIRC. It's not going to work with the latest site changes, but the behavior you're seeing is DEFINITELY off the reservation.
In any case, you're probably running Greasemonkey on your Firefox instance, and you'll want to go into it and remove the 'DAZ Wishlist and Item detail page improvements' script.
You can see the code you're seeing here: http://www.webextender.net/scripts/preview/133738.html (It used to be on userscripts.org, but that site died as the founder went on to start a startup.)
It's in the section labeled 'daz_inject(function() {'
It's one of the drawbacks of things like Greasemonkey; when the site changes, it's not always possible to keep up. Optimally it would have failed safe, again I'm sorry about that.
-- Morgan
Interesting... still not sure how that code is getting saved as a draft, though. That seems especially odd.
But now that we know more, we can track it down a bit better and offer up solutions so that users won't have to uninstall that script if they find it useful.
Thanks for the update.
Greetings,
@DAZ_Benjam : That script was for the site as of Jul 13, 2012, I'm fairly sure there isn't a bit of it left that's still going to be useful. :)
The answer as to how it's getting saved as a draft is actually pretty amusing. In order to inject JavaScript onto the page, it grabs the document.body, and appends the script to the end of it. It wraps it in a script tag, but I imagine that gets ignored.
The magic happens with the rich text editor control you have on the forums. The editor works inside an iframe, with it's own document.body. The entire document.body is set contenteditable. So when the greasemonkey script (incorrectly) fires on the internal frame, it adds the script to the body, which is the editable space that I'm writing in right now. :)
That triggers the editor to see a change in the document, and it saves it as a draft...just to be safe. :)
-- Morgan
Ah, OK. In that case, I'll disable the script when I get to that computer.
At a guess, the last update to Firefox (either last week or week before, I think) triggered some sort of incompatibility with Greasemonkey that made all this happen.
Well, back at the computer in question. Disabled the extension, and so far, it hasn't been doing random "Draft saved" messages in a thread, so that part's good.
EDIT: And I can now make posts without random code appearing, so disabling the script seems to have fixed it.
Weird thing is, Greasemonkey itself was disabled. The script shouldn't have been trying to do anything at all.