Title: Custom type bug?
Last modified: May 17, 2022

---

# Custom type bug?

 *  Resolved [Creatium](https://wordpress.org/support/users/creatium/)
 * (@creatium)
 * [4 years ago](https://wordpress.org/support/topic/custom-type-bug/)
 * Hi,
 * I noticed that plugin seems to not care about custom post types. If I check my
   custom type to be included, Sitemap creates custom XML documents for that type,
   but even though they have right amount of pages, but include all default posts,
   not a single custom post.
 * At the same time if I uncheck custom type to not be included, plugin still creates
   XML files named after custom post type, but with default posts.
 * If this a bug or something on my side?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [4 years ago](https://wordpress.org/support/topic/custom-type-bug/#post-15654612)
 * Hi, that should not be happening. Can you share a link to your sitemap with the
   custom post type included?
 *  Thread Starter [Creatium](https://wordpress.org/support/users/creatium/)
 * (@creatium)
 * [4 years ago](https://wordpress.org/support/topic/custom-type-bug/#post-15655539)
 * 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](https://wordpress.org/support/users/creatium/).
 *  Plugin Author [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [4 years ago](https://wordpress.org/support/topic/custom-type-bug/#post-15656072)
 * 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://wordpress.org/support/topic/php-fatal-error-with-feed-sitemap-pt-php-bot/](https://wordpress.org/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/](https://status301.net/contact/)
 *  Thread Starter [Creatium](https://wordpress.org/support/users/creatium/)
 * (@creatium)
 * [4 years ago](https://wordpress.org/support/topic/custom-type-bug/#post-15656733)
 * 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.
 *  Plugin Author [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [4 years ago](https://wordpress.org/support/topic/custom-type-bug/#post-15659655)
 * 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.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom type bug?’ is closed to new replies.

 * ![](https://ps.w.org/xml-sitemap-feed/assets/icon-128x128.png?rev=1112143)
 * [XML Sitemap & Google News](https://wordpress.org/plugins/xml-sitemap-feed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/xml-sitemap-feed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/xml-sitemap-feed/)
 * [Active Topics](https://wordpress.org/support/plugin/xml-sitemap-feed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/xml-sitemap-feed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/custom-type-bug/#post-15659655)
 * Status: resolved