Skip to content

Fix redirect description persistence#550

Merged
duncanmcclean merged 5 commits into
statamic:7.xfrom
eminos:fix-redirect-description-persistence
May 5, 2026
Merged

Fix redirect description persistence#550
duncanmcclean merged 5 commits into
statamic:7.xfrom
eminos:fix-redirect-description-persistence

Conversation

@eminos
Copy link
Copy Markdown
Contributor

@eminos eminos commented May 4, 2026

Summary

This fixes a bug in the new redirects feature where the Description field was shown in the publish form but discarded when creating or updating a redirect.

The controller was only copying the core redirect attributes (source, destination, response_code, and enabled) onto the redirect model. Any additional blueprint fields, including description, never made it into the redirect's data payload.

Changes

  • Preserve redirect blueprint data on create and update.
  • Exclude system/core redirect fields from the custom data payload.
  • Add regression tests for saving the description field when creating and updating redirects.

Testing

  • ./vendor/bin/pint --dirty
  • ./vendor/bin/phpunit tests/Redirects/CreateRedirectTest.php tests/Redirects/UpdateRedirectTest.php

@duncanmcclean duncanmcclean merged commit fc27ac5 into statamic:7.x May 5, 2026
14 checks passed
@duncanmcclean
Copy link
Copy Markdown
Member

Thanks!

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