statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.05k stars 530 forks source link

Taxonomie Handles get mixed up #5420

Closed alexscro closed 10 months ago

alexscro commented 2 years ago

Bug description

When creating a new taxonomy in the CMS, it applies the name of the latest created taxonomy to all previously created taxonomies. The GraphQL key changes and all queries do not work any longer.

In this case, I created a taxonomy called "Auto" as my third taxonomy and now "_Auto" is applied to every other taxonomy.

Please help as this blocks the usage of taxonomies completely.

Screenshot 2022-03-07 at 11 13 59

How to reproduce

  1. Create Taxonomy
  2. Check Taxonomy handle in GraphQL data layer
  3. Create another Taxonomy
  4. Check Taxonomy handle in GraphQL data layer

In this case, I created a taxonomy called "Auto" in the end and now "_Auto" is applied to every other taxonomy. Screenshot 2022-03-07 at 11 13 59

Logs

No response

Versions

Statamic 3.2.35

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

alexscro commented 2 years ago

@duncanmcclean

Hey! We would appreciate it if you could look into that, we are currently blocked on a project because of that.

Thanks, Alex

duncanmcclean commented 2 years ago

Sorry, I don't work for Statamic, I just triage & label issues. The Core Team will get to it when they find some time.

alexscro commented 2 years ago

I can confirm that there has been a duplicate handle name for a blueprint and taxonomy that caused this error to happen. Closing the ticket therefore.

alexscro commented 2 years ago

Unfortunately, it's really a bug. I created 2x taxonomies and the name of the second one created get's applied to the first one.

@JohnathonKoster can you take a look?

Screenshot 2022-04-01 at 10 25 06

edalzell commented 2 years ago

Unfortunately, it's really a bug. I created 2x taxonomies and the name of the second one created get's applied to the first one.

@JohnathonKoster can you take a look?

He'd have nothing to do with this, please don't tag people directly. The core team sees all issues and works on them when appropriate.

alexscro commented 2 years ago

@edalzell Sorry, I just saw that he was assigned to a couple of taxonomy related stuff ✌🏻 Thanks! Appreciate it.

valschr commented 2 years ago

Any update on this? It's still happening and a major blocker!

valschr commented 2 years ago

Looks like this is coming from here https://github.com/statamic/cms/blob/0c8f5a15e829311bfa40a1fd55a190c594a2fdaa/src/GraphQL/Types/TermInterface.php#L54-L61

The $term->blueprint() that gets passed to the buildName function is the last one that was created, not the one belonging to that term.

duncanmcclean commented 10 months ago

Hey 👋

I'm unable to reproduce this issue on the latest version of Statamic. The taxonomy handles seem to be correct to me:

CleanShot 2024-01-08 at 13 10 09

I'm going to close this issue now. If you're still experiencing this issue, please leave a comment and we can re-open the issue. Thanks!