Skip Navigation

[Resolved] Deleted taxonomies come back to life

This thread is resolved. Here is a description of the problem and solution.

Problem: I have taxonomy terms that are formatted like "Last Name, First Name". When I save a post with this term, the original term is split into two terms "Last Name" and "First Name". If I delete the separate terms and try to add the original term again, the terms are split again.

Solution: Don't use commas in term names. WordPress interprets comma-separated terms as separate terms.

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by SimonP3753 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1164808
Screen Shot 2018-12-12 at 14.05.19.png
Screen Shot 2018-12-11 at 17.43.24.png
Screen Shot 2018-12-11 at 17.43.32.png
Screen Shot 2018-12-12 at 14.00.49.png

Hi. I followed this thread - https://toolset.com/forums/topic/delete-custom-taxonomy-values-from-the-database - but I still can't delete my taxonomies.

I'm not actually sure whether this issue lies in Views or elsewhere...

On only a few products out of 3,800 we are getting this issue, which can be seen on our index of composers page: hidden link

To illustrate we have two taxonomies: 'Composers' & 'Composers-Full-Name'. Take the example of 'Dornel' & 'Dornel, Louis-Antoine (c.1685-1765)'.

As you can see on screenshot our View is set to output only 'Composers-Full-Name', but the short 'Composer' Dornel is also there.

If I go to the taxonomy 'Composers-Full-Name' I have both terms. If I delete the short one, go back to the product and assign the long name it 'comes back' and is still there.

A bit hard for me to explain sorry.

I'm not far off going live and then I can leave all you helpful guys alone ?

Thanks

Simon

#1164960
Screen Shot 2018-12-12 at 12.19.16 PM.png

As you can see on screenshot our View is set to output only 'Composers-Full-Name', but the short 'Composer' Dornel is also there.
The table here doesn't appear to be generated by Views:
hidden link
It appears to be generated by some datatable system, possibly the WooCommerce Product Table plugin. Not sure how it's filtered.

If I go to the taxonomy 'Composers-Full-Name' I have both terms. If I delete the short one, go back to the product and assign the long name it 'comes back' and is still there.
It's because there is a comma in the taxonomy term name. When you try to add the term "Dornel, Louis-Antoine (c.1685-1765)" through the wp-admin post editor screen, WordPress interprets this text as two separate terms because of the comma. Like the instructions say, "Separate Composers-Full-Names with commas" (see the screenshot). You might be able to get around this with custom code, but it's not something I am able to offer you as a cut-and-paste solution.

#1164981
Screen Shot 2018-12-12 at 18.07.05.png

Hi Christian

I suspected the comma thing as all of the composer long names are structured in the same way and appear to 'break' on the editor screen.

Strange thing is all the composers have a comma in but I only have an issue with 5 (see SS attached).

You're right about that table, but on the link I supplied the table is created by Views: hidden link

So ultimately I realise it's nothing to do with Toolset so out of your remit; but any idea why only a few would act like this?

Thanks

Simon

#1164996
1-product-before-update.png
2-composers-full-before-update.png
3-after-product-update.png

Strange thing is all the composers have a comma in but I only have an issue with 5 (see SS attached).
Any time a Product is updated in wp-admin, it will split the associated long name term(s) into two separate terms. I just tested this with a post:
hidden link
See screenshots attached.
1. Before I made any changes in wp-admin, this was the state of the full name terms for the post. It looks like the terms are separate, but actually they are not yet as you can see in the next pic.
2. Before I made any changes in wp-admin, I searched for a term "rath" in the full names taxonomy. You can see only two items are found, and the terms for Rathgeber are not separated yet.
3. I made a minor text edit in the post editor and updated the post. Then I repeated the same search, and now you can see the individual component term name appear in the list. Now the short names for Rathgeber will also appear in the View of full names.

My guess is that you have only updated a few Products via wp-admin since these full-name terms were added. Each update splits one more full name into two separate terms. How the full-name terms were originally added correctly, I can't say. Maybe an import process? Maybe the terms were modified somehow after being assigned? I'm not able to tell after the fact.

#1165057

My issue is resolved now. Thank you!