I installed the Discourse WordPress plugin, and even though I don’t enter any API key and URL, it is still showing at the top that You are connected to Discourse!
Thank you!
Brajmohan_Kumar encountered a problem with the WordPress Discourse plugin, where it displayed “You are connected to Discourse!” despite not entering an API key and URL. simon confirmed it was a bug caused by a condition that bypasses the connection status check when no API credentials are entered, returning a WP_Error object. simon fixed the issue in WP Discourse version 1.9.9, which is now available in the WordPress repository. The fix was welcomed by Brajmohan_Kumar, who thanked simon for the prompt resolution.
I installed the Discourse WordPress plugin, and even though I don’t enter any API key and URL, it is still showing at the top that You are connected to Discourse!
Thank you!
Thanks for reporting that! If the Connection options fields have not been set, the “connected” message gets displayed. That is a bug. I’ll fix it today. For now, you can ignore that message until you have filled in the fields on the Connection options page. Once you have filled in those fields, the connection message that gets displayed will be accurate.
The problem was caused when I added a condition that bypasses the connection status check if no API credentials have been entered. That condition returns a WP_Error object. The function that displays the status notice needs to be updated to check if a WP_Error object has been returned.
The issue with the connection status notice has been fixed in WP Discourse version 1.9.9. That version is in the WordPress repo now. Thanks again for reporting this!
Thank you so much for the quick fix!