Fixed Unable to Edit Big Posts

DFI

Active member
I am experiencing some wierd bug after upgrading to Xf 1.2 while editing big posts. Smaller Posts are easily getting edited but whenever i or any other member is trying to edit, it shows blank post.

PHi7ttl.png



Checked all User and settings in ACP but it seems uncurable .

Please help with solution.
 
Yes, Each and every moderator the same issue at their end.

Small posts are getting edited but big one become blank as shown above.
 
Open the edit link in a new tab. Any different?

Open the developer tools in your browser - any error message?

Could you link us to a message with the problem?
 
This isn't something that I can reproduce locally - I basically doubled the length of the example post and had no problems editing it in IE, Firefox, or Chrome.

Can you submit a ticket with FTP and admin CP access so I can attempt to reproduce the issue and debug it?
 
This isn't something that I can reproduce locally - I basically doubled the length of the example post and had no problems editing it in IE, Firefox, or Chrome.

Can you submit a ticket with FTP and admin CP access so I can attempt to reproduce the issue and debug it?

I have raised the ticket. Actually its very wierd. When I am creating another thread of similar length, I am too able to create and edit but unable to EDIT these old important lists which got upgraded from XF 1.1.5
 
Nope. The 1st thing I did to find out the reason was disabling each and every add on and then try to edit but issue remained the same.
 
I did confirm it on your server, but I need FTP access to debug it. See the ticket you submitted. (Though it's not something I'll be able to look at for a couple days now.)
 
This looks like it might be dependent on PCRE settings - I think one of the regexes was backtracking too much. It likely only comes up with posts from 1.1 or before that were heavily formatted in the WYSIWYG editor.

Regardless, changing library/XenForo/BbCode/Formatter/Wysiwyg.php fixes it. Replace:
Code:
'#<(xf' . $i . ':([a-z0-9-]+))([^>]*)(?<!/)>(.*)</\\1>#siU',
with:
Code:
'#<(xf' . $i . ':([a-z0-9-]+))([^>]*)(?<!/)>((?:(?>[^<]*?)|<)*)</\\1>#siU',
 
Top Bottom