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

5.3 - inline editable blocks broken with custom admin route #1281

Closed
2 tasks done
PortableSteve opened this issue Nov 25, 2024 · 1 comment
Closed
2 tasks done

5.3 - inline editable blocks broken with custom admin route #1281

PortableSteve opened this issue Nov 25, 2024 · 1 comment
Assignees

Comments

@PortableSteve
Copy link
Contributor

PortableSteve commented Nov 25, 2024

Module version(s) affected

5.3.1

Description

If a custom admin route is set, inline editable blocks cannot be saved. Version 5.3 of this module assumes the admin route is /admin

How to reproduce

Set a custom admin route.

Add a Content Block to an element area.

Make changes to the content block and try to save it.

Browser console shows a 404 error and the changes are not saved.

Possible Solution

Update line 245 of ElementalAreaController.php to:

$form->setFormAction(AdminRootController::admin_url("$urlSegment/elementForm/$id"));

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

PRs

PortableSteve added a commit to PortableSteve/silverstripe-elemental that referenced this issue Nov 26, 2024
Fixes an issue saving inline editable content blocks if a custom admin route was set
@GuySartorelli GuySartorelli self-assigned this Nov 26, 2024
@GuySartorelli
Copy link
Member

PR merged. This will be automatically tagged by GitHub Actions.

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

No branches or pull requests

2 participants