can not download file

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173108

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.4
-- Browser(s) name and version -- : firefox
-- Error-message(debug-mod must be tuned on) -- : Warning: Cannot modify header information - headers already sent by

Hi
I'm starting a new project where I have installed the latest hikashop version with joomla 3.3.4 in a fresh empty website.

I create a product with a file that is Free download and when I go to the product page and click on the link to download, it returns an error and not the file (in the frontend).

Thank you for your help :)
CEd

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

  • Posts: 84301
  • Thank you received: 13697
  • MODERATOR
10 years 11 months ago #173143

Hi,

Your website is in maintenance so we need a user account to be able to access it and see the error.
Could you provide that please ?

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

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173231

Hi
I have removed the maintenance mode, you can access the website :)
CEd

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

  • Posts: 84301
  • Thank you received: 13697
  • MODERATOR
10 years 11 months ago #173235

You have something else outputing stuff on the page before HikaShop sends the file and thus it screws the content of the file because of the errors.
Turn off the "error reporting" option of the Joomla configuation and try again, that should hopefully help

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

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173357

error reporting to "none" and still the same issue.
Hikashop is the first component installed and the only one used in frontend for now, on a fresh joomla 3 install

May be a server problem ? If you have an idea :)

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

  • Posts: 84301
  • Thank you received: 13697
  • MODERATOR
10 years 11 months ago #173446

HI,

It moved forward. You don't get the error messages on the resulting page. Now, you still have the content of the file output directly on the page instead of having it downloaded by the browser. That's because of the configuration of Joomla or your web server which forces the gzip compression on the data.
Could you make sure that it is turned off on both your website configuration page and in the settings of your web server ?
It should then hopefully work.

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

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173467

thank you for your help but this does not work
Error reporting = none
Gzip compression = No

and still the same like you said : the content of the file output directly

For information, I have other websites on the same server with also some ZIP files that works correctly.
I also have tesed with a PDF file on my product "theme"2, and the problem is the same.

If you need an admin access let me know I can give you this per email :)
CEd

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #173480

Hi,

Please see :
www.hikashop.com/forum/orders-management...-file-not-found.html
And (yes it's in French but the message explain a code replacement to do)
www.hikashop.com/forum/5-support-en-fran...hier-endommages.html

These modifications are already include in HikaShop 2.3.4 ; the next release.
Because HikaShop 2.3.3 just include the security patch and the Joomla 3.3.4 patch, it does not have this one.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173535

yes it's in French

no problem, you know that I'm french too ;), but I don't see any french in this message lol

unfortunately this does not work. But, as I knew which file to edit I have made some tests and found a workaround.
I have tested another code that I know it works by my side, and it was also not working.
What I had to do is to edit the file
administrator/components/com_hikashop/helpers/helper.php
with notepadd++ and convert it from UTF8 to ANSI
once this file is ANSI encoded, the download works ! (with the original file.php)

Please check by your side if you can do something for the next version to fix this :)

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #173555

Hi,

Thanks for the tip but if the problem is coming from the encoding, the problem is linked to your server and not HikaShop.
PHP support UTF8 and our files are in UTF8 since the beginning of HikaShop.
We use the "UTF8 without BOM" encoding and unless your file got the BOM header, I don't see why the UTF8 encoding will affect the download part.

Regards,

PS : The french was for the second thread link.


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173614

I know that this not really related to hikashop, I was hoping that you had more ideas than me about the problem :)

1/ I have reinstalled hikashop (over the existing to overwrite my modifications) :
the problem is there again

2/ opened classes/file.php in notepad++ :
the file encoding was on ANSI, I converted it to UTF8-nobom
>> still the problem

3/ opened helpers/helper.php in notepad++ :
the file encoding was on UTF8, I converted it to UTF8-nobom
>> now it works again

Hope it helps to find a useful end to my problem... because if I upgrade Hikashop (and I will for sure), it wil no more work.
Could you please check this by your side and let me know ?
CEd

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #173618

Hi,

Thanks, I think I got it.
Nicolas might have apply the security patch with an editor which convert the file in UTF8... with BOM
I'll slap him again :)

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173620

:)
let me know if you need a test with your update file, I can confirm you that it works by my side too
CEd

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #173628

Hi,

Nicolas checked the packages and the starter edition only was impacted.
The new one should be better !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 73
  • Thank you received: 3
10 years 11 months ago #173682

solved !
reinstalled the new package and it works :)

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

Time to create page: 0.081 seconds
Powered by Kunena Forum