wetalk network
You're here : vbfans.com / wetalk.vBulletin / General vBulletin Support / vBulletin 4.x Support / blank page when saving an edited post with custom bbcode

Forum : vBulletin 4.x Support Unofficial, but free, vBulletin support by fellow vB users and trained professionals.

Start New Topic  Post a Reply    
 
Thread Tools Search this Thread
 
casaschi's Avatar
casaschi
Active Member
hello,

I developed for a friend running vbulletin a custom bbcode that displays a chessboard showing chess games.

You can look at the bbcode definition here:
User_Notes_vbulletin - pgn4web - notes about integration with the vbulletin forum platform - Project Hosting on Google Code
For simplicity, consider only the second bbcode, the one that would allow to "install vbulletin and pgn4web on different domains", but the issue I have happens in both cases.

The custom bbcode generally works fine, I can create a post with the "pgn" tag and the chessboard is displayed no problem. I can add more than one chessboard per post, I can reply to a post even quoting the chessboard text and so on.

However, each time I edit a post that is using the "pgn" tag, when I click "save" vbulletin displays a blank page and the browser waits forever without displaying anything more. The post modifications are actually saved, if I stop the browser and manually go back to my post, the modifications have actually been saved. Also, if I use the "advanced" edit option (instead of just "save") and then save from there, everything works fine.

My friend opened a ticket with vbulletin that was closed replying they dont troubleshoot third party extensions; very unprofessional response in my opinion since this looks to me a vbulletin bug/issue... anyway, I wonder if anyone here has some clue what might be happening and why the "save" command is (partially) broken.

I tried to isolate any part of the bbcode replacement script that might be the cause of the problem, taking pieces of code out and trying saving, but without much luck. I cant do much troubleshooting because I cannot test on the live system of my friend and there's only a limited amount of things you can do on http://demo.vbulletin.com.

Any help appreciated.
Last edited by casaschi; June 28th, 2010 at 10:36 AM.
 
#1 by casaschi, June 28th, 2010
 
Pitchoune's Avatar
Pitchoune
Trusted Member
I'll give a try to see what is wrong
 
#2 by Pitchoune, June 28th, 2010
 
casaschi's Avatar
casaschi
Active Member
Quote: (Originally Posted by Pitchoune View Post)
I'll give a try to see what is wrong
Thanks.
You can use this as the content of a test post:

Code:
Testing the chessboard bbcode:
[pgn]

[Event "World championship"]
[Site "Moscow URS"]
[Date "1985.10.15"]
[Round "16"]
[White "Karpov"]
[Black "Kasparov"]
[Result "0-1"]

1. e4 c5 2. Nf3 e6 3. d4 cxd4 4. Nxd4 Nc6 5. Nb5 d6 6. c4 Nf6 7. N1c3 a6 8.
Na3 d5 9. cxd5 exd5 10. exd5 Nb4 11. Be2 Bc5 12. O-O O-O 13. Bf3 Bf5 14.
Bg5 Re8 15. Qd2 b5 16. Rad1 Nd3 17. Nab1 h6 18. Bh4 b4 19. Na4 Bd6 20. Bg3
Rc8 21. b3 g5 22. Bxd6 Qxd6 23. g3 Nd7 24. Bg2 Qf6 25. a3 a5 26. axb4 axb4
27. Qa2 Bg6 28. d6 g4 29. Qd2 Kg7 30. f3 Qxd6 31. fxg4 Qd4+ 32. Kh1 Nf6 33.
Rf4 Ne4 34. Qxd3 Nf2+ 35. Rxf2 Bxd3 36. Rfd2 Qe3 37. Rxd3 Rc1 38. Nb2 Qf2
39. Nd2 Rxd1+ 40. Nxd1 Re1+ 0-1

[/pgn]
Done!
 
#3 by casaschi, June 28th, 2010
 
casaschi's Avatar
casaschi
Active Member
did some more testing on http://demo.vbulletin.com

the issue disappears if I change the "Settings" item "Disable AJAX Features" from the default "Enable ALL AJAX Features" to "Disable Problematic AJAX Features"

now the questions are:

- what is lost by switching to "Disable Problematic AJAX Features" ?

- which part of the javascript replacement of my bbcode is conflicting with these "AJAX Features" ?

Thanks in advance for any hint.
Last edited by casaschi; June 28th, 2010 at 04:25 PM.
 
#4 by casaschi, June 28th, 2010
 
Pitchoune's Avatar
Pitchoune
Trusted Member
If this is related to AJAX features, maybe this is related to " inside the bbcode. Not sure (Firebug returns me 2 lines of errors in the blank page like 'pgn4webTextareaId is not defined').
 
#5 by Pitchoune, June 30th, 2010
 
casaschi's Avatar
casaschi
Active Member
Quote: (Originally Posted by Pitchoune View Post)
If this is related to AJAX features, maybe this is related to " inside the bbcode. Not sure (Firebug returns me 2 lines of errors in the blank page like 'pgn4webTextareaId is not defined').
I tried to replace all quotes inside the bbcode, first all to ' (escaped when necessary) then all to " (escaped when necessary) without improvement.

I tried to isolate the error, but havent been able to.
Probably some issue with javascript in the bbcode that in turn dynamically creates javascript objects... for some unknow reason some of those dynamically created objects show up nicely in a new post but fail to appear when using the (quick) edit option.
 
#6 by casaschi, June 30th, 2010
 
Pitchoune's Avatar
Pitchoune
Trusted Member
It shows nice in a new thread because the thread is not sent via AJAX.

It seems to be definately in conflict with AJAX.
 
#7 by Pitchoune, June 30th, 2010
Start New Topic  Post a Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


[register]Login!
No Account? Sign up!

[rss]Active Content!

[info]Supporters
The Geek District
Security Seals
Christopher Nadeau
teen drama forum
Tech-Unity
x