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

Add extension to correctly support element preview #527

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

michalkleiner
Copy link
Contributor

@michalkleiner michalkleiner commented Jun 21, 2023

As per the title, conditional based on base element class existing.

Tried to get the subsite ID from the element, if it has the model extension adding it applied, or from its page.

Targeting 2.8 as I see this as a fix for a broken preview mechanism rather than a new feature or an enhancement, but ok to target 3.0 as well since this can easily be done in project code until this is released.

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.

Nice and clean, works well locally.
I agree this is a bug fix that can and should be released as a patch.

@GuySartorelli GuySartorelli merged commit 6ff4f33 into silverstripe:2.8 Jun 21, 2023
@GuySartorelli
Copy link
Member

GuySartorelli commented Jun 21, 2023

Released as 2.8.2 and 3.0.2 - and congrats, this is apparently your first contribution to subsites 🥳

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