Closed (fixed)
Project:
Media Gallery
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2012 at 00:56 UTC
Updated:
23 Oct 2012 at 12:11 UTC
This issue is the Media Gallery counterpart of #1426820: Fix Notices and EntityMalformedException if FID is not in the file_managed database table.
Similar to that issue, regardless of whether the root cause of the bug is in Media Gallery or not, it might make sense for Media Gallery to work around it because otherwise having files in a gallery that no longer exist as managed files in the database results in fatal errors on your site.
The attached patch implements this workaround.
| Comment | File | Size | Author |
|---|---|---|---|
| media-gallery-entity-malformed-exception.patch | 635 bytes | David_Rothstein |
Comments
Comment #1
moloc commentedJust for documentation:
If i see it correct, this issue/patch seems to conflict with the patch in issue #1300144: Missing file object, when rendering referenced gallery as Media gallery block.
Comment #2
moloc commentedYour patch works for me, with one side-effect:
Example:
Having a pager with 3 images on one page. You delete one entry in the {file_managed} table. The gallery which shows that image, displays only 2 images on that specific pager-site (because the non-existing image is filtered by this patch). I assume, this can not be changed?
Reproduceable?
Is it enough to just delete one entry in the {file_managed} table? If so, the patch in media does not work for me (i still get a undefined index notice). Or which module does not handle this correct / how is that reproduceable?
Comment #3
moloc commentedCommitted: http://drupalcode.org/project/media_gallery.git/commit/4b0220d