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

[BUG] Container opens with an exception #163

Open
florianRepenn opened this issue Jun 6, 2024 · 1 comment
Open

[BUG] Container opens with an exception #163

florianRepenn opened this issue Jun 6, 2024 · 1 comment

Comments

@florianRepenn
Copy link
Contributor

Description

Django: 4.2
django-cms: 3.11.6
djangocms-bootstrap4: 3.0.1

Adding the content element Container leads to the following exception:

TypeError at /de/admin/cms/page/add-plugin/
__str__ returned non-string (type __proxy__)

The reason for this is gettext_lazy returning a __proxy__ object instead of the actual string of the help_text fields.

Solution

Replacing gettext_lazy with gettext in djangocms_bootstrap4/contrib/bootstrap4_grid/models.py solves the problem.

This could have the side effect of not getting the correct translations of the help_text fields when creating a Container. But when I tested it on older versions (Django 3.1, django-cms 3.7.4, djangocms-bootstrap4 1.6.0) where the plugin still works, there were no translations either.

Screenshot

exception1

@florianRepenn
Copy link
Contributor Author

PR: #164

@leture leture mentioned this issue Aug 9, 2024
4 tasks
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

1 participant