Skip to content

Conversation

@ktyagiapphelix2u
Copy link
Contributor

Description

Fixing mktg urls for infinite redirect loop

Ticket

https://2u-internal.atlassian.net/browse/BOMS-215

Copilot AI review requested due to automatic review settings November 10, 2025 06:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates marketing site URL configurations across Python and YAML configuration files, standardizing URL paths and removing deprecated marketing URLs.

  • Simplified MKTG_URLS by removing unused marketing page keys (ACCESSIBILITY, CAREERS, ENTERPRISE, MEDIA_KIT, NEWS, SITE_MAP)
  • Updated URL paths for COURSES, PRIVACY, and TOS_AND_HONOR to shorter, more standardized paths
  • Added missing marketing URL entries to YAML configuration and cleaned up trailing whitespace

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
py_configuration_files/lms.py Removed deprecated marketing URL keys and updated paths for COURSES, PRIVACY, and TOS_AND_HONOR
configuration_files/lms.yml Removed FAQ key, updated COURSES path, added BLOG/DONATE/TOS_AND_HONOR keys, and fixed trailing whitespace

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

COURSES: /course
COURSES: /courses
BLOG: /blog
DONATE: /donate
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The FAQ key was removed from configuration_files/lms.yml but is still present in py_configuration_files/lms.py (line 437: 'FAQ': '/student-faq'). These two configuration files should remain consistent. Either add FAQ back to the YAML file or remove it from the Python file as well.

Suggested change
DONATE: /donate
DONATE: /donate
FAQ: /student-faq

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks relevant comment

Copilot AI review requested due to automatic review settings November 10, 2025 07:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


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

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Changing MARKETING_SITE_ROOT default from 'http://localhost:8080' to '/' is a significant behavioral change. The value '/' is a relative path rather than a full URL, which may cause issues when constructing absolute URLs for marketing site links.

If this is intentional to support relative paths, ensure that:

  1. All code using MARKETING_SITE_ROOT can properly handle relative paths
  2. The change is documented and tested
  3. Consider if this affects external link generation or redirects

Alternatively, if this should remain an absolute URL, consider using 'http://localhost:18000' to match the typical LMS development environment.

Suggested change
MARKETING_SITE_ROOT = os.environ.get('MARKETING_SITE_ROOT', '/')
MARKETING_SITE_ROOT = os.environ.get('MARKETING_SITE_ROOT', 'http://localhost:18000')

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

@ktyagiapphelix2u Can this entire setting be removed ?

As we already have MKTG_URLS['ROOT'] so should we rely on this variable anymore ?

Can you check with @robrap or in general with community on this ?

Copy link
Contributor

@chintanjoshi-apphelix-2u chintanjoshi-apphelix-2u left a comment

Choose a reason for hiding this comment

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

Minor comments to check a few things.

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

Successfully merging this pull request may close these issues.

3 participants