Support Forum

I administer several websites running the Construction template on the web hosting service IONOS. Joomla is on 6.2.0, PHP is 8.4.27, Construction is 1.7.0. Gantry is on 5.6.4. All are the latest.

When I am in the Gantry 5 template area, and try to change the Outline in the dropdown, I get a white box with the following error:

Length Required
A request of the requested method GET requires a valid Content-length.

This is happening on all the sites that are on this IONOS webhost, Joomla, PHP, Construction, and Gantry combination. I also run websites on VPS servers, and this error does not occur on those sites.

Since the common factor for these sites is Construction, Gantry 5, and IONOS hosting, I don't know which one might be the culprit. It might be related to the recent PHP security updates, but I don't know when this issue started as I hadn't used the template switcher for months on any of these sites.

I did try switching to the Milano template as a test, and the error still came up.

I will be reaching out to IONOS also since it is only an issue with their webhosting service, but thought you, as a Gantry and Joomla programmer, might have some insight into it.

When I searched for this error online, this is what was came up:

------------------------

Understanding the Error
The error message indicates that a GET request requires a valid Content-Length header. This situation arises because some servers expect this header even though GET requests typically do not include a body.

Why Content-Length is Needed
GET Requests: Generally, GET requests do not have a body, and thus, a Content-Length header is not necessary.
Server Requirements: Some servers may be configured to require a Content-Length header for all requests, including GET requests.

How to Resolve the Issue
To fix this error, you can manually add a Content-Length header to your GET request. Here’s how:

Steps to Add Content-Length Header
Set Content-Length to 0: If your GET request does not have a body, you can specify the Content-Length as 0

-------------------------
Responses (3)
Sorry, but you are not allowed to view the replies here.
Your Reply

Become an insider | Subscribe to our Newsletter
Subscribe to our mailing list and stay up-to-date with all our awesome releases, latest updates and amazing discount offers!