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

CMS preview doesn't work inside ItemEditForm #1251

Closed
GuySartorelli opened this issue May 18, 2021 · 11 comments · Fixed by #1250
Closed

CMS preview doesn't work inside ItemEditForm #1251

GuySartorelli opened this issue May 18, 2021 · 11 comments · Fixed by #1250

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented May 18, 2021

silverstripe/silverstripe-framework includes a separate form in GridFieldDetailForm_ItemRequest's ItemEditForm which LeftAndMain doesn't add the necessary components to form CMS previews (cms-previewable ExtraClass and SilverStripeNavigator field).

I think an extension class should be included as a part of this module which takes advantage of the updateItemEditForm extension point of GridFieldDetailForm_ItemRequest to add these.

Edit: The following pull requests all ultimately relate to this:

And, as an extension of all of this:

GuySartorelli referenced this issue in signify-nz/silverstripe-admin Sep 28, 2021
Fixes silverstripe/silverstripe-cms#2659
@GuySartorelli
Copy link
Member Author

Oops, looks like this should have been raised in silverstripe/silverstripe-admin, since that's where the LeftAndMain cms preview code lives. Is there a clean way to move an issue?

@michalkleiner michalkleiner transferred this issue from silverstripe/silverstripe-cms Sep 28, 2021
@michalkleiner
Copy link
Contributor

michalkleiner commented Sep 28, 2021

@GuySartorelli moved the issue from the CMS repo.

You can relink it in your PR description if you want since it changed its URL/reference now (if it didn't auto-update, looks like it might have).

@GuySartorelli
Copy link
Member Author

Thanks!

@GuySartorelli
Copy link
Member Author

GuySartorelli commented Oct 8, 2021

I've put a list of pull requests that relate to this work in the original message.
I'm also working on a PR to update the docs in silverstripe/silverstripe-framework. (Edit: docs PR now linked in original message)

@maxime-rainville
Copy link
Contributor

@brynwhyman Let's maybe bring this in sprint.

@GuySartorelli
Copy link
Member Author

I've just found https://userhelp.silverstripe.org/en/4/creating_pages_and_content/creating_and_editing_content/previewing_changes/ which will also probably need to be updated - if only to mention that the draft/published toggle may not be available for some content.

@GuySartorelli
Copy link
Member Author

@brynwhyman Let's maybe bring this in sprint.

@maxime-rainville Let me know if there's anything you need from me in that regard.
For now I think I've done all I can until there's some feedback on the PRs.

@GuySartorelli
Copy link
Member Author

@emteknetnz It might be worth keeping this ticket open while the other PRs mentioned in the description are still pending - especially docs.

@emteknetnz emteknetnz reopened this Jan 30, 2022
@emteknetnz
Copy link
Member

Sorry yes intend to keep open, GitHub auto-closed it due to closing a linked PR

@emteknetnz emteknetnz self-assigned this Jan 31, 2022
@emteknetnz
Copy link
Member

All PRs have been merged.

Thank you once again @GuySartorelli this was a significant contribution

@GuySartorelli
Copy link
Member Author

Thanks for working with me to get it in!

GuySartorelli added a commit to GuySartorelli/silverstripe-framework that referenced this issue Feb 6, 2022
I figured I'd write this while these changes are fairly fresh in my mind, and save someone else the trouble.
Obviously if there's some procedure ormpolicy for writing release notes that I'm not following here feel please let me know and feel free to close this PR.

Refer to silverstripe/silverstripe-admin#1251 for preview PRs, silverstripe#10204 for the `GridFieldComponent` stuff, and silverstripe/silverstripe-elemental#913 for changes to elemental search indexing.

There are some extra new lines in here that I can't remove from the GitHub editor - but I expect there will be other requested changes so I'll clean that up at the same time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants