Problem beim Verknüpfen des Discourse-Forums mit WP Discourse

Hello,

I’m working on a wordpress site and have the WP Discourse plugin installed. Our objective is obviously to sync our wordpress site with the Discourse forum so that when a post is published to the site it is also published to Discourse.

However until now it didn’t work much. While creating a post, even with the “Create new Topic” Discourse box checked, it does not work and the post isn’t created in the forum.

I went to the WP Discourse plugin settings and to me everything seemed to be fine (everything isn’t obviously fine and I may have done something wrong as it doesn’t work), the Discourse API key is correct as well as the SSO secret key, as I’m also trying to use my wordpress site as an SSO provider.

I noticed in the WP Discourse plugin settings that there were two error messages, when accessing the “SSO Provider” and “Connection” tabs:


which is quite problematic because there IS an admin user with this email address on the forum (myself).
and most importantly, “You are not connected to Discourse. If you are setting up the plugin, this notice should go away after completing the form on this page.”

Soooo my wordpress and Discourse don’t seem to be synced. Can I please get some help in order to solve this ? Feel free to ask if you need more information - I guess you obviously do

The first thing to sort out is the issue on the Connections tab. The plugin won’t work until you establish a connection with Discourse.

What have you set for the Publishing Username on that tab? It should be set to either the Discourse username of the system user (‘system’ by default) or the username of an admin user from your forum.

What version of WordPress are you using?

3 „Gefällt mir“

Hello Simon, thanks for the answer.

So it seems really dumb, but as expected the Publishing Username wasn’t correct (I missed a space on the name). I fixed this and now I have the “You are connected to Discourse!” message.

Also no more error message on the SSO Provider tab. By the way I’m using WordPress 4.9.3.

Anyway, sorry for the inconvenience and thanks again for the answer. I’ll update this thread/create another one if I have any other issue especially with synchronizing the creation of posts between Wordpress and the forum.

3 „Gefällt mir“

Hi,

Although I put all the needed info to Connection tab but it still shows

You are not connected to Discourse. If you are setting up the plugin, this notice should go away after completing the form on this page.

Please help.

Discourse: https://forum.biohack.vn
WP: https://biohack.vn
I use admin as the username since it’s the Discourse admin.

Try using ‘system’ for the username.

1 „Gefällt mir“

Already before I switch to admin.

For the Publishing Username setting, you need to use the username of your Discourse System user. That username defaults to ‘system’ (without the quotes.) For the API Key, use the All Users API Key. You can find that key at /admin/api/keys.

When I try to visit your site at http://biohackplus.com/, the page isn’t loading for me. Are you able to access it at that URL?

Let’s not open more than one topic on the same exact thing please.

2 „Gefällt mir“

I was able to connect to Discourse. However, although I put all the needed info Publishing tab, when I create a post in Wordpress, it doesn’t show in Discourse.

What I’m trying to do: When I create a post in a category in Wordpress, the plugin will create a post in Discourse with link to my Wordpress post in a matched Discourse Category.

This topic has instructions for publishing posts to Discourse: WP Discourse now supports the WordPress Block Editor. Is this working for you?

1 „Gefällt mir“

Meine Website hat ein ähnliches Problem. Ich habe WP Discourse installiert, einen All-User-Schlüssel erstellt, und der Veröffentlichungsbenutzername ist „system“. Trotzdem erscheint die Meldung: „Sie sind nicht mit Discourse verbunden…“. Meine Website wird über Cloudflare proxyed, aber soweit ich das beurteilen kann, funktioniert das einwandfrei. Jegliche Hilfe wäre sehr willkommen. Discourse ist Version 2.6.0.b4.

Hey @sturdy2, es gibt ein paar Gründe, warum du dort möglicherweise auf ein Problem stößt. Könntest du bitte diese Konfiguration für mich ausprobieren?

In Discourse: Erstelle einen globalen API-Schlüssel für einen Admin-Benutzer

Die Konfiguration sollte so aussehen:

In WordPress: Verwende diesen Schlüssel und setze den „Veröffentlichungsbenutzernamen

1 „Gefällt mir“

Hallo @angus, danke für die Rückmeldung. Leider erhalte ich auch nach dem Erstellen des einzelnen Benutzer-Schlüssels, wie von dir beschrieben, weiterhin die Meldung „Keine Verbindung“. Ich habe alles ausprobiert, was mir einfällt, aber leider ohne Erfolg … vielen Dank nochmals.

Ok, schauen wir mal, ob wir das herausfinden können.

Nur zur Bestätigung: Hast du einen „Global Key

1 „Gefällt mir“

[quote=“angus, Beitrag: 14, Thema: 79824”]
Nur zur Bestätigung: Hast du einen „Global Key

Ok, könnten Sie bitte Cloudflare aus Ihrer Einrichtung entfernen? Wir müssen die potenziellen Fehlerquellen eingrenzen.

1 „Gefällt mir“

Hallo @angus,
noch ein Update: Ich habe das Query-Monitor-Plugin in WP installiert (siehe Ausgabe unten).

Auch mit cURL auf meinem lokalen Computer erhalte ich einen 403-Fehler. Das deutet darauf hin, dass es sich um ein Problem aufseiten des Upstreams handelt, das meine Site und WP Discourse betrifft. Wahrscheinlich Cloudflare, aber ich möchte Cloudflare noch nicht entfernen. Siehe unten.

Noch eine Entschuldigung für meine Verzögerung. Ich habe eine Benachrichtigung von meinem Hosting-Anbieter erhalten, dass meine Site auf einen anderen Server migriert wird und es einige Änderungen geben wird, einschließlich einer IP-Änderung. Daher muss ich weitere Arbeiten an diesem Problem vorerst verschieben. Darf ich mich später, wenn sich der Staub gelegt hat, wieder an dich wenden?

EDIT: Gelöst! Vielleicht ein Fehler unter /admin/site_settings/category/security → erlaubte Crawler-User-Agents.
Es scheint, dass jeder Eintrag im Textfeld für erlaubte User-Agents alle Zugriffe blockiert, selbst einen cURL-Befehl von meinem lokalen Computer. Das Zurücksetzen des Textes auf leer führt sofort dazu, dass WP Discourse anzeigt: " Du bist mit Discourse verbunden!"

3 „Gefällt mir“

Schön, dass du es herausgefunden hast! :tada:

Ja, diese Einstellung ist meiner Meinung nach absichtlich sehr restriktiv (daher die WARNUNG IN GROSSBUCHSTABEN in den Anweisungen).

Um deine WordPress-Instanz zu ermöglichen, während allowed crawler user agents verwendet wird, kannst du sie wie folgt hinzufügen:

Wordpress/<wordpress_version>

Ich habe das gerade auf meinem Test-WordPress / Discourse getestet, indem ich Wordpress/5.5.3 zu allowed crawler user agents hinzugefügt habe, und es hat funktioniert :+1:

Wenn du das nicht bei jedem WordPress-Upgrade aktualisieren möchtest, kannst du ein einfaches Plugin verwenden, um deinen eigenen User-Agent für diese Art von Anfragen in WordPress festzulegen, z.

2 „Gefällt mir“

Danke für die Erklärung. Das ergibt für mich langsam mehr Sinn. Anfangs dachte ich, „allowed crawler user agents

1 „Gefällt mir“

Hallo,

Das einzige Mitgliedschafts-Plugin, von dem ich weiß, dass es sowohl mit WordPress als auch mit Discourse funktioniert, ist Memberful. Sie haben auch detaillierte Anweisungen zur Integration mit Discourse hier – Integrate Discourse with Memberful - Memberful

Wenn Sie bereits ein anderes Mitgliedschafts-Plugin verwenden, könnte es sich lohnen, direkt auf sie zuzugehen und sie zu fragen. Ich habe es in meinem Portfolio von Kundenwebsites verwendet.

2 „Gefällt mir“