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

ENH Allow no recordId to be passed in #347

Conversation

emteknetnz
Copy link
Member

Issue silverstripe/silverstripe-admin#1782

While this isn't exactly the deepest way of fixing the issue, the component rendering is triggered by redux so it's going to be very difficult and not worth the effort just to fix a dev only console warning.

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

It seems like there's something very buggy about the HistoryViewerField - the entire Root.History tab is missing from inline-edible blocks, despite no code that I can find to exclude it.

Any other arbitrary tab you add via getCMSFields() is included, so without code to explicitly exclude this one, it should also display.

Adding a HistoryViewerField to another tab doesn't stop that tab from appearing in the list - but trying to open that field does cause the UI to freak out, and close the block. Trying a second time will open the tab, but without any history viewer at all.

All of that said - I don't think that's worth trying to tackle, especially not just to remove this one console error.
I had a click around the history tab of both non-inline-editable blocks and various pages and couldn't find any problem that this change causes, so I'm okay with it.

@GuySartorelli GuySartorelli merged commit 0c02307 into silverstripe:2.2 Jun 18, 2024
12 checks passed
@GuySartorelli GuySartorelli deleted the pulls/2.2/allow-no-record-id branch June 18, 2024 03:03
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