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

FIX CMSPreview 500 error #25

Merged
merged 1 commit into from
Jun 26, 2017

Conversation

christopherdarling
Copy link
Contributor

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

@christopherdarling christopherdarling force-pushed the patch-1 branch 2 times, most recently from 5adaa8f to ebc09b3 Compare October 29, 2016 19:08
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
@christopherdarling
Copy link
Contributor Author

Updated PR to exclude check for 'CMSPreview' $_GET param as this still caused an error if browsing the site with ?stage=Stage query param

@danaenz
Copy link

danaenz commented Feb 28, 2017

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.

@camspiers
Copy link
Contributor

@kyle-beattie @shane-garelja Can someone take a look at this PR?

@christopherdarling
Copy link
Contributor Author

@camspiers would be great if we could get this merged?

@bendubuisson
Copy link
Contributor

@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)

@danaenz
Copy link

danaenz commented Jun 26, 2017

@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.

@bendubuisson
Copy link
Contributor

bendubuisson commented Jun 26, 2017

@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!

@christopherdarling
Copy link
Contributor Author

Thanks for the merge @bendubuisson. Could we get a new release?

@christopherdarling christopherdarling deleted the patch-1 branch June 27, 2017 07:21
@bendubuisson
Copy link
Contributor

Thanks for your contribution! Just released 4.2.1
https://github.com/heyday/silverstripe-cacheinclude/releases/tag/4.2.1

Cheers

@christopherdarling
Copy link
Contributor Author

Awesome, cheers Ben

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.

4 participants