Opened 10 years ago
Closed 9 years ago
#33943 closed defect (bug) (fixed)
Changeset 34095 and 34180 from recent 4.3.1 update breaks comment table layout
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.3.1 |
Component: | Comments | Keywords: | has-patch |
Focuses: | javascript | Cc: |
Description
hello there,
i'm using the latest wp 4.3.1 and discovered a bug with my wordpress setup. i'm using wordpress as some sort of documentation system and users can submit optional info when posting a comment.
this optional info is appended to the comment and displayed as a table when viewing comments in the admin panel -> /wp-admin/edit-comments.php (see screenshot attachments).
with the most recent update to 4.3.1 and changes to /wp-admin/js/edit-comments.js it breaks the layout of the comment table with my sort of special setup.
the changesets affecting my setup:
https://core.trac.wordpress.org/changeset/34095/branches/4.3
https://core.trac.wordpress.org/changeset/34180/branches/4.3
this line in edit-comments.js counts the <th> and <td>
colspanVal = $( 'th:visible, td:visible', c ).length;
and then adds it to the edit row
if ( editRow.hasClass( 'inline-edit-row' ) && 0 !== colspanVal ) { $( 'td', editRow ).attr( 'colspan', colspanVal ); }
in my case it counts all the <th> and <td> from the optional info table appended to the comment and then sets a colspan value of 24 to the #replyrow, which finally breaks the layout of the comment table, (see screenshot attachments)
if there's no info table appended to the comment then all is working fine.
for the moment being, to get things working again for my client, i changed the jquery selector to NOT count the <th> and <td> of my optional info table with a class of .timeSheetEntries
colspanVal = $( 'th:visible table:not(".timeSheetEntries"), td:visible table:not(".timeSheetEntries")', c ).length;
so, all is working fine again with my workaround but i'm not sure on how to properly solve this issue? as i don't want to do the change on each worpdress update!
What would be the proper way to handle this issue? should i display my data appended to the comment in a non <table> way? can we update the jquery to not match the table appended to the comment?
what would be the best way?
thanks, greetings & all the best
becki
Attachments (4)
Change History (10)
#2
in reply to:
↑ 1
@
10 years ago
Replying to swissspidy:
with the most recent update to 4.3.1 it breaks the layout of the comment table with my sort of special setup.
To simplify this: Does this break the list table in general when there's a table in the comment content and not just your custom setup?
yes, just added a comment with a table and 4 data cells on a blank wordpress install without my special setup and it also breaks the list table layout. see attachment wordpress-trac-04.jpg
To simplify this: Does this break the list table in general when there's a table in the comment content and not just your custom setup?