-
Notifications
You must be signed in to change notification settings - Fork 19
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 CMSPreview 500 error #25
Conversation
5adaa8f
to
ebc09b3
Compare
A bit of a crude fix for WPP-Public#23 CMS Preview of Live mode doesn't require a DB connection to check if the user can view the stage so is still allowed to run
ebc09b3
to
af62f7e
Compare
Updated PR to exclude check for 'CMSPreview' $_GET param as this still caused an error if browsing the site with ?stage=Stage query param |
I've tested this solution on framework 3.5.3 (which was having similar issues) and it works perfectly. For the moment we leave .htaccess as SilverStripe default which skirts the issue but sacrifices the speed benefits. |
@kyle-beattie @shane-garelja Can someone take a look at this PR? |
@camspiers would be great if we could get this merged? |
@danaenz @christopherdarling hey guys, looking into this but I can't reproduce the issue, can you help reproduce (tried on clean 3.3.1 install with cacheinclude 4.2.0) |
@bendubuisson Ensure that you have added the lines to .htaccess (replace the two references to framework/main.php with silverstripe-cacheinclude/main.php). Then view your site in preview mode (?stage=Stage). It should come up with a PHP error. |
@danaenz right I missed that you were using the main.php (and I know it was in the issue's title 😂 ). Looking into it now, cheers! |
Thanks for the merge @bendubuisson. Could we get a new release? |
Thanks for your contribution! Just released 4.2.1 Cheers |
Awesome, cheers Ben |
A bit of a crude fix for #23
CMS Preview of Live mode doesn't require a DB connection to check if the user can view the stage so is still allowed to run