• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Unable to Edit Big Posts

DFI

Active member
#1
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.




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

Please help with solution.
 

DFI

Active member
#3
Yes, Each and every moderator the same issue at their end.

Small posts are getting edited but big one become blank as shown above.
 

Mike

XenForo developer
Staff member
#4
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?
 

Mike

XenForo developer
Staff member
#6
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?
 

DFI

Active member
#8
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
 

DFI

Active member
#10
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.
 

Mike

XenForo developer
Staff member
#12
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.)
 

Mike

XenForo developer
Staff member
#13
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',