Skip to content

[BUG] Container opens with an exception #163

@florianRepenn

Description

@florianRepenn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions