• Resolved Creatium

    (@creatium)


    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)
  • Hi, that should not be happening. Can you share a link to your sitemap with the custom post type included?

    Thread Starter Creatium

    (@creatium)

    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 2 years, 10 months 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://www.ads-software.com/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/

    Thread Starter Creatium

    (@creatium)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom type bug?’ is closed to new replies.