Support » Plugin: Embedly » [Plugin: Embedly] Missing providers

  • WordPress 3.1. Multisite enabled and in use.

    On the main blog embedly seems to be fine, but on other blogs on the site embledly shows this message in embedly settings area:

    “Hmmmm, there where no providers found. Try updating?”

    When I click the Update Provider List button I get this message:
    “Something went wrong. Try again later.”

    This is probably due to our server disallowing the fetch of something, but it doesn’t explain why it works in the root blog for the site, but none of the other blogs.

    http://wordpress.org/extend/plugins/embedly/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Embedly

    (@embedly)

    Errr, we don’t know enough about WordPress to help you out on this one. It’s probably less to do with the server and more that we can’t write the providers to the database. Embedly creates a DB table to store all the providers in.

    Let us know if you make any headway?

    Well, I dove into the embedly plugin code a bit and saw that it’s using a single table for all WordPress sites in a multi-site environment or not. The plugin was also appending the table prefix for a given site using $wpdb->prefix which it really should be doing. So while the initial site would have the prefix chosen by the user when they set up WordPress (wp_ by default) subsequent sites add a number to that (wp_2_ for the second and so on).

    I fixed the problem by hard coding our table prefix into the plugin code and I disabled individual site admin access to the plugin administration (they don’t really need control over which providers anyway). It’s a fix that’ll work for us for now, but the real fix would be to make the plugin create other tables for other sites in the WP Multi-site environment so the provider list could vary for different sites. For us it’s not a big deal though, we don’t really want people to have access to that anyway. The only issues is that we’ll have to remember to readjust when the plugin updates if the problem persists.

    Hello,

    I was having the same problem. Network disabling the embedly plugin and then enabling on a blog-by-blog basis also seems to make the plugin work. It would be good to have it network enable-able without having to hack, though.

    Jonathan

    To work around this, I changed all instances of $table_name = $wpdb->prefix . "embedly_providers";

    to $table_name = $wpdb->prefix . $wpdb->blogid . "embedly_providers";

    You may need to network deactivate and then then re-network active.

    I may have spoke too soon.

    So yes, the change I suggested would add the blog id to the tables, but it doesn’t address the fact the plugin doesn’t run it’s activation function upon network activation. Tables simply doesn’t get created. Andrea suggested this plugin http://wordpress.org/extend/plugins/proper-network-activation/ but that didn’t help.

    Interestingly enough, http://wordpress.org/extend/plugins/multisite-plugin-manager/ will allow you to activate the plugin across all sites in a network. Note it is 3.1+

    Yes, I’m talking to myself.

    Further testing, I changed $wpdb->prefix with $wpdb->base_prefix and that may have resolved the network activation issue. Initial testing on my end seems to be working.

    And ignore that last idea. That simply shares a single database with all installs. Shouldn’t be adding things to this forum before getting my morning coffee.

    Well, I can reassure you that you weren’t talking to yourself, but I think that’s all I can do.

    I’ve still just been using my “solution” from above. Any solution that would require doing anything to every blog manually is out of the question, as my install is for a University with 50k students, faculty and staff, all of whom have access to create blogs.

    I wasn’t sure what your solution entailed. Glad i wasn’t talking to myself 🙂

    Ah ya, mine just made it so it uses the single table with a hard coded prefix. It’s lame because my users don’t have access to change any embedly settings and all blogs share the same settings. It works for me because I don’t really want them to have that much control anyway, but I would imagine not everyone wants such a restriction.

    Gotcha. Yeah, using $wpdb->base_prefix creates a shared DB so all sites can access it. As I also mentioned, the multisite plugin manager did allow me to activate the plugin across all sites. Not necessarily a plugin I’d want to use all the time, but in a scenario such as this, might be worth turning on to work around such a plugin that won’t network activate.

    I’ll be investigating this more in the couple of days and will report back anything I figure out.

    hi guys, could you please point on one working solution for wp 3.1 multisite (better with no access from subblogs at all)?

    should I change $wpdb->prefix to $wpdb->base_prefix and that’s it?

    thank you!

    The $wpdb->base_prefix works only in the sense that it allows the plugin to be network activated, but it does so by sharing a single table with all installs. So if you were to “hide” the options from users in the menu, then that would work. I was able to use the aforementioned multi-site plugin manager plugin to actually activate the plugin across all sites, more like a mass manual activate, rather than network activate.

    Wish I had a better solution to offer up. I will continue to work through this as it’s a handy feature to offer users.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Embedly] Missing providers’ is closed to new replies.