New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Undefined index: security
when upgrading from 3.3.29 to 3.4.25
#1065
Comments
So... something is not right here. Changes were made that should update your bundles to have the appropriate settings. Addressed in: c98982f You can try it now by setting your semver in your "nystudio107/craft-seomatic": "dev-develop as 3.4.26”, Then do a |
Hm, still no dice on this one. If it's helpful I can provide you with the composer.json file and a copy of our database, @khalwat? |
@aaronbushnell can you verify for me that this actual code is in the file on the machine you're testing from? c98982f#diff-c3edda52a0935a5f66e70f65d9b0c895c7073699fcfd3d25cbca22740775eec9R389 It should look like this now: // Handle an edge-case where a migration didn't work properly to add SECURITY_TXT_HANDLE
if (!isset($templateContainers[FrontendTemplates::SECURITY_TXT_HANDLE])) {
$globalMetaBundle = Seomatic::$plugin->metaBundles->createGlobalMetaBundleForSite($siteId, $metaBundle);
$templateContainers[FrontendTemplates::SECURITY_TXT_HANDLE] =
$globalMetaBundle->frontendTemplatesContainer->data[FrontendTemplates::SECURITY_TXT_HANDLE];
}
$variables['securityTemplate'] = $templateContainers[FrontendTemplates::SECURITY_TXT_HANDLE]; And if that code is there, can you show me the error you're seeing now? |
Also, verify for me that your |
Ah, good catch @khalwat! It was the lack of a Adding that has me situated here, thanks! |
@aaronbushnell You might want to re-install from scratch, it sounds to me like what you have installed is not the full current build, for whatever reason. |
Hey @khalwat I think it's just because I have my own <?php
use nystudio107\seomatic\services\FrontendTemplates;
use nystudio107\seomatic\models\FrontendTemplateContainer;
return [
'name' => 'Frontend Templates',
'description' => 'Templates that are rendered on the frontend',
'handle' => FrontendTemplates::FRONTENDTEMPLATES_CONTAINER,
'class' => (string)FrontendTemplateContainer::class,
'include' => true,
'data' => [
FrontendTemplates::HUMANS_TXT_HANDLE => [
'handle' => FrontendTemplates::HUMANS_TXT_HANDLE,
'path' => 'humans.txt',
'template' => '_frontend/pages/humans.twig',
'controller' => 'frontend-template',
'action' => 'humans',
'include' => false,
'templateString' => '',
],
FrontendTemplates::ROBOTS_TXT_HANDLE => [
'handle' => FrontendTemplates::ROBOTS_TXT_HANDLE,
'path' => 'robots.txt',
'template' => '_frontend/pages/robots.twig',
'controller' => 'frontend-template',
'action' => 'robots',
'include' => false,
'templateString' => '',
],
FrontendTemplates::ADS_TXT_HANDLE => [
'handle' => FrontendTemplates::ADS_TXT_HANDLE,
'path' => 'ads.txt',
'template' => '_frontend/pages/ads.twig',
'controller' => 'frontend-template',
'action' => 'ads',
'include' => false,
'templateString' => '',
],
],
]; |
Ah yes. That would do it. :) |
Thanks a bunch for the quick assist here! 🙌 |
Describe the bug
I have a site that, after I updated SEOmatic from 3.3.29 to 3.4.25, the global content control panel area (/admin/seomatic/global/general/en_us) errors out with...
To reproduce
Steps to reproduce the behaviour:
php craft update seomatic
to get to the latest versionExpected behaviour
I expected that, if a table/index is missing, SEOmatic would attempt to create it so that this area is visible and does not error
Versions
The text was updated successfully, but these errors were encountered: