404 header on every post published after wp-discourse installation

AI-generated summary

In a discussion regarding a 404 header appearing on all WordPress posts published after installing the wp-discourse plugin, user Denki reported that while previous posts returned a 200 header, new posts consistently returned 404s. Denki attempted to troubleshoot by deactivating wp-discourse, all other plugins, and switching themes, but the issue persisted for all new content. They noted the problem coincided with the plugin’s installation, suggesting a possible link.

User Simon advised against using the plugin’s beta version compatible with PHP 5.3.3, suggesting the plugin was unlikely to be the root cause. Following this advice, Denki updated their PHP version and the plugin. It was later revealed that the issue stemmed from a DNS configuration error after a hosting migration; specifically, the IPv6 AAAA record was not updated, causing services like the Facebook crawler to fail. Denki acknowledged that while the issue coincided with the plugin installation, the true cause was the incomplete DNS update required to support the plugin’s requirements. Thanks were given to Simon for the assistance.

I noticed all the new posts published in the blog after the installation and activation of wp-discourse plugin, have a 404 header.

Last post with a normal 200 header → https://denki.es/136/mercedes-benz-prueba-sus-camiones-electricos-dejandoselos-gratis-a-20-clientes-durante-un-ano

Next post, already has a 404 header → https://denki.es/155/el-primer-coche-electrico-que-participo-en-un-rally-dakar-lo-condujo-un-espanol (you can also check the header information here: https://securityheaders.io/?q=https%3A%2F%2Fdenki.es%2F217%2Fcomo-abrir-el-maletero-de-un-tesla-model-s-o-model-x-sin-tener-la-llave&followRedirects=on )

If you check, the 404 header post is the first one using Discourse - hence the normal wordpress comments code is not being used.

I tried de-activating the wp-discourse plugin, the posts still use 404 header. Tried de-activating all plugins, the new posts still have a 404 header (even newly published test posts). Tried using Wordpress default theme, with all plugins de-activated or activated… in both situations, all new posts have 404 header. Previous posts keep 200 header. Also tried to use default options for permalinks, same result. Swtiched back to my fancy permalinks, again same result… all new posts use 404 header.

I publish this here because the only cue I have on this issue, is the date; all the 404 header posts started being published exactly the moment after the wp-discourse plugin was installed. It might not be related but it’d be too much of a coincidence. I didn’t install anything else. Please note I’m using the beta version compatible with php 5.3.3.

any ideas… ? :slight_smile:

Please don’t use this. I’m going to remove it from my GitHub repo. I don’t think the plugin could be causing the problem your having.

Hi Simon,

First, already updated PHP, and updated your plugin to the latest version.

Second, the problem was in my DNS settings after the hosting migration I needed to do only to use this plugin, so I could update both curl and PHP; only edited the IPv4 IP, but Facebook crawler and other services only use IPv6 now, and that one was still pointing to the previous host. This is why the dates coincided with the day I could start using wp-discourse. So you were right, the plugin was not causing the problem, although its requirements forced me to change hosting and then I missed to update IPv6 AAAA registry as well.

In any case, thanks a lot for your help.