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

GridFieldOrderableRows Breaks CMS Breadcrumbs #363

Open
jmarshstudios opened this issue May 25, 2023 · 4 comments
Open

GridFieldOrderableRows Breaks CMS Breadcrumbs #363

jmarshstudios opened this issue May 25, 2023 · 4 comments

Comments

@jmarshstudios
Copy link

When adding GridFieldOrderableRows extension to a DataObject GridField for a has_many child DataObject the breadcrumbs in the north toolbar of the child DO break (back button and parent links) via multiple root names added to the href attribute.

Example: the toolbar__back-button class in the north toolbar href should be /root/admin/pages/edit/EditForm/etc. but becomes /root/root/root/admin/pages/edit/EditForm/etc instead, leading to a broken link that sends the content author to a 404 error.

This is the only add-on used in this case and commenting out the extension resolves the issue.

screenshot

@michalkleiner
Copy link
Collaborator

Looks like you're running the CMS in a subfolder in the document root. Is it also an issue when you run the CMS in the root of the domain?

@jmarshstudios
Copy link
Author

No; the issue resolves when placed in webroot as suspected. 👍

Suggestions on how one might resolve this for a webroot/subfolder scenario would be appreciated.

@michalkleiner
Copy link
Collaborator

So it's likely related to the recent change around base url within the admin, so likely a valid issue that needs resolving.

@jmarshstudios
Copy link
Author

Appreciate that. I'm not very familiar with extending the CMS but for what its worth:

Commenting out line 900 (Breadcrumbs function) in:
SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest
also seems to resolve this.

No obvious immediate effect for me elsewhere but this foreach must be there for a reason :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants