Author Topic: Image URL messed up with CSVI when placed in subfolder  (Read 9812 times)

DaWaN

  • Beginner
  • *
  • Posts: 1
Image URL messed up with CSVI when placed in subfolder
« on: July 03, 2008, 13:44:39 pm »
Hi, i'm trying to get my Virtuemart shop up and running but I ran into a problem right now.

When i'm importing products from CSVI and when I place the image in a subfolder the image doesn't show up properly everywhere.

It works completely fine in the admin menu and when I press on the not-working thumbnail I'll get an popup with the full image.

But the thumbnail doesn't work in the category overview and in the productview itself. Also the big image viewer at the productview doesnt work (the one that changes the background black).

It seems like somewhere is missing a urldecode because the slashes are replaced by %2F tokens, therefore the URL's don't work.

I'm sorry for my rubbish English, If you have any futher question, please don't hesitate to ask !

jochen

  • Beginner
  • *
  • Posts: 1
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #1 on: July 09, 2008, 21:09:39 pm »
Hi,

i have the same Problem, my shop have over 30.000 products and more pictures.
For the best Server Performance i must put the product images in subfolder.

In the CSVImproved List i write this string into the full_image row:
i.e. subfolder/image.jpg

But after import no image is displayed :(

So I´ve found a forum Post to change in components/com_virtuemart/show_image_in_imgtag.php this:
Code: [Select]
$basefilename = @basename(urldecode($_REQUEST['filename']));
to this:
Code: [Select]
$basefilename = urldecode($_REQUEST['filename']);
So good by the first look, the thumbs are display but the next problem i have with full_image.

The url in the statusbar is absolut correct but after klick on the thumb no full_image is loading.

Code: [Select]
http://www.growinger.de/components/com_virtuemart/shop_image/product/200623%2FalchPP461.jpg
the Problem is the Slash in the CSVI textstring subfolder/image.jpg is generated in subfolder%2Fimage.jpg

Can anybody help me????  ???  :'(  :'(  :'(

regards chevron08

Skye

  • Beginner
  • *
  • Posts: 13
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #2 on: October 19, 2008, 22:59:26 pm »
I am also having problems with this, and I can't seem to find a resolution.  Please advise if someone has found a solution.

jorgejordao

  • Beginner
  • *
  • Posts: 2
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #3 on: January 28, 2009, 06:48:57 am »
i am also having this problem, no solution since october????

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #4 on: January 28, 2009, 11:11:38 am »
I'll get back to you guys when I've had the chance to test CSV Improved's behaviour on my rig.

RolandD

  • Full Member
  • ***
  • Posts: 780
    • Home of CSVI
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #5 on: January 28, 2009, 17:53:03 pm »
The thumbnail image is supposed to be in a folder called "resized/" below the subfolder. Depending on the version of CSV Improved thumbnail handling differs.

I have not seen this post before otherwise I would have replied. Especially CSVI related posts are better placed at www.csvimproved.com.
Regards,

RolandD

CSVI
http://www.csvimproved.com/

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #6 on: January 28, 2009, 18:45:43 pm »
The thumbnail image is supposed to be in a folder called "resized/" below the subfolder. Depending on the version of CSV Improved thumbnail handling differs.
I have not seen this post before otherwise I would have replied. Especially CSVI related posts are better placed at wwww.csvimproved.com.

Thanks for the feedback RolandD! :) Are you part of the "CSV Improved" project?

RolandD

  • Full Member
  • ***
  • Posts: 780
    • Home of CSVI
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #7 on: January 29, 2009, 02:30:57 am »
The CSV Improved project is a one-man job and I am that one man ;)
Regards,

RolandD

CSVI
http://www.csvimproved.com/

klutzon

  • Jr. Member
  • **
  • Posts: 319
  • Knuckles the Echidna
    • Rage3D
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #8 on: January 29, 2009, 03:05:02 am »
The CSV Improved project is a one-man job and I am that one man ;)

Very nice to meet you RolandD! :)

So you'll be the man I come to when I need to talk about CSV Improved in case I have any question then? And while I've got you, I've been to your site, and I really wanted to try out the VmCategoryModule, but I couldn't find the link for it. Is it an extension for sale?

(Sorry for the thread hijack...)

RolandD

  • Full Member
  • ***
  • Posts: 780
    • Home of CSVI
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #9 on: January 29, 2009, 09:41:11 am »
Quote
So you'll be the man I come to when I need to talk about CSV Improved in case I have any question then?
Yep, but please post your questions on the CSV Improved forum at www.csvimproved.com.

Quote
I really wanted to try out the VmCategoryModule, but I couldn't find the link for it. Is it an extension for sale?
Yes, it is a module that is for sale and can only be downloaded after it is paid for. Some more info can be found here.
Regards,

RolandD

CSVI
http://www.csvimproved.com/

ABunning

  • Beginner
  • *
  • Posts: 8
    • ToolForce
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #10 on: October 21, 2009, 14:51:34 pm »
Hi,
I am still having this problem.

I have my images in subfolders of the products folder with the thumbnails in a "resized" folder as suggested.
i.e. .../products/Bosch/38342.jpg and the small ones in ...products/Bosch/resized/38342.jpg

This is all OK in the browse list - both the thumbnail and full image are perfect suggesting CSVI has done it's job correctly.
The thumbnail is fine on the product page but when I click it to get the full image I get ...shop_image/product/Bosch%2F38342.jpg
As the first user suggested, the "/" from the database is replaced with "%2F" suggesting that it has been run through the htmlspecialchars() function at some point.

Is anyone else having this issue?  Any ideas how to fix?

One product with this issue is:
http://www.cmtl.co.uk/shop/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=542&category_id=10&option=com_virtuemart&Itemid=9

Thanks,
   Andrew

tens

  • Beginner
  • *
  • Posts: 14
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #11 on: October 27, 2009, 15:58:18 pm »
I also have this issue with the lightbox not displaying full size image.
I still get no image when clicking on the thumbnails. The lightbox will open and try to load endlessly, because it's looking for the wrong image path.
There is an issue with the urlencode() function somewhere, because where it should lead to "/shop_image/product/subfolder/image.jpg" it leads to "/shop_image/product/subfolder%2Fimage.jpg"
And i've come to know that %2F results to "/" with urlencode() function... just not there.

ABunning

  • Beginner
  • *
  • Posts: 8
    • ToolForce
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #12 on: October 27, 2009, 16:26:43 pm »
@tens

I eventually found the issue here - the urldecode is in the components/com_virtuemart/show_image_in_imgtag.php file.

About line 39, $basefilename is defined using it - just remove and it seems to work (for me at least  ;))

Cheers,
   Andrew

tens

  • Beginner
  • *
  • Posts: 14
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #13 on: October 27, 2009, 20:31:03 pm »
Thanks for your answer, Abunning.

though i seem not to have the same show_image_in_imgtag.php file as you...
here's what i have on line 39:
Code: [Select]
if( PSHOP_IMG_RESIZE_ENABLE == '') {
the only line i found about urldecode(), was the line 53 of my file :
Code: [Select]
$filenameAlone = @basename(urldecode($_REQUEST['filename']));
and now the weirdest part: i tried several things.
First i tried to remove only the urldecode() function only -> no change
Then i wanted to try to remove the whole line -> no change
So i just deleted completely the file show_image_in_imgtag.php and guess what ? no change... website not giving any warnings or errors, just the same problem, no picture showing in the lightbox.

Are you sure the images shown in the lightbox are using the file  show_image_in_imgtag.php at all ?

ABunning

  • Beginner
  • *
  • Posts: 8
    • ToolForce
Re: Image URL messed up with CSVI when placed in subfolder
« Reply #14 on: October 28, 2009, 15:17:46 pm »
@tens,

Where are you having the issues?  Are they from the browse page or the flypage?
I found the browse page was OK but the flypage wasn't so had to track it down from the included files there.
Can you send me a copy of your flypage?

Cheers,
   Andrew