Hi,

I do not know if this is an error from ctools or the update just broke the way oEmbed implements the functions, but I found an error:
Invalid argument supplied for foreach() in sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php on line 54
So oEmbed module does not get any provider anymore.

Thanks for your support.

Comments

voxpelli’s picture

Not good. I haven't updated any of my own sites yet so I can't confirm - but I will try to do that pretty soon.

voxpelli’s picture

Seems like others have the same issue in #865738: warning: Invalid argument supplied for foreach() in ctools/plugins/export_ui/ctools_export_ui.class.php on running update.php - do your error appear outside of the update process? If so we should add that info to that issue as well.

davebv’s picture

I am not so sure, but I think I got the error outside the update process. As I said, not sure though. i will check it out and report it back as soon as I can.

Thanks for your quick answer.

davebv’s picture

By the way. I also tried to remove/uninstall oEmbed and ctools completely. Then I reinstalled the 1.7 from scratch and oEmbed did not show any providers still.

voxpelli’s picture

Might be that it's a bug that is unrelated to the warning you got.

davebv’s picture

Can I do something to provide you with more information?

patrickslee’s picture

I have the exact same problem and I have figured out why.

Since ctools 1.7 schemas are provided with default values. Specifically, the 'api' key is provided with defaults. That creates two problems:

  1. Your modules have to implement hook_ctools_ctools_plugin_api(), otherwise the hook_default_oembedcore_preset() and hook_default_oembedcore_provider() functions are not getting called.
  2. All objects are required to provide a 'api_version' property otherwise _ctools_export_get_defaults() will not include the object because it fails version check.

I personally think this is more a ctools problem. But before ctools is fixed this should help you to make a workaround.

patrickslee’s picture

Project: oEmbed » Chaos Tool Suite (ctools)
Version: 6.x-0.6 » 6.x-1.7

I have moved this ticket to ctools.

According to my comment above, can we change ctools_export_get_schema() so that it does not provide a default to $schema['export']['api']?

Otherwise all modules those just use ctools export will have to implement hook_ctools_ctools_plugin_api().

merlinofchaos’s picture

Oh crap.

I think that slipped in with the export ui patch and I didn't notice it got put there and yes, the 'api' section is not supposed to have a default. I will happily remove that, and I apologize that it got put in. :/

barraponto’s picture

is this ticket connected in some way?
http://drupal.org/node/873776

davebv’s picture

Is the patch commited in the dev version yet?

merlinofchaos’s picture

Status: Active » Fixed

#11: "the patch"

There's no patch on this issue. So it can't be committed.

I just went ahead and made the change and committed it now. But you'd be doing everyone a favor if you'd read more closely before you add to issues.

davebv’s picture

Sorry for the latest post. It was late and I misunderstood what you wrote in #9.
I also asked that because I could not find any CVS commit message related to this issue.

Again, I am sorry, did not want to sound rude in my post nor to bother you or anyone else.
Apologies and thanks for your excellent work.

Status: Fixed » Closed (fixed)

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

dddbbb’s picture

What's the latest on this issue? I really need a fix for this and am having a nightmare rolling things back in the meantime.

voxpelli’s picture

I'll try to look into adding a specific fix to the oEmbed module this weekend.

dddbbb’s picture

Fantastic - cheers.

davebv’s picture

I tried the -dev version. It works with current version of oEmbed module

voxpelli’s picture

Tried to fix this in the OEmbed-module as well since 6.x-1.8 is taking a while to get released, but couldn't accomplish that without breaking compatibility with all existing exports. The only possible fixes I see until Chaos tools 6.x-1.8 is released is to use a dev-release or to stay at 6.x-1.6.

voxpelli’s picture

For those who need this fix but are afraid to update to a dev-release of Chaos Tools because it might cause conflicts with eg. Panels - you can find the diff here: http://drupalcode.org/viewvc/drupal/contributions/modules/ctools/include...

voxpelli’s picture

Title: Ctools 1.7 breaks oembed module » Ctools 1.7 breaks simple exportables

Changing title to reflect that this is not only affecting the oEmbed module but also the OAuth module, which with Chaos tools 1.7 no longer shows its default context.

A lot of other modules like Services are also affected, although only minor as far as I've understood.

Any site using exports from oEmbed, OAuth 3.x, Services 3.x or others will lose functionality on an upgrade to Chaos tools 1.7 and for users starting out with Chaos tools 1.7 these modules will look broken.