The Lesson Copy That Still Carries the Original Component ID

Key takeaways

  • Copying creates a new component identity; editing preserves the intended existing identity.
  • Newly copied repeatable components need their IDs removed, including nested component identities.
  • Shared media and document references remain shared unless duplication is intentional.
  • Publication checks must verify distinct blocks, sequence and quiz answer mappings.
  • Generated clients need real-ID tests and explicit validation-failure handling.

A copied swipe card carries more than text

Consider Mira, a fictional course author building onboarding lessons from structured swipe cards and quiz blocks. An AI-assisted script copies a card, rewrites its text and appends it to the lesson. The copy still carries the original Strapi component ID. Two intended learning steps now claim one identity. This is an illustration, not an observed App-Learning client incident.

Document identity and component identity serve different purposes

Strapi 5 uses documentId as the stable identifier for an entry across locales and publication states. Nested components have separate numeric IDs tied to their draft or published records. (docs.strapi.io) The lesson’s identity therefore cannot stand in for the identity of each card. Reusing a lesson structure requires an explicit decision about which objects remain and which become new.

Strapi 5.64.0 makes the copying error visible

Released on November 25, 2026, Strapi 5.64.0 rejects updates that repeat a component ID within one repeatable-component or dynamic-zone list. Previously, the update returned success but retained only the last copy. The new validation writes nothing across REST, GraphQL, Content Manager, MCP and Document Service. REST reports a 400 ValidationError; GraphQL reports BAD_USER_INPUT. (github.com) This is a documented v5 change, not evidence about existing v4 installations.

Diagram contrasting blocked cloning with a reused ID, successful cloning with a new ID, and editing that keeps its ID.
Cloning needs a new identity; editing keeps the existing one.

Copy and update need separate contracts

Strapi creates a component when its ID is omitted. (github.com) A safe pipeline should expose separate copy and update operations rather than accept an unchanged CMS response as a write payload.

For an illustrative two-card draft, the conceptual payload is {"data":{"cards":[{"id":42,"text":"Report the issue"},{"text":"Escalate the issue"}]}}. The first card retains its identity; the second requests a new component.

The copy operation should remove identities from copied components, including nested components, while preserving intentional media and document references. A blanket “delete every id” transformation is too crude. The update operation should retain the target draft’s component IDs, not reuse IDs from published responses, because draft and published components have different identities. (docs.strapi.io)

Readback turns saved content into tested content

AI course generation validation should cover the stored lesson, not just generated text. Strapi requires explicit population to retrieve components, media and relations through Document Service. (docs.strapi.io) A proposed staging matrix should verify the following.

  • Repeated IDs cause rejection, with before-and-after content unchanged.
  • An original and its copy survive as distinct components in the intended order.
  • Shared media references remain intact without unnecessary duplication.
  • Quiz choices retain their correct-answer mappings after copying and reordering.
  • Each target locale passes draft readback before publication and published readback afterward.

Build a safer onboarding content pipeline with App-Learning.

Discuss

The rollout belongs in staging before bulk generation

The release also corrects generated OpenAPI document-ID schemas from UUIDs to plain strings without changing request handling. (github.com) That makes client regeneration part of the rollout, not a substitute for integration tests.

  1. Inventory copy paths and add schema-aware clone handling.
  2. Regenerate OpenAPI clients and validators, then test real document IDs against staging fixtures.
  3. Block publication on validation or readback failure, retain diagnostics and require correction before retrying.
  4. Release a small course batch before enabling bulk generation.

For headless CMS learning content, fluent wording is only one quality gate. The App-Learning goal is simpler onboarding without shifting technical checks onto managers. That requires a content studio where copying, editing and publishing have explicit contracts—and no lesson goes live merely because a request succeeded.