In CustomPress, taxonomy items are all updating eachother

Ok - I have 4 taxonomies that I created with CustomPress that are associated with 4 different post types.

Post Type -> Taxonomy:
Menu - Chattanooga -> categories - Chattanooga
Menu - Daphne-> categories - Daphne
Menu - Alabaster-> categories - Alabaster
Menu - Shoals-> categories - Shoals

Each menu has the same categories - Drinks, Full Plates, Salad Options, etc.

If I change the title or slug for Drinks to Drinks - Chattanooga, then all of the taxonomies are changing Drinks to Drinks - Chattanooga even though I'm only changing it in Chattanooga. For some reason, they seem to all be connected and I can't figure out why. Has anyone else had this problem?

  • aecnu

    Greetings christina_hooper,

    Thank you for bringing this item to our attention.

    I am not going to comment since I do not know if this is intended use or not.

    But I will get someone in here who does know if this is intended use or not, the lead developer whom can shed some light on this very subject for us both.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Arnold

    It's not clear to me how you have this setup.

    You created a Post Type called "Taxonomy"? That's probably a reserved word and confuses things because post types are a type of post, not a taxonomy. They store the data of a post.

    Then you talk about Menus which is not direct function of CustomPress per se so I don't understand how you got your menu items?

    So can you give me:

    Names of your Post Types

    Names of your Taxonomies and what post types they are associated with. and whether they are hierarchical or not.

    Names of any categories you've defined for each taxonomy.

    A description of what you are trying to do with all this.

  • christina_hooper

    I did give you all of that:

    To put it in context, I'm building an online menu for a restaurant that has 4 locations. The four locations are Chattanooga, Daphne, Alabaster and Shoals. I have a custom post type for each location's menu. (Menu - Chattanooga). For each location's menu post type I have a custom taxonomy for the types of items that they serve on their menu in the restaurant (categories - Chattanooga). In each taxonomy, I have the categories created for each type of item on the menu - like Drinks, Appetizers, Full Plates, Desserts. These are not hierarchical. Then I want to create the menu items as posts in the custom post type with a category of what they are. For example, I create a post of 'Cheese Fries' in the custom post type of 'Menu - Chattanooga' and I give it a category of 'Appetizer' Then I create a post of 'Cheese Fries' in the custom post type of 'Menu - Shoals' and give it a category of 'Appetizer'.

    Post Type -> Taxonomy:
    Menu - Chattanooga -> categories - Chattanooga
    Menu - Daphne-> categories - Daphne
    Menu - Alabaster-> categories - Alabaster
    Menu - Shoals-> categories - Shoals

    Each location's menu has the same categories - Drinks, Full Plates, Salad Options, etc. and I think that's where the problem comes from. If I make sure the slug is different when I create them, then it's not a problem.

    For example - this works:
    - Menu-Chattanooga (Custom Post Type)
    ---- categories - Chattanooga (Custom Taxonomy)
    ---------- Drinks (category name)
    ---------- drinks-chattanooga (category slug)
    - Menu-Daphne(Custom Post Type)
    ---- categories - Daphne(Custom Taxonomy)
    ---------- Drinks (category name)
    ---------- drinks-daphne(category slug)

    When I do this, I have problems:
    - Menu-Chattanooga (Custom Post Type)
    ---- categories - Chattanooga (Custom Taxonomy)
    ---------- Drinks (category name)
    ---------- drinks(category slug)
    - Menu-Daphne(Custom Post Type)
    ---- categories - Daphne(Custom Taxonomy)
    ---------- Drinks (category name)
    ---------- drinks(category slug)

    I can't just change the slug after it's been created either. For example, if I change the slug in chattanooga to drinks-chattanooga and then go look at the one under Daphne, then it will say drinks-chattanooga too. If I change it to drinks-daphne, it changes the Chattanooga one. If I create them originally as drinks-daphne and drinks-chattanooga, then I don't have problems.

  • Arnold

    Still confusing because it says right on the page under the Post Type

    The new post type system name ( max. 20 characters ). Alphanumeric lower-case characters and underscores only. Min 2 letters. Once added the post type system name cannot be changed.

    So a post type id of "Menu - Chattanoga" is illegal. I used "menu_chattanoga" Since this determines what slugs get useed by default it's important. Should give an error if you do put in an illegal identifier and does when I tried it.

    It also means unless you defined custom rewrite slugs that the slug for categories - Chattanooga that you have would be would be "categories_chattanooga" So I' still not getting a clear picture of what you've set up.

    Same for the taxonomies.

    Second problem. Categories are by definition hierarchical. You say yours are not hierarchical? Then they will act like tags. This is possibly your problem because tags don't have to be predefined, they are just text attached to Post. So to enter a tag you type it in or pick from a most popular list. This doesn't prevent anyone from putting in just about anything. Changing it to Hierarchical will let you precreate categories like you're trying to do and you won't have the slug collisions.

    Third is to get Archive lists, ie all the listings in /menu_chattanooga/ for example you need to set Has Archive to true in the post type, same with taxonomies.

    Also it's not clear what capability type you set in post types. It defaults to "post" and anything you put in will act like a post.

    There's probably other things but the setup is still not clear to me. One good way to make it clear is export those post types and taxonomies and paste the export text here.

  • Arnold

    Found the problem. Don't know if you can call it a bug but it's a quirk in Wordpress. They check for duplicate slugs on creation and when you change it thereafter it changes all of them.

    Work around would be to first delete the one you want to change and then re-add it with the new slug. This also means that any posts with that category will lose it, but that happens if you just rename it anyway. Need to get it right before adding any posts using them.

    If you look at Drinks in Chattanooga and Daphne you'll see I was able to get different slugs on them.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.