craftcms-thearchitect icon indicating copy to clipboard operation
craftcms-thearchitect copied to clipboard

Argument 1 passed to craft\services\Sites::getSiteById() must be of the type integer

Open england9911 opened this issue 5 years ago • 1 comments

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!

england9911 avatar Aug 15 '19 10:08 england9911

Is this plugin still supported? I've gotten this error for almost a year now....hoping this would finally get fixed at some point.

brandondeweese avatar Jan 11 '20 06:01 brandondeweese