Shopping Cart error message

Without changing anything in backend since a few days an error message occurs when I try to turn to the next page of a gallery. It says: "The Shopping cart is currently unavailable. Please contact the site owner for further assistance.“ And in addition once having tried to turn to the second page, the cart module is indeed without any function. The error message even occurs to galleries without any cart function. The problem doesn’t occur on one-page-galleries. I’ve tried to reinstall cart, updated all modules, turned to php 8.3 and cleared template cache - without any results. Does anybody have any advice?
Thank you!

Hi @ThomasIx, can you share a link to a gallery where the error comes up?

Hi Ben - sorry and of course: 05 - Jagd Verden - Thomas Ix | Photography

Thanks, @ThomasIx. The Cart sends the current URL to the back-end for each page load. This is so that when items are added to the cart, the server knows which page and gallery the items belong to.

For some reason, your server is objecting to a URL like this being passed as a parameter:
https://www.foto-ix.de/galleries/01-schleppjagden/2024/05-jagd-verden/?page=2

In particular, the section ?page=2.

Do you know if your site has had any recent security modules installed? mod_security is a common module that could be incorrectly detecting a request like this as a security threat.

A similar situation came up last week on the forums: Search yields error

I’ll look into changing the Cart so that it omits everything from the ? when sending the current page to the back end. I’ll need to work out whether that part of the URL is of importance to the back-end of the Cart.

I’m not aware of any new security modes installed on DreamHost but it’s certainly possible. Is there a way for me to check for mod_security on the host?

Hi @mblanchette1 and @ThomasIx, I have found what could be the issue.
The Cart already sanitises the referrer URLs to avoid false positives with mod_security. However it has only ever done this for http:// (by sending it as http:__). I have updated the cart to also do this for https:// (by sending it as https:__).

Can you visit the Backlight Modules page and update Cart to version 8.1.5? Let me know if that solves the issue.

Ben, I unfortunately still get the same error. Did the update, cleared the cache, etc and still get the error message.

Same with me - still get the error.

Hi @mblanchette1 and @ThomasIx, thanks for confirming.
I will spend more time on this over the weekend. The next step is to sanitise the ? that is causing the issue. It is already encoded as %2F, so isn’t being treated as a ? as far as the browser is concerned, but that’s not helping with the handling on the web server.

Hi @ThomasIx and @mblanchette1, I have made a further update to the Cart. This sanitises the question mark in query strings.

Can you please visit Backlight Modules and click Reinstall for the entry for Cart 8.1.5, then clear your browser cache and test again?

Hi @Ben,

you made it - everything works fine.

Many many thanks for your fantastic support. Great job!

2 Likes

Hi @ThomasIx, thanks for confirming. That’s great to hear. Are you also with Dreamhost?

Hello Ben. Yes, it now seems to work. The error has gone. Thank you very much for this.

1 Like