Problem/Motivation
My content authors have requested that the preview link form display information on all the existing preview links.
Currently, the preview link form shows us the latest preview link url along when the time until it expires. My content authors would like to see the url, redirect url, and expiration for all existing preview links.
Proposed resolution
I want to add a details element to the preview link form.

Remaining tasks
User interface changes
new details element with table
API changes
nope
Data model changes
nope
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screenshot 2026-01-20 at 10.37.47 AM.png | 19.2 KB | danflanagan8 |
| #12 | Screenshot 2026-01-20 at 10.36.32 AM.png | 162.43 KB | danflanagan8 |
| Screenshot 2025-07-29 at 9.40.40 AM.png | 102.46 KB | danflanagan8 |
Issue fork wse-3538583
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
Comment #3
danflanagan8Comment #4
agarzola commentedI’ve applied this patch successfully and it does what it says on the tin!
Comment #5
amateescu commentedThe current MR works well for its purpose, but we're planning on adding a full admin UI for preview links. Sebastian is working on that so assigning it to him.
Comment #8
s_leu commentedReady for an initial review. The remaining pipeline fails are unrelated.
Comment #9
danflanagan8I haven't tested yet because I'm having trouble with my local. I keep getting "The "workspace_preview_link" entity type does not exist." but I think it's a problem with Docker/lando file syncing rather than a bug in the code. Although, you know what, it is a bug in the code. The entity type definition uses the new format, which is not compatible with D10. So we'd either need to bump the core_version_requirement or add the D10-compatible entity type annotation in there.
I also haven't reviewed line by line. Still I'd like to share a few high level thoughts.
First, I love that the preview link is an entity now. As I was working on my original patch I was thinking to myself, "this would be a lot easier if the preview link was an entity!"
Second, I wonder if the canonical link for this entity shouldn't activate the preview. Wouldn't that be cool? I mean if I click a preview link entity that was rendered with "link to entity", isn't the preview the most obvious place to go?
Making the preview route and entity route (as opposed to a totally custom route with a custom controller) I think could make more granular access control easier. Currently there's a single broad permission to view previews. Now that the preview link is an entity, it's easy to imagine more sophisticated permissions. And my gut says that's all more natural if the preview route is the canonical entity route. This is mostly at the gut level, though. I haven't thought too hard. One immediate concern I would have with my idea is that we would still want to use the uuid rather than the id since we need to make it impossible to guess a valid preview url. I don't know how to deal with that.
Comment #10
amateescu commented@danflanagan8,
That's an interesting idea, but I think it'd be too risky/disruptive. Most listings (list builders, views) will provide that link by default, which would make accidental workspace preview activation way too easy. Let's provide it as a
activatelink template instead :)Comment #11
s_leu commentedComment #12
danflanagan8Excited about this! Doing some manual testing after applying patch to 2.0.0-alpha13...
Update hooks look good:
And once I'm in a workspace, the new listing of preview links looks really slick!
Those are links that were successfully promoted to content entities by the update hook. Nicely done!
The filter works for me. Very cool.
I have run into a couple bugs though.
First, if I go to the Workspaces listing page (/admin/config/workflow/workspaces) I get a WSOD with the following error:
Second, if I am generating a new preview link, the "Expire date and time" default value isn't working. The help text reads "Leave blank to use the time of form submission." But if I actually leave it blank, I get a validation error because it's a required field:
That said, I don't think using the time of form submission really makes sense. Does this MR get rid of the
preview_expiry_defaultsetting? Could that value still be used to set the default expiry time here?Comment #14
amateescu commentedOpened a 3.0.x-only MR from @s_leu's work on in MR 120, and I'll start fixing stuff found by @danflanagan8 above as well as some UX issues.
Comment #15
amateescu commentedAfter a bunch of updates and new features added to this MR, I decided to promote
WSE Previewto a standalone module: www.drupal.org/project/workspace_previewWrote a change record as well with more details: https://www.drupal.org/node/3592549
Thanks everyone for the work and testing from this issue!