πŸ‡ΊπŸ‡ΈUnited States @tenken

Account created on 7 December 2010, about 14 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States tenken

@aaronmchale I am in the process of slowly learning D8/B9 development best-practices. I am making my first custom revisionable entity.

The official documentation for Drupal 8 does not show `show_revision_ui` anywhere in the Docs:
* https://www.drupal.org/docs/8/api/entity-api/making-an-entity-revisionable β†’
* https://www.drupal.org/docs/drupal-apis/entity-api/converting-a-content-... β†’

I was able to piece together information from this issue, and the Block Content Revision UI, and Linky Revision UI modules as examples of what to implement for this functionality along with the CR. But all these documentation references omit `show_revision_ui` usage for enabling this aspect of the revision ui for ones custom entity. I eventually looked at core Block Content and Node and saw the `show_revision_ui` annotation was included there.

The CR appears to be documentation showing how to enable a complete revision UI for a custom entity, and while this is a legacy annotation item it would seem like including this annotation within the CR would benefit other newbie D8/D9 developers since there is no prior complete documentation on how to achieve showing a "complete" revision UI for revisionable entities.

If nothing else hopefully my comments will help others who are also fumbling around in the dark. Thanks to all for your efforts.

πŸ‡ΊπŸ‡ΈUnited States tenken

Shouldn't the Change Record note that in order to see the "create new revision" checkbox and log message similar to Block Content and Node entities, a custom entity annotation should include:

/**
 * show_revision_ui = TRUE,
 *   route_provider = {
 *     ...
 *     "revision" = "Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider",
 *   }
 */

Otherwise, yes the CR enables the Revision tabs and local actions ... but a developer cannot create a new revision via the entity add/edit forms without additionally adding this annotation entry.

Production build 0.71.5 2024