Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update post.js to fix bug in metaboxes created for custom non-hierarchical taxonomies #1392

Merged
merged 1 commit into from Apr 12, 2024

Conversation

KTS915
Copy link
Member

@KTS915 KTS915 commented Apr 12, 2024

This PR is to fix the bug reported at https://forums.classicpress.net/t/custom-taxonomies-dont-work/5163

The bug is isolated to the non-hierarchical taxonomies’ (i.e. like tags) metaboxes on the edit screen of a custom post type.

Metaboxes on regular posts, and hierarchical taxonomies (i.e. like categories) on any post type work fine. The bug also does not affect non-hierarchical taxonomies added via Quick Edit.

The cause is that, while the correct JavaScript file is being loaded, it is not being initiated. The reason for this is that the code looks for a div while, in version 2 of ClassicPress, we replaced a lot of old JavaScript with HTML5 disclosure widgets. So the bugfix here is simply to replace div with details on a specific line.

@ClassyBot
Copy link
Contributor

This pull request has been mentioned on ClassicPress Forums. There might be relevant details there:

https://forums.classicpress.net/t/custom-taxonomies-dont-work/5163/10

Copy link
Member

@xxsimoxx xxsimoxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mattyrob mattyrob merged commit 3059adf into ClassicPress:develop Apr 12, 2024
11 checks passed
@KTS915 KTS915 deleted the tags-bugfix branch April 13, 2024 19:16
@mattyrob mattyrob added this to the 2.1 milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants