simonsays Posted June 15, 2018 Share Posted June 15, 2018 Hello, encountered weird error message, which in my opinion is wrong. I already have a PAGE named 'nav' using some template. I tried to create a new TEMPLATE for navigation (different purposes) also naming it 'nav'. When I try to do it via admin UI, I get "name already exists", when I use Migrations module I get ` Got error PDOException with SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'nav' for key 'name' ` The only culprit could be 'fieldgroups' table (which already has 'nav' name) with unique index. But is this an expected behaviour? User hardly manipulates field group names. Link to comment Share on other sites More sharing options...
horst Posted June 15, 2018 Share Posted June 15, 2018 The one and only field in PW that is (really) required for every single item is a "name". The name must be unique! This is intended. ? Link to comment Share on other sites More sharing options...
dragan Posted June 15, 2018 Share Posted June 15, 2018 14 minutes ago, horst said: The one and only field in PW that is (really) required for every single item is a "name". The name must be unique! This is intended. ? But only within the same hierarchy (siblings) ? Link to comment Share on other sites More sharing options...
simonsays Posted June 15, 2018 Author Share Posted June 15, 2018 Just now, dragan said: But only within the same hierarchy (siblings) ? Should also stay true for same entities. Therefore, having a page with some name should not mean, that I can't have a template with the same name. Link to comment Share on other sites More sharing options...
kongondo Posted June 15, 2018 Share Posted June 15, 2018 7 hours ago, simonsays said: The only culprit could be 'fieldgroups' table (which already has 'nav' name) with unique index. But is this an expected behaviour? User hardly manipulates field group names. There is no connection between the pages table and the fieldgroups and templates tables. You can name your page identically to a template and there shouldn't be any conflict. However, fieldgroups and templates are twins. Creating a template creates a fieldgroup with the same name. Maybe you already had a template called nav, hence the conflict. Alternatively, you may have had a fieldgroup called nav that was not deleted when a similarly named template was deleted? 3 Link to comment Share on other sites More sharing options...
simonsays Posted June 18, 2018 Author Share Posted June 18, 2018 On 6/15/2018 at 6:32 PM, kongondo said: There is no connection between the pages table and the fieldgroups and templates tables. You can name your page identically to a template and there shouldn't be any conflict. However, fieldgroups and templates are twins. Creating a template creates a fieldgroup with the same name. Maybe you already had a template called nav, hence the conflict. Alternatively, you may have had a fieldgroup called nav that was not deleted when a similarly named template was deleted? So, fieldgroups are only related to templates? And fieldgroup is only deleted when a template is deleted? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now