Make WordPress Core

Opened 5 years ago

Last modified 2 years ago

#25473 reopened defect (bug)

wp_text_diff creates wrong number of columns if title arguments are set

Reported by: joedolson Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.6.1
Component: Revisions Keywords: has-patch needs-testing
Focuses: Cc:


The 3rd parameter for wp_text_diff is an array with 3 possible arguments. If any of those arguments are provided, the thead element will contain 4 columns, but the text diff renderer has only produced 3 columns of data since version 3.6.

Patch revises wp_text_diff to generate only 3 columns.

Attachments (3)

25473.wp-text-diff.patch (758 bytes) - added by joedolson 5 years ago.
Patch to wp_text_diff
markup-table.diff (711 bytes) - added by mehulkaklotar 3 years ago.
th with colspan 2
Screenshot from 2015-07-31 12:22:33.png (14.1 KB) - added by mehulkaklotar 3 years ago.
td and th creates problem in markup and display

Download all attachments as: .zip

Change History (15)

5 years ago

Patch to wp_text_diff

#1 @c4xpl0siv3
5 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Tested and fine

#2 @c4xpl0siv3
5 years ago

  • Keywords 2nd-opinion close added

#3 @joedolson
5 years ago

Can I ask how you tested this? Based on my check and code review, this is very clearlya bug, though it's not expressed in the built-in usage of revisions. I'm open to the possibility I'm missing something, but would appreciate knowing what I'm missing.

#4 @markoheijnen
4 years ago

  • Milestone Awaiting Review deleted

Clearing out the milestones for closed tickets on Awaiting Review

#5 @zodiac1978
3 years ago

  • Keywords close removed
  • Resolution worksforme deleted
  • Status changed from closed to reopened

I can reproduce this bug. Re-opening.

#6 @zodiac1978
3 years ago

If you omit the show_split_view argument there will be just one column in the table header which is also wrong and not documented in Codex.

See: https://core.trac.wordpress.org/browser/tags/4.2.1/src/wp-includes/pluggable.php#L2325 and https://codex.wordpress.org/Function_Reference/wp_text_diff

#7 @SergeyBiryukov
3 years ago

  • Milestone set to Awaiting Review

#8 @mehulkaklotar
3 years ago

When set title args, it is taking correct markup. But for the title_left and title_right. it should use colspan 2 to matchup with tbody td elements.

3 years ago

th with colspan 2

3 years ago

td and th creates problem in markup and display

#9 @mehulkaklotar
3 years ago

  • Severity changed from normal to major

#10 @mehulkaklotar
3 years ago

  • Keywords ui-feedback added

#11 @johnbillion
3 years ago

  • Keywords needs-testing added; 2nd-opinion ui-feedback removed
  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from major to normal

#12 @SergeyBiryukov
2 years ago

#36127 was marked as a duplicate.

Note: See TracTickets for help on using tickets.