• Hi.

    I cannot activate the plugin, when I try, I get this error:

    Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /wp-content/plugins/duracelltomi-google-tag-manager/common/readoptions.php on line 450.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Kasper Aamodt

    (@kasperaamodt)

    I’m on php8, may that be the problem?

    Thread Starter Kasper Aamodt

    (@kasperaamodt)

    Here is the entire error message:

    Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /wp-content/plugins/duracelltomi-google-tag-manager/common/readoptions.php:450 Stack trace: #0 /wp-content/plugins/duracelltomi-google-tag-manager/common/readoptions.php(465): gtm4wp_reload_options() #1 /wp-content/plugins/duracelltomi-google-tag-manager/duracelltomi-google-tag-manager-for-wordpress.php(22): require_once('/home/...') #2 /wp-admin/includes/plugin.php(2300): include('/home/...') #3 /wp-admin/plugins.php(191): plugin_sandbox_scrape('duracelltomi-go...') #4 {main} thrown in /wp-content/plugins/duracelltomi-google-tag-manager/common/readoptions.php on line 450

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Thanks for the report.
    PHP8 compatibility has been not fully tested yet but this is the goal for the next plugin version.

    I am checking now your error message and get back soon….

    Plugin Author Thomas Geiger

    (@duracelltomi)

    If you open /wp-content/plugins/duracelltomi-google-tag-manager/common/readoptions.php and go to line 131, you should see this line:

    global $gtm4wp_options, $gtm4wp_defaultoptions, $gtm4wp_entity_ids;

    Could you test whether changing the line to this solves your issue?

    global $gtm4wp_options, $gtm4wp_defaultoptions, $gtm4wp_entity_ids, $gtm4wp_business_verticals, $gtm4wp_business_verticals_ids;

    Thread Starter Kasper Aamodt

    (@kasperaamodt)

    That worked, thanks! 🙂

    Thread Starter Kasper Aamodt

    (@kasperaamodt)

    Now that I have activated the plugin, I can see that all settings now are on one page, and not in tabs as they used to. Is this expected behavior?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    No, tabs should be still visible.
    But that is not related to PHP8.

    Could you clear your browser cache?

    Thread Starter Kasper Aamodt

    (@kasperaamodt)

    I have cleared the browser cache, and still no tabs.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Do you have a test version of the site where you could disable all other plugins to see if this solves your tab issue?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Cannot activate plugin’ is closed to new replies.