The simpler media website CMS
I have been experiencing this issue with the Matomo widget embed code on my live server for a few versions of Zenphoto. It will save on my local test version, so I wasn’t sure if it was an actual bug, or what it could be? Maybe an issue with my live database itself? In the past I also could not save the Site copyright URL in the Gallery option, but that was fixed with the update to 1.6.
It didn’t matter before because the widget would not load because of an issue with the Content-Security-Policy header. When I read in the release notes for 1.6 that the issue had been fixed, I decided to try it again on my live server. This time I manually edited the matomo_widgets_code value in the options table of the database in phpMyAdmin. It worked, the “Matomo statistics” button showed up on the Info section of the Overview tab, and I was able to open the Matomo page in Zenphoto.
However, when I tried to update the embed code in Zenphoto it deleted it again when I pressed “Apply”. So the issue is still not really fixed, I’ve only found a workaround.
If anyone has suggestions on how to get this to work right, please let me know.
Comments
A couple things I want to add, if anyone does use Matomo for their analytics, be sure to check it out after updating to Zenphoto 1.6. Search terms in Zenphoto are now automatically recognized as search terms in Matomo. They will now just show up in the visitor logs and under the Site Search Keywords section, which is pretty cool, and thanks to the extra work acrylian put in to make it happen.
The last thing is that the current Matomo embed code is made for responsive designs. Using it in the Zenphoto admin you will end up with an iframe that has a height that is only 150 pixels tall. To make it usable, in the iframe code change height="100%" to something static like height="1000” (if using it on a desktop).
So you are saying the option does not save? that is a different issue to the iFrame formerly not showing up for the reasons you mentioned.
The backend is not yet properly responsive but it does adjust to the width generally. So not sure why the height is so small… We actually don't use that option ourselves and just access the Matomo install directly. We will try to reproduce that.
The option does not save. That is the problem I have been having with the plugin, and the issue has been there for me since at least 1.5.7.
Okay, we'll try to find out.
Please reset your Allowed tags option. Probably you are using older defaults and iframe is missing.
It does work for us. I can reproduce the iframe height issue and will try to fix that.
That was it. Resetting the allowed tags under General options more than doubled the entries, from 26 that were there to 54 now, including the iframe tag the Matomo widget needed. Thanks for the help!
Yeah, we added/improved some more HTML5 semantic tags to the defaults that were missing at some time. It does not update itself since that would override custom settings.