Closed (fixed)
Project:
File Entity (fieldable files)
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 May 2016 at 21:35 UTC
Updated:
12 Jul 2017 at 13:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
johan den hollander commentedComment #3
dave reidIt sounds like something is passing an empty file object to file_view() or file_view_multiple().
Comment #4
johan den hollander commentedDave, you gave me a good hint. I had a node in my gallery where the image had gone missing.
Switched back to file_entity 7.x-2.0-beta2, the problem did not arise.
After deleting the corrupted node I upgraded tot beta 3 again and the problem is gone.
Comment #5
Yuri commentedcomment deleted
Comment #6
steinmb commentedComment #8
joelstein commentedI'm having this same error. Here are steps to reproduce it:
We just need to filter out empty items, which is already being done for some of the File Entity field formatters, but not all. The attached patch fixes this issue (and potentially others).
Comment #9
steinmb commentedI see nothing critical about this. If this is, as you write, a clean installation of Drupal the needed modules, there should be none old and broken configs passing empty file objects around. I think checking and omitting, would simply hide the real problem.
Comment #10
joelstein commentedWe can disagree about the severity of this issue, but the fact remains that it's currently possible for a content editor to break their site by navigating to "admin/content/file" and deleting a file that is referenced elsewhere.
What would it take to get this patch committed?
Comment #11
steinmb commentedStart by confirming that this is still a issue with the latest dev version of file entity and media.
Comment #12
joelstein commentedYes, this issue exists with the latest dev of both modules. I posted steps to reproduce it above.
Comment #13
dave reidActually I think this should solve it for all our formatters. hook_field_formatter_prepare_view() is useful in this case!
Comment #15
dave reidComment #16
xlin1003 commented@Dave Reid, Thanks for the patch. It seems the patch #13 will not resolve the issue when using panel + paragraph (screenshot attached).
You can import the attached panel page txt file to see the error.
Comment #17
dave reid@xlin1003: I think paragraph_panes also has a bug in how it loads the field data. When you combine the patch in #2774857: If a file fails to load, the item value should be set to NULL with this one, it should make your error go away.
Comment #18
xlin1003 commentedThanks @Dave Reid! Both patches work great!
Comment #19
danielen commentedWork for me in file_entity 7.x-2.0-beta2 and file_entity 7.x-2.0-beta3.
Error caused before, because user has removed the file, but not the paragraph itself.
After save the node, the error showed up.
Comment #20
alisonHi! The patch works great for me, too -- any guesses on when this might get into the module? (And/or are there any blockers that I might be able to help with?) Thank you!
[EDIT: Still applies fine against 7.x-3.16, fwiw]
Comment #21
steinmb commentedPatch still apply. Before the patch
In the node, the field_media_image field refers to a file which does not exist. Aborting the render for it.So probably not as severe as reported #8, but that was one year ago.
With the patch applied. not warnings and no log entries.
Comment #22
joseph.olstadRolling several tests, 5.4, 5.5 , 5.6, 7.0, 7.1
followup soon.
Comment #24
joseph.olstadfixed in 7.x-2.x dev