I applied an update to Flexslider, to 8.x-2.x-dev, and now cannot view the manage display page on any of my nodes.
In the Apache error logs, I get this error (curtailed to remove certain elements):
ResponsiveImageFormatter' not found in FlexsliderResponsiveFormatter.php on line 25
Although this issue appears to discuss a similar problem, I am not getting a resolution. I never had the Responsive Images module enabled, tried turning it on, got a WSOD, then uninstalled it again, and I am back to the same place.
Had to uninstall the field formatter submodule to get everything to work. again.
Not sure if this is a bug, or if I am configuring it wrong?
Comment | File | Size | Author |
---|---|---|---|
#19 | flexslider-items-array.png | 85.72 KB | Jeff Burnz |
#19 | standard-field-image-items-array.png | 146.47 KB | Jeff Burnz |
#13 | People Wildlife Preserves.png | 441.08 KB | RKopacz |
#12 | wildlife.development.com gallery people.png | 19.04 KB | RKopacz |
#6 | flexslider-responsive-dependency-2845747.patch | 751 bytes | amaria |
Comments
Comment #2
amaria CreditAttribution: amaria commentedOk. I'll write some tests to see if I can reproduce the issue.
Comment #3
RKopacz CreditAttribution: RKopacz commentedThanks for the quick response. The site in question is ready to go into production, and I was hoping to use FS for one of the slide shows, so I am available for quick-turnaround manual testing on this end as well.
Comment #4
amaria CreditAttribution: amaria commentedIf you need this right away, just use the patch in https://www.drupal.org/node/2797537 to set responsive image as a dependency until I can figure out what's happening.
Comment #5
RKopacz CreditAttribution: RKopacz commentedThanks, I'll do that. Will follow this issue closely, happy to test new patches.
Comment #6
amaria CreditAttribution: amaria commented@RKopacz are you using the patch from https://www.drupal.org/node/2797537 that adds the dependency on responsive image? If so, can you remove the patch, clear cache, uninstall responsive image and try again with this patch? If it doesn't work, try clearing the cache again. If it still doesn't work, I'll have to try more drastic measures.
I was able to reproduce the error. Looks like I caused the bug by taking out some code that I shouldn't have. After adding the attached patch code and rebuilding the cache, it worked.
Comment #7
amaria CreditAttribution: amaria commentedComment #8
RKopacz CreditAttribution: RKopacz commentedHi @amaria, sorry for the delay in responding to this, and thank you for the patch. I will test it now. I will use drush to download a fresh copy of flex slider (having some problems with Composer), and will apply the patch to that. I need to then install it fresh, because I uninstalled the previous instance that I was using.
I will let you know the results.
Comment #9
RKopacz CreditAttribution: RKopacz commentedOk I just enabled the module views and fields submodules after the patch. Just before that, I redownloaded the module using Drush. the module was actually still installed, only the views and fields submodules were uninstalled.
(interesting side note: when I uninstalled the views submodule, it also seemed to delete the view that was using it. Is this intended behavior?)
I am able to visit the Manage Display page for content types. When I visit a multi item image field, I get a Flexslider formatter. I had cleared the cache twice before attempting anything.
I note that the formatter only appears where there are multi item image fields. Where the image is set to one image, the formatter is not available.
I was unable to do that much before. I will next select the field formatter for a content type with a multi item image field and see what we get.
Comment #10
amaria CreditAttribution: amaria commentedOk, I'll keep an eye on this if it comes up again but for now I'll mark as fixed. Particularly since I haven't gotten any other complaints about it. I believe it mostly has to do with clearing the cache after (un)installing modules.
Comment #12
RKopacz CreditAttribution: RKopacz commented@amaria the patch does not seem to work. Following from #9, I selected the Flexslider field formatter for my multi-item image field, and was able to save it. But when visiting a node with existing content in that field for that content type, I got a WSOD where only the node title appeared, unformatted, when I try to view the node.
See the attached screenshot.
I am going to try to use a prior version of FS to see if I can get this working again. Right now, I am having a hard time changing the display setting to something other than Flexslider, after having set it.
Comment #13
RKopacz CreditAttribution: RKopacz commentedAdding a screenshot of how the content item looks with a different field formatter.
Comment #14
RKopacz CreditAttribution: RKopacz commentedComment #15
RKopacz CreditAttribution: RKopacz commentedAlso adding entries in the error logs:
Comment #16
amaria CreditAttribution: amaria commentedLooks like a problem with your theme. Try changing the theme to the default bartik and see if that works. It looks like a conflict with image caption.
Comment #17
RKopacz CreditAttribution: RKopacz commented@amaria Wow, great catch! It would have taken me much longer to track that down, so thank you. I'll post something in Adaptivetheme queue just to alert Jeff Burnz to the issue.
Thanks again and sorry for the trouble.
Comment #18
amaria CreditAttribution: amaria commentedOk, great! So this issue can be closed. If you find another problem, feel free to create another issue.
Comment #19
Jeff Burnz CreditAttribution: Jeff Burnz commented#16 no, this is not a problem with theme, but a problem coming from the module.
Flexslider is removing #item from the render array:
Standard Drupal field image $variables['items'] array (kint() from preprocess field image)
Flex slider $variables['items']
values
are protected and the only way to get these is to use the method getValue() e.g.I think other extensions/themes/templates/preprocess etc should be OK with expecting the normal items array to be there, and call standard Drupal methods e.g. getValue().
E.g. this is totally legit:
But this would no longer work, and if you try to do this in preprocess it will blow up your site. The way Flexslider is working is expecting nothing like this to ever happen, but that's a bit crazy, of course people are going to do this in field--image template, so this will be an ongoing issue for years. You're setting a quite difficult precedent for theming here, themes need consistent array, because array of doom is already mad enough, and now we must check every time, everywhere, if variable isset before we call standard method on standard array item?
Comment #20
Jeff Burnz CreditAttribution: Jeff Burnz commentedIs a possible/passable solution for Flexslider to hook_theme_registry_alter and force it's own preprocess for the field images it uses and have it's own field image template?
Comment #21
amaria CreditAttribution: amaria commentedOk, @Jeff Burnz. Thanks for the input! This is a pretty big holdover from the D7 version. Will look into it but it's separate from this issue so I'll create another.