opencart / opencart

A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.

Home Page:https://www.opencart.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Openacart Extension mOdule page showing space

kiranmane1992 opened this issue · comments

version of OpenCart
3.0.3.2
Screenshot from 2024-04-25 17-14-30

Issue Description:
In the admin panel, when I go to Extensions and then Modules, there is a space below the select bar and no scroll bar appears.

Yes, a lot of websites face this issue today.

Internally, the error related to the promotion module. Which is causing this major issue. Internally the console error is :
cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1?ray=879e5305287e91 net::ERR_ABORTED 404 (Not Found)

To solve the issue. Could you install this patch file?
scrollfix.ocmod.zip

@cartbinder: This just bypasses the curl call to the OpenCart api/promotion . Not a real bugfix.

To describe this "bug" a bit more: normally OC loads a "promotion banner" above the list.
Fetching the code from OpenCart, which itself is "protected" by CloudFlare.

While we all know that Cloudflare ist not the optimal solution, it is as it is.
The mentioned fix does only bypass this promotion banner (and the call to OpenCart itself in the background).
As @mhcwebdesign telling, it's not really a fix, but will solve the current issue.

Yes, that is true. Internally the curl is asking for validation, presenting a challenge. Which will not be solved. As it's not human. So there must be a temporary fix.

Users have important things that need to be done in the modules / payment method etc.

Yeah, I agree, CloudFlare is a nightmare, and also slows things down.

This has been discussed on the forums today. https://forum.opencart.com/viewtopic.php?p=869350#p869343

$response = curl_exec($curl);
curl_close($curl);
if ($response) {
return $response;
} else {
return '';
}

The issue is that the promotion is returned regardless whether is was successful or not. A quick fix is to check the response has a status code of 200 as Cloudflare returns 403 when it injects a page in place of the response. Probably don't want to push anything to the admin view that failed in some way anyway. Remember that curl_exec will return data even on error or 404 codes.

if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {

This is a better way. Advertising will continue to work once the response is okay.

Updating the zip based on the above solution.

scrollfix.ocmod.zip

Honestly .. who ever needs that advertisement ??