Problem/Motivation

Upon saving a user that exists in Discourse, the following error message is displayed in the log:

Discourse not synchronized. Group [name] does not exist.

However the group name does exist, after some debugging I found another error when trying to search for groups.

`403 Forbidden` response: {"errors":["You need to be logged in to do that."],"error_type":"not_logged_in"}

Steps to reproduce

  • Create user in Drupal
  • Create user in Discourse
  • Assign user in Drupal a role (that has already been synced with Discourse)
  • See issue in log

Proposed resolution

Looks like the /groups/search.json endpoint maybe use to allow get params, but now this is not an option?
I found that if you apply the api-key and api-username as headers then the syncing works again.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Eli.Stone created an issue. See original summary.

3li’s picture

Version: 2.0.0-rc4 » 8.x-1.x-dev
3li’s picture

fjgarlin’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Active » Reviewed & tested by the community
FileSize
497 bytes

Re-rolling patch for 2.0.x version as the previous would not apply.
Also marking as RTBC as the above patch fixed the issue described.

AaronBauman’s picture

Bump, RTBC+1

  • jurgenhaas committed f32b2ae on 2.0.x
    Issue #3162446 by Eli.Stone, fjgarlin, AaronBauman: Roles/groups not...
jurgenhaas’s picture

Sorry for the delay, mergin right now.

jurgenhaas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.