craftcms-thearchitect
craftcms-thearchitect copied to clipboard
Argument 1 passed to craft\services\Sites::getSiteById() must be of the type integer
When exporting various things, in my case sections, I kept running into the error:
Argument 1 passed to craft\services\Sites::getSiteById() must be of the type integer, string given, called in /vendor/pennebaker/craft-architect/src/base/Processor.php on line 297
The fix for this is pretty straightforward, I haven't added a PR for this as it doesn't look like they're being accepted here(?)
Anyway, if you open the mentioned file above and change line 297:
$site = Craft::$app->sites->getSiteById(($sites);
to
$site = Craft::$app->sites->getSiteById((int) $sites);
You should be able to continue!
Is this plugin still supported? I've gotten this error for almost a year now....hoping this would finally get fixed at some point.