Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix removing source path from image TV value in MODX 2.x #508

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

halftrainedharry
Copy link
Contributor

In MODX 2.x, when an image TV has a source assigned, the source path isn't removed correctly from the TV value when the resource is saved in the front-end.

  1. The code tries to load the class "modFileMediaSource" instead of "sources.modFileMediaSource", which creates the error Could not load class: modFileMediaSource from mysql.modfilemediasource.
  2. Sometimes the TV values contains also the MODX base URL (MODX_BASE_URL), sometimes only the Media-Source baseUrl.

Related forum topic: https://community.modx.com/t/trouble-getting-fred-to-save-correct-path-to-image/7917

Fred 3.0.0-pl
MODX 2.8.7-pl


This fix might not work in MODX 3, as I haven't tested it!

@matdave matdave merged commit 79a6ec0 into modxcms:main Aug 19, 2024
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.

2 participants