Open aschmutt opened 1 year ago
We updated to yoast_seo_premium 5.3.0 on a dev server, the bug is still the same
Any update to this problem? We face it in all our typo3 systems as well.
for me, this false positive is solved with the yoast_seo v9.0.0
Updated to yoast_seo 9.0.1 and the problem still exists on all typo3 systems
We also have this issue. It happens when there is content before the first h1.
In our case it's a breadcrumb navigation. But also empty <a>
tags seem to be a problem, i.e. the <a id="c123"></a>
jumpmarks of TYPO3 content elements.
I moved the marker after the headline, and the breadcrumb navigation below the content and moved it up via CSS. The first is fine, the latter is not, as this works against the principles of designing HTML pages.
I'd love to provide a fix for this, but I have no clue how to compile JS sources in this project.
same issue for us on latest state/version
thanks a lot for the hint. I am xclassing the previewservice and move everything before the h1 to the end. this might not fit for you but maybe gives you an idea
<?php
declare(strict_types=1);
namespace StudioMitte\Theme\XClass\YoastSeo;
use YoastSeoForTypo3\YoastSeo\Service\PreviewService;
class XclassedPreviewService extends PreviewService {
protected function prepareBody(string $body): string
{
$body = parent::prepareBody($body);
$pos = strpos($body, '<h1');
if ($pos !== false) {
$firstPart = substr($body, 0, $pos);
$body = substr($body, $pos) . $firstPart;
}
return trim($body);
}
}
Please give us a description of what happened.
In Backend I click on "SEO needs improvement" and I get the H1 duplicate warning. But on the page, there is just one H1 as it should be: https://www.leuphana.de/studium.html
Please describe what you expected to happen and why.
The H1 warning shall only be displayed, if more than one H1 in source code
How can we reproduce this behavior?
Screenshots
Additional context
Is there maybe some kind of caching involved, so the result is not updated?
Technical info