File not found on downloadable link

  • Posts: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
1 year 1 week ago #357642

-- HikaShop version -- : 5.0.2
-- HikaSerial version -- : 4.0.2
-- Joomla version -- : 5.0.1
-- PHP version -- : 8.1.24
-- Browser(s) name and version -- : FireFox 120.0
-- Error-message(debug-mod must be tuned on) -- : It does not provide a error, except file not found.

Hi There,


So, we've got our hikashop and hikaserial running smoothly, e-tickets are being sold, but, so now and then there comes a customer complaint that they could not download their e-tickets.

In the example below, you see that there are 4 e-tickets purchased, so far, so good.



When i click the Download button on one of the tickets, it states "File not found", it does that with 3 tickets, 1 ticket is working.

If i take a look at the HTML code which is behind the Download buttons i see:




The strange thing here is, the working e-ticket got HTML ending with
file_pos=2
, all other non working cards have:
file_pos=5
,
file_pos=7
or
file_pos=8

When i manually change the code to file_pos=1, 3, or 4, then it works, and i got the proper e-tickets.


This is on the admin part of hikashop, but the e-mail to the customer also got 1 out of 4 e-tickets and the customer order page also have 1 working e-ticket download button.


How can this be solved?


Like to hear from you,

Kind regards,
Patrick Lieftink

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

  • Posts: 26166
  • Thank you received: 4029
  • MODERATOR
1 year 1 week ago #357649

Hello,

Thank you for your message and details regarding the bug you found.

file_pos is an internal marker of HikaShop download system, it's not created by HikaSerial (but used by).
When an order is made, the download links for the products are created and if you have multiple products then the "file_pos" is being increment in order to make the difference between same products and handle the counters (for limitation).

In order to understand more about your issue, we need to take a look at the content of the table "#__hikashop_download" where you will see entries for your "order_id" and "file_id" ; you'll also see the "file_pos".
We first need to be sure that this table contains valid content for your testing order (401).

Since you have file_pos which are not an incremental range (1,2,3,4...), it might have an issue in the HikaShop file_pos generation.
That generation is made within the HikaShop order class and we need to perform a further investigation in order to provide the right bug fix.

As you saw with your tests ; When a download is made, HikaSerial is triggered if the download links starts with "#hikaserial:" and if the related product have serials.
It then convert the "file_pos" to a corresponding serial ; since each product in the order (you have 4 in your testing order), has its own unique serial ; it must generate valid content for each serial.
So the file_pos is used in order to know which serial should be taken since there are several identical products (and more precisely files) in the order.
With an invalid file_pos, HikaSerial won't find an associate serial so it cannot generate a unique content and it results to that "file not found".

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: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
1 year 1 week ago #357660

Hi Jerome,

Thanks for your answer, i was really doubting if this was a Hikaserial issue, or a Hikashop issue.

Yes, that table does contain indeed information about the order:

SELECT * FROM `tpw_hikashop_download` WHERE `order_id` = 401 ORDER BY `order_id` DESC 
(12, 401, 1, 1),
(12, 401, 2, 3);

I cannot correlate why there are 2 entries for this order.

If it is better to move this conversation to the Hikashop part of the forum, thats also fine with me.


Thanks again,

Kind regards,
Patrick

Last edit: 1 year 1 week ago by plieftinkpride.

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

  • Posts: 281
  • Thank you received: 6
  • Hikaserial Standard
1 year 1 week ago #357662

Bonjour,

Une question qui n'a peut etre rien à voir mais comment faites vous pour avoir cela ? > L'accès au téléchargement


(Je suppose que c'est dans la commande )

Merci

Attachments:

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

  • Posts: 26166
  • Thank you received: 4029
  • MODERATOR
1 year 1 week ago #357663

Hello @plieftinkpride

Now I cannot move the thread into the HikaShop section ; but it will be interesting to create a new one for that issue.
Since the "file_pos" bug is mostly seen with dynamic files (so with HikaSerial attachserial/pdfserial) ; it might not be reported yet.

Kind regards,

--

Bonjour @sudkarting

Je suis navré mais votre question n'est pas en lien avec le thread en cours.
De plus vous avez déjà abordé le sujet et vous avez déjà eu la réponse dans un précédent thread :
www.hikashop.com/forum/18-support-en-fra...-eticket.html#357238
Je vous invite donc à consulter plus de détails sur le fonctionnement des fichiers de produits HikaShop.

Cordialement,


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: 13
  • Thank you received: 1
  • Hikaserial Standard Hikashop Business
1 year 6 days ago #357729

Hi,


I've made a topic in the HikaShop area: https://www.hikashop.com/forum/integrations/907489-file-not-found-on-downloadable-link.html

I've put the link here for a reference, in case other users experience the same issue.


Thanks again,
Kind regards,
Patrick

The following user(s) said Thank You: Jerome

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

Moderators: Obsidev
Time to create page: 0.062 seconds
Powered by Kunena Forum