Skip to content

Entry ID changes when publishing a draft #9104

@daveyjones

Description

@daveyjones

Description

When you create a new entry, it's a draft until published. Once published, the entry ID changes (usually incrementing by 1, unless other elements have been created in the meantime). I'm assuming this is a bug, and if it's not a bug, it's definitely not intuitive or expected.

This has caused a major headache for us. We have a template UI element that generates a short link via the Firebase Dynamic Links API (e.g. https://links.example.com/abc123). The short links are generated using the entry ID. Our content managers created hundreds of entries and copied the short link to paste into a related print magazine. Unfortunately, they copied the link before publishing, not realizing that the ID changes when doing so. This means all of those short links are now invalid, so we have to somehow figure out a way to shift all the entry IDs to match the short links that were generated (and already included in print materials).

Steps to reproduce

  1. Create a new entry.
  2. Take note of the entry ID in the URL.
  3. Enter a title.
  4. Press "Publish".
  5. Take note of the entry ID in the URL. It's different from the original entry ID.

Additional info

  • Craft version: 3.6.17
  • PHP version: 7.4.15
  • Database driver & version: MySQL 8.0.25
  • Plugins & versions:

Amazon SES 1.3.4
Campaign 1.19.2
Element API 2.7.0
Incognito Field 1.2.0
Maps 3.9.1
Redactor 2.8.7
SendGrid 1.2.2
Store Hours 2.1.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions