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

Subsite ErrorPage published in main CMS generates 404 as the static version #439

Open
dnsl48 opened this issue Jul 26, 2019 · 4 comments
Open

Comments

@dnsl48
Copy link
Contributor

dnsl48 commented Jul 26, 2019

Version

silverstripe-themes/simple 3.2.0
silverstripe/recipe-cms    4.4.1
silverstripe/recipe-plugin 1.3.0
silverstripe/subsites      2.3.x-dev ca01e26

Description

When publish an ErrorPage in a subsite from the main CMS panel (not a subsite), the
errorpage module doesn't account for the subsites and renders 404 as the page static version.
When publish the same Error page from within the subsite CMS panel, it renders the correct content.

Happens here: https://github.com/silverstripe/silverstripe-errorpage/blob/6f1fcfc571787662b179f47ad6fe01185d2daf76/src/ErrorPage.php#L318

Here's an example of the erroneous content:

The requested page could not be found.
@robbieaverill
Copy link
Contributor

Can you provide some clearer steps to reproduce? Here's what I've tried:

  • Main site URL: cwp23.localhost
  • A subsite created with a domain cwp23-subsite.localhost
  • Publish error pages in both subsite and main site
  • Hit cwp23.localhost/fsidofoisfois - renders the main site's error page correctly
  • Hit cwp23-subsite.localhost/sdfijsdofjsdofj - renders the subsite's error page correctly

@dnsl48
Copy link
Contributor Author

dnsl48 commented Jul 28, 2019

Hit cwp23.localhost/fsidofoisfois - renders the main site's error page correctly
Hit cwp23-subsite.localhost/sdfijsdofjsdofj - renders the subsite's error page correctly

When you hit it in the browser it's not showing you the static version, but always renders it anew. Static versions go into public/assets/error-*.html files. I think that makes it impact/low.

@robbieaverill
Copy link
Contributor

Right. I’m sure I checked those files too... =/

@dnsl48
Copy link
Contributor Author

dnsl48 commented Jul 28, 2019

Publish error pages in both subsite and main site

If you published it through the main site last, then it could override the wrong content written by the subsite before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants