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.
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