Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion changelog.d/20260120_142137_eemaanamir_remove_site_id.md

This file was deleted.

27 changes: 0 additions & 27 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,33 +320,6 @@ This configuration parameter sets the Contact Email.

This configuration parameter sets the Platform Name.

SITE_ID and email branding
~~~~~~~~~~~~~~~~~~~~~~~~~~

We do **not** override ``SITE_ID`` during initial Tutor setup.

Leaving ``SITE_ID`` unset allows Django to create sites correctly:

- ``example.com`` → ``id = 1``
- LMS site → ``id = 2``

Overriding ``SITE_ID`` too early may result in the LMS site using ``id = 3`` and
``example.com`` using ``id = 2``.

When to set SITE_ID
*******************

For features that rely on site context (for example bulk emails or other
personalized emails), explicitly set::

SITE_ID = 2

Add this setting in the ``openedx-common-settings`` patch::

patches:
openedx-common-settings: |
SITE_ID = 2

Custom Open edX docker image
----------------------------

Expand Down
17 changes: 0 additions & 17 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,20 +226,3 @@ The handy :ref:`update-mysql-authentication-plugin <update_mysql_authentication_

tutor local do update-mysql-authentication-plugin $(tutor config printvalue OPENEDX_MYSQL_USERNAME)
tutor local do update-mysql-authentication-plugin $(tutor config printvalue MYSQL_ROOT_USERNAME)

Emails sent without correct branding
------------------------------------

**Cause**

When the platform cannot determine the site from the request, it falls back to
``SITE_ID``. If ``SITE_ID`` points to ``example.com``, emails are sent without
proper branding.

**Fix**

Ensure your LMS site uses ``id = 2`` and set::

SITE_ID = 2

in the ``openedx-common-settings`` patch, then restart Tutor.
3 changes: 3 additions & 0 deletions tutor/templates/apps/openedx/settings/partials/common_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
}
}

# The default Django contrib site is the one associated to the LMS domain name. 1 is
# usually "example.com", so it's the next available integer.
SITE_ID = 2

# Contact addresses
CONTACT_MAILING_ADDRESS = "{{ PLATFORM_NAME }} - {% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}"
Expand Down