If I try to uninstall Drupal Commerce Extra Panes - Terms of service, I get following error message:

Fatal error: Call to undefined function commerce_extra_panes_get_panes() in /mnt/webc/42/58/51167658/htdocs/d/sites/all/modules/commerce_extra_panes/modules/commerce_extra_panes_termsofservice/commerce_extra_panes_termsofservice.install on line 12

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greysun’s picture

*push*

Any help?

pcambra’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

Which version of Drupal 7 are you using? this is a problem identified in #1029606: Regression: Not loading the .module file causes a fatal error when uninstalling some modules (as does loading it) and solved both for D7 and D8 in June http://drupal.org/node/1029606#comment-4603656

Prague man’s picture

There is not solution.

My solution is here:

function commerce_extra_panes_termsofservice_uninstall() {
/* New line here */
  module_load_include('module', 'commerce_extra_panes');
/* End new line */
  $extra_panes = commerce_extra_panes_get_panes();
  foreach ($extra_panes as $extra_pane) {
    $pane_id = 'extra_pane__' . $extra_pane->extra_type . '__' . $extra_pane->extra_id;
    variable_del('cep_tos_' . $pane_id);
    variable_del('cep_tos_required_' . $pane_id);
  }
}
pcambra’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
772 bytes

As I posted in #2 I can't reproduce this and if you're using a Drupal version older than June (and you should), this should be safe.

Anyways we could be really sure that the module file is being included by doing a drupal_load.

I'll be happy to commit this when some getting the error confirms it fixes the problem.

dmirtillo’s picture

The patch does not solve the issue. I'm on D7.10 with commerce 1.2 and the revision of commerce extra panes currently for download (20 Jan).

I have the same kind of error but i don't know if i can reproduce it.

The module is currently not working for me and i can't uninstall it.

Is there any manual way of doing it so that i can try working on a clean install?

pcambra’s picture

#5 there's little to do if you can't reproduce a problem, how do you know that you've got a problem then?

Not sure of what does "can't uninstall it" mean, you should be fine just deleting the variables.

dmirtillo’s picture

I know i had a problem cause i could not uninstall the module, since i was receiving a fatal error similar to the one in the main post :)
The solution proposed by @mpark worked flawlessly, but thanks anyway!

pcambra’s picture

#7 how is it possible that the solution in #3 solves your problem but the same solution in a patch #4 does not?

pcambra’s picture

Status: Needs review » Reviewed & tested by the community

Setting to RTBC after a chat with D4rKr0w on IRC

pcambra’s picture

Status: Reviewed & tested by the community » Fixed

And committed!

Thanks everyone for reporting and give feedback.

Status: Fixed » Closed (fixed)

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

PESTO3567’s picture

#3 worked for me

sixelats’s picture

#3 worked for me (drupal 7.12, extra panes 7.x-1.x-dev 2011-Mar-07).

@pcambra, commited? Doesn't seem so in 7.x-1.x-dev of 2011-Mar-07. Am I missing something?

pcambra’s picture

sixelats’s picture

@pcambra,
Sorry, I was either tired or blind yesterday and could not see the change in current dev version...

Tomefa’s picture

I get the same problem, #3 works for me too
here is the patch to include in the module

eidoscom’s picture

Posted in #16 is the correct patch RTBC. It worked for me.

@pcambra, Patch in 4 was wrong as it try to load the extra_panes_termsofservice module instead of extra_panes module.

Thanks @Tomefa and all ;)

pcambra’s picture

Status: Closed (fixed) » Active
pcambra’s picture

Status: Active » Fixed

Fixed, thanks for the catch

Status: Fixed » Closed (fixed)

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

darvanen’s picture

Issue summary: View changes

#16 does not appear to be in the current stable release.

Slown’s picture

#3 and #16 patch worked for me too. Thank's a lot.

danon1981’s picture

Just using patch from #16 did the trick for me Thanks!!

Stephane Bouillet’s picture

Patch #16 works for me in Drupal 7.56


Why is this patch not integrated in the module ????????

darvanen’s picture

@remedact my guess is the maintainer is no longer maintaining the module, there have been no commits for about 4 years.

Instead of shouting, perhaps consider applying to be a maintainer of the module? (I'm no longer working on sites that use this or I would do so myself - I was too green to do so when I first commented).