MukurtuCMS / mukurtucms

GNU General Public License v2.0
81 stars 36 forks source link

Latest field_scald_protocol check breaks drush updb #116

Closed techgique closed 3 years ago

techgique commented 5 years ago

I'm upgrading a site from 2.0.13 and pulled from master today as directed by the upgrading instructions. When I ran drush updb (both general and manual upgrade steps for intermediate releases start with that command) I got this error:

PHP Fatal error:  Can't use method return value in write context in /var/local/www/mukurtu/sandbox/master/sites/all/modules/custom/features/ma_scald/ma_scald.module on line 51
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Can't use method return value in write context in
/var/local/www/mukurtu/sandbox/master/sites/all/modules/custom/features/ma_scald/ma_scald.module,
line 51

I looked in the git history and saw this commit after the 2.1.1 release: https://github.com/MukurtuCMS/mukurtucms/commit/505d255f4c33e2685f0f0a7255bae3ab4ec5c7b3

Reverting this change fixed the error for me and the database migration is now in progress.

I don't know if this means that commit is actually a bug or just that it perhaps should not have been merged to master yet, but I hope this may at least help others upgrading.

taylor-steve commented 5 years ago

Hi, thanks for the report. Are you using PHP 5.4? This shouldn't be an issue on PHP 7+. That being said, I wrote that bit in haste and didn't mean to break compatibility, that's my fault. I've committed a fix to the develop branch, but I need to get it tested before I roll it into master. Thanks.

techgique commented 5 years ago

Thanks for responding.

Yes, it's a development CentOS 7 server running PHP 5.4 from base repo. I tried running the site with PHP 7.2.7 built with PHPBrew and PHP 7.3.4 from Remi's repo, but neither of those worked for me. I would just get an error page upon trying to load the site with zero output to the Apache error log, so I switched back to PHP 5.4 and began the update process.

After reverting that change, everything seems to have updated successfully. I'm trying to switch to PHP 7.3.4 again now. I think I may be missing some dependencies. Thankfully /dashboard#overlay=admin/reports/status is displaying and giving me some hints. Sorry to sort of change topics from the reported issue, but is switching PHP versions without any changes to the site configuration etc generally supported?

taylor-steve commented 5 years ago

Yes, you shouldn't have any troubles after changing PHP versions, at least nothing a cache clear wouldn't fix. We actually switched our CentOS 7 servers over from 5.4 to 7.2 (remi) not that long ago and we didn't need to do anything to the Mukurtu installs. I would suggest PHP 7.2 and not 7.3. I tried Remi's 7.3, which installed fine, but I think at least one of our bundled contrib modules had issues (Rules maybe?) on existing sites. That's on the list for the next release. If you do need PHP 7.3 for some reason let me know and I'll dig up what I did to make it work. Thanks.

techgique commented 5 years ago

It seems to be working with Remi's 7.3 now that I've got the missing dependencies installed. If I run into any further quirks, I'll be sure to ask for help. Thanks!