Problem/Motivation
When a paragraph nested inside another paragraph is checked on its own, its findings name its immediate parent paragraph as their host, not the page that holds both. The report and the messages then point at a paragraph rather than the page an editor opens.
Steps to reproduce
- Create a page with a paragraph that holds another paragraph, with an error in the inner paragraph's checked text field.
- Set up the Check prose with Vale action for paragraphs, and run it on the inner paragraph.
- The finding names the outer paragraph as its host, not the page.
Proposed resolution
Name the top-level entity as the host of a nested paragraph, with the same lookup the report already uses for each row's root. A paragraph nested too deep to reach its page still names its parent, and a paragraph with no parent still has no host.
Rows already stored with a paragraph as their root keep it until a full drush vale:lint --save, or until a field's Vale setting changes.
Remaining tasks
Review.
User interface changes
The content report and messages name the page as the host of a nested paragraph's findings.
API changes
None.
Data model changes
None.
Issue fork vale-3638318
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments