Closed (fixed)
Project:
Slick Carousel
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2017 at 09:42 UTC
Updated:
14 Jun 2017 at 18:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
msgph commentedComment #3
gausarts commentedThank you.
The
$itemsare passed fromslick_fields_field_formatter_view():http://cgit.drupalcode.org/slick/tree/slick_fields/slick_fields.module?h...
Perhaps we should move it into
slick_fields_field_formatter_view()?If not, we may have to pass it into other two places:
http://cgit.drupalcode.org/slick/tree/includes/slick.media.inc?h=7.x-2.x#n8
http://cgit.drupalcode.org/slick/tree/includes/slick.field_collection.in...
The latter solution is also reasonable as sometimes I just pick up slick_format_image() without needing for
slick_fields_field_formatter_view()such as from within a block.But the first is quicker route.
Thoughts?
Comment #4
msgph commentedGood point. I agree, the first is the quicker and more efficient route.
Here's a new patch.
Comment #5
msgph commentedComment #6
gausarts commentedThank you.
Please allow some delay to get back on this ;)
Comment #7
gausarts commentedI am trying to replicate the error, but I couldn't.
Could you please paste the complete error log, so we can track down what caused this?
Seeing the given errors, Argument 3 refers to $settings parameter, not $items.
I deleted images, and no errors thrown.
I deleted Media file entities, and no errors, either.
Assumed we are on the same 7.x-2.x-dev as you reported.
Would you mind providing steps to re-produce it?
I need to make sure what is going on, for just in case this is not about $items.
Thanks.
Comment #8
msgph commentedError message:
Recoverable fatal error: Argument 3 passed to slick_get_image() must be of the type array, null given, called in sites/all/modules/contrib/slick/includes/slick.image.inc on line 38 and defined in slick_get_image() (line 61 of sites/all/modules/contrib/slick/includes/slick.global.inc
Steps to reproduce (this is probably an edge case, but this is how we got the error):
1. Add an image(s) to field
2. Delete the image's file row entry from file_managed table.
Comment #9
gausarts commentedAlmost similar to what I experienced with media file entity last time with some corrupt import as noticed here:
http://cgit.drupalcode.org/slick/tree/includes/slick.media.inc?h=7.x-2.x...
Your solution seems to address this type of issue much better.
Thank you.
Comment #11
gausarts commentedSorry for delay on this. I must have been very busy with D8 ;)
I changed lining a bit to match the rest below, hopefully doesn't change the essence.
Committed. Thank you for contribution.