Skip to content

i18n.py applies patch after derive_settings method #1292

@anfbermudezme

Description

@anfbermudezme

The template at tutor/templates/build/openedx/settings/partials/i18n.py#L16 applies {{ patch("openedx-common-i18n-settings") }} after derive_settings(name). This causes derived values in Studio (e.g., FRONTEND_REGISTER_URL = LMS_ROOT_URL + "/register") to be evaluated before LMS_ROOT_URL can be set by the patch. During image build, the CMS translations step fails:

RUN ./manage.py cms --settings=tutor.i18n compile_xblock_translations
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
# in cms/envs/common.py when LMS_ROOT_URL is None

There’s already a fix in the release branch: #1256, but I suggest reordering the patch in tagged versions too, since the impact goes beyond image builds to other workflows that rely on derived settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Pending Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions