Home Forums Pro Themes Nature Bliss Pro Warning: filemtime(): stat failed when using child theme

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #195397
    RobertK
    Participant

    Hi, i cannot post my question due to the following error message, every time i click on the submit button:

    Error: Your topic cannot be created at this time.

    #195398
    RobertK
    Participant

    we are using a child theme based on Nature Bliss.
    But i think there is an error in functions.php
    In the function nature_bliss_scripts() there is a wp_enqueue_script for custom(.min).js. But the path is built with the get_theme_file_uri() function and filemtime is done with the get_theme_file_path() function.

    #195399
    RobertK
    Participant

    but these two functions gives the current used theme directory, which is our child theme, which has (of course) another path and don’t have this custom(.min).js file. This results in the following error message:

    Warning: filemtime(): stat failed …

    #195400
    RobertK
    Participant

    instead of get_theme_file_uri() and get_theme_file_path() functions the get_template_directory_uri() and get_template_directory() functions should be used.

    I have made this little change in the nature bliss theme code and its working. Unfortunately this change will be overwritten every time i update the theme.
    Could you please fix this?

    Thank you!

    #195401
    RobertK
    Participant

    Sorry for so many posts in here, but it seems that some text in my original question was blocked. I had written the original line of code and my changed line of code. But with these lines, my post is always blocked.

    So i hope you understand my problem anyway.

    #195404
    Psink
    Keymaster

    @ROBERTK, Appreciate your suggestion regarding using the functions. We will update the functions in the upcoming update so that it will not create an issue with your current changes

    #195411
    RobertK
    Participant

    Great to hear!
    Thank you in advance!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.