Closed highburyeye closed 2 months ago
Actually the prevention of an error with a misconfigured attribute comes in the SQL query above that line: https://github.com/lat9/gpsf/blob/f9ac7e05f5094ac6eba671e75c79702ce25c4940/includes/classes/gpsfFeedGenerator.php#L837-L848
Those joins should be INNER
instead of LEFT
, but that misuse of the join type did point out that your site has attributes for which no associated products_options
record exists!
Noting that a similar issue will arise if the product's products_type
isn't found in the product_types
table or if the product has no records in the products_to_categories
table.
Thanks - I will see if I can check my database. Would this mean products were deleted without deleting the attributes perhaps?
Nope, it means that some of your products have attributes whose options_id
or options_values_id
references a non-existing products_options
or products_options_values
record, respectively.
To prevent PHP Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated on /public_html/includes/classes/gpsfFeedGenerator.php on line 852.
change
$attributes = []; foreach ($attributes_info as $next_att) { $variant_key = strtolower($next_att['products_options_name'] ?? '');//TC mod line 852 to prevent null being passed if ($this->isStringInArray($variant_key, $this->attributeVariants) === false) { continue; }