# Post editing completely broken

Page 1 of 2 1 2 Last
1. ## Post editing completely broken

Since the forum upgrade, there was a bug with editing posts. The changes took effect, however the page didn't refresh.

Now, I can't edit posts at all, running on FF2.

Can you have a look please?

2. I looked at it but I don't have a clue. Any vBulletin experts out there with any ideas?

3. Switching to Advanced for editing works fine tho.

4. I did a quick search, and http://www.vbulletin.com/forum/proje...?issueid=22912 is the same problem, but it's an issue with prototype.js.

5. I see the same thing with Opera, I just refresh the page after editing the post.

6. Firebug to the rescue...

when cancelling a quickedit:

when saving a quickedit:

i tried to dive through vB's scripts, but they're ugly.
i couldn't stand the ugliness.

7. vBulletin uses JavaScript Array objects as hashes and iterates over them by
Code:
for (var i in array) {
// do something with array[i]
}
that doesn't work with Ext Js because Ext Js adds several functions to the Array prototype.

To fix this error, one has to change all hashes to Objects and/or all for-loops to skip prototype-properties
Code:
for (var i in array) {
if (array.hasOwnProperty(i)){
// do something with array[i]
}
}

I just did a quick scan of the sources and found quite some of these for-loops that need to be adjusted. Just regex-search for "for\s*$$.*\sin\s.*$$" to find these.

Edit on Safari ... also works after a refresh

8. Thanks mystix and dj. It should be fixed now (may require refresh).

Edit: (Does this edit work???)

Edit: Yes it does!

9. The font and font-size lists also needs this patch

10. Originally Posted by jack.slocum
Thanks mystix and dj. It should be fixed now (may require refresh).

Edit: (Does this edit work???)

Edit: Yes it does!
thanks!

p.s. [code][/code] tag styles seem to have changed -- long code lines now wrap instead of continuing on forever.