Hello @jholm22804
I trust you’re doing well!
This looks like it is not related to the Defender plugin. First please make sure there is enough free space on your server.
The error means that PHP wasn’t able to “check when the given file was last modified” and that usually happens if either such file is not available (usually due to the wrong path being used) or if there are some file permission issues.
Please locate the /public_html/sitemap.xml file and check if the file is there, the file size, and its permissions.
These do not affect the site functionality and you may choose to hide these warnings by adding these lines to the wp-config.php file
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
Add them right above /* That’s all, stop editing! Happy blogging. */ line and make sure there is no other WP_DEBUG or WP_DEBUG_DISPLAY define line added.
Let us know how it went.
Kind regards,
Nastia
Hello @jholm22804
I hope you are doing well!
We haven’t heard back from you for a while now so we’ve marked this ticket as resolved. If you do have any followup questions or require further assistance feel free to reopen it and let us know here.
Kind regards,
Nastia
Hi Nastia,
I do not have /public_html/sitemap.xml file as our sitemap is generated by the All in One SEO Pack plugin. It is a virtual file added to our websites by the plugin. This file doesn’t physically exist. I know I can hide the error using the instructions kindly provided but I thought I would let you know to assist your plugin development and the error can be sorted in a future update. I understand the Yoast SEO plugin also generates a sitemap the same as the All in One SEO Pack plugin.
Kind Regards
John
Hi @jholm22804,
I tested this in my system to see whether I could replicate similar with All in One SEO Pack plugin and Defender but wasn’t able to replicate any such warning messages.
Are there any steps that we should follow to replicate this? I just enabled the sitemap setting in One SEO Pack plugin and enabled Defender and re-ran a new scan still wasn’t able to notice any such logs displaying in the dashboard side nor in Defender admin screen in the dashboard.
If there is any further info you think you could share to replicate the issue it would be helpful. Have a nice day ahead.
Best Regards,
Nithin
Hi Nithin,
Thank you for your support.
Having done a new test, It seems the Defender error is created when ticking the box “Dynamically Generate Sitemap” in All In One SEO Pack. A warning shows in All In One SEO Pack stating: Warning: a static sitemap ‘/home/*******/public_html/sitemap.xml’ generated by All In One SEO Pack 3.5.2 on Sat, 04 Jul 2020 13:17:33 UTC already exists that may conflict with dynamic sitemap generation. It then asks to delete or rename the conflicting file. I pressed delete and the result is – Deleted /home/*******/public_html/sitemap.xml. Thus the Defender error appears.
Hope this helps.
Kind Regards
John
Hello @jholm22804
I trust you’re doing well!
Since you have deleted the initial sitemap, the warnings showed up. As mentioned in the initial reply, this warning is showing when a file doesn’t exist but there is some data of it left.
Please re-run a Defender’s scan from Defender > Malware Scanning and see if the issue still is there. Please also clear the site’s cache and the server cache, if there is such enabled.
Let us know how it went!
Kind regards,
Nastia
Hi Nastia,
Great news, followed your instructions and ran the Defender’s scan. Now the Defender error no longer appears.
Thank you so much for your patience and expertise.
Kind Regards
John