$this->category->image est vide

More
13 years 4 months ago #29054 by Hableur
Bonjour,

j'ai un problème depuis la mise à jour de la nouvelle version pour j 1.5.

J'utilise une image pour chacune de mes catégories dans mon template flexicontent.

Jusqu'à présent, j'utilisais $this->category->image
dans l'expression
Code:
echo JHTML::_('image.site', $this->category->image, 'images/stories/', NULL, NULL, $this->escape($this->category->title));

et ça le faisait très bien.

Depuis la mise à jour, $this->category->image est vide, et je ne trouve pas de biais pour avoir l'adresse de la vignette à charger.

Je suis allé regarder le paramétrage des catégories, je n'ai rien vu d'anormal.

Quelqu'un a-t-il une idée, merci.

ps: pour info, le contenu de $item->fields->display_small a aussi changé, on peut l'utiliser tel quel, il contient toute la balise <img>. Malheureusement, du coup on ne peut plus insérer un titre, ce qui est dommage pour le référencement.

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

More
13 years 4 months ago #29058 by ggppdk
yes ...->display_small should contain an image tag <img .../>

the image URLs are in the variables:
...->display_small_src
...->display_medium_src
...->display_larg_src

about the category images,
maybe there is a inconsistency with image folder used:
-- i see that in backend when selecting image we use images/stories folder
-- and in frontend we use the path configure in JOOMLA's Global Configuration

Is the image folder configured in your Joomla's Global Configuration, the folder: "images/stories" ?


-- 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 review. Thanks!

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

More
13 years 4 months ago #29060 by Hableur
Hello ggppdk,

always here for help ! Thanks a lot !

the image URLs are in the variables:
...->display_small_src

Yes, it's right, and it's more logical.

About Joomla's Global Configuration, the folder is "images/stories". I didn't make any change except new version of Flexi.

Have somebody the same problem ?

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

More
13 years 4 months ago #29061 by ggppdk
Then i would need to examine if this is some other bug

Can you send me a PM with
- admin access
- and tell me which category you are trying to view e.g. category 41


-- 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 review. Thanks!

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

More
13 years 4 months ago #29062 by Hableur
Sorry, i can't give you an administration access because the site is private and contains professionnal and personnal data of users :? .

The problem is the same for alls categories.

Is $this->category->image not empty when trying on a trial category in others sites ?

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

More
13 years 4 months ago #29066 by ggppdk
Is showing of category image enable in category options?

This is the code creating the image in view.html.php inside folder views/category/
Code:
// category image $cat = & $category; $config =& JFactory::getConfig(); $joomla_image_path = FLEXI_J16GE ? $config->getValue('config.image_path', '') : $config->getValue('config.image_path', 'images'.DS.'stories'); $image = ""; if ($cat->id && $show_cat_image) { $cat->image = FLEXI_J16GE ? $params->get('image') : $cat->image; $image = ""; $cat->introtext = & $cat->description; $cat->fulltext = ""; if ( $cat_image_source && $cat->image && JFile::exists( JPATH_SITE .DS. $joomla_image_path .DS. $cat->image ) ) { $src = JURI::base(true)."/".$joomla_image_path."/".$cat->image; ...


-- 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 review. Thanks!

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

More
13 years 4 months ago #29069 by Hableur

Is showing of category image enable in category options?

Yes (of course ;) ).

The problem is in conditions
Code:
if ( $cat_image_source && $cat->image && JFile::exists( JPATH_SITE .DS. $joomla_image_path .DS. $cat->image ) ) { $src = JURI::base(true)."/".$joomla_image_path."/".$cat->image; $h = '&amp;h=' . $cat_image_height; $w = '&amp;w=' . $cat_image_width; $aoe = '&amp;aoe=1'; $q = '&amp;q=95'; $zc = $cat_image_method ? '&amp;zc=' . $cat_image_method : ''; $ext = pathinfo($src, PATHINFO_EXTENSION); $f = in_array( $ext, array('png', 'ico', 'gif') ) ? '&amp;f='.$ext : ''; $conf = $w . $h . $aoe . $q . $zc . $f; $image = JURI::base().'components/com_flexicontent/librairies/phpthumb/phpThumb.php?src='.$src.$conf; } else if ( $cat_image_source!=1 && $src = flexicontent_html::extractimagesrc($cat) ) {

$cat_image_source is equal to 0, so instructions in first "if" are not done. If I rewrite the condition as :
Code:
if ($cat->image && JFile::exists( JPATH_SITE .DS. $joomla_image_path .DS. $cat->image ) )
it's work.

In second "if",
Code:
else if ( $cat_image_source!=1 && $src = flexicontent_html::extractimagesrc($cat) ) {

flexicontent_html::extractimagesrc($cat) is empty. So instructions in the second "if" are not played. I have tried to change $src = flexicontent_html::extractimagesrc($cat) with $src == flexicontent_html::extractimagesrc($cat), but it doesn't work.

From where come this :
Code:
// category image $show_cat_image = $params->get('show_description_image', 0); // bad named maybe $cat_image_source = $params->get('cat_image_source', 0); $cat_link_image = $params->get('cat_link_image', 1); $cat_image_method = $params->get('cat_image_method', 1); $cat_image_width = $params->get('cat_image_width', 80); $cat_image_height = $params->get('cat_image_height', 80);

Only in J2.5 perhaps ?

Thanks.

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

More
13 years 4 months ago #29070 by Hableur
:o Oh, it seems it's necessary to tell flexi the size of the category's img now ! :shock:

If I don't write the right width and height, the category's img is deformed !

Why this ? Why flexi isn't able to know himself the size of category's img ???

Have I to rewrite all my parameters for my categories' img ?

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

More
13 years 4 months ago #29074 by ggppdk
ok, the problem is not
if ( $cat_image_source && $cat->image && JFile::exists( JPATH_SITE .DS. $joomla_image_path .DS. $cat->image ) ) {


-- The default value above for category image source: cat_image_source

should be 2 instead of 0 like it is in the category.xml file, this effects categories saved with older FLEXIcontent versions, that did not have this parameter. (same change needed in Directory view)


-- About image resizing,
the default sizes are 80x80, and resizing method is "crop", so the smaller dimension is scaled and then the larger dimension is cropped,
so your images should not be deformed, they should be cropped, right?


-- 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 review. Thanks!

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

More
13 years 4 months ago - 13 years 4 months ago #29076 by Hableur
Hello,

with
Code:
$cat_image_source = $params->get('cat_image_source', 2);
it's work !
Thanks.

But where this parameter is in bdd ? I don't find it.

About size of image.

All my 87 images for categories are 100 X 83.
With old version, I don't have to tell Flexi the size and images where correctly played with css properties widht et height.

Now, if I don't want my images to be cropped or deformed (and I don't want, that sure !), i'have to manually modify the width and the height of image in each category. It would be easier if flexi take width and height of the original image for default width en height when in "use image parameter" mode.

Thanks
Last edit: 13 years 4 months ago by Hableur.

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

Moderators: vistamediajoomlacornerggppdk
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