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

Html templates, 400 and 500 not recreated on flush or build #1134

Open
mediabeastnz opened this issue Nov 20, 2014 · 14 comments
Open

Html templates, 400 and 500 not recreated on flush or build #1134

mediabeastnz opened this issue Nov 20, 2014 · 14 comments

Comments

@mediabeastnz
Copy link

It seems like the html files for error-400 and error-500 are not recreated on dev build or flush.

If you delete them they are recreated which is good but should they not get recreated on flush or build?

This means when you first launch a site those templates will have no database info e.g. site name will be default site name etc.

@stevie-mayhew
Copy link
Contributor

You need to publish the pages to recreate them, its not part of the flush or build step.

@mediabeastnz
Copy link
Author

@stevie-mayhew so if you make changes to your template you need to publish these pages every time?
Seems odd?

@jonom
Copy link
Contributor

jonom commented Nov 30, 2014

@mediabeastnz completely agree these should be regenerated on build and flush - and probably even more often than that. Related: #1139

@dhensby
Copy link
Contributor

dhensby commented Mar 6, 2015

The error files are created on dev/build so why not regenerated? I agree that they should be.

@jonom
Copy link
Contributor

jonom commented Mar 6, 2015

Hey @dhensby I had some discussion with @chillu about this at #1139 and then moved it to UserVoice but I don't think that has turned out to be a good place to generate discussion. Would love to see some activity on this though - maybe time for a discussion on the dev list?

@chillu
Copy link
Member

chillu commented Mar 8, 2015

Template renders can get expensive depending on the project implementation. Adding two page renders to every dev/build is a bit of an overhead that I'd rather avoid (~1-3s?).

As mentioned before in #1139: I would prefer to serve the 404 dynamically by default, and have a stripped down static HTML version of the 500 which would be the same for every install (not generated from Page.ss). Generating the 500 page from Page.ss (and the required complexity of keeping it up to date) could move into a module. What do you guys think?

@lerni
Copy link
Contributor

lerni commented Mar 8, 2015

I think it's a question of concerns. Publishing isn't the preferred job of developers and content-authors do usually not care much about error pages. I had just one project, where CMS driven error-pages were a requirement. I would vote to have this in a module and also would love to see it magically republished.

@dhensby
Copy link
Contributor

dhensby commented Mar 9, 2015

I agree that dev/build is not the place to be publishing static error pages.

Having said that, dev/build currently does do that, it just only does it if they aren't there. If dev/build currently has that responsibility, then it is natural that it takes on doing it every time.

However, as this is an issue we should discuss the ideal way to manage error pages and that is to have them dynamic (which is much more fun and relevant for a user).

@mediabeastnz
Copy link
Author

Getting them out of the site-tree would be great as it can be a little confusing for a content author.
Settings would make the most sense as it only needs to be configured once.

I'm not sure what options you could have under settings though?

@chillu
Copy link
Member

chillu commented Apr 27, 2015

@mediabeastnz
Copy link
Author

Sounds like everyone wants it to be a module rather than core which is cool.
Will this issue be updated once a RFC has been completed?

@tractorcow
Copy link
Contributor

I'd like to see it a separate dev task

Perhaps dev/errorfiles ?

@jonom
Copy link
Contributor

jonom commented May 5, 2015

Sorry guys I missed the second half of this conversation, thought I was following it. Anyway I created an RFC and think it is in line with the thinking here. I posted it on Framework as I figured the changes would affect that module as well as CMS, plus I figured it would be good to keep the RFCs in one place. silverstripe/silverstripe-framework#4149

@tractorcow
Copy link
Contributor

I guess this is a bug, if user experience isn't what's expected.

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

10 participants