Post by JessiesBoutique » Thu Apr 25, 2024 5:47 pm

Hi All, I have never encountered this problem and couldn't find any solution. I just logged in to my account, wanted to add Revolut Payment gateway. I have downloaded the mod and installed successfully but now, when I go to Extensions, everything is greyed out and I cannot even scroll. All categories look like that. Any idea what I can do? I have already tried different browsers but no luck. Thank you.

Attachments

OCextensions.JPG

OCextensions.JPG (159.69 KiB) Viewed 2804 times



Posts

Joined
Wed Nov 15, 2023 4:42 pm

Post by aboutnet » Thu Apr 25, 2024 6:33 pm

Hi,

to fix this change the line 18 of file admin/controller/extension/extension/promotion.php

from

Code: Select all

return $response;
to

Code: Select all

return '';
Refresh the modification and you are ready!

https://www.aboutnet.gr
Κατασκευή Ιστοσελίδων & E-shop


User avatar
Newbie

Posts

Joined
Sat Apr 25, 2015 10:37 pm
Location - Athens / Greece

Post by paulfeakins » Thu Apr 25, 2024 6:34 pm

Could it be that your admin user doesn't have the necessary permissions?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by JessiesBoutique » Thu Apr 25, 2024 6:38 pm

Thank you both. I definitely have permissions as I have installed more Extensions in the past with no issues. I'm always cautious about changing code because this should not be necessary especially when there were no updates to the platform.


Posts

Joined
Wed Nov 15, 2023 4:42 pm

Post by ADD Creative » Thu Apr 25, 2024 7:31 pm

The issue seems to be that the OPENCART_SERVER is using Cloudflare, which is messing up the response when retrieving the advert.

The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.

Code: Select all

		if ($response) {
To.

Code: Select all

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

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by softmonke » Thu Apr 25, 2024 7:45 pm

ADD Creative wrote:
Thu Apr 25, 2024 7:31 pm
The issue seems to be that the OPENCART_SERVER is using Cloudflare, which is messing up the response when retrieving the advert.

The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.

Code: Select all

		if ($response) {
To.

Code: Select all

		if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
I prefer this solution - at least the ads/promotions banner will continue to show up correctly after the server issue has been rectified.

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by JessiesBoutique » Thu Apr 25, 2024 7:52 pm

Fantastic. This fixed the issue. Thank you for your help.


Posts

Joined
Wed Nov 15, 2023 4:42 pm

Post by k2tec » Thu Apr 25, 2024 9:46 pm

I opened the same problem viewtopic.php?t=233602, but what is changed in 24 hours, because yesterday I was able to change the settings for my customers without any problems.

Thanks the fix helped. But that is not the way. I am always afraid that just like with licensing of modules, the connection does not work between the servers. Then your shop is down or no checkout is possible.

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by JNeuhoff » Thu Apr 25, 2024 11:50 pm

ADD Creative wrote:
Thu Apr 25, 2024 7:31 pm
The issue seems to be that the OPENCART_SERVER is using Cloudflare, which is messing up the response when retrieving the advert.

The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.

Code: Select all

		if ($response) {
To.

Code: Select all

		if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
Maybe it makes sense to also add this fix to the upcoming OC 3.0.4.0 , too? The opencart.com uses CloudFlare which is known to cause quite few problems.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by ADD Creative » Fri Apr 26, 2024 12:35 am

JNeuhoff wrote:
Thu Apr 25, 2024 11:50 pm
Maybe it makes sense to also add this fix to the upcoming OC 3.0.4.0 , too? The opencart.com uses CloudFlare which is known to cause quite few problems.
I've done a pull request.
https://github.com/opencart/opencart/pull/13894

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by tdaubs » Tue Nov 26, 2024 11:38 pm

I wanted to say thanks for posting this fix! One of my sites started having the 'scroll prevention' issue just yesterday and a client also reached out to me just this morning to report they were also having the issue. The fix did the trick!

Image
Opencart Support . Buy Me a Coffee?


User avatar
Active Member

Posts

Joined
Fri Apr 08, 2011 4:51 am
Location - Southern California

Post by OSWorX » Wed Nov 27, 2024 12:06 am

To be honest: who of us needs an advertising banner inside the administration?
The more, when it makes troubles since months?

I understand that Daniel wants to make benefit as much as he can, but this way?
Not really.

And about the "solution" above: I prefer to add a

Code: Select all

return '';
right after

Code: Select all

public function index() {
This way, I prevent the systen to make an extra call to an url the result is for the waste .. and have a few milliseconds more ..

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by siteadvice » Wed Nov 27, 2024 11:48 pm

ADD Creative wrote:
Thu Apr 25, 2024 7:31 pm

Code: Select all

		if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
Just adding another shout out to ADD Creative for this fix.

inframes.com Website Design with Opencart, Wordpress, Lucee and bespoke application design and development


User avatar
New member

Posts

Joined
Mon Oct 24, 2011 8:12 pm

Post by spstore » Fri Nov 29, 2024 2:56 am

ADD Creative wrote:
Thu Apr 25, 2024 7:31 pm
The issue seems to be that the OPENCART_SERVER is using Cloudflare, which is messing up the response when retrieving the advert.

The request in admin/controller/extension/extension/promotion.php should be checking for a correct response before sending to the view.
Changing.

Code: Select all

		if ($response) {
To.

Code: Select all

		if ($response && curl_getinfo($curl, CURLINFO_HTTP_CODE) === 200) {
Just another one that found this solution useful as suddenly the last 3 days, both of my oc 3.0.3.8 stores stopped loading the extension page without any reason.
I tried this and works.
Thanks for the solution!

Newbie

Posts

Joined
Sat Aug 26, 2023 8:14 pm
Location - Athens

Post by furnica10 » Sun Dec 01, 2024 1:47 am

aboutnet wrote:
Thu Apr 25, 2024 6:33 pm
Hi,

to fix this change the line 18 of file admin/controller/extension/extension/promotion.php

from

Code: Select all

return $response;
to

Code: Select all

return '';
Refresh the modification and you are ready!


Worked, thank you

Newbie

Posts

Joined
Mon Jan 04, 2021 1:22 am

Post by crosland » Mon Dec 02, 2024 7:10 pm

Happened to me today. It must be atransient issue with Cloudflare as others have seen it at different time.

Why not just bin the whole Fn and simply

Code: Select all

return '';
???

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by by mona » Mon Dec 02, 2024 7:45 pm


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


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


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by crosland » Mon Dec 02, 2024 11:55 pm

by mona wrote:
Mon Dec 02, 2024 7:45 pm
You can with this
viewtopic.php?t=234855#p875283
Errm, that is the solution proposed above. I am suggesting remove the rest of the function so the the curl call is never made rather than just changing line 18.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm
Who is online

Users browsing this forum: Amazon [Bot] and 23 guests