I am building a shop on Drupal 9 ,Commerce 2, and want to implement a "my favorite products"-bookmark, so that a user can bookmark products and save them for later. So, I installed flag module and created a flag for product variations which shows up in my products -> variations types -> variation -> manage display as follows:
I flushed all caches, went to the site, and it throws the "the website encountered an unexpected error"-error. In the logs, it says:
"DomainException: When a #lazy_builder callback is specified, no properties can exist; all properties must be generated by the #lazy_builder callback. You specified the following properties: #attributes, #ajax_replace_class, #type, #optional, #process, #pre_render, #theme_wrappers, #defaults_loaded. in Drupal\Core\Render\Renderer->doRender() (line 335 of /home/domain.com/public_html/core/lib/Drupal/Core/Render/Renderer.php)."
When I set a bookmark flag for a product type (not product variation type), It doesn't break my site, but the bookmark link simply doesn't render (in Bartik theme).
Does anybody face similar problems with flag and commerce or can anyone point me any way to make it work? Should I build products as content type nodes instead of commerce products, to make it work?
Thank you very much in advance! Everything I can find is old patches and discussions about Drupal 7 and commerce...