Skip to content

fix: Load the context settings correctly during save - #530

Merged
matdave merged 4 commits into
mainfrom
initialize
Jul 16, 2026
Merged

fix: Load the context settings correctly during save#530
matdave merged 4 commits into
mainfrom
initialize

Conversation

@matdave

@matdave matdave commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: matdave <mat@matdave.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to ensure Fred’s AJAX endpoints initialize MODX in the correct context (instead of always web), so context-specific settings are loaded correctly during save/load operations. It also bumps the package version and documents the change in the changelog.

Changes:

  • Pass the current resource context key (ctx) through save/load AJAX requests and use it during endpoint initialization.
  • Bump package version to 3.2.1-pl.
  • Add a changelog entry for the fix.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
core/components/fred/docs/changelog.txt Adds a 3.2.1-pl changelog entry describing the context-loading fix.
assets/components/fred/web/endpoints/init.3x.php Initializes MODX using a context key from the request instead of hardcoding web.
assets/components/fred/web/endpoints/init.2x.php Same as above for MODX 2.x initialization.
_build/gpm.json Bumps package version to 3.2.1-pl.
_build/config.json Bumps build config version to 3.2.1-pl.
_build/assets/js/Actions/fred.js Appends ctx to save/load endpoint requests so the backend can initialize the correct context.

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

Comment thread assets/components/fred/web/endpoints/init.3x.php
Comment thread assets/components/fred/web/endpoints/init.2x.php
matdave and others added 3 commits July 16, 2026 10:52
Signed-off-by: matdave <mat@matdave.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

This comment was marked as low quality.

@matdave
matdave merged commit 75346bf into main Jul 16, 2026
1 check passed
@matdave
matdave deleted the initialize branch July 16, 2026 17:40
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