40.000 folders in media/com_hikashop/uploads

  • Posts: 117
  • Thank you received: 6
10 years 1 month ago #205518

-- 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

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

  • Posts: 84233
  • Thank you received: 13673
  • MODERATOR
10 years 1 month ago #205540

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.

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

  • Posts: 117
  • Thank you received: 6
10 years 1 month ago #205670

Good morning Nicolas

With "keep size" ON the problem is not over.

Folders are made. and filled with thumbnails.
In one night thousands of files are added




Attachments:

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

  • Posts: 84233
  • Thank you received: 13673
  • MODERATOR
10 years 1 month ago #205752

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.

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

  • Posts: 117
  • Thank you received: 6
10 years 1 month ago #206153

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:

<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.

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #206159

Hi,

To get the image in the listing, in the view "product / listing_img_title" we use the following 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>
So you can potentially replace your custom code by this one.

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

Time to create page: 0.092 seconds
Powered by Kunena Forum