Components rendering errors are not displayed in the PCV #10675#10792
Open
ashklianko wants to merge 2 commits into
Open
Components rendering errors are not displayed in the PCV #10675#10792ashklianko wants to merge 2 commits into
ashklianko wants to merge 2 commits into
Conversation
edloidas
requested changes
Jun 11, 2026
Member
|
I think we will postpone with this a bit and with page editor part, as there will be massive rework of the PE itself and how it works, that would require more changes to these PRs. |
Member
Author
|
Switching to draft then |
Removed debug log and trimmed redundant comments per review. Added incremental render-error tracking via onComponentLoaded / onComponentLoadFailed to supplement the ready snapshot on partial reloads. Components rendering errors are not displayed in the PCV #10675 - Marked components that failed the live edit render as invalid in the v6 page components tree - Sourced render-error paths from LiveEditPageViewReadyEvent component data via the page editor bridge - Cleared render-error marks on component add/remove/move and on page reload
Sourced the initial render-error snapshot from the ready message errorPaths payload in LiveEditPageProxy. Removed the dead LiveEditPageViewReadyEvent.getComponents() accessor and LiveEditComponentRecord type. Bumped @enonic/page-editor to 2.0.0-beta.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
edloidas
approved these changes
Jul 8, 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.
Summary
Components that fail to render in the live edit are now marked as invalid in the v6 page components tree, so a broken part/layout/fragment is visible in the outline even though it does not affect form validity.
What changed
LiveEditPageProxyreads the render-error snapshot from the page editor protocol'sreadymessage (errorPaths) and forwards the paths viaPageEventsManager.notifyPageRenderErrors.$renderErrorComponentPathsfact store;PageComponentsViewmerges them into each node's visualinvalidflag.component-loadedclears a mark,component-load-failedadds one.@enonic/page-editorto 2.0.0-beta.1 (modules/libandmodules/app), which introduces theready.errorPathspayload.Why / how it works
The marker reuses the existing invalid visual but is kept separate from form validation: render errors are a real render failure, so they show regardless of validation visibility and never feed
$invalidComponentPaths/setWizardFormValidation.Notable findings / decisions
/main/0). The error set is a snapshot taken at render time; add/remove/move shift sibling indices, and most edits are partial reloads (no fresh snapshot), so the marks would stick to the wrong position. A full positional remap would duplicate the tree's index-shift logic (especially for move) at notable risk, and is overkill for an edge case. We clear the marks on structural changes instead; they are re-reported on the next full render. Move is covered because it fires both component-removed and component-added; config updates do not shift positions and are left untouched.Closes #10675
Requires
@enonic/page-editor>= 2.0.0-beta.1 (enonic/npm-page-editor#86)Drafted with AI assistance