PoeticMediaLab / Lacuna

Lacuna: Digital Annotation for Teaching and Learning
http://www.lacunastories.com
GNU General Public License v2.0
36 stars 20 forks source link

Cannot update to Drupal 7.5.8 #215

Closed pguerr061703 closed 6 years ago

pguerr061703 commented 6 years ago

Hello I'm running Drupal 7.5.0 on a virtual Ubuntu site. I am having problems updating to Drupal 7.5.8 Getting the following error. Is there a way to fix this?

Code updates will be made to drupal core. WARNING: Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt. If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.

Command is: # drush up --security-only When I try drush up drupal, I still get the same error.

Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y Project drupal was updated successfully. Installed version is now 7.58. Backups were saved into the directory [ok] PHP Fatal error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc on line 80 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc, line 80 The external command could not be executed due to an application error. [error] Backups were restored successfully. [ok] Backups were restored successfully. [ok] Backups were restored successfully. [ok] Backups were restored successfully. [ok] Backups were restored successfully. [ok] Backups were restored successfully. [ok] Backups were restored successfully. [ok]

mwidner commented 6 years ago

It looks like there's a conflict between the Rules contributed module and the core system. I would just do a full update. It shouldn't cause any problems. We'll be releasing an updated version to address the security issue soon, though, so you could just download the latest Lacuna code when 2.4.1 is out.

mwidner commented 6 years ago

https://poeticmedia.stanford.edu/lacuna-v241-released-private-feedback-students

pguerr061703 commented 6 years ago

Nothing is working When I run drush up or drush up --security-only. I don't know how to get past this

root@ace-linux13:/var/www/html# drush up PHP Fatal error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc on line 80 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc, line 80 root@ace-linux13:/var/www/html# drush cache-clear PHP Fatal error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc on line 80 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc, line 80 root@ace-linux13:/var/www/html# drush cache-clear PHP Fatal error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc on line 80 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc, line 80

mwidner commented 6 years ago

I'm sorry, but I don't know why that drush command wouldn't work on your system. It could be a variety of issues. I recommend that you download the latest Lacuna code, which includes the update to Drupdal 7.58, then update from there.

pguerr061703 commented 6 years ago

I'm running LacunaStories 2.2.2 on a Ubuntu 16 server. It is live, with lots of content from faculty and staff ( /var/www/html/ ). Not sure how to perform an update without AFFECTING faculty data. What's involved? Sounds like it needs to be carefully planned and I may not be ready without understanding what's impacted from the upgrade (user data, ..etc)

pguerr061703 commented 6 years ago

It looks like the problem has to do with PHP7.2 and there is a patch for it.. I'm just not sure how to apply the patch.. See below
https://www.drupal.org/project/rules/issues/2923477#comment-12343075

mwidner commented 6 years ago

That's true, though I will say I just ran the update on a live site and it worked just fine. To test, here's what you can do: run "Backup and Migrate" to get the database for the current live site. Then, in a test installation of the newest code, restore from that database. Then revert all features, run database updates, etc. If everything works, then you're fine.

I regularly update the live Stanford instance of Lacuna when we release new versions. Unless you've done any customizations, then is should be fine. But, to be extra careful, fire up a test copy of the site, as I mentioned, and test it there first. If you're using git for the code, you can even just backup your database, pull the latest code, run the updates as described in the README.md, then check it out. If anything goes awry, you can revert the code the previous version you were running, restore the database, and you will have effectively undone any changes.

As for patching, here's the Drupal instructions for applying patches:

https://www.drupal.org/patch/apply

When they update the next release of Rules, that patch will be included, but it sounds like you can't wait until then. Basically, download this: https://www.drupal.org/files/issues/php7_2_compatibility-2923477-5.patch

Then use that that patch the Rules modules before updating. Good luck!

pguerr061703 commented 6 years ago

I downloaded the patch and called it patch.php and dumped it in /var/tmp I'm not sure i understand how to apply it ..but it looks like the command is: patch < /var/tmp/patch.php Do I need to put patch.php in a plugins directory? Can I run it from any directory?

mwidner commented 6 years ago

You should be in the 'sites/all/modules/contrib/rules' directory, I think.

pguerr061703 commented 6 years ago

Specifically /var/www/html/sites/all/modules/contrib/rules/ui/ ??

Error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /var/www/html/sites/all/modules/contrib/rules/ui/ui.plugins.inc, line 80 The external command could not be executed due to an application error. [error]

pguerr061703 commented 6 years ago

I'm getting an error using "git apply -v patch"

root@ace-linux13:/var/www/html/sites/all/modules/contrib/rules# git apply -v patch fatal: corrupt patch at line 29

root@ace-linux13 # more patch

--- a/ui.plugins.inc 2017-11-15 15:23:38.474142310 +0530 +++ b/ui.plugins.inc 2017-11-14 23:52:46.273778697 +0530 @@ -17,7 +17,7 @@ $this->conditions = $this->rule->conditionContainer(); }