Open willguv opened 1 year ago
Big issue for Essex - also inconsistent about what's shown. A big issue for stakeholders who're being asked a lot of "an email with 20 links isn't helping"
Also more urgent than other issues as content reviewing is happening all the time
Haringey has a single read only log in to workaround this
Newcastle uses Entity Share
Content designers can share a variety of content types from single guides to whole sections, so solution needs to work for all scenarios
Is also an issue at BHCC, we have used the login with limited role in the past. Does entity share require a seperate provisoned environment just for testing? That might be impractical. Would it be possible to extend preview link or create a new module that grants access to a limited set of pages? Maybe setting as a cookie instead of long links??
Hi Andy, yes Entity Share requires a separate environment - agree that this isn't practical for a lot of councils. It was very useful for us in Cumbria though
I'd like us to look at extending preview link functionality or creating something new
Can't do Product Group today sadly (you should have a cancellation) but am catching up with Stephen soon to talk about this and a few other issues. Can invite you?
Wondering if we could add another workflow state "Accuracy check" which can only be viewed by a user with limited permissions
Then create a single user account with this role, and details can be shared with services
Thinking aloud here...
Easiest - provide a "Service contact" read only login, as Haringey has done. Users would be able to view all unpublished content, but we don't think this is too big an issue. Users would have to find their content again
Also talk at Tech Group about options @finnlewis @andybroomfield @stephen-cox
Other options
Workflow access - a way of restricting view of unpublished content (eg by url or entry in services menu) . Provide documentation on config options
Workspace - could be created for staging etc or for a single guide which could be shared with a service contact
Andy:
Brighton takes read only login approach, and also sometimes publishes on staging environment. Looking at Entity Share
BHCC comms like the temporary link idea, but needs to work for multiple pages
Thoughts:
Need to make sure the public can't discover the log in screen as they'll try to log in with MyAccount
I'd like us to look at extending preview link functionality or creating something new
Yeah, that's what I was thinking. This is how it should work:
Example:
I must say I haven't tried anything like this. The whole thing may not work or prove too complex.
Thanks @Adnan-cds
Any thoughts @andybroomfield @stephen-cox @finnlewis? Worth chatting about it at the Tech Group too?
@stephen-cox separately, could we specify a new read only "Service contact" role to go along with the Service contact work you're doing elsewhere?
Is this a lot of effort?
It might be a bit simpler than rewriting links, just using hook_node_access
and then maybe using either condition field or entity references to determine whats allowed. Theres also the issue of nodes that are linked into landing pages but not yet published so they don't show on landing pages unless you have permission to view them.
Its something to think about and possibly worth those interested getting heads together post Drupal 10 to work out the best approach.
Anyone tried the "Preview Site" module? Looks like it might do what we want here and is created by the same developers as the Preview Link module.
https://www.drupal.org/project/preview_site
However, it does add Tome and other modules to the site as well as preview_site itself, so might be a heavy duty piece of work.
@stephen-cox separately, could we specify a new read only "Service contact" role to go along with the Service contact work you're doing elsewhere?
Is this a lot of effort?
@willguv This shouldn't be a lot of work, but as it's a self contained task I would suggest creating a separate issue for this. There's already too much stuff going on on the email notification issue and it's possible for someone else to pick up if they get to before I do.
Anyone tried the "Preview Site" module? Looks like it might do what we want here and is created by the same developers as the Preview Link module.
This has an interesting approach to this issue:
Extends the paradigm of the Preview link module to the concept of previewing more than one item of content, by way of a static site.
It looks to create a static site for each preview. I doubt this is a simple drop-in solution though as there's going to be some hosting setup needed to allow multiple previews to be deployed. I would also imagine creating a static copy of a large site is going to be quite time consuming and resource hungry. Could be worth evaluating through.
What about recommending using workspaces for this sort of thing?
Workspaces is part of Drupal core experimental, but I've tested it with guides and step-by-step and it works.
https://www.drupal.org/docs/8/core/modules/workspace/overview
I did run into some problem with subsites, but I'm sure we could work through issues if we wanted to go this route.
I wonder if/how preview link would work with workspaces.... ?
@finnlewis workspaces sounds like a very good idea and definitely worth some investigation.
We'd also need to check how this works with caching, as if we used the same urls and a CDN or varnish cache is in use it might be that pages that anon users browse get saved to serve all anon traffic so there is potential for data leakage.
I like the approach of creating a static preview, but it should limit it to just the pages being previewed as otherwise there will be 1000s of pages generated, the use case is previewing a section as it would appear when published, so a way of bundling a set of pages or everything under this page, if the module linked above can do that.
So reading it more closely
Content editors can create unlimited preview sites - each site consists of one or more pieces of draft content they wish to share with non-authenticated users to preview before publishing
This is what the admin screen for preview site module looks like, would be nice if it could use wildcard urls.
It then builds a static site, but (at least in default config, havnt dived into settings yet) the links are all back to the main site.
This looks very promising. Thanks @andybroomfield
Hi @andybroomfield @finnlewis @markconroy @stephen-cox it would be good to restart the conversation about this as it's still amongst the most wanted fixes for content editors - just discussed again in a content session
Preview Site looks like the best for non authenticated users - see Andy's demo above
x What infrastructure is required? x What technical support would councils need to install and use? x Have to specify every individual item to be included in the Preview Site
It might be a bit simpler than rewriting links, just using hook_node_access and then maybe using either condition field or entity references to determine whats allowed.
On a form dev site, I am using the newest preview_link which is version 2.1.0-alpha2 and this may have implemented something like the above. This is how it works:
Screenshot of the preview link form follows:
Not bad :)
@stephen-cox please install on Product site - thank you!
Require a config option (can't find it in the UI) for preview_link.settings.yml
set the key multiple_entities: true
@willguv This is now on the product site. You can now add extra content when generating a preview link.
It looks like we'll need to make some changes to accommodate it though. This is an unpublished guide overview: https://product.localgovdrupal.org/preview-link/node/120/755882c3-d07f-4dca-8bbd-5d18f7348efb
The guide pages are not in the navigation even though they are accessible:
@stephen-cox this looks promising - thank you!
When clicking "Preview link" for a Guide overview, are all the linked guide pages automatically populated in the entities list?
I think we should remove the Drupal-isms. The content group can help with new wording
Is it possible to include a control to vary the expiry time (either per link or somewhere in config?)
What else would we need to do please?
When clicking "Preview link" for a Guide overview, are all the linked guide pages automatically populated in the entities list?
It's a manual job to add all the links you want to preview. We could build a form to do this automatically for things like guides and step by steps, but it would a chunk of work.
Is it possible to include a control to vary the expiry time (either per link or somewhere in config?)
This can be configured at a global level; not on a given page. As discussed in Slack there's no UI for setting this, although patching the module to add a config form should be easy enough.
What else would we need to do please?
To release this as is, it's just a matter of turning it on for new sites and documenting how to do it for existing sites.
@stephen-cox patch the module to provide an UI for:
@stephen-cox could we talk at today's PG about the work involved to provide a form to add all guides/ step by step assets to a preview link automatically?
Would be good to get an estimate
We think around a day's work, followed by technical review
Let's check out why it's an Alpha
If urgent need, devs can turn on the Alpha version via the command line
PR adding the admin UI which will allow sites to turn on previewing of multiple pages here: https://github.com/localgovdrupal/localgov/pull/691
Could you demo this at the next PG @stephen-cox please?
About 10 hours work
Ideally should include:
Consider size of each above, maybe needs guidance
@willguv There are pull / merge requests for all this here:
See this in action at https://www.youtube.com/watch?v=rCREsyceNBw
Preview links only work for single pages. This means editors have to send multiple links to service colleagues for them to check guides, step by step, directories, whole content sections... it's not ideal
In Cumbria we got around this issue using separate environments, and Entity Share to push content between them https://cumbria.localgov.blog/2022/05/31/using-entity-share-with-localgov-drupal/
This may not be practical for many councils. It would be good to explore options