Fixing Combrite for WordPress

Combrite is an awesome plugin for WordPress to help you import your Eventbrite events into your WordPress site as posts or pages… and it’s been broken for over a year.

What made it unusable for many was how you selected an event to import. You had to search for it and then click on a link in Combrite’s search results to import it. Here’s what that looked/looks like.

Combrite Event Search Results

Above is a search I did for the Learn to Code Seattle meetup group (which uses Eventbrite for ticketing) earlier today.

When the search stopped working, people complained on the WordPress forums, but no one answered. The plugin shows a warning that it hasn’t been updated in two years and the only Combrite online now seems to be a plugin for Joomla.

But since there’s nothing quite as good, I created a quick and dirty hack to get around the search. It worked for me, but it was hacky and fiddly, and wouldn’t work for most others.

I was looking for a simple side project and decided fixing the search might be fun. Since it’s GPL licensed, I fixed it and here’s an unofficial “1.0.3” update with repaired search. I offer this with no warrantees, no guarantees, and I am not the helpdesk, but if you want to give it a try…

Download the Combrite 1.0.3 update as a .zip file

Get/fork/follow it on GitHub

The rest of this will detail what I fixed, what I didn’t fix, and what I may do in the future.

What I Fixed

Apparently Eventbrite’s update to their v3 API broke the search function. The URL just wouldn’t work. So I updated the URL’s construction, but the API changed the structure of the JSON object that’s returned, so I had to update the decoding of that object in both the back-end PHP and the front-end JavaScript. The primary changes are…

/back/combrite_events.php – updated to work with the new API and combrite_settings.php

/back/back.php – updated to add combrite_settings.php to the mix.

/back/combrite_settings.php – adds an easy to change oAuth key setting. I’m using the anonymous key for an app I created which has a daily velocity limit of about 5k queries. It should suffice for now, but if this grows in popularity, it will make it easy to abstract it out.

/back/js/script.js – also updated to work with the new API and object structures.

What I Didn’t Fix

The actual event import continues to work as is and trying to update it for the new API was just breaking it in many ways. Since it works (as far as I can tell), there’s no point in delaying this release until it’s updated.

What I May Do

If more people test it and it works for them, I’ll see what I can do about putting it into the WordPress Codex and if they’ll let me take over the original listing.

If I get some good feedback, I may improve the event import a bit, add some more search functions (specify an organizer or geographic location for better filtering), add a nice “import by event ID” interface that’s less hacky and fiddly than what I was running for the past year +.

Leave a Reply

Your email address will not be published. Required fields are marked *