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

Handle changes in ContentTypes more gracefully. #1374

Closed
bobdenotter opened this issue May 13, 2020 · 2 comments · Fixed by #1391
Closed

Handle changes in ContentTypes more gracefully. #1374

bobdenotter opened this issue May 13, 2020 · 2 comments · Fixed by #1391
Labels
🐛 tag: bug This is a bug.

Comments

@bobdenotter
Copy link
Member

When adding a new contenttype foo_bar_qux, you might get this error when requiesting a page:

Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Parameter "contentTypeSlug" for route "listing" must match "homepage|pages|entries|blocks|page|entry|block" ("foo_bar_qux" given) to generate a corresponding URL.").

It's remedied bu running bin/console cache:clear, but this is not very user friendly.

@bobdenotter bobdenotter added the 🐛 tag: bug This is a bug. label May 13, 2020
@bobdenotter bobdenotter added this to the Bolt 4.0.0 stable milestone May 13, 2020
@I-Valchev
Copy link
Member

Two more things:

  • View saved version on site button does not work before clearing the cache
  • Adding a CT which does not have a singular_name or singular_slug gives a 500, which is difficult to debug.

@I-Valchev
Copy link
Member

Update on this:

container params can only be set before the container is compiled, which means we cannot update the container bolt.requirement.contenttypes param at runtime. That means when a new content type is created, cache has to be cleared.

This looks, however, like an important usability issue impacting the "simplicity of creating content" aim of Bolt :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 tag: bug This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants