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

Invalid block tag on line 7: '#container' #76

Closed
nicokant opened this issue Jun 25, 2024 · 8 comments
Closed

Invalid block tag on line 7: '#container' #76

nicokant opened this issue Jun 25, 2024 · 8 comments

Comments

@nicokant
Copy link
Contributor

nicokant commented Jun 25, 2024

Invalid block tag on line 7: '#container', expected 'endblock'. Did you forget to register or load this tag?

This error was introduced with slippers, self closing tags in slippers don't need starting #.

Probably would be useful to have test for these templates, to make sure you are not shipping a broken version.

Screenshot from 2024-06-25 13-48-17

@danihodovic
Copy link
Owner

This works perfectly fine for me. Try https://django-allauth-ui.hodovi.ch/accounts/login

@danihodovic
Copy link
Owner

Did you install slippers as a dependency and add it to installed apps? See the Readme

@nicokant
Copy link
Contributor Author

Yes, I already had slippers installed, I also have enabled slippers as builtin template filter (optional part of the installation section of slippers)

@danihodovic
Copy link
Owner

danihodovic commented Jun 25, 2024

I'm unsure where the problem may be. There are two ways I test this:

  • by running the project locally ./manage.py runserver_plus (which uses test settings)
  • by deploying a sample app to Hetzner

1.0.0 was a breaking change so I'll try to help you get upgraded, but I need more info to debug with

@nicokant
Copy link
Contributor Author

I think the problem is that you are using components.yaml to describe the library components, but since it's inside templates it's going to be replaced by mine components.yaml (this is django default override behaviour for templates).
You need to place your components in a separate registry (https://mitchel.me/slippers/docs/registering-components/#adding-components-to-a-different-register) so that it doesn't clash with the components defined by your users.
The "simple" tutorial for slippers is mostly for django projects, not for django reusable apps like in this case :)

@danihodovic
Copy link
Owner

Should be fixed in 1.1.6

@danihodovic
Copy link
Owner

danihodovic commented Jun 28, 2024

Does that solve your problem Nico?

@nicokant
Copy link
Contributor Author

nicokant commented Jul 3, 2024

I confirm, it's working :)

@nicokant nicokant closed this as completed Jul 3, 2024
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

No branches or pull requests

2 participants