Skip to content
Open
14 changes: 11 additions & 3 deletions configuration_files/cms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ ELASTIC_SEARCH_CONFIG:
- host: edx.devstack.elasticsearch
port: 9200
use_ssl: false
ENABLE_MKTG_SITE: true
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace after 'true'.

Suggested change
ENABLE_MKTG_SITE: true
ENABLE_MKTG_SITE: true

Copilot uses AI. Check for mistakes.

EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: localhost
EMAIL_HOST_PASSWORD: ''
Expand Down Expand Up @@ -315,7 +316,6 @@ FEATURES:
ENABLE_EXPORT_GIT: false
ENABLE_GRADE_DOWNLOADS: true
ENABLE_LTI_PROVIDER: false
ENABLE_MKTG_SITE: false
ENABLE_MOBILE_REST_API: false
ENABLE_OAUTH2_PROVIDER: false
ENABLE_PUBLISHER: false
Expand Down Expand Up @@ -382,8 +382,16 @@ LOG_DIR: /edx/var/log/edx
MAINTENANCE_BANNER_TEXT: Sample banner message
MEDIA_ROOT: /edx/var/edxapp/media/
MEDIA_URL: /media/
MKTG_URLS: {}
MKTG_URL_LINK_MAP: {}
MKTG_URLS:
ROOT: http://localhost:18010
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was asked elsewhere, but ROOT: '' does not work?

Copy link
Contributor Author

@ktyagiapphelix2u ktyagiapphelix2u Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROOT: '' (empty string) does not work as it requires a non-empty value for ROOT in MKTG_URLS. If you set it to an empty string, you’ll get errors. That’s why we use ROOT: http://localhost:18010 for devstack

Uses the same LMS instance for both learning and marketing pages ROOT: http://localhost:18000 points marketing URLs back to the LMS itself

Keep the configurations different as they are designed for different use cases. The devstack configuration allows you to test marketing site integration during development, while the sandbox configuration provides a simpler setup for basic testing.

Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ROOT URL uses port 18010, but this appears to be a hardcoded localhost development URL. Consider using an environment variable or configuration parameter to make this configurable across different environments.

Suggested change
ROOT: http://localhost:18010
# The ROOT URL for marketing pages. Set via the MKTG_URLS_ROOT environment variable, defaults to localhost:18010 for development.
ROOT: ${MKTG_URLS_ROOT:http://localhost:18010}

Copilot uses AI. Check for mistakes.

ABOUT: /about
CONTACT: /contact
FAQ: /help
COURSES: /course
TOS: /edx-terms-service
HONOR: /honor
PRIVACY: /privacy
WHAT_IS_VERIFIED_CERT: /verified-certificate
MOBILE_STORE_ACE_URLS: {}
MODULESTORE:
default:
Expand Down
14 changes: 11 additions & 3 deletions configuration_files/lms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ ELASTIC_SEARCH_CONFIG:
- host: edx.devstack.elasticsearch
port: 9200
use_ssl: false
ENABLE_MKTG_SITE: true
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace after 'true'.

Suggested change
ENABLE_MKTG_SITE: true
ENABLE_MKTG_SITE: true

Copilot uses AI. Check for mistakes.

EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST: localhost
EMAIL_HOST_PASSWORD: ''
Expand Down Expand Up @@ -346,7 +347,6 @@ FEATURES:
ENABLE_EXPORT_GIT: false
ENABLE_GRADE_DOWNLOADS: true
ENABLE_LTI_PROVIDER: false
ENABLE_MKTG_SITE: false
ENABLE_MOBILE_REST_API: false
ENABLE_OAUTH2_PROVIDER: false
ENABLE_PUBLISHER: false
Expand Down Expand Up @@ -422,8 +422,16 @@ MAILCHIMP_NEW_USER_LIST_ID: null
MAINTENANCE_BANNER_TEXT: Sample banner message
MEDIA_ROOT: /edx/var/edxapp/media/
MEDIA_URL: /media/
MKTG_URLS: {}
MKTG_URL_LINK_MAP: {}
MKTG_URLS:
ROOT: http://localhost:18000
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ROOT URL uses port 18000, but this appears to be a hardcoded localhost development URL. Consider using an environment variable or configuration parameter to make this configurable across different environments.

Suggested change
ROOT: http://localhost:18000
ROOT: ${MKTG_ROOT_URL:http://localhost:18000}

Copilot uses AI. Check for mistakes.

ABOUT: /about
CONTACT: /contact
FAQ: /help
COURSES: /course
TOS: /edx-terms-service
HONOR: /honor
PRIVACY: /privacy
WHAT_IS_VERIFIED_CERT: /verified-certificate
MOBILE_STORE_URLS: {}
MODULESTORE:
default:
Expand Down
2 changes: 1 addition & 1 deletion py_configuration_files/lms.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing
'ENABLE_ENTERPRISE_INTEGRATION': True,
})

ENABLE_MKTG_SITE = os.environ.get('ENABLE_MARKETING_SITE', False)
ENABLE_MKTG_SITE = os.environ.get('ENABLE_MARKETING_SITE', True)
MARKETING_SITE_ROOT = os.environ.get('MARKETING_SITE_ROOT', 'http://localhost:8080')

MKTG_URLS = {
Expand Down