Xmlsitemap is not compatible with Shopify entities

Created on 22 May 2017, over 7 years ago
Updated 15 February 2023, almost 2 years ago

When rebuilding the Xmlsitemap, once I encounter Shopify entities, I get the following:

Error: Call to a member function toUrl() on boolean in Drupal\shopify\Entity\ShopifyProductVariant->url() (line 186 of ShopifyProductVariant.php)

It seems that there should be a check to make sure $product is a ShopifyProduct instance prior to trying to return a URL. Doing this seems to work so I'll post the patch.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024