Develop v4 - #640
Open
kirtesh-cstk wants to merge 3 commits into
Open
Conversation
The edit button linked to the entry and field but said nothing about the page it was clicked from. The CMS cannot work that out from the entry alone: a referenced entry can be rendered on several pages, and a nested one has no page among the entries that directly reference it. Without it the live preview panel falls back to the environment base URL. The redirect URL now carries the current page as preview-url, which the CMS already understands. Live preview's own query parameters are stripped so only the page remains. Co-Authored-By: Claude <noreply@anthropic.com>
The copier in addLivePreviewQueryTags and the stripper in getCurrentPageUrl are inverse operations on the same set of parameters, and each carried its own copy of it. Adding a parameter to one and not the other would have let a preview parameter ride back into preview-url. Both now read LIVE_PREVIEW_QUERY_PARAMS. getCurrentPageUrl drops that list plus cslp-buttons, which the edit button reads off the page URL but must not be forwarded onto internal links. Also drops preview_variant from the strip list. It appears nowhere else in src, so it was guarding against a parameter that does not exist. The copier no longer requires content_type_uid and entry_uid to be present together. Neither the SDK nor the panel produces a URL with one and not the other, and setConfigFromParams already reads them independently. Co-Authored-By: Claude <noreply@anthropic.com>
…view-url fix(edit-button): send the page the editor was on to the CMS
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.