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

TASK: Fix Lowlevel_ProjectionTests if redirect handler is installed #5421

Draft
wants to merge 1 commit into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

The Following error will be thrown:

Error while catching up: Event 8 in "Neos.Neos:DocumentUriPathProjection": Hook "onBeforeEvent" failed: "DocumentUriPathProjectionHook": Missing configuration for "Neos.Neos.sites.site" or fallback "Neos.Neos.sites.*"

Upgrade instructions

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

The Following error will be thrown:

> Error while catching up: Event 8 in "Neos.Neos:DocumentUriPathProjection": Hook "onBeforeEvent" failed: "DocumentUriPathProjectionHook": Missing configuration for "Neos.Neos.sites.site" or fallback "Neos.Neos.sites.*"
Copy link
Contributor

@dlubitz dlubitz left a comment

Choose a reason for hiding this comment

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

We should make the low level tests dependent on some external packages.

I know the tests will also work if the package is not installed, but if we need the configuration just because of the redirect package, we shouldn't add this.

@mhsdesign
Copy link
Member Author

Hmm then technically we need to adjust the step

And using identifier "default", I define a content repository

to

Then I define a content repository "default" with the following configuration:
"""yaml
projections:
    'Neos.Neos:DocumentUriPathProjection':
        factoryObjectName: Neos\Neos\FrontendRouting\Projection\DocumentUriPathProjectionFactory
"""

which in turn will not register the Neos.RedirectHandler.NeosAdapter:DocumentUriPathProjectionHook then as this step will not use the defaults set. This is all not super nice to be implemented though as its currently rather abstracted which projections are existing.

@dlubitz
Copy link
Contributor

dlubitz commented Jan 7, 2025

But why? Every external package could change the core behavior and you can't control that. If you want to test the core, you simply need to install the core.

@mhsdesign mhsdesign marked this pull request as draft January 8, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants