- This topic has 6 replies, 2 voices, and was last updated 9 months, 1 week ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
Home › Forums › Pro Themes › Nature Bliss Pro › Warning: filemtime(): stat failed when using child theme
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.
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.
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 …
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!
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.
@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
Great to hear!
Thank you in advance!
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |