Closed neokoenig closed 1 month ago
Check your JavaScript console in your browser for errors?
Also if you go to SEOmatic -> Content SEO does that also not appear?
No console errors.
Content SEO section renders in the dom as follows:
<div class="flex-grow">
<h2 class="centeralign" style="font-weight: 200;">Content SEO Setup</h2>
<div id="ContentSEOChart" style="width: 300px; margin: 0px auto;">
<div class="cursor-pointer" style="min-height: 310px;">
<div id="apexchartsypxtpxr1" class="apexcharts-canvas apexchartsypxtpxr1 apexcharts-theme-"
style="width: 300px; height: 310px;"><svg id="SvgjsSvg1126" width="300" height="310"
xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svgjs="http://svgjs.dev" class="apexcharts-svg" xmlns:data="ApexChartsNS"
transform="translate(0, 0)">
<foreignObject x="0" y="0" width="300" height="310">
<div class="apexcharts-legend" xmlns="http://www.w3.org/1999/xhtml"></div>
</foreignObject>
<g id="SvgjsG1128" class="apexcharts-inner apexcharts-graphical" transform="translate(23, 0)">
<defs id="SvgjsDefs1127">
<clipPath id="gridRectMaskypxtpxr1">
<rect id="SvgjsRect1129" width="262" height="316" x="-3" y="-3" rx="0" ry="0"
opacity="1" stroke-width="0" stroke="none" stroke-dasharray="0" fill="#fff"></rect>
</clipPath>
<clipPath id="forecastMaskypxtpxr1"></clipPath>
<clipPath id="nonForecastMaskypxtpxr1"></clipPath>
<clipPath id="gridRectMarkerMaskypxtpxr1">
<rect id="SvgjsRect1130" width="260" height="314" x="-2" y="-2" rx="0" ry="0"
opacity="1" stroke-width="0" stroke="none" stroke-dasharray="0" fill="#fff"></rect>
</clipPath>
</defs>
<g id="SvgjsG1133" class="apexcharts-radialbar"></g>
<line id="SvgjsLine1134" x1="0" y1="0" x2="256" y2="0" stroke="#b6b6b6" stroke-dasharray="0"
stroke-width="1" stroke-linecap="butt" class="apexcharts-ycrosshairs"></line>
<line id="SvgjsLine1135" x1="0" y1="0" x2="256" y2="0" stroke-dasharray="0" stroke-width="0"
stroke-linecap="butt" class="apexcharts-ycrosshairs-hidden"></line>
</g>
<g id="SvgjsG1131" class="apexcharts-datalabels-group" transform="translate(0, 0) scale(1)"></g>
<g id="SvgjsG1132" class="apexcharts-datalabels-group" transform="translate(0, 0) scale(1)"></g>
</svg></div>
</div>
</div>
<div style="text-align: left; margin: 0px auto; display: inline-block;">
<h4>Content SEO Setup Checklist:</h4>
<ul class="checkboxChecklist"></ul>
</div>
</div>
admin/seomatic/content
is the same as the screenshot I posted previously. (Clicking on the blank section still takes you there)
Have tried clearing all caches etc..
XHR request to index.php/admin/actions/seomatic/content-seo/meta-bundles?sort=sourceName%7Casc&page=1&per_page=20&siteId=1&filter=new
returns an empty array.
Do you not have any sites or sections set up perhaps? Is this a new site or an existing site?
Existing site where the plugin has been working for years.... Annoying I hadn't noticed when it happened - it just got reported to me the SEO wasn't working properly.
In the DB, there's only one row in the seomatic_metabundles table (the first row, __GLOBAL_BUNDLE__
)
I found an old DB backup which had the additional rows for sections & categories etc;
As an experiment I re-imported the old rows, cleared the SEO caches etc, but no joy - they just get deleted as soon as the admin seomatic content page is loaded - I'm not sure how those rows are generated.
Did you recently update the plugin and/or Craft?
Is it possible that your Site(s) does not have URLs enabled? Or is it possible the Site itself is disabled?
Did you recently update the plugin and/or Craft?
Looks like the behaviour started "nystudio107/craft-seomatic": "4.0.48", -> "nystudio107/craft-seomatic": "4.1.2"; I updated it to 4.1.3 to see if it would fix the issue.
Is it possible that your Site(s) does not have URLs enabled? Or is it possible the Site itself is disabled?
Site is definitely enabled, and is live in production.
Is it worth me disabling/uninstalling the plugin and trying to reset it up from scratch? (bit of a PITA, but not the end of the world).
So there is one and only one thing that will ever cause SEOmatic to delete anything from the seomatic_metabundles
table, and that is this:
https://github.com/nystudio107/craft-seomatic/blob/develop-v5/src/services/MetaBundles.php#L889
public function pruneVestigialMetaBundle($metaBundle): bool
{
$prune = false;
$sourceBundleType = $metaBundle->sourceBundleType;
if ($sourceBundleType && $sourceBundleType !== self::GLOBAL_META_BUNDLE) {
$seoElement = Seomatic::$plugin->seoElements->getSeoElementByMetaBundleType($sourceBundleType);
if ($seoElement) {
$sourceModel = $seoElement::sourceModelFromId($metaBundle->sourceId);
/** @var Section|CategoryGroup|ProductType|null $sourceModel */
if ($sourceModel === null) {
$prune = true;
} else {
$prune = true;
$siteSettings = $sourceModel->getSiteSettings();
if (!empty($siteSettings)) {
/** @var Section_SiteSettings $siteSetting */
foreach ($siteSettings as $siteSetting) {
if ($siteSetting->siteId == $metaBundle->sourceSiteId && $siteSetting->hasUrls && SiteHelper::siteEnabledWithUrls($siteSetting->siteId)) {
$prune = false;
}
}
}
}
} else {
$prune = true;
}
}
return $prune;
}
If either the source section doesn't exist, or the site doesn't have URLs enabled, or if the site isn't enabled.
Aha.
No base url set.
If I set to "has it's own base URL" and added @web
, then redo the DB imports, it appears to work...!
Thanks for the assist!
Ah great, glad you got it sorted.
Describe the bug
Missing graph and progress, empty Content SEO section... any ideas?
To reproduce
Go to SEO settings section
Expected behaviour
For the content SEO Section to exist Data was there previously
Screenshots
Versions