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: Update status code if obsolete redirect targets get updated #28

Merged
merged 8 commits into from
Oct 11, 2023

Conversation

dlubitz
Copy link
Contributor

@dlubitz dlubitz commented May 12, 2023

If I create an redirect, which source uri is already set up as target uri, this redirect becomes obsolete. So this obsolete redirect get corrected to the new target. Now the status code of the obsolete redirect gets also updated.

# before
Existing: "/foo" => "/bar" (301)
New: "/bar" => "" (410)
Corrected: "/foo" => "" (301)

# after fix
Existing: "/foo" => "/bar" (301)
New: "/bar" => "" (410)
Corrected: "/foo" => "" (410)

Also fixed styling and test execution.

@dlubitz dlubitz requested a review from Sebobo May 12, 2023 15:45
@dlubitz dlubitz self-assigned this May 13, 2023
@dlubitz
Copy link
Contributor Author

dlubitz commented Jul 10, 2023

Sorry for the many formatting changes. But so we get the pipeline green again.

Actual change is just:
https://github.com/neos/redirecthandler-databasestorage/pull/28/files?diff=split&w=1#diff-3adf7c6086c560924366c8411bec302ff4326bfdce18d5323ea2aa75c33cb91aR294-R295

and the new tests.

Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

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

i trust you

# Conflicts:
#	Classes/RedirectStorage.php
Copy link
Member

@ahaeslich ahaeslich left a comment

Choose a reason for hiding this comment

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

Tested it in combination with neos/redirecthandler-neosadapter#60

@dlubitz dlubitz merged commit 8043fbd into main Oct 11, 2023
@dlubitz dlubitz deleted the bugfix-update-status-code branch October 11, 2023 08:59
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