Hi, that should not be happening. Can you share a link to your sitemap with the custom post type included?
I see a lot of these errors in my log:
PHP Fatal error: require_once(): Failed opening required '/home/user/domains/domain.com/public_html/wp-content/plugins/xml-sitemap-feed/views/feed-sitemap-misc.php' (include_path='/home/user/domains/domain.com/public_html/wp-content/plugins/wp-media-folder-addon/class:/home/user/domains/domain.com/public_html/wp-content/plugins/wp-media-folder-addon/class:.:/usr/share/pear') in /home/user/domains/domain.com/public_html/wp-includes/template.php on line 770
PHP Warning: require_once(/home/user/domains/domain.com/public_html/wp-content/plugins/xml-sitemap-feed/views/feed-sitemap-pt.php): failed to open stream: No such file or directory in /home/user/domains/domain.com/public_html/wp-includes/template.php on line 770
As you see, WP Media Folder Addon plugin is mentioned in same error as your plugin. Could this be the reason? That plugin is used to connect uploads folder with Amazon AWS. I tried disabling that plugin, but the problem did not solve itself. Same when disabled the main plugin WP Media Folders
Any way I could send you a link privately?
-
This reply was modified 4 years ago by
Creatium.
Hi, the issue is known and will be fixed in the next release. The error is created when an external agent (like a search engine crawler) tries to access a sitemap that does not exist. The sitemap plugin tries to include a template file that subsequently does not exist either and generates this error. In short, the error only affects requests to your site that would otherwise meet a 404 response.
Here is an earlier thread about similar error messages: https://ww.wp.xz.cn/support/topic/php-fatal-error-with-feed-sitemap-pt-php-bot/
Does the custom post type come from the WP Media Folder Addon plugin? You can send me the URL privately via https://status301.net/contact/
I sent you a message.
Custom post was added via traditional WP function to register custom post types. They are added and edited as custom posts in their own section in WP Admin – meaning they seem to work as one would expect custom post to work.
Marking this as solved after our exchange via e-mail 🙂
Quick recap for others running into a similar issue: A custom pre_get_posts action was “resetting” the main query to the Posts post type, inadvertently affecting the sitemap query too.