Jump to content

Bug or expected behaviour? Template & page same name?


simonsays
 Share

Recommended Posts

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

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

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?

  • Like 3
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...