After updating to 2.x-2.3 from 7.x-1.4, I cannot successfully run update.php. Using web interface, I get:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://websitename/update.php?op=selection&token=iDCX49qg9EXqTL95VFv0pFW... StatusText: OK ResponseText: Fatal error: Call to undefined function file_type_load_all() in /home/useridname/public_html/sites/all/modules/picture/picture.install on line 146
In Drush, "Call to undefined function file_type_load_all<> in /home/useridname/public_html/sites/all/modules/picture/picture.install on line 146 ... Error: Call to undefined function file_type_load_all<> in /home/useridname/public_html/sites/all/modules/picture/picture.install, line 146.
I edited and resaved the breakpoints and picture module settings, cleared caches, tried both the 2.x2.3 and current 7.x-2.x-dev version and keep getting the same error.
When I reverted to the 7.x-1.4 version, I had to reattach many of my images to the content. Also, with the new and dev versions, some of the photos overflow the website boundaries where they displayed perfectly with the older version.
Not sure how to proceed.
Comments
Comment #1
muranod commentedTook a few hours, but I believe I fixed this for me. For anyone else with this issue, here's what I did:
Installed picture-7.x-2.x-dev.zip
Rebuilt the registry (drush rr)
You need to have the rebuild_registry module installed for drush Here's a page that tells you how to do that:
http://maxbronsema.com/blog/2013/01/08/drupal-registry-rebuild/
Next, I updated the media module I had on site from v. 7.x-1.4 to v. 7.x-2.0-alpha3
I rebuilt the registry again (don't know if I had to, but that's what I did).
Then I used drush to run update.php. Got 3 warnings (in yellow) about a specific Argument not being an array. Don't know for sure what that meant, but all of the other updates returned an OK.
Everything now seems to be working fine. Note that I tried this on a dev version of the site before doing it on the live site.
Running update.php in a browser, there are no more warnings or fails - just a "no pending updates" message.
Comment #3
attiks commentedThe reason is that picture has support for file entity, but since a lot has changed between version 1 and 2 of file entity, we didn't check version 1. Since it is a soft dependency we cannot check the version in the info file. I added an extra check in the picture.install file, to make sure the function exists, if it doesn't an exception is thrown urging people to update.
For those having similar problems, the solution in #1 is spot on.
Comment #4
groovedork commentedI have now tried rolling back the module from a backed-up older version, and have truncated the watchdog table in the database. I then added the code that checks the file entity version that you mentioned to the picture.install.php, and then ran update again. It now gave the warning as expected, but allowed me to continue form there.
I'll have to check if that broke anything.. *crosses fingers*.
Now everytime that I run update it asks that I update the file entity.
Media module and picture module are now incompatible?
Unfortunately, updating to version 2 of the file entity module is not as easy as you think. If you want to use a stable version of the media module, the recommendation is using version 1.0, which in turn uses a special 1.0 version of the file entity module (if I understand correctly).
From the media module page: "The File entity project is not compatible with Media 7.x-1.x. You must use the File entity module bundled with Media 7.x-1.x."
Updating to the 2.0 version of media module from 1.0 is not only terribly complex, but the 2.0 version still has all kinds of bugs (just had a look at the issue cue), cementing the claim that it's not production ready.
It's all incredibly interconnected.. the short of it: you can't use the media and picture module together in a production system.
And that's a serious issue in my opinion.
I hope I'm being a n00b, if so, please explain.
Also, please don't assume everyone has access to Drush. The killer feature of Drupal is its WYSIWYG sitebuilding nature after all.
Comment #5
attiks commentedMy bad, I'm using media 2 since a long time and I assumed - wrongly - that most people are. The problem is that file entity has matured a lot in version 2, so for now I guess the are kind of incompatible.
If you ignore the error, is everything still working, because we removed some code in version 2 specific to file entity?
Comment #6
groovedork commentedI'm afraid it has caused some serious trouble, from what I can tell from a short analysis. Images are all rendered in one resolution. No more responsiveness.
I also couldn't update any other modules, as the picture module kept wanting to update every time I started update.php. In the end I had to manually modify the database to fake that the picture module had updated successfully (changed schema version in system-table, if anyone else is wondering).
Would it theoretically be possible to still use the old version of file entity with the latest picture code? Your claim that you deleted a lot of code makes me fear the worst..
Another option would be to roll back to the old version, and just not update the module anymore (horrible thought obviously). In this scenario, how would I go about it? Did this latest Picture update make any changes to the database structure?
Comment #10
jelle_sThis should be fixed in latest dev. Picture should now work with both File Entity 1.x and 2.x.
Can you confirm?
Comment #15
groovedork commentedHurray!
The flexslider is still acting wonky, but the other parts of the pages seem to output the correct sizes of images again. I'll see what's wrong there later, but so far things are looking good. The update.php ran without a hitch too.
Thanks so much for the quick response!
Comment #16
groovedork commentedOk, I installed in on production, and some strange things still going on there:
http://setup.nl/
The scaling/cropping seems to be going wrong. The Flexslider on top is supposed to be more narrow, and the images below it are all supposed to be equal height. Hmm.
UPDATE
There are 4 breakpoints in the site, but the image stays the same at all sizes, across all different imagesets: it outputs the mobile version. It's as-if it thinks the site is being watched in a mobile phone.
I've hacked it by upgrading the mobile image to 960x480px instead of the 320x240 it used to be. This means that mobile users are now downloading a very heavy site, but at least desktop users don't get very grainy images.
Comment #17
attiks commentedI guess the order of your breakpoints are reversed, it uses the first match, so it always uses
(min-width: 0px)Comment #18
groovedork commentedThe order was indeed from mobile tot desktop.
But then why did it work ok before? And now, having changed that order around, the problem isn't fixed either.
Comment #19
attiks commentedNow the right image is used based on the media query, so what other problem do you have? If it's the height, check your image styles to make sure they are high enough
Comment #20
deanflory commentedIf you updated Picture recently, I believe they just made changes for the 2.x release that caused a reverse in order, so now standard (large) is on top of the list whereas mobile (small) was the top of the order before. Try reversing the order of your breakpoints in your picture groups. See the Picture project page for more info.
Comment #21
attiks commented