Sitemap Generation Issue - URLBuilder - must be type of string - error

I really appreciate the response and help. I don’t work inside the DB very often and it always seems like a headscratcher when you’re not familiar with it.

I have found an anomalous row in catalog_product_entity_media_gallery. Everything in that table has an image path, however there is ONE row that has NULL. Since M2 is b*****n about NULL being pass, I am hoping that value is the one being passed along and messing everything up. I have confirmed through running the image resize command several times now that it appears M2 is stepping through this table in order (whatever order is is sorted in by default).

I am trying to get rid of this single instance of NULL, however I want to make sure I get rid of all other associated data in the tables and this is where I’m not sure where to go. I’ve been trying to follow the data and have found references to the entity_id in media_gallery_value, media_gallery_entity_to_value, and entity_varchar. So four tables thus far.

I guess my question here would be, is the entity_id referring to the product ID that we see in the backend of magento?

Yes, this is a migration from M1toM2.3.2(since upgraded to 2.3.5-p1). Luckily, it is all still in dev, so I have a little time but I was hoping to actually go live today, however this has caused a week of no production for me.

Well… the problem is solved!!! It turns out that there was no issue with migration and this NULL value was migrated over from M1 as the M1 store is still up and running and this empty image is in that catalog.

I was able to use the entity_id to look up the product in M2 backend and sure enough there is basically an empty image there. Once I deleted that from the backend of M2 then the sitemap generated perfectly. Now to restore back to before this and get this implemented as I’ve resized my images about a half dozen times as a way to help learn more about what was going on because it actually provided me more info on the error and ultimately led me to find this.

Of course, looking back on it now it is so obvious.

1 Like

It’s these types of issues that you can’t teach, but the troubleshooting skills you’ll definitely learn from.