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

Unable to add new page #76

@eastcoastinfosec

Description

@eastcoastinfosec

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions