Skip to content

Conversation

abeforgit
Copy link
Member

@abeforgit abeforgit commented Sep 1, 2025

Overview

PR #1323 added a check to recognize older-style literal nodes (without a data-literal-node attribute).
Unfortunately, this check also caught resource-nodes with a contentLiteral that also had a datatype, resulting in articles no longer being parsed correctly.

This uncovered a fatal flaw in the current parsing logic: there is no way to differentiate resource-nodes with contentLiterals from literalnodes, based on rdfa only (i.e. in documents not made by the editor, or older editor documents).

I investigated what a long-term solution would look like, and I think it will involve a rethink of resource nodes and literal nodes, most likely dropping the idea of resource nodes altogether (and only keeping literal nodes). However, that would involve too much rewriting to do in a reasonable time.

connected issues and PRs:

GN-5676

Plugin pr with version bump: lblod/ember-rdfa-editor-lblod-plugins#594

frontend GN pr: lblod/frontend-gelinkt-notuleren#872

frontend RB pr: lblod/frontend-reglementaire-bijlage#337

Setup

How to test/reproduce

A test is added to check for the erroneous parsing.
To test the original problem, link in the plugins using the dev build, or use any of the frontend prs
and check that articles now correctly survive a page reload, while also avoiding
the problems that were discovered in pr #1323

Challenges/uncertainties

It's a hack that specifically targets the failure case that was discussed in
#1323, while the original solution attempted a more broad coverage. There is a
chance there are other failure cases that we didn't know about.

Checks PR readiness

  • changelog
  • npm lint
  • no new deprecations

@abeforgit abeforgit merged commit b35b289 into master Sep 4, 2025
5 checks passed
@abeforgit abeforgit deleted the fix/article-parsing branch September 4, 2025 08:41
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