Saved Image not displayed in item edit form.

More
11 years 11 months ago #37992 by brandonking
Hello George,

I can now see the images in item form both backend and frontend.

I have replaced code on line 540 in image.php
Code:
$img_link .= '/s_'.$value['originalname'];
to
Code:
$img_link .= '/s_fld'.$field->id.'_'.$value['originalname'];

Regards,

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #38004 by ggppdk
Hello,
thanks for pointing this out

Explanation:
- image field can be configured to use images uploaded by other image fields, but we do not want to overwrite the thumbnails of the other image field which maybe of different size, so we append 'fld20' to the thumbnails
- this fix is needed there, just it needs to be conditional (with an IF statement or a '?' operator)

so replace:
Code:
$img_link .= '/s_'.$value['originalname'];

with
Code:
$all_media = $field->parameters->get('list_all_media_files'); $multiple_image_usages = !$image_source && $all_media; $extra_prefix = $multiple_image_usages ? 'fld'.$field->id.'_' : ''; $img_link .= '/s_' .$extra_prefix. $value['originalname'];

Also another fix is needed in the function that rebuild thumbnails
-- when using thumbnails like s_fld20, m_fld20, l_fld20, then also the s_ thumbnail must be created if it does not exist already (needed when selecting re-usable images via thumbnails or select-drop down that were uploaded by another image field)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.304 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save