In the thread titled ‘WP Discourse plug in being odd’, adamprocter reports that new WordPress posts are creating topics in Discourse, but the comment link is missing, showing ‘Comments are not currently available for this post.’ Additionally, they encounter an error indicating they’re not connected to Discourse, despite topics being created. adamprocter also notes a deprecation warning in Discourse about outdated API authentication, though simon clarifies the WP Discourse plugin uses header-based auth and the warning is harmless. After troubleshooting — including deactivating/reactivating the plugin, recreating webhooks, and generating new API keys — adamprocter discovers the Publishing Username account was deactivated in Discourse, which resolved the issue temporarily. However, the account deactivates again, prompting simon to suggest checking the Discourse setting invalidate inactive admin email after days (default 365 days). simon further theorizes the issue may stem from using an admin account for Publishing Username while using the All Users API Key — which wouldn’t count as activity for the admin user. He recommends switching to the ‘system’ user and All Users API Key to avoid deactivation. adamprocter confirms the setting is at 365 and continues to reactivate the account after each deactivation.
The WP Discourse plugin shouldn’t be causing this warning. All API requests from the plugin are using header based authentication. In any case, this is just a deprecation notice. Authenticating API requests with URL parameters will continue to work in the near future.
Can you check that the user you have entered for the plugin’s Publishing Username setting is still active on Discourse? To do this, go to the user’s admin page and look at the Activated row of the Permissions section. If Activated is set to No, click the Activate Account button.
its the only API request thing I have… but the user was deactivated… and that has fixed it thank you so much - hmm why would that have happened . Thank you so much
The notice may have been created before you updated the plugin to version 1.9.7. I’ll keep an eye out for that notice to make sure that it’s not being generated by the current version of the plugin.
This is probably related to the Discourse invalidate inactive admin email after days site setting. There have been some recent changes that could affect accounts that are only used for connecting to the API. I believe that this issue was fixed in a recent update.
It seems wrong that the user was deactivated again. My understanding is that re-activating the user by clicking the Activate button should keep the user active for the period of days set by your invalidate inactive admin email after days site setting. Can you double check that setting to make sure it’s set to its default value of 365 days? Also, let us know if the user becomes deactivated again.
I’m looking at the code that invalidates inactive admin accounts now. One thing to note is that you can bypass having inactive admin account emails invalidated by setting invalidate inactive admin email after days to 0. I don’t think this is the ideal solution though.
Admin emails should not be invalidated if the API Key for the admin user has been used within the period of time set by the invalidate inactive admin email after days setting. Is it possible that on WordPress you have set the Publishing Username to the admin account that is getting deactivated, but for the API Key you are using the All Users API Key? If so, it would make sense that the admin account keeps getting invalidated.
Unless you have a reason to not use the All Users API key on WordPress, you could change the values you have set in the WP Discourse connection settings to use your All Users API Key and your system user’s username. That username defaults to ‘system’.