When I uninstall JS injector 1.x-dev I get this message:

PHP Fatal error: Call to undefined function _js_injector_rule_path() in /Volumes/Daten HD/Daten/Webserver/Kunden/reventa.de/sites/all/modules/js_injector/js_injector.install on line 65

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

belekas’s picture

Same problem happens for me.

wiifm’s picture

Status: Active » Postponed (maintainer needs more info)

Did you completely disable and uninstall 7.x-1.x, before upgrading to 7.x-2.x ?

Also be weary of any legacy files lingering in the module directory.

The safest way to upgrade this module is by using drush. Here are some sample commands - assuming you are starting from an existing 7.x-1.x install:

drush dis js_injector -y
drush pm-uninstall js_injector -y
drush dl js_injector -y
drush en js_injector -y

Hope this helps

Wolfgang Reszel’s picture

Well, 7.x-1.x can't be uninstalled, that's the problem.

Morten Nielsen’s picture

I’m also not able to uninstall version 7.x-1.x

wiifm’s picture

Can I ask exactly what step fails? Is it the disabling of the module or the uninstalling of the module?

Wolfgang Reszel’s picture

Disabling works, the error appears when we uninstall the module. I can successfully uninstall the module when I copy the missing functions from js_injector.module to js_injector.install. I had to rename them as Drupal seems to load both files in some cases.

Wolfgang Reszel’s picture

Maybe my workaround is helpful for others. I've created a small patch. No guarantee that it works in your case.

Morten Nielsen’s picture

It worked for me. Thank you so much, Wolfgang! :-)

For others doing their very first patch, the following guide was helpful to me:
http://drupal.org/node/620014