Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33004 closed defect (bug) (invalid)

WP_Text_Diff_Renderer_Table class's '_changed()' is having bug

Reported by: vishalkakadiya's profile vishalkakadiya Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2.2
Component: Revisions Keywords: reporter-feedback close
Focuses: Cc:


WP_Text_Diff_Renderer_Table class on line 319

When anyone changed the content at that time the return data is containing one extra '<td>&nbsp;</td>', that is not required see in the "_changed()" function.

Changed the line no 319

"$r .= '<tr>' . $this->deletedLine( $orig_line ) . $this->emptyLine() . $this->addedLine( $final_line ) . "</tr>\n";"

Attachments (2)

#33004.diff (717 bytes) - added by utkarshpatel 9 years ago.
Patch #33004
33004_1.diff (1.1 KB) - added by dipesh.kakadiya 9 years ago.
Need to change '_changed' & '_context' function

Download all attachments as: .zip

Change History (8)

9 years ago

Patch #33004

#1 @vishalkakadiya
9 years ago

  • Summary changed from When '_show_split_view' is having an issue to WP_Text_Diff_Renderer_Table class's '_changed()' is having bug

9 years ago

Need to change '_changed' & '_context' function

#2 @iseulde
9 years ago

  • Component changed from General to Revisions

#3 @adamsilverstein
9 years ago

  • Keywords reporter-feedback added

@vishalkakadiya: Thanks for the bug report!

I'm not sure that blank line call is a bug, although clearly in your case it is producing unintended results.

If you examine the constructed html for the 'split' diff view, you should see a series of rows consisting of three columns, a left hand 'removed' column, a middle spacer column, and a right hand added column. (see Any html inside the diffs should be encoded and not break the layout.

Removing the middle column is likely to have unintended consequences elsewhere as the entire page structure assumes three columns. Before I close this ticket as 'won't fix, I'd like to dig a bit more to see how you are getting into the situation your screenshot illustrates. Can you help by adding some additional detail?

  • Are you testing on wp 4.2 or trunk?
  • Anything special to reproduce this issue, do you see it only on that one post/revision, or something you see elsewhere as well?
  • Can you try reproducing with all plugins disabled and using the default theme?
  • If the issue persists, can you provide a db dump of your posts table or just the part referencing this post and its revisions?


#4 @vishalkakadiya
9 years ago

  • Keywords close added

#5 @vishalkakadiya
9 years ago


I think one of the plugin is conflict with code. This issue was came on all the posts, but the issue is resolved.

Thanks for the help.

Version 1, edited 9 years ago by vishalkakadiya (previous) (next) (diff)

#6 @adamsilverstein
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.