• I just spent a fair amount of time troubleshooting why the plugin wasn’t working. The room I was trying to post to has a space in the name. After some debugging I noticed the space was in the URL to HipChat, rather than being encoded. I tried replacing it with a + but that didn’t work. I tried all sorts of other troubleshooting before returning to the space in the URL. I finally tried replacing the space with %20 and it worked!

    Hopefully this can save someone else some time and or frustration.

    https://wordpress.org/plugins/better-hipchat/

Viewing 1 replies (of 1 total)
  • Thread Starter myquealer

    (@myquealer)

    I spoke too soon. Replacing spaces with %20 worked for testing the room, but when you save the config the %20 is stripped out and notifications fail.

    The fix is to URL encode the room name in the plugin (or only use rooms without spaces in their names).

    To URL encode the room name edit line 17 of includes/event-payload.php to look like:

    sprintf( 'https://api.hipchat.com/v2/room/%s/notification', rawurlencode($this->setting['room'] ))

Viewing 1 replies (of 1 total)
  • The topic ‘Rooms with spaces’ is closed to new replies.