Closed (fixed)
Project:
D7 Media
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2013 at 15:26 UTC
Updated:
1 Sep 2016 at 10:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gmclelland commentedHave you overridden any of the core image styles? If so, I had a similar issue were I had to revert those image styles and then everything worked.
Hope that helps
Comment #2
dave reidComment #3
rickdonohoe commentedHi David,
The issue happened to be the image styles. From what I can tell square_thumbnail was changed to media_thumbnail in the Media 2 upgrade, and hasn't cleaned up the references properly (am I correct there?!)
Anyway, to fix it I cloned the media_thumbnail image style to re-create the square_thumbnail style which was missing.
I've set it as active in the event that I have got that correct there, and a patch needs to be created.
Comment #4
blazindrop commentedI can confirm #3. I'm confused why the machine name would be changed from square_thumbnail to media_thumbnail, though. Here's what I think is happening:
In the update routine (also in version 7.x-2.0-alpha2):
.. it is renaming the machine name of the square_thumbnail style to be media_thumbnail. The result is an override is automatically created since the media module defines a default image style (used by features/ctools) here:
Reverting this style will quickly destroy any customizations you had to the original "square_thubmail" style.
Without any deep knowledge of media I'm not sure about the best approach is to fix this. I'm searching around to see why it was renamed in the first place since best practice dicates never to change machine names.
Comment #5
ellen.davis commentedI came across this issue on one of my sites. I changed the machine name for square thumbnail to square_thumbnail. Then media_thumbnail appeared in the list of styles. When using media browser in ckeditor, it now displays the thumbnails in the Library.
Comment #6
mehotkhan commentedhi ,
on my image-styles i have media_thumbnail ,but on media browser don't show image thumbnail ,
i uninstall media module many times , but media browser don't fix ,
for all thumbnail show :
/files/styles/media_thumbnail/public/media-icons/default/image-x-generic.png?itok=gTGcRXZF
latest dev version in install
thanks for your great work
Comment #7
devin carlson commentedIt looks like a better approach would be to either conditionally define the square_thumbnail image style in
hook_image_default_styles()based on a legacy variable, à lamedia_show_deprecated_view_modes, or to save it in the database and remove it from code.The attached patch takes the second approach, removing the square_thumbnail image style from
hook_image_default_styles()and changing the update function to save the image style in the database. The square_thumbnail image style may already exist in the database if the user has done any customizations to it, so the update function checks for its existence and leaves the style alone if it already does.Comment #8
devin carlson commentedRetested #7 with an old Media install and didn't run into any issues. I've now seen a couple of reports that this has worked for folks who have had issues with missing images after upgrading Media.
Committed to Media 7.x-2.x.
Comment #11
spanners commentedLife-saver! #3 fixed it for me. Created a new image style, called it Square Thumbnail, ensured the machine name was square_thumbnail, set the image style to scale and crop to 100x100px and saved.
Then, when I created a node with an image field on it, the preview thumbnail generated, and all the image thumbnails in the library were back as well.
Comment #12
digitaltodd commentedadding square thumbnail worked for me too.