WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 4 days ago

#25473 reopened defect (bug)

wp_text_diff creates wrong number of columns if title arguments are set

Reported by: joedolson Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 3.6.1
Component: Revisions Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

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 22 months ago.
Patch to wp_text_diff
markup-table.diff (711 bytes) - added by mehulkaklotar 4 days ago.
th with colspan 2
Screenshot from 2015-07-31 12:22:33.png (14.1 KB) - added by mehulkaklotar 4 days ago.
td and th creates problem in markup and display

Download all attachments as: .zip

Change History (12)

@joedolson22 months ago

Patch to wp_text_diff

comment:1 @c4xpl0siv322 months ago

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

Tested and fine

comment:2 @c4xpl0siv322 months ago

  • Keywords 2nd-opinion close added

comment:3 @joedolson22 months 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.

comment:4 @markoheijnen20 months ago

  • Milestone Awaiting Review deleted

Clearing out the milestones for closed tickets on Awaiting Review

comment:5 @zodiac19783 months ago

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

I can reproduce this bug. Re-opening.

comment:6 @zodiac19783 months 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

comment:7 @SergeyBiryukov3 months ago

  • Milestone set to Awaiting Review

comment:8 @mehulkaklotar4 days 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.

@mehulkaklotar4 days ago

th with colspan 2

@mehulkaklotar4 days ago

td and th creates problem in markup and display

comment:9 @mehulkaklotar4 days ago

  • Severity changed from normal to major
Note: See TracTickets for help on using tickets.