Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Workspaces #755

Merged
merged 5 commits into from
Aug 13, 2024
Merged

Compatibility with Workspaces #755

merged 5 commits into from
Aug 13, 2024

Conversation

ekes
Copy link
Member

@ekes ekes commented Aug 11, 2024

What does this change?

Workspaces has issues with core, pathauto, and redirect that are experienced with LocalGov Drupal.

Core

https://www.drupal.org/project/drupal/issues/3179199

Most commonly the automatically created pathauto revision id will clash with a previous revision id of some content that is being published, causing (because of not checking entity type with revision id) an erroneous error that there is content in a non-default workflow state in the space. Very confusing.

How to test

Automated tests on the patch. Manual steps (I'd advise the last one) to reproduce on the issue.

Pathauto

https://www.drupal.org/project/pathauto/issues/3283769

Main problem experienced in manual testing with LGD was when something with a path pattern dependent on a parent (like services parent) was in a space that was published the paths were regenerated and the parent path would be /node/123 at the point of publishing, so the child ended up with node/123/child-title. With the patch paths are generated in the space, and not regenerated when the space is published.

How to test

Tediously create content in spaces with paths that depend on a parent till it goes wrong.

Redirect

https://www.drupal.org/project/redirect/issues/3431260

This one allows redirect to be somewhat workspaces aware. Notes on my earlier thoughts https://www.drupal.org/project/redirect/issues/3114103#comment-15714027

How to test (and problem)

Create content in a space, then change its title. It will generate a redirect, but this will fail with a fatal error as it tries to create a redirect.

How can we measure success?

Can use workspaces with LGD.

Have we considered potential risks?

Issues don't change data structure, so should be fine to apply. If they stop applying or a different approach is taken we had Workspaces working till then and will have to move to any other fix.

 - Core patch for integration with workflows / content moderation.
 - Pathauto patch to prevent recalculation of aliases when publishing a
   space (order is not always good, and paths relying on paths, services
   parent for example, can be incorrect).
 - Redirect patch to allow it to be spaces aware, and avoid a sql error.
Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah baby! This does seem to fix the problems with Workspaces where changing url aliases in the stage workspace generated fatal errors.

Nice work @ekes !

@finnlewis finnlewis merged commit f0cd618 into 3.x Aug 13, 2024
8 checks passed
@finnlewis finnlewis deleted the fix/workspaces branch August 13, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants