Analyze frontend theme output + issue with missing <p> elements when analyzing

Created on 27 March 2020, over 4 years ago
Updated 16 June 2023, over 1 year ago

While implementing yoast_seo for a client we stumbled onto two issues:

1. yoast_seo analyses the output of a rendered entity. This entity should be rendered in the frontend theme rather than using the administration theme which is active when running the AnalysisFormHandler logic. In the attached patch, an addition to the yoast_seo settings is added where you can select the theme to use when analysing.

2. Another issue we encountered is that not all <p> elements are 'detected' when analysing. We traced this problem back to the getParagraphsInTags method in https://github.com/Yoast/YoastSEO.js/blob/develop/src/stringProcessing/m..., which cannot handle newlines in the given text. This issue is solved by simply stripping all \n characters in the createEntityPreview method.

Please see the attached patch.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇱Netherlands Ruuds

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024