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
166 stars 71 forks source link

'Unsupported operand types: string * int' Error when generating sitemap #1498

Closed joostwaaijer closed 3 months ago

joostwaaijer commented 3 months ago

Describe the bug

When running the Sitemap generation command, I'm running into a

'TypeError' with message 'Unsupported operand types: string * int' error, and the sitemap can't complete generating.

To reproduce

Steps to reproduce the behaviour:

  1. Run the sitemap generate commando.
  2. After running for a while, the commando fails with the error.

Expected behaviour

Expected to complete the commando without errors.

Screenshots

image

Versions

khalwat commented 3 months ago

What version of PHP are you running?

I should note that with the version of SEOmatic that you're running, it's not necessary to generate the sitemap via CLI command anymore.

But that's parenthetical, I'd like to get to the bottom of this error, it looks like an incoming parameter isn't being set as expected.

khalwat commented 3 months ago

Okay, I can reproduce it if I go in and set the Sitemap Page Size to "Single Page" -- is this what you have it set to?

khalwat commented 3 months ago

Fixed in the above commits

Craft CMS 3:

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

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

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

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

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

Then do a composer clear-cache && composer update

…..

Craft CMS 5:

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

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

Then do a composer clear-cache && composer update

joostwaaijer commented 3 months ago

Thanks for the fix! I'll try it out!