[16.0][FIX] document_page_reference: migrate widget to OWL#622
Open
dnplkndll wants to merge 3 commits into
Open
[16.0][FIX] document_page_reference: migrate widget to OWL#622dnplkndll wants to merge 3 commits into
dnplkndll wants to merge 3 commits into
Conversation
The legacy JS widget registered in web.field_registry was not picked up by the OWL form view parser, causing "Missing widget: document_page_reference" warnings and the content_parsed field not rendering at all. Changes: - Migrate JS widget from legacy field_registry to OWL registry - Fix retargetLinks adding target="_blank" to internal reference links - Override _get_page_index to use oe_direct_line links in category pages - Replace oe_read_only/oe_edit_only CSS classes with proper attrs/invisible - Add tour test for reference link navigation - Fix _compute_content_parsed using self instead of record in loop
html_escape() returns markupsafe.Markup, which auto-escapes plain str when concatenated. Use Markup() for HTML literals to prevent the index links from being double-escaped. Also add sanitize=False to content_parsed field to match content field.
Co-authored-by: Ignacio J. Ortega <nacho.ortega@gmail.com>
Contributor
|
Hi @etobella, |
This was referenced Jun 19, 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.
Supersedes #601 (rebased on current 16.0 +
index.htmlregen). Original work by @IJOL.The legacy
web.field_registrywidget isn't picked up by the OWL form parser, socontent_parsedrenders raw${reference}text instead of clickable links. This migrates the widget to OWL (registry.category("fields")+HtmlField), replaces theoe_read_only/oe_edit_onlyCSS toggle (dead in OWL forms) withreadonly="1"/invisible, strips thetarget="_blank"thatretargetLinksadds to internal links, and fixes aMarkupescaping case in_get_page_index.