Adding support for the Drupal Canvas page to the module would be great.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

heyyo created an issue. See original summary.

j-barnes made their first commit to this issue’s fork.

j-barnes’s picture

@heyyo - Added support for canvas_page in the above MR.

Canvas pages don't define a bundle entity type (similar to menu_link_content), so I extended the pseudo-bundle pattern we already had in place. Added a hasBundles() helper to EntityHelper to clean up the conditionals and hide the bundle override table in the admin UI since there's nothing to configure per-bundle.

Since Canvas requires Drupal 11.2+, the CI configuration conditionally installs it only on compatible jobs and excludes the Canvas tests on D10/D11.1 runs. Took a bit of trial and error to get that working, but we got there.

I don't have a lot of hands-on time with Canvas yet, so if you could give it a spin and let me know how it goes, that would be awesome. Happy to refine as needed.

j-barnes’s picture

Status: Active » Needs review
heyyo’s picture

StatusFileSize
new43 KB
new175.1 KB

Wouah it was quick !
I tested locally, and it did the job. I was able to set number of revisions for Canvas page to keep only 3.
Keep 3 revisions of canvas pages

After running cron, my older revisions of my canvas pages were gone !
Also I checked the presence of logs in watchdog

Logs revision manager

So it looks good to me, but maybe better to ask canvas developers to verify everything is expected.

j-barnes’s picture

Thanks for testing this out. Good to hear it's working on your end. Going to have our team try it out too, they've been wanting to give Canvas a go so this gives us a good excuse.

sunny-lee’s picture

Status: Needs review » Reviewed & tested by the community

Tested this on a fresh d11 install. Set canvas/page for 3 revisions and also 5 revisions. Created a variety of revisions over 10 both times and after running the cron revision manager, revision manager successfully removed when set for 3 and successfully removed for 5 when set for 5 for the canvas pages. Also tried old functionality with basic pages and it's working as expected. All good here!

j-barnes’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all for the help with this!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.