Hi,

I have variable 7.x-1.2 installed. I want to update to 7.x-2.0 version.

In my admin module status page, i have a link to download 7.x-2.0 version but no automatic update for the module.
I have try to replace the variable directory under /sites/all/module/version with the new version of the module but the site crash. So i replaced it with my backup.

So, how can i update the module ?

Thanks

Comments

bforchhammer’s picture

  • Clear caches (!!)
  • Replace "variable" folder with new version
  • If you have the i18n module installed, also replace i18n folder with latest version
  • Run update.php

Should work. If it doesn't please provide more info on how your "site crashes" (error message, screenshot, watchdog/log messages etc.).

Solarius’s picture

Status: Active » Fixed

Thanks for the help.

I follow your instructions and all works now !

My mistake is to doesn't clear the cache before update ?

Thanks

ramsegal’s picture

Hi, i tried the above and got:

PHP Fatal error: Call to undefined method VariableRealmDefaultController::setWeight() in /var/www/xforex-d7/public/sites/all/modules/variable/variable_realm/variable_realm.module on line 396

bforchhammer’s picture

ramsegal’s picture

Thank you bforchhammer, updating i18n+variable together works :)

brycesenz’s picture

I am still getting issue when I try to make the update.

I have followed the instructions above (cleared the caches, replaced both i18n and variable with latest version, then ran update.php), but I am stuck in an endless loop on the Database Update confirmation/overview page. I just keep hitting "continue" over and over again, but it never performs the update.

Any advice?

Jose Reyero’s picture

Status: Fixed » Closed (fixed)

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

AndyZhang’s picture

Status: Closed (fixed) » Active

I've also followed the instruction and updated the variable code to 7.x-2.1 and i18n code to 1.7. When I tried to run the update.php I got stuck in the infinite loop. Please advise. Thanks in advance.

brycesenz’s picture

Hello Andy -

I had a similar issue while upgrading. What fixed it for me was first upgrading to Internationalization 1.5 and Variable 1.2, and from there upgraded to Internationalization 1.7 and Variable 2.0. If I did that, I didn't get stuck in an infinite loop.

Does that work for you?

AndyZhang’s picture

Hi brycesenz,

I've tried that one, the first half went very well. But when I ran the update.php from i18n 1.5 to 1.7 and variable 1.2 to 2.1, it reported the following error/warning:

The update process was aborted prematurely while running update #7004 in i18n_taxonomy.module. All errors have been logged. You may need to check the watchdog database table manually.

I've checked the dblog but there is no error there, so I've no idea what's going on. My Drupal core is 7.x-12, does it have anything to do with the above message?

Other than the error message, the site seems to be working after the upgrade. I don't know if I can ignore the error message. Any suggestions are welcome. Thanks in advance.

danyg’s picture

HI,

I've experienced the same issue, but brycesenz's guide worked for me, first step to update to i18n 1.5 and variable 1.2, then CLEAR CACHES (very important!), then change codes to updated ones (i18n 1.7 and variable 2.1) and run update.php.

brycesenz’s picture

@AndyZhang -

I wasn't using i18n on this project (which it seems you were), so I don't have a good sense for whether that message really is an issue or not. But in my experience, if all of your modules show as being up-to-date and the site works, then I wouldn't worry too much about it.

martinbo’s picture

Thanks bforchhammer, it has helped me too !

latulipeblanche’s picture

Right, the module Variable isn't in the list of modules to be updated.

Before updating other modules I did an update of the Variable Module version 1.2 by 2.0 (I replaced the module folders with tfp access) .
Than I did the regular update by the admin/modules/update -> update.php and I didn't have problems (like I had when I first did an update without the Variable update before)

cinnamon’s picture

For those with simular problems as I had, that is: can't escape from the endless loop in update.php. "drush updb" did work, so if that is an option try that one.

ali_b’s picture

#12 works

Jose Reyero’s picture

Disabling i18n_variable before updating then enabling it again may work too.

Anywa, does anyone have a tip on what failed exactly so we can fix it? Maybe adding a cache_clear_all() as part of the update.php will work?

sahuni’s picture

I had also the loop while updating variable module, updating from 7.1.1 to 7.2.3.

I try again doing the job in 2 steps. First upgrading from 7.1.1 to 7.1.2
then upgraging from 7.1.2 to 7.2.3
No more problem.

And after I had no problem with i18n modules upgrade.

I still have to do that on server, but for local tests, this method was successful to me.

ma74’s picture

Issue summary: View changes

#12 still works. thanks

betyargabor’s picture

#19 works for me on the server.
Thank you.
This is the same solution in #12.
If i skip variable module update 7.1.2 version, i got endless update loop.