Update Resource preview to support settings tag in Weblinks#16954
Open
smg6511 wants to merge 2 commits into
Open
Update Resource preview to support settings tag in Weblinks#16954smg6511 wants to merge 2 commits into
smg6511 wants to merge 2 commits into
Conversation
Adds parsing of setting tags used in weblinks
Tweak section documentation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.x #16954 +/- ##
============================================
- Coverage 21.67% 21.67% -0.01%
- Complexity 10786 10791 +5
============================================
Files 566 566
Lines 33149 33170 +21
============================================
+ Hits 7186 7189 +3
- Misses 25963 25981 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What changed and why
Added condition in
getPreviewUrlto take system settings (including ones created by Extras like ClientConfig) into account and parse them before checking validity. Previously, Weblinks with valid targets (Resource or static URLs) supplied by a setting tag would cause preview to fail and an error message to be logged.How to test
Related issue(s)/PR(s)
This PR addresses the issue raised in the MODX Community forum by @SnowCreative.
Compatibility notes
n/a
Breaking change assessment
n/a
Test coverage
No pre-existing tests for this method; none currently planned.
Contributors
See related issues above.
AI tool use
n/a