• Resolved francoc30

    (@francoc30)


    Hi Marko,
    I have enabled minify functions using manual selection of files. The selected files are those recommended by W3TC under Performance -> Minify -> Help. It detects my active child theme whose parent is Astra. Ever since this activation, my server is logging php warnings as below. There is nothing else changed on my website, so I suspect these warnings are caused by the minification function that I activated. Please help. Thanks.

    <<<<
    20220226T070151: mydomain.com/index.php
    PHP Warning: Use of undefined constant STYLESHEETPATH – assumed ‘STYLESHEETPATH’ (this will throw an Error in a future version of PHP) in /myserverpath/public_html/test/wp-includes/template.php on line 703
    PHP Warning: Use of undefined constant TEMPLATEPATH – assumed ‘TEMPLATEPATH’ (this will throw an Error in a future version of PHP) in /myserverpath/public_html/test/wp-includes/template.php on line 706
    >>>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @francoc30

    Thank you for reaching out and I am happy to assist you with this.
    This is a default function of WP:
    define('STYLESHEETPATH', get_stylesheet_directory());
    This constant is defined in WordPress Core in the file wp-includes/default-constants.php, which gets loaded from wp-settings (which is loaded from wp-config.php).
    Can you please share which WP version you are using and what is the current PHP version?
    Thanks!

    Thread Starter francoc30

    (@francoc30)

    WP 5.8.3
    PHP 7.4.10

    I check the wp-includes/default-constants.php and see the define statement:
    define( ‘STYLESHEETPATH’, get_stylesheet_directory() );

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @francoc30

    Thank you for the feedback.
    I think this may be the problem with abspath configuration in wp-config.php and the abspath needs to be updated.
    Let me try to replicate this and I’ll get back to you.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘php warnings after minification’ is closed to new replies.