Every time I think I’m getting close to accomplishing something I find a new issue. This one has me stumped. I’m working through it as much as I can with magento’s limited hints.
It is in the system.log
main.CRITICAL: Recoverable Error: Object of class Magento\Framework\DataObject could not be converted to string in public_html/vendor/magento/framework/Escaper.php on line 261 [] []
Line around 261 on Escaper.php
/**
* Escape a string for the HTML attribute context
*
* @param string $string
* @param boolean $escapeSingleQuote
* @return string
* @since 101.0.0
*/
public function escapeHtmlAttr($string, $escapeSingleQuote = true)
{
if ($escapeSingleQuote) {
return $this->getEscaper()->escapeHtmlAttr((string) $string);
}
return htmlspecialchars((string)$string, $this->htmlSpecialCharsFlag, 'UTF-8', false);
}
I have run in to something extremely strange and I have NO idea what has caused it or if I have all of the sudden stumbled upon this issue that has been there all along.
I found a couple categories that have no products that show on them. When I try to load the category I get that error in the system log. Strange, I tried to add a product from the “ghost” (shows no products) category to another category and now that category is “ghosting” me. I removed the product and now it still won’t show any products.
Super strange. Time to go digging around in the database to see if I can find something anomalous there.