• Resolved apedog

    (@apedog)


    This notice is undismissible:

    It looks like you are maybe using a custom WordPress content directory. The Matomo reporting/admin pages might not work. You may be able to workaround this. Learn more.

    I have WP_CONTENT_DIR defined as default ABSPATH . '/wp-content' directory. So no problems should occur anyway.

    I’ve also added the following (redundant) line to my wp-config: define( 'MATOMO_WP_ROOT_PATH', ABSPATH ) as per the instructions. The notice still persists.

    1. Please make notice dismissible.
    2. If MATOMO_WP_ROOT_PATH is defined – please do away with the notice.
    3. If WP_CONTENT_DIR is defined as the default – please do away with the notice.
    3. Also – consider a warning notice. not an error notice. There is no error.

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

    (@tsteur)

    Thanks for letting us know @apedog

    I’ll adjust the plugin check cause currently we’re only checking for ABSPATH . 'wp-content' === rtrim( WP_CONTENT_DIR, '/' )). So basically we’re checking for ABSPATH . 'wp-content' and not also for ABSPATH . '/wp-content'.

    Re define( 'MATOMO_WP_ROOT_PATH', ABSPATH ) for some reason we’re currently only supporting this as an environment variable but not as a constant. I will have a look later regarding the reason.

    I will start working on a patch and see what is happening in https://github.com/matomo-org/wp-matomo/pull/223

    Maybe you could define content directory as ABSPATH . 'wp-content' to fix it?

    Thread Starter apedog

    (@apedog)

    Oh,
    Thank you for that. For some reason I thought all WP constants are unslashed. I see now that ABSPATH is an exception to this. So that’s actually bad configuration on my part.

    Fixing the constant fixed my issue.

    Again, thanks.

    PS.
    wp_normalize_path() might allow for an easy patch/fix.

    Plugin Author Thomas

    (@tsteur)

    Awesome, thanks for letting me know. Glad it works now. And thank you for the wp_normalize_path hint, I’ll look into this now. Very appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Undismissible error notice – tho everything is working fine’ is closed to new replies.