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
FIX Don't try to preview unlocalised objects #781
FIX Don't try to preview unlocalised objects #781
Conversation
Also happy to change the commit name - when I wrote it I was thinking of the last piece of the chain that I was solving, not the first part as described in the issue itself. |
The only risk this introduced, as we identified in a prior conversation, is that some pages visible in the admin won't appear at all (i.e. 404) in preview. I still this this fix is a more consistent and better functionality, rather than showing a false view of content that then breaks after publish. :) |
@tractorcow I'm not sure if your comment is in response to something I've said, or to the changes I've introduced with this PR.... if the latter, then there is no 404 in the preview (for pages specifically) with this PR. That's what setting the preview url to |
@tractorcow @chrispenny do either of you have an opinion as to whether this change belongs on the |
@GuySartorelli Good question... Can any DataObject implement a Preview window? I don't think I've ever seen it outside of SiteTree, but I vaguely remember reading that it was possible. If any DO can use Preview, then I guess it makes sense to be on |
I think the ability to have a preview is not limited to only |
Yup (I even did a whole talk on it ;p). Any
I'll make the change 👍
I don't think it makes sense to configure this separately - I can't think of any use case where you'd want anything other than the correct preview being displayed in the preview panel. |
51d9237
to
6f7fc63
Compare
Oops I broke some tests - will look at that now |
6f7fc63
to
975329b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍
I don't think there's ever a scenario where you'd want to consider previews as not frontend so I don't think this is a breaking change.
I'm on the fence about whether
updatePreviewLink()
belongs here or inFluentExtension
directly. Probably it belongs onFluentExtension
so it can affect anything else which have a preview (e.g. elemental blocks which aren't inline-editable) - but I'll leave it like this for now (it is still an improvement and solves the specific exact scenario mentioned in the issue) until someone opines.Parent issue