Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#60076 new defect (bug)

200 tags maximum

Reported by: motk88's profile motk88 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.4.2
Component: Taxonomy Keywords: 2nd-opinion dev-feedback
Focuses: Cc:


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)

2023-12-14_20-47.jpg (83.3 KB) - added by sebastienserre 4 months ago.
202 tags created
list-of-tags.jpg (99.0 KB) - added by sebastienserre 4 months ago.
count-of-tags.jpg (15.8 KB) - added by sebastienserre 4 months ago.
Screenshot 2023-12-17 173146.png (10.0 KB) - added by motk88 4 months ago.

Download all attachments as: .zip

Change History (9)

4 months ago

202 tags created

#1 @sebastienserre
4 months ago


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.

add_action( 'plugins_loaded', function(){
        $i = 1;
        while( $i <= 200 ){
                wp_insert_term( $i, 'post_tag');

Could you please confirm you're testing with a basic WordPress configuration (Only WP and a Twenty theme) ?

#2 @motk88
4 months ago

Wow, you're fast!

Maybe I was too unclear. I'm trying to add the tags to a post. The tags have already been created.

If I try to add another tag, the whole list disappears and I have to add all the tags again.

But I will try to reproduce the problem with a basic WP config, thanks.

#3 @sebastienserre
4 months ago

You're right, I've misunderstood your initial post which was clear (now that I've read it a second time).

#4 @sebastienserre
4 months ago

  • Keywords 2nd-opinion dev-feedback added

So I have added 210 terms to the post_tagand assign the to a test post with ID 863:

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 ) ){
                $tags[]=$term_id[ 'term_id' ];
        wp_set_post_terms( 863, $tags );

Then, I have just count the number of terms to be sure :

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 @motk88
4 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!

Note: See TracTickets for help on using tickets.