- Issue created by @ciesinsg
I am unable to add a background image to a view. When I try to add this, I get:
TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, Drupal\Core\Link given in htmlspecialchars() (line 440 of core/lib/Drupal/Component/Utility/Html.php).
I should also add that there is no widget to add a background image to a view, and the blog used as the documentation doesn't mention this at all. I was able to find a way to add the image to a view, but this results in the above error.
I am able to add background images to other entities.
After installing the module:
I am not sure if this is the way the module expects background images to be added to views. I have also tried to go to the view itself and adding "Global: Rendered entity - Background Image (Global: Rendered entity - Background Image)" to the header, but this results in no change.
I found issue 3446229 📌 Error when try to add background image Fixed that discusses something similar happening on the 2.0.x-dev@dev branch, and it looks like a MR has been submitted. I am not using the dev branch though.
Another duplicate is 3368941, but the patch is a year old and older than the latest update so I have not attempted the patch.
I decided to open a new issue to specifically address this issue on the 2.0.2 version.
I want to confirm if adding a background image should work or if it is not an existing feature yet. Following this, I want to confirm if this issue can be fixed with a patch, or if I should switch to the dev branch.
Active
2.0
Code