fix: Load the context settings correctly during save - #530
Merged
Conversation
Signed-off-by: matdave <mat@matdave.com>
Contributor
There was a problem hiding this comment.
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.
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>
theboxer
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.