Opened 11 months ago
Last modified 11 months ago
#60076 new defect (bug)
200 tags maximum
Reported by: | motk88 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.4.2 |
Component: | Taxonomy | Keywords: | 2nd-opinion dev-feedback |
Focuses: | Cc: |
Description
A customer is trying to add more than 200 tags to a specific post. However if she tries to add the 201. tag, the complete tag list disappears. I was able to recreate the problem.
I didn't even know there was a limited number of keywords. But if there is a limit, shouldn't a message appear? Instead in this case the whole list disappears.
Attachments (4)
Change History (9)
#1
@
11 months ago
Hello,
Thank you for reporting your issue and contributing to make WordPress better than it is yet.
Unfortunately, I do not reproduce your issue.
I have used this piece of cod to create 200 post_tag and as you can see, I've successfully created 2 more.
<?php add_action( 'plugins_loaded', function(){ $i = 1; while( $i <= 200 ){ wp_insert_term( $i, 'post_tag'); $i++; } });
Could you please confirm you're testing with a basic WordPress configuration (Only WP and a Twenty theme) ?
#3
@
11 months ago
You're right, I've misunderstood your initial post which was clear (now that I've read it a second time).
#4
@
11 months ago
- Keywords 2nd-opinion dev-feedback added
So I have added 210 terms to the post_tag
and assign the to a test post with ID 863:
<?php add_action( 'plugins_loaded', function(){ $i = 1; $tags = array(); while( $i <= 210 ){ $term_id = wp_insert_term( 'tag_' . $i, 'post_tag'); if ( is_wp_error( $term_id ) ){ return; } $tags[]=$term_id[ 'term_id' ]; $i++; } wp_set_post_terms( 863, $tags ); });
Then, I have just count the number of terms to be sure :
<?php add_action( 'plugins_loaded', function (){ $terms = wp_get_post_terms( 863, 'post_tag' ); $terms_count = count ( $terms ); var_dump( $terms_count ); die; });
I do not reproduce your issue.
I'm attaching 2 screenshots (list-of-tags.jpg & count-of-tags.jpg)
#5
@
11 months ago
I've now disabled all plugins and used the Twenty Twenty-Four theme and the problem persists.
I'm attaching a screenshot of the error message in the Chrome DevTools.
This error message appears as soon as I try to add another tag. However as soon as I delete a tag and add another (so that it doesn't become more than 200 tags), it works!
202 tags created