Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Unable to add new page #76

Open
eastcoastinfosec opened this issue Feb 19, 2022 · 0 comments
Open

Unable to add new page #76

eastcoastinfosec opened this issue Feb 19, 2022 · 0 comments

Comments

@eastcoastinfosec
Copy link

I was getting a goofy error trying to add a new page after deploying the template.

error: insert into "components_meta_metadata" ("meta_description", "meta_title", "twitter_card_type") values ($1, $2, $3) returning "id" - duplicate key value violates unique constraint "components_meta_metadata_pkey"

I'm using postgres. It seems like the id primary key sequence has to be altered.
SELECT * FROM components_meta_metadata_id_seq;
last_value for me was showing 3, but the template populated up to 10;
SELECT setval('components_meta_metadata_id_seq', 11, true);
lead me to a second but same issue on the pages
SELECT * FROM pages_id_seq;
last_value was set to one, template populated 8;
SELECT setval('pages_id_seq', 9, true);

I'm going to go through the rest of the sequences, I didn't see how to change this in the strapi so I did it through SQL. I'd be interested in seeing where this exists in the strapi so I can edit and send a PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant