- Issue created by @anaconda777
- 🇧🇴Bolivia manuvelasco Bolivia
Apparently the problem is for the push() method added in /adsense/templates/adsense-managed-page-level.html.twig
For auto ads, the push() script is not needed.{% if not defer %}
{% else %}
#} {# (adsbygoogle = window.adsbygoogle || []).push({#} {# google_ad_client: "ca-{{ client }}",#} {# enable_page_level_ads: true#} {# });#} {#
{{ attach_library('adsense/adsense.adsbygoogle') }}
{% endif %}
{##}
- First commit to issue fork.
- 🇫🇷France erwangel
This MR worked for me. I don't have the "Only one 'enable_page_level_ads' allowed per page" error any more.
I now have this Deprecated function: urldecode(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\adsense\Controller\CseResultsController->display() (line 77 of /path_to_site/web/modules/contrib/adsense/src/Controller/CseResultsController.php). Not sure it is related to the MR but I haven't noticed this before.
- Status changed to RTBC
2 months ago 4:24pm 3 February 2025 - 🇺🇸United States jesss
The MR is working for me to resolve this error.
I am not seeing the deprecated function warning reported by @erwangel so I think that may have been related to something else.