Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic 2.6.11 Edit Post Bug Resolution (Read 47 times)
 
Paste Member Name in Quick Reply Box Strake
Guest


2.6.11 Edit Post Bug Resolution
May 2nd, 2021 at 2:18pm
Mark & QuoteQuote  

Didn't seem to be a clear place for bug reports on old revisions, so I figured I'd just post it here and let you move it if necessary.

I updated from 2.5AE to 2.6.11 a while back. In doing so, the ability to edit posts broke - no one, not even mods or admins, can modify a post. While it has made for some amusing incidents, it is a bit of a pain. Well, eventually, one of my members got sick of it, did some debugging, and identified the issue. I'm reporting it here in case it has not been found yet.

In cgi-bin/yabb2/Sources/ModifyMessage.pm, around line 766, a closing curly brace was put in the wrong location. This makes it so that if attachments are disabled, edited posts are not saved/posted. Here is the before/after:

-- BEFORE --
Code (Perl)
Select All
     # Create the list of files
     $fixfile = join q{,}, @filelist;

     ${ $thread_arrayref{$threadid} }[$postid] =
 qq~$subject|$mname|$memail|$mdate|$musername|$icon|0|$useredit_ip|$message|$ns|$
date|$username|$fixfile\n~;
     fopen( FILE, ">$datadir/$threadid.txt" )
       or fatal_error( 'cannot_open', "$datadir/$threadid.txt", 1 );
     print {FILE} @{ $thread_arrayref{$threadid} }
       or croak "$croak{'print'} FILE";
     fclose(FILE);
         }

     if ( $postid == 0 || $staff ) {
  




-- AFTER ---
Code (Perl)
Select All
     # Create the list of files
     $fixfile = join q{,}, @filelist;

         }

     ${ $thread_arrayref{$threadid} }[$postid] =
 qq~$subject|$mname|$memail|$mdate|$musername|$icon|0|$useredit_ip|$message|$ns|$
date|$username|$fixfile\n~;
     fopen( FILE, ">$datadir/$threadid.txt" )
       or fatal_error( 'cannot_open', "$datadir/$threadid.txt", 1 );
     print {FILE} @{ $thread_arrayref{$threadid} }
       or croak "$croak{'print'} FILE";
     fclose(FILE);

     if ( $postid == 0 || $staff ) {
  



As an aside, I noticed that the lines of interest are the only ones with tabs in that file. Go figure it was a dirty tabber who introduced this terrible bug! Tongue
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
2.6.11 Edit Post Bug Resolution

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry