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

BUGFIX: Respect the configured value for uriPathSuffix #11

Closed

Conversation

c4ll-m3-j4ck
Copy link

@c4ll-m3-j4ck c4ll-m3-j4ck commented May 31, 2023

When using this package, routing is defaulted to routes without appending the chosen uriPathSuffix.

This fix adds the missing check for uriPathSuffix the same way as it is done in Neos\Neos\Routing\FrontendNodeRoutePartHandler

}
$suffixLength = strlen($this->options['uriPathSuffix']);
if (substr($uriPath, -$suffixLength) !== $this->options['uriPathSuffix']) {
throw new Exception\InvalidRequestPathException(sprintf('The request path "%s" doesn\'t contain the configured uriPathSuffix "%s"', $uriPath, $this->options['uriPathSuffix']), 1604912439);
Copy link
Member

Choose a reason for hiding this comment

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

Exception codes must never be re-used.

Suggested change
throw new Exception\InvalidRequestPathException(sprintf('The request path "%s" doesn\'t contain the configured uriPathSuffix "%s"', $uriPath, $this->options['uriPathSuffix']), 1604912439);
throw new Exception\InvalidRequestPathException(sprintf('The request path "%s" doesn\'t contain the configured uriPathSuffix "%s"', $uriPath, $this->options['uriPathSuffix']), 1693381063);

@kdambekalns kdambekalns changed the title FIX: Respect the configured value for uriPathSuffix BUGFIX: Respect the configured value for uriPathSuffix Aug 30, 2023
kdambekalns added a commit to kdambekalns/neos-dimensionresolver that referenced this pull request Jul 2, 2024
Inspired by PR Flowpack#11 opened by @c4ll-m3-j4ck this adds the missing piece
of the puzzle to support the `uriPathSuffix`.
@kdambekalns
Copy link
Member

Thanks again!

This showed me a missing piece in PR #13, so I added it. Closing this one in favor of #13 now.

@kdambekalns kdambekalns closed this Jul 2, 2024
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.

3 participants