nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
165 stars 70 forks source link

robots.txt is 404ing after update to 3.3.36/37 #864

Closed OwenMelbz closed 3 years ago

OwenMelbz commented 3 years ago

Describe the bug

The robots.txt no longer works on (at least) multi-site installs

UPDATE: This also seems to affect the ads.txt and humans.txt.

To reproduce

Steps to reproduce the behaviour:

  1. Go to "website.com/robots.txt"
  2. See error message "404 - Page Not Found"

Expected behaviour

The robots.txt powered via teh CMS should display.

Screenshots

Here's the stack trace from when landing on the /robots.txt

yii\web\NotFoundHttpException: Template not found: robots.txt in /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/controllers/TemplatesController.php:92
Stack trace:
#0 [internal function]: craft\controllers\TemplatesController->actionRender('robots.txt', Array)
#1 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#2 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#3 /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction('render', Array)
#4 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('render', Array)
#5 /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/web/Application.php(274): yii\base\Module->runAction('templates/rende...', Array)
#6 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/web/Application.php(104): craft\web\Application->runAction('templates/rende...', Array)
#7 /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/web/Application.php(259): yii\web\Application->handleRequest(Object(craft\web\Request))
#8 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#9 /Users/storm/Documents/Websites/dantherm-group/web/index.php(22): yii\base\Application->run()
#10 /Users/storm/.composer/vendor/laravel/valet/server.php(219): require('/Users/storm/Do...')
#11 {main}

The web-404.log after making a single request to the robots.txt

2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Connection::open] Opening DB connection: mysql:host=127.0.0.1;dbname=dantherm_dev;port=3306
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Connection::open] Opening DB connection: mysql:host=127.0.0.1;dbname=dantherm_dev;port=3306
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Connection::open] Opening DB connection: mysql:host=127.0.0.1;dbname=dantherm_dev;port=3306
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT *
FROM `info`
WHERE `id`=1
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT *
FROM `info`
WHERE `id`=1
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT *
FROM `info`
WHERE `id`=1
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `s`.`id`, `s`.`name`, `s`.`handle`, `s`.`language`, `s`.`primary`, `s`.`hasUrls`, `s`.`baseUrl`, `s`.`sortOrder`, `s`.`uid`, `s`.`dateCreated`, `s`.`dateUpdated`, `s`.`groupId`, `s`.`enabled`
FROM `sites` `s`
INNER JOIN `sitegroups` `sg` ON `sg`.`id` = `s`.`groupId`
WHERE (`s`.`dateDeleted` IS NULL) AND (`sg`.`dateDeleted` IS NULL)
ORDER BY `sg`.`name`, `s`.`sortOrder`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `s`.`id`, `s`.`name`, `s`.`handle`, `s`.`language`, `s`.`primary`, `s`.`hasUrls`, `s`.`baseUrl`, `s`.`sortOrder`, `s`.`uid`, `s`.`dateCreated`, `s`.`dateUpdated`, `s`.`groupId`, `s`.`enabled`
FROM `sites` `s`
INNER JOIN `sitegroups` `sg` ON `sg`.`id` = `s`.`groupId`
WHERE (`s`.`dateDeleted` IS NULL) AND (`sg`.`dateDeleted` IS NULL)
ORDER BY `sg`.`name`, `s`.`sortOrder`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `s`.`id`, `s`.`name`, `s`.`handle`, `s`.`language`, `s`.`primary`, `s`.`hasUrls`, `s`.`baseUrl`, `s`.`sortOrder`, `s`.`uid`, `s`.`dateCreated`, `s`.`dateUpdated`, `s`.`groupId`, `s`.`enabled`
FROM `sites` `s`
INNER JOIN `sitegroups` `sg` ON `sg`.`id` = `s`.`groupId`
WHERE (`s`.`dateDeleted` IS NULL) AND (`sg`.`dateDeleted` IS NULL)
ORDER BY `sg`.`name`, `s`.`sortOrder`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `id`, `handle`, `version`, `schemaVersion`, `licenseKeyStatus`, `installDate`, `licensedEdition`
FROM `plugins`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `id`, `handle`, `version`, `schemaVersion`, `licenseKeyStatus`, `installDate`, `licensedEdition`
FROM `plugins`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `id`, `handle`, `version`, `schemaVersion`, `licenseKeyStatus`, `installDate`, `licensedEdition`
FROM `plugins`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SHOW FULL COLUMNS FROM `seomatic_metabundles`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SHOW FULL COLUMNS FROM `seomatic_metabundles`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SHOW FULL COLUMNS FROM `seomatic_metabundles`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'seomatic_metabundles' AND `kcu`.`TABLE_NAME` = 'seomatic_metabundles'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'seomatic_metabundles' AND `kcu`.`TABLE_NAME` = 'seomatic_metabundles'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'seomatic_metabundles' AND `kcu`.`TABLE_NAME` = 'seomatic_metabundles'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT *
FROM `seomatic_metabundles`
WHERE (`sourceBundleType`='__GLOBAL_BUNDLE__') AND (`sourceSiteId`=3)
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT *
FROM `seomatic_metabundles`
WHERE (`sourceBundleType`='__GLOBAL_BUNDLE__') AND (`sourceSiteId`=3)
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT *
FROM `seomatic_metabundles`
WHERE (`sourceBundleType`='__GLOBAL_BUNDLE__') AND (`sourceSiteId`=3)
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][nystudio107\seomatic\Seomatic::init] SEO plugin loaded
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\web\Session::open] Session started
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT COUNT(*)
FROM (SELECT 1
FROM `sites`
LIMIT 2) `x`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT COUNT(*)
FROM (SELECT 1
FROM `sites`
LIMIT 2) `x`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT COUNT(*)
FROM (SELECT 1
FROM `sites`
LIMIT 2) `x`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `fields`.`id`, `fields`.`dateCreated`, `fields`.`dateUpdated`, `fields`.`groupId`, `fields`.`name`, `fields`.`handle`, `fields`.`context`, `fields`.`instructions`, `fields`.`translationMethod`, `fields`.`translationKeyFormat`, `fields`.`type`, `fields`.`settings`, `fields`.`uid`, `fields`.`searchable`
FROM `fields` `fields`
ORDER BY `fields`.`name`, `fields`.`handle`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT EXISTS(SELECT `id`, `handle`, `version`, `schemaVersion`, `licenseKeyStatus`, `installDate`, `licensedEdition`
FROM `plugins`
WHERE `handle`='super-table')
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `sections`.`id`, `sections`.`structureId`, `sections`.`name`, `sections`.`handle`, `sections`.`type`, `sections`.`enableVersioning`, `sections`.`uid`, `structures`.`maxLevels`, `sections`.`propagationMethod`, `sections`.`previewTargets`
FROM `sections` `sections`
LEFT JOIN `structures` `structures` ON (`structures`.`id` = `sections`.`structureId`) AND (`structures`.`dateDeleted` IS NULL)
WHERE `sections`.`dateDeleted` IS NULL
ORDER BY `name`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `sections`.`id`, `sections`.`structureId`, `sections`.`name`, `sections`.`handle`, `sections`.`type`, `sections`.`enableVersioning`, `sections`.`uid`, `structures`.`maxLevels`, `sections`.`propagationMethod`, `sections`.`previewTargets`
FROM `sections` `sections`
LEFT JOIN `structures` `structures` ON (`structures`.`id` = `sections`.`structureId`) AND (`structures`.`dateDeleted` IS NULL)
WHERE `sections`.`dateDeleted` IS NULL
ORDER BY `name`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `sections`.`id`, `sections`.`structureId`, `sections`.`name`, `sections`.`handle`, `sections`.`type`, `sections`.`enableVersioning`, `sections`.`uid`, `structures`.`maxLevels`, `sections`.`propagationMethod`, `sections`.`previewTargets`
FROM `sections` `sections`
LEFT JOIN `structures` `structures` ON (`structures`.`id` = `sections`.`structureId`) AND (`structures`.`dateDeleted` IS NULL)
WHERE `sections`.`dateDeleted` IS NULL
ORDER BY `name`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SHOW FULL COLUMNS FROM `elements`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SHOW FULL COLUMNS FROM `elements`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SHOW FULL COLUMNS FROM `elements`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'elements' AND `kcu`.`TABLE_NAME` = 'elements'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'elements' AND `kcu`.`TABLE_NAME` = 'elements'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'elements' AND `kcu`.`TABLE_NAME` = 'elements'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `users`.`password`, `elements`.`id`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`id` AS `siteSettingsId`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `users`.`username`, `users`.`firstName`, `users`.`lastName`, `users`.`email`, `users`.`unverifiedEmail`, `users`.`admin`, `users`.`locked`, `users`.`pending`, `users`.`suspended`, `users`.`lastLoginDate`, `users`.`lockoutDate`, `users`.`photoId`, `users`.`hasDashboard`, `content`.`id` AS `contentId`, `content`.`field_contentSecurityPolicy`, `content`.`field_maximumWidth`, `content`.`field_hubSpotMarkers`, `content`.`field_megaMenuStyle`, `content`.`field_plainText`, `content`.`field_redirectUrl`, `content`.`field_keywords`, `content`.`field_seo`, `content`.`field_showInFilters`, `content`.`field_tableOfContents`, `content`.`field_alignment`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`
FROM `elements` `elements`
INNER JOIN `users` `users` ON `users`.`id` = `elements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `elements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
WHERE (`elements_sites`.`siteId`=3) AND (`elements`.`id`=1) AND (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL)
ORDER BY `users`.`username`
LIMIT 1) `subquery`
INNER JOIN `users` `users` ON `users`.`id` = `subquery`.`elementsId`
INNER JOIN `elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `content` `content` ON `content`.`id` = `subquery`.`contentId`
ORDER BY `users`.`username`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `users`.`password`, `elements`.`id`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`id` AS `siteSettingsId`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `users`.`username`, `users`.`firstName`, `users`.`lastName`, `users`.`email`, `users`.`unverifiedEmail`, `users`.`admin`, `users`.`locked`, `users`.`pending`, `users`.`suspended`, `users`.`lastLoginDate`, `users`.`lockoutDate`, `users`.`photoId`, `users`.`hasDashboard`, `content`.`id` AS `contentId`, `content`.`field_contentSecurityPolicy`, `content`.`field_maximumWidth`, `content`.`field_hubSpotMarkers`, `content`.`field_megaMenuStyle`, `content`.`field_plainText`, `content`.`field_redirectUrl`, `content`.`field_keywords`, `content`.`field_seo`, `content`.`field_showInFilters`, `content`.`field_tableOfContents`, `content`.`field_alignment`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`
FROM `elements` `elements`
INNER JOIN `users` `users` ON `users`.`id` = `elements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `elements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
WHERE (`elements_sites`.`siteId`=3) AND (`elements`.`id`=1) AND (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL)
ORDER BY `users`.`username`
LIMIT 1) `subquery`
INNER JOIN `users` `users` ON `users`.`id` = `subquery`.`elementsId`
INNER JOIN `elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `content` `content` ON `content`.`id` = `subquery`.`contentId`
ORDER BY `users`.`username`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `users`.`password`, `elements`.`id`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`id` AS `siteSettingsId`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `users`.`username`, `users`.`firstName`, `users`.`lastName`, `users`.`email`, `users`.`unverifiedEmail`, `users`.`admin`, `users`.`locked`, `users`.`pending`, `users`.`suspended`, `users`.`lastLoginDate`, `users`.`lockoutDate`, `users`.`photoId`, `users`.`hasDashboard`, `content`.`id` AS `contentId`, `content`.`field_contentSecurityPolicy`, `content`.`field_maximumWidth`, `content`.`field_hubSpotMarkers`, `content`.`field_megaMenuStyle`, `content`.`field_plainText`, `content`.`field_redirectUrl`, `content`.`field_keywords`, `content`.`field_seo`, `content`.`field_showInFilters`, `content`.`field_tableOfContents`, `content`.`field_alignment`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`
FROM `elements` `elements`
INNER JOIN `users` `users` ON `users`.`id` = `elements`.`id`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `elements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
WHERE (`elements_sites`.`siteId`=3) AND (`elements`.`id`=1) AND (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL)
ORDER BY `users`.`username`
LIMIT 1) `subquery`
INNER JOIN `users` `users` ON `users`.`id` = `subquery`.`elementsId`
INNER JOIN `elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `content` `content` ON `content`.`id` = `subquery`.`contentId`
ORDER BY `users`.`username`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `id`
FROM `sessions`
WHERE (`token`='xZQ8yOm-f1okdviZXZDTuUetvMYxIY9FZKTyE_PhiYnrbGxJ3bIMQGKGYhuoeY477eM_rzS3w6ydj9hWtDnATWc6CDzBcApNlFnx') AND (`userId`=1)
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `id`
FROM `sessions`
WHERE (`token`='xZQ8yOm-f1okdviZXZDTuUetvMYxIY9FZKTyE_PhiYnrbGxJ3bIMQGKGYhuoeY477eM_rzS3w6ydj9hWtDnATWc6CDzBcApNlFnx') AND (`userId`=1)
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `id`
FROM `sessions`
WHERE (`token`='xZQ8yOm-f1okdviZXZDTuUetvMYxIY9FZKTyE_PhiYnrbGxJ3bIMQGKGYhuoeY477eM_rzS3w6ydj9hWtDnATWc6CDzBcApNlFnx') AND (`userId`=1)
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SHOW FULL COLUMNS FROM `sessions`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SHOW FULL COLUMNS FROM `sessions`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SHOW FULL COLUMNS FROM `sessions`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'sessions' AND `kcu`.`TABLE_NAME` = 'sessions'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'sessions' AND `kcu`.`TABLE_NAME` = 'sessions'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'sessions' AND `kcu`.`TABLE_NAME` = 'sessions'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::execute] UPDATE `sessions` SET `dateUpdated`='2021-04-06 09:23:06' WHERE `id`='1867'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::execute] UPDATE `sessions` SET `dateUpdated`='2021-04-06 09:23:06' WHERE `id`='1867'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::execute] UPDATE `sessions` SET `dateUpdated`='2021-04-06 09:23:06' WHERE `id`='1867'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::execute] INSERT INTO `sessions` (`userId`, `token`, `dateCreated`, `dateUpdated`, `uid`) VALUES (1, '2PMTQIvTpYEn7DdOw9CnYlLrmz99aTzLlSX0b6U7OTNvhBirpZoyEYg05uFcIotRIB-mPwQ-WlN2y3qRjA4pTVQfBaE_ywWGMRnE', '2021-04-06 09:23:06', '2021-04-06 09:23:06', 'cccf0cb9-400f-424c-afb2-237e2c46d7c4')
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::execute] INSERT INTO `sessions` (`userId`, `token`, `dateCreated`, `dateUpdated`, `uid`) VALUES (1, '2PMTQIvTpYEn7DdOw9CnYlLrmz99aTzLlSX0b6U7OTNvhBirpZoyEYg05uFcIotRIB-mPwQ-WlN2y3qRjA4pTVQfBaE_ywWGMRnE', '2021-04-06 09:23:06', '2021-04-06 09:23:06', 'cccf0cb9-400f-424c-afb2-237e2c46d7c4')
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::execute] INSERT INTO `sessions` (`userId`, `token`, `dateCreated`, `dateUpdated`, `uid`) VALUES (1, '2PMTQIvTpYEn7DdOw9CnYlLrmz99aTzLlSX0b6U7OTNvhBirpZoyEYg05uFcIotRIB-mPwQ-WlN2y3qRjA4pTVQfBaE_ywWGMRnE', '2021-04-06 09:23:06', '2021-04-06 09:23:06', 'cccf0cb9-400f-424c-afb2-237e2c46d7c4')
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\web\User::loginByCookie] User '1' logged in from 127.0.0.1 via cookie.
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SHOW FULL COLUMNS FROM `users`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SHOW FULL COLUMNS FROM `users`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SHOW FULL COLUMNS FROM `users`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'users' AND `kcu`.`TABLE_NAME` = 'users'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'users' AND `kcu`.`TABLE_NAME` = 'users'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`,
    `rc`.`DELETE_RULE`,
    `rc`.`UPDATE_RULE`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'users' AND `kcu`.`TABLE_NAME` = 'users'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `users`.*
FROM `users`
INNER JOIN `elements` `element` ON `users`.`id` = `element`.`id`
WHERE (`element`.`dateDeleted` IS NULL) AND (`users`.`id`=1)
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `users`.*
FROM `users`
INNER JOIN `elements` `element` ON `users`.`id` = `element`.`id`
WHERE (`element`.`dateDeleted` IS NULL) AND (`users`.`id`=1)
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `users`.*
FROM `users`
INNER JOIN `elements` `element` ON `users`.`id` = `element`.`id`
WHERE (`element`.`dateDeleted` IS NULL) AND (`users`.`id`=1)
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT *
FROM `elements` `element`
WHERE `id`=1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT *
FROM `elements` `element`
WHERE `id`=1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT *
FROM `elements` `element`
WHERE `id`=1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::execute] UPDATE `users` SET `lastLoginDate`='2021-04-06 09:23:06', `dateUpdated`='2021-04-06 09:23:06' WHERE `id`=1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::execute] UPDATE `users` SET `lastLoginDate`='2021-04-06 09:23:06', `dateUpdated`='2021-04-06 09:23:06' WHERE `id`=1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::execute] UPDATE `users` SET `lastLoginDate`='2021-04-06 09:23:06', `dateUpdated`='2021-04-06 09:23:06' WHERE `id`=1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `preferences`
FROM `userpreferences`
WHERE `userId`=1
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `preferences`
FROM `userpreferences`
WHERE `userId`=1
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `preferences`
FROM `userpreferences`
WHERE `userId`=1
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][nystudio107\seomatic\services\{closure}] UrlManager::EVENT_REGISTER_SITE_URL_RULES
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `id`, `name`, `uid`
FROM `sitegroups`
WHERE `dateDeleted` IS NULL
ORDER BY `name`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `id`, `name`, `uid`
FROM `sitegroups`
WHERE `dateDeleted` IS NULL
ORDER BY `name`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `id`, `name`, `uid`
FROM `sitegroups`
WHERE `dateDeleted` IS NULL
ORDER BY `name`
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][nystudio107\seomatic\{closure}] UrlManager::EVENT_REGISTER_SITE_URL_RULES
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getTokenRoute] [
    'rule' => 'Token',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][yii\db\Command::query] SELECT `elements`.`id`, `elements`.`type`
FROM `elements` `elements`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
WHERE (`elements_sites`.`siteId`=3) AND (`elements`.`dateDeleted` IS NULL) AND ((`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL)) AND (`elements_sites`.`uri`='robots.txt') AND ((`elements_sites`.`enabled`=TRUE) AND (`elements`.`enabled`=TRUE) AND (`elements`.`archived`=FALSE))
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile begin][yii\db\Command::query] SELECT `elements`.`id`, `elements`.`type`
FROM `elements` `elements`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
WHERE (`elements_sites`.`siteId`=3) AND (`elements`.`dateDeleted` IS NULL) AND ((`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL)) AND (`elements_sites`.`uri`='robots.txt') AND ((`elements_sites`.`enabled`=TRUE) AND (`elements`.`enabled`=TRUE) AND (`elements`.`archived`=FALSE))
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][profile end][yii\db\Command::query] SELECT `elements`.`id`, `elements`.`type`
FROM `elements` `elements`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
WHERE (`elements_sites`.`siteId`=3) AND (`elements`.`dateDeleted` IS NULL) AND ((`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL)) AND (`elements_sites`.`uri`='robots.txt') AND ((`elements_sites`.`enabled`=TRUE) AND (`elements`.`enabled`=TRUE) AND (`elements`.`archived`=FALSE))
LIMIT 1
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedElementRoute] [
    'rule' => 'Element URI: robots.txt',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: api',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: insights/<tag:[^\\/]+>',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: sitemap.xml',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: sitemap.xsl',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: sitemap-empty.xsl',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: sitemaps-<groupId:\\d+>-sitemap.xml',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: sitemaps-<groupId:\\d+>-global-custom-<siteId:\\d+>-<file:[-\\w\\.*]+>',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: sitemaps-<groupId:\\d+>-<type:[\\w\\.*]+>-<handle:[\\w\\.*]+>-<siteId:\\d+>-<file:[-\\w\\.*]+>',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: seomatic/seo-file-link/<url:[^\\/]+>/<robots:[^\\/]+>/<canonical:[^\\/]+>/<inline:\\d+>/<fileName:[-\\w\\.*]+>',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedUrlRoute] [
    'rule' => 'URL Rule: seomatic/preview-social-media',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getMatchedDiscoverableUrlRoute] [
    'rule' => 'Discoverable change password URL',
    'match' => false,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][craft\web\UrlManager::_getTemplateRoute] [
    'rule' => 'Template: robots.txt',
    'match' => true,
    'parent' => null,
]
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\web\Application::handleRequest] Route requested: 'templates/render'
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\Controller::runAction] Route to run: templates/render
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\InlineAction::runWithParams] Running action: craft\controllers\TemplatesController::actionRender()
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][error][yii\web\HttpException:404] yii\web\NotFoundHttpException: Template not found: robots.txt in /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/controllers/TemplatesController.php:92
Stack trace:
#0 [internal function]: craft\controllers\TemplatesController->actionRender('robots.txt', Array)
#1 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#2 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#3 /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction('render', Array)
#4 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('render', Array)
#5 /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/web/Application.php(274): yii\base\Module->runAction('templates/rende...', Array)
#6 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/web/Application.php(104): craft\web\Application->runAction('templates/rende...', Array)
#7 /Users/storm/Documents/Websites/dantherm-group/vendor/craftcms/cms/src/web/Application.php(259): yii\web\Application->handleRequest(Object(craft\web\Request))
#8 /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#9 /Users/storm/Documents/Websites/dantherm-group/web/index.php(22): yii\base\Application->run()
#10 /Users/storm/.composer/vendor/laravel/valet/server.php(219): require('/Users/storm/Do...')
#11 {main}
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/exception.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][yii\base\View::renderFile] Rendering view file: /Users/storm/Documents/Websites/dantherm-group/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][nystudio107\seomatic\{closure}] View::EVENT_END_BODY
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][trace][nystudio107\seomatic\{closure}] View::EVENT_END_PAGE
2021-04-06 10:23:06 [-][1][ss6o3oj96nm0ujngum6qs1oui1][info][application] $_GET = []

Versions

Application Info

PHP version 7.4.14 OS version Darwin 19.6.0 Database driver & version MySQL 5.7.31 Image driver & version GD 7.4.14 Craft edition & version Craft Pro 3.6.11.2 Yii version 2.0.41.1 Twig version v2.14.4 Guzzle version 6.5.5

Plugins

SEO 3.3.37

Modules

No modules are installed.

khalwat commented 3 years ago

Can you ensure that the site has a base URL, and ensure that base URL has no sub-directory?

https://github.com/nystudio107/craft-seomatic/blob/v3/src/services/FrontendTemplates.php#L90

OwenMelbz commented 3 years ago

Hi,

The site does have a base URL, however it will have a sub directory of the language segment.

e.g. "website.com/en-gb/"

image

The form itself uses an alias

image

khalwat commented 3 years ago

Right. So as per the spec, robots.txt files don't appear in sub-directories. They will only ever appear in the root domain, as you noted here:

https://github.com/nystudio107/craft-seomatic/issues/859#issuecomment-811984524

In your case, you do not have a site that doesn't have a sub-directory as part of the URL, so robots.txt does not appear.

OwenMelbz commented 3 years ago

Sigh... why close so abruptly?

The robots.txt, humans etc should live in the root directory... currently its not, that's the problem its 404ing after these changes.

Language segments are completely irrelevant for multi-site installs - regardless of what they are set to, the robots.txt should always live within the root.

Thus the issue.... the robots.txt is 404ing, when it should be in the root of the domain, regardless of what Base URLs are set up for multilingual functionality.

This update has been marked as a "minor" release right - however it's just broken every Craft site that uses language segments for their pages rather than just a naked domain for their site.

In your case, you do not have a site that doesn't have a sub-directory as part of the URL, so robots.txt does not appear.

At what point does this become a suitable solution? To just remove the root robots.txt from everybody that is using language segments? As you've pointed out - it needs to be in the root. So why remove it? It's fine to remove it from sub directories, but this has adversely removed it from the root as well which is not a desired outcome.

khalwat commented 3 years ago

You have no Craft site that is responding to the bare root directory. Therefor SEOmatic will never see the requests coming in anyway -- I'm assuming you have some kind of server-side redirect that redirects from domain.com to whatever your default is, e.g. domain.com/en/

What exactly happens to requests for domain.com (the bare domain) in your setups?

It's not a matter of "removing" it from the root domain, it's a matter of no root domain existing at all (at least as far as Craft is concerned).

khalwat commented 3 years ago

I think what could be done in this situation is if the request comes in with no site assigned, I can register this template anyway... let me test.

The problem is, Craft defaults to your primary site if there is no current site set for the current request (which would be the case in your setup):

    /**
     * Returns the current site.
     *
     * @return Site the current site
     * @throws SiteNotFoundException if no sites exist
     */
    public function getCurrentSite(): Site
    {
        if ($this->_currentSite !== null) {
            return $this->_currentSite;
        }

        // Default to the primary site
        return $this->_currentSite = $this->getPrimarySite();
    }
OwenMelbz commented 3 years ago

Hi sorry if we're coming across arsy, but as a customer who has paid thousands of pounds for your product, we expected less dismissal than we've received which has been really frustrating as it's currently broken these txt files on 4 of our clients websites, so you must appreciate our frustration as this was a direct outcome from a change made in Seomatic which was flagged as non-breaking and we trusted that.

Craft will load the "primary" site when you access it without a language segment without any issues - this is the default behavior of it out of the box.

We'd expect SEOmatic to follow the same principles - the code runs getCurrentSite() which returns a completely valid result as far as Craft is concerned.

Regarding the .com to .com/en redirect we simply have some middleware loaded into the request cycle that checks for a language segment, if it doesn't find one it redirects to the same URL but with the primary site baseURL injected at the start of it. This allows any pre-registered URLs to function without a language segment.

We don't mind having to define an optional flag to opt-in to the new behaviour, as long as we've got something that will allow our clients sites to get back to the state they were in before.

Thanks

khalwat commented 3 years ago

Craft will load the "primary" site when you access it without a language segment without any issues - this is the default behavior of it out of the box.

We'd expect SEOmatic to follow the same principles - the code runs getCurrentSite() which returns a completely valid result as far as Craft is concerned.

Yes, the problem is that your primary site that is returned will have a sub-directory as part of the path, which is what we're keying off of to not render the robots.txt files, to be in line with the spec, and satisfy https://github.com/nystudio107/craft-seomatic/issues/859

I'm reverse-engineering Craft's code at the moment to see exactly where and how it is setting the current site, to see if there is a way to special-case requests that are coming in that are not assigned to any site.

The problem is that as noted above, Sites::getCurrentSite() defaults to your primary site if no site matches the request, which is problematic for what we're trying to do here because we have no apparent way to tell if this is a legitimate request for that site, or if it's just defaulting to it.

OwenMelbz commented 3 years ago

Would it be possible to simply add a config item like ignore_sub_directories and let the user choose - I'd go with defaulting to false - to preserve existing users functionality, then allow users to opt in to the alternative functionality.

khalwat commented 3 years ago

Addressed in: https://github.com/nystudio107/craft-seomatic/commit/0aa17f62210e17c916997aae11e00544ca9d95f0

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop as 3.3.38”,

Then do a composer clear-cache && composer update

OwenMelbz commented 3 years ago

👌 looks like it's done the job, have tested on 2 different sites and they both are working as before thanks :) much appreciated - will await full release to double check!

Thanks

khalwat commented 3 years ago

Great! Will likely cut a release today.

khalwat commented 3 years ago

Released in 3.3.38: https://github.com/nystudio107/craft-seomatic/releases/tag/3.3.38