[wp-trac] [WordPress Trac] #54955: Custom fields Issue
WordPress Trac
noreply at wordpress.org
Fri Jan 28 18:37:40 UTC 2022
#54955: Custom fields Issue
--------------------------+--------------------------------------------
Reporter: gadhiyaravi | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.9.1
Component: Editor | Version: 5.9
Severity: major | Resolution:
Keywords: needs-patch | Focuses: ui, accessibility, javascript
--------------------------+--------------------------------------------
Changes (by sabernhardt):
* keywords: => needs-patch
* focuses: ui, accessibility => ui, accessibility, javascript
Comment:
I did not think this was related to r52170, but removing `successmsg +=
response.data;` confirmed it. The table row output is in the
`response.data` for an Ajax call in the custom fields section.
One way to avoid the custom fields message is checking whether the admin
screen is editing the Taxonomy terms before adding `response.data` to the
message:
{{{
if ( jQuery( 'body' ).hasClass( 'edit-tags-php' ) ) {
successmsg += response.data;
}
}}}
That option is **not ideal**, especially if WordPress adds success
messages elsewhere, though it might be good enough for now.
To avoid empty messages, the `err.length` check's `else` statement needs
to check the `successmsg` length:
{{{
} else if ( successmsg.length ) {
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54955#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list