#641 404 Error When Download Limit Is Exceeded for Downloadable Products

Posted in ‘Technical Support / Bugs’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Olivier on Friday, 30 January 2026 17:23 UTC

Damien BERENGER

Hi team ! 

For downloadable files,

  • when Manage Stock is enabled and the limit is exceeded, it generates a 404 error.
  • When Quantity Restriction is enabled, if the limit is exceeded, the same 404 error occurs.

Here is a video to make it clearer 🙂

https://www.youtube.com/watch?v=INXHjMdpDlQ

Thank you for your help

Damien BERENGER

Hello,

For additional information,

Here is my goal and configuration for selling digital files::

  • Limit the purchase quantity to 1 per customer
  • Set a total stock of 3
  • The options “Manage stock” and “Quantity limit” are correctly enabled and configured

Observed behavior:

1. On the cart page or via the advanced cart popup window 

  • The “stock” or “quantity” limit works correctly.
    The quantity is properly restricted to 1, and it is not possible to sell out of stock.
  • No error message appears

     

    2. On the product page ❌

  • If the product is already in the cart with a quantity of 1, or if the maximum available stock (3) has already been added to the cart
  • And I click again on “Add to cart”
  • I get a 404 error, instead of a message indicating that the maximum quantity has been reached


On the product page, when clicking the “Add to cart” button, the behavior should be the same as on the cart page:

  • If the quantity limit is reached: display the same message
    (“The maximum order quantity for this item is 1. You already have 1 product(s) in your cart.”)

  • If the stock is reached: display “Out of stock”

 

https://www.youtube.com/watch?v=INXHjMdpDlQ

Thank you in advance for your help.

Best regards,

Olivier

Hello Damien,

I finally was able to get to it.

I am going to check your site as all the tests you made in your video don't throw the error 404 you are experiencing on my test site. I do get messages instead like 'Only 3 left in stock' when selecting 'Add to cart'.

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Olivier

Ok Damien,

I think the problem comes from the fact the 'Panier' menu item is not found...

I don't think the 'Panier' should be in the user menu, since you need to be able to see that page if you are not logged in.

I moved the menu item out of the user menu and it worked.

As far as feedback is concerned, you are missing 

<div class="j2store-notifications"></div>

On the page. Hopefully once you have it located under the button, you will see feedback.

Let us know how that turns out!

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Damien BERENGER

Hello Olivier,

I have followed your recommendations:

  • assigned the Cart menu with "public" access rights in the main menu

  • added <div class="j2store-notifications"></div> positioned below the Add to Cart button.

However, despite this, I still encounter a 404 error when exceeding the quantity limit or available stock.

In the current state, I do not know what concrete changes to make to avoid the 404 error.
You can log in and test it yourself.

Thank you in advance for your help.
Best regards,
Damien

Olivier

I don't want to mess up your site...

But now you have 2 cart menus and it will look for the first item to create the link... which is the 'Panier' from the user menu.

Can you test with the 'Panier' 'off' ?

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Damien BERENGER

Thank you Olivier, but I still have the error.

I have disabled the “panier” (cart) menu from the user menu.

I kept the “cart” menu in the main menu.

I tested again by adding a 4th product while the limit is 3. When clicking the Add to cart button, I get a 404 error with the following URL:
https://v2.intergesty.fr/chantiers/13-bouches-du-rhone/undefined

You can reproduce the issue here:
https://v2.intergesty.fr/chantiers/13-bouches-du-rhone/test-1er-chantier

Thank you for your help.

Damien BERENGER

Olivier,

I have (partially) identified the source of my 404 error issue.

I am using Joomla with YOOtheme Pro, along with your YOOtheme Pro Integration application.

  • In the “product” template, I had added an HTML element using YOOtheme dynamic content: J2Store > Product > Add to cart.
    The button works correctly, but a 404 error occurs when the quantity limit is reached.

Alternative solution:

  • In the “product” template, I added an HTML element using YOOtheme dynamic content: J2Store > Product > ID Product.
    In the output, I added {j2store} before the content and |cart{/j2store} at the end.

With this method, the button is displayed correctly with all information from the J2Commerce setup/configuration/product, and most importantly, the 404 error no longer occurs when the quantity limit is reached ✌️

It’s better shown in a video: https://youtu.be/N6PdFyy8Rbg  

 

Olivier

Ah! That was going to be my next step: looking if the YooTheme integration was an issue...

The video was VERY useful, as I am not a user of YooTheme, it was a teaching moment for me.

As I was looking at a solution, it brought up an issue in the Advanced Cart plugin, which I have to clear with Adam. It should not affect the use of Advanced Cart, but will need an update in the near future.

I will use your video as a base to create a tutorial (I won't add the video to the tutorial, just use the info I got from it) which will probably clear quite a few blurry lines when it comes to the YooTheme integration.

Olivier.

Growing Together

Help us get back to #1 in the Joomla Extension Directory by leaving us a 5-Star review here.

Stay Updated

Subscribe for free and be the first to know about the latest features, updates, and new additions.