Skip to content

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

@england9911

Description

@england9911

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions