• Resolved denisit71

    (@denisit71)


    Hello,
    I installed matomo plugin but when I try to go on repports,administration,etc I get this error :
    Undefined index: piwik_pro_ads_enabled
    I installed matomo on another wordpress with no problem.
    Thank you,

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Thomas

    (@tsteur)

    Hi @denisit71 thanks for letting us know about this. Does this maybe appear in the error logs? Or is this error visible in the UI? Where in the UI do you see this?

    There’s only one place where this index is accessed and technically any possible error is suppressed while trying to access it so it’s not quite clear how this might happen. We can likely fix this though anyway. It’s just very unexpected that it does that.

    Plugin Author Thomas

    (@tsteur)

    Just FYI I will mark it already as resolved as we have created a patch that should prevent this particular issue in the future (in https://github.com/matomo-org/matomo/pull/17233 ). However, be great if you could still reply to do the above question as it’s not clear why this would show an error in the first place.

    Thread Starter denisit71

    (@denisit71)

    Hi thomas,
    I see the error on the UI and the apache logs:
    [Fri Feb 19 10:01:53.918812 2021] [php7:notice] [pid 25598] [client 46.218.X.X:65115] Error in Matomo: Undefined index: piwik_pro_ads_enabled
    I get this error when I go ton report page. When I go to administration page I get this error:
    Undefined index: items
    Below 2 screenshots :
    image1
    image2
    I modified Advertising.php but now I get a Blank page when I go to report.

    • This reply was modified 4 years, 1 month ago by denisit71.
    Plugin Author Thomas

    (@tsteur)

    Thanks for this @denisit71

    > I modified Advertising.php but now I get a Blank page when I go to report.

    I’m assuming there’s maybe some typo like a bracket not correctly set etc. You could remove some lines and make this function around line 118 look like this:

    
        public static function isAdsEnabledInConfig($configGeneralSection)
        {
            $oldSettingValue = false;
            $newSettingValue = @$configGeneralSection['piwik_professional_support_ads_enabled'];
            return (bool) ($newSettingValue || $oldSettingValue);
        }
    

    or even

    
        public static function isAdsEnabledInConfig($configGeneralSection)
        {
            return true;
        }
    

    Does this help @denisit71 ?

    Thread Starter denisit71

    (@denisit71)

    Hi Thomas,
    Yes,I forgot a bracket. But now when I go to report, I get:
    Undefined index: instance_id
    I always get the error below when I go to “administration matomo”:
    Undefined index: items

    Plugin Author Thomas

    (@tsteur)

    Thanks for this @denisit71

    Any chance you could post your system report see https://matomo.org/faq/wordpress/how-do-i-find-and-copy-the-system-report-in-matomo-for-wordpress/ ? The report should be anonymised automatically. Alternatively, you could email this to [email protected] .

    These notices/warnings should all be suppressed and not shown. There is likely some PHP setting that forces these messages to show up. Maybe some plugin overwrites the error reporting level and the system report would hopefully help us reproduce this issue. Thanks for this.

    Thread Starter denisit71

    (@denisit71)

    Hi thomas,
    I found the plugin responsible (crowdsec). I disabled it and now there is no errors.
    I will open a topic on their forum.
    Thank you very much for your time.

    • This reply was modified 4 years ago by denisit71.
    Plugin Author Thomas

    (@tsteur)

    Glad you found it @denisit71 . Thanks for finding this out and reaching out to them. Very appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Undefined index: piwik_pro_ads_enabled’ is closed to new replies.