- Posts: 117
- Thank you received: 6
40.000 folders in media/com_hikashop/uploads
11 years 3 months ago #205518
by Formidog
40.000 folders in media/com_hikashop/uploads was created by Formidog
-- url of the page with the problem -- :
www.formidog.nl
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.5
-- Browser(s) name and version -- : all
Good morning Nicolas et al
I have created a new topic on this:
You are probably right that there are no new folders generated for product pictures.
BUT
The tens of thousands of folders that are in media/com_hikashop/uploads contain thumbnails of the badges.
Not of the products, but the badges!
So I feel that the problem is caused there.
I feel this is a nasty bug.
I have already deleted over 40.000 folders and every hour there are maybe 100 new folders
Dick
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.5
-- Browser(s) name and version -- : all
Good morning Nicolas et al
I have created a new topic on this:
You are probably right that there are no new folders generated for product pictures.
BUT
The tens of thousands of folders that are in media/com_hikashop/uploads contain thumbnails of the badges.
Not of the products, but the badges!
So I feel that the problem is caused there.
I feel this is a nasty bug.
I have already deleted over 40.000 folders and every hour there are maybe 100 new folders
Dick
Please Log in or Create an account to join the conversation.
11 years 3 months ago #205540
by nicolas
Replied by nicolas on topic 40.000 folders in media/com_hikashop/uploads
Hi,
It probably means that you have the "Keep size" turned off in your badges and thus the system dynamically resize the bagdes in order to fit the different sizes of the thumbnails.
Turn that option on in your badges and it won't happen.
It probably means that you have the "Keep size" turned off in your badges and thus the system dynamically resize the bagdes in order to fit the different sizes of the thumbnails.
Turn that option on in your badges and it won't happen.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #205670
by Formidog
Replied by Formidog on topic 40.000 folders in media/com_hikashop/uploads
Please Log in or Create an account to join the conversation.
11 years 3 months ago #205752
by nicolas
Replied by nicolas on topic 40.000 folders in media/com_hikashop/uploads
Hi,
That's something which is already fixed on our end.
So it looks like you have an issue with view overrides from old versions of HikaShop were this bug was present.
For example, if you look in the "show_block_img" view file, we now use getThumbnail instead of a call to the display function of the image library. The new one handles the create of thumbnails without multiplying the folders while the display function doesn't.
That's the same in the listing_img_title and the other view files where images are displayed.
So check the overrides, and if that's the case, you'll want to update the overrides with the new code handling the images in the product view files.
That's something which is already fixed on our end.
So it looks like you have an issue with view overrides from old versions of HikaShop were this bug was present.
For example, if you look in the "show_block_img" view file, we now use getThumbnail instead of a call to the display function of the image library. The new one handles the create of thumbnails without multiplying the folders while the display function doesn't.
That's the same in the listing_img_title and the other view files where images are displayed.
So check the overrides, and if that's the case, you'll want to update the overrides with the new code handling the images in the product view files.
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206153
by Formidog
Replied by Formidog on topic 40.000 folders in media/com_hikashop/uploads
Hello Nicolas,
Bjorn here. I've looked at the html overrides and we have two:
- category/listing_title.php
- product/show_tabular.php
The category/listing_title.php one has a code about thumbnails:
This code is not present in the original file.
Would this be the problem?
I hope to hear from you.
Thanks in advance,
Bjorn Elsing
Bjorn here. I've looked at the html overrides and we have two:
- category/listing_title.php
- product/show_tabular.php
The category/listing_title.php one has a code about thumbnails:
Code:
<a href="<?php echo $link;?>">
<?php if($this->config->get('thumbnail',1)){ ?>
<div class="rn_hktitlelisting">
<?php
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);
?>
</div>
<?php } ?>
This code is not present in the original file.
Would this be the problem?
I hope to hear from you.
Thanks in advance,
Bjorn Elsing
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206159
by Xavier
Replied by Xavier on topic 40.000 folders in media/com_hikashop/uploads
Hi,
To get the image in the listing, in the view "product / listing_img_title" we use the following code:
So you can potentially replace your custom code by this one.
To get the image in the listing, in the view "product / listing_img_title" we use the following code:
Code:
<div style="height:<?php echo $this->image->main_thumbnail_y;?>px;text-align:center;clear:both;" class="hikashop_product_image">
<div style="position:relative;text-align:center;clear:both;width:<?php echo $this->image->main_thumbnail_x;?>px;margin: auto;" class="hikashop_product_image_subdiv">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">
<?php }
$image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside'));
$img = $this->image->getThumbnail(@$this->row->file_path, array('width' => $this->image->main_thumbnail_x, 'height' => $this->image->main_thumbnail_y), $image_options);
if($img->success) {
echo '<img class="hikashop_product_listing_image" title="'.$this->escape(@$this->row->file_description).'" alt="'.$this->escape(@$this->row->file_name).'" src="'.$img->url.'"/>';
}
//echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);
$main_thumb_x = $this->image->main_thumbnail_x;
$main_thumb_y = $this->image->main_thumbnail_y;
if($this->params->get('display_badges',1)){
$this->classbadge->placeBadges($this->image, $this->row->badges, -10, 0);
}
$this->image->main_thumbnail_x = $main_thumb_x;
$this->image->main_thumbnail_y = $main_thumb_y;
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</div>
</div>
Please Log in or Create an account to join the conversation.
Time to create page: 0.209 seconds