Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

[BUG] can't open checkout page #470

Closed
laysunecboo opened this issue Sep 1, 2020 · 41 comments
Closed

[BUG] can't open checkout page #470

laysunecboo opened this issue Sep 1, 2020 · 41 comments
Labels

Comments

@laysunecboo
Copy link

Webstore Url
Your webstore Url :www.ecboo.com

FBE plugin version
Version of FBE plugin 3.1.0

OpenCart version
Version of OpenCart 3.0.2.0

Describe the bug
can't open checkout page and cart page

@abbywelford
Copy link

We're experiencing the same issue, would be great to get a patch/ resolution for this please.

@Superstar18
Copy link

Hi everybody! Did you find a solution for this problem. I have the same issue.

@PapaIce786
Copy link

Same issue here

@konstantinosbotonakis
Copy link

Open the error logs and send the error you guys have, so we can help you.

@Superstar18
Copy link

Hi @konstantinosbotonakis,

Due to the long reponse, i installed a older version of the module so we could not have any problems with the pixel and to make the website work. This issue was detected 2 weeks ago and i'm waiting for a solution from then. Do you think the error log will include what you need so you can check the last version of the module that made these errors?

Because if i add again the new version, the website will brake again. This is a big issue and we can't stay with the website down for such a long time. How do you suggest we should do?

@konstantinosbotonakis
Copy link

The best way is to make a copy of your website, create a staging env for ex: test.ecboo.com
enable the logs and desplay_errors = 1

Then install latest version and post here the error.

@Superstar18
Copy link

Yes but that's too complicated and we need this to be done by a developer and the one we work with is not available till next month. I saw that this error appears at many stores. You have many tickets opened with this issue. I think somewhere is a general bug or something. Do you have any suggestions?

@TheLankyScottishNerd
Copy link

Hello All,

I may be able to offer a little insight into a workaround for this issue, albeit not hellish much help at the minute but it may steer the dev's in the right direction.

It seems to be an issue with the SASS Cache, and so disabling the SASS cache restores cart and checkout functionality.

Theme cache can stay enabled but as soon as I enable the SASS cache the 500 error persists.

My environment is: OpenCart 3.0.3.3 - Facebook Plugin 3.1.0 - Linux Host

I tried enabling php errors in the php.ini file and no errors appeared with the 500 error message, nor did the OpenCart logs generate any errors when visiting the cart or checkout page. I have no other php.ini settings overriding these so I'm not sure why there's no errors being generated.

I'm willing to go further into this and provide all the info you guys need with some guidance from the dev's on how I would maybe get some errors from the SASS cache?

Anyway, if anyone has any suggestions on how I start to debug the cache I'm all ears and if not I hope this lets people get there stores back online, albeit at a slower than usual calibre, but hey Facebook messenger makes it worth it 👍 .

@Superstar18
Copy link

Hi @Dmasterz,
Thank you for the info. I hope they will find a solution for this.
Could you provide the error log so @konstantinosbotonakis could take a look?

@TheLankyScottishNerd
Copy link

Sure can, although like I say, no errors are generated...

The issue has also re-appeared for me... with all cache's off... but it took a while to do so and hard refreshing the browser does see the pages come back sporadically.

Upon further testing, I can go all the way through checkout up till the point where i confirm the order and the PayPal form should pop up, then 500 error.

Attached my error.log.
error.log

@TheLankyScottishNerd
Copy link

display_errors = 1
error_reporting = E_ALL

Both set in php.ini and yet no errors, just those warnings.

@konstantinosbotonakis
Copy link

Sure can, although like I say, no errors are generated...

The issue has also re-appeared for me... with all cache's off... but it took a while to do so and hard refreshing the browser does see the pages come back sporadically.

Upon further testing, I can go all the way through checkout up till the point where i confirm the order and the PayPal form should pop up, then 500 error.

Attached my error.log.
error.log

The error log you attached has only warnings, no fatal errors. Also all warnings are related to missing images from the folder /image

Not related to this error.

@konstantinosbotonakis
Copy link

konstantinosbotonakis commented Sep 28, 2020

Hello All,

I may be able to offer a little insight into a workaround for this issue, albeit not hellish much help at the minute but it may steer the dev's in the right direction.

It seems to be an issue with the SASS Cache, and so disabling the SASS cache restores cart and checkout functionality.

Theme cache can stay enabled but as soon as I enable the SASS cache the 500 error persists.

My environment is: OpenCart 3.0.3.3 - Facebook Plugin 3.1.0 - Linux Host

I tried enabling php errors in the php.ini file and no errors appeared with the 500 error message, nor did the OpenCart logs generate any errors when visiting the cart or checkout page. I have no other php.ini settings overriding these so I'm not sure why there's no errors being generated.

I'm willing to go further into this and provide all the info you guys need with some guidance from the dev's on how I would maybe get some errors from the SASS cache?

Anyway, if anyone has any suggestions on how I start to debug the cache I'm all ears and if not I hope this lets people get there stores back online, albeit at a slower than usual calibre, but hey Facebook messenger makes it worth it 👍 .

Steps to show all errors:
Open config.php file.
After <?php
you add:
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);

Save file and refresh the checkout. It should now show the actual error.

@TheLankyScottishNerd
Copy link

TheLankyScottishNerd commented Sep 28, 2020

Thanks @konstantinosbotonakis , but that hasn't changed the 500 error.

I'm familiar with the kind of errors I should be seeing, but nothing is shifting this 500 error page, but refreshing the page a few times does seem to get you past the 500 error and back to the cart or checkout page.

config.php is as follows now:

<?php

ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);

// HTTP
define('HTTP_SERVER', 'https://www.***/');

// HTTPS
define('HTTPS_SERVER', 'https://www.***/');

// DIR
define('DIR_APPLICATION', '/var/sites/b/b***/public_html/catalog/');
define('DIR_SYSTEM', '/var/sites/b/b***/public_html/system/');
define('DIR_IMAGE', '/var/sites/b/b***/public_html/image/');
define('DIR_STORAGE', '/var/sites/b/b***/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', '');
define('DB_USERNAME', '');
define('DB_PASSWORD', '');
define('DB_DATABASE', '');
define('DB_PORT', '');
define('DB_PREFIX', '');

(IGNORE THE *** AS THIS WAS TO ANONYMISE)

All caches are still turned off.

@konstantinosbotonakis
Copy link

Thanks @konstantinosbotonakis , but that hasn't changed the 500 error.

I'm familiar with the kind of errors I should be seeing, but nothing is shifting this 500 error page, but refreshing the page a few times does seem to get you past the 500 error and back to the cart or checkout page.

config.php is as follows now:

<?php

ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);

// HTTP
define('HTTP_SERVER', 'https://www.***/');

// HTTPS
define('HTTPS_SERVER', 'https://www.***/');

// DIR
define('DIR_APPLICATION', '/var/sites/b/b***/public_html/catalog/');
define('DIR_SYSTEM', '/var/sites/b/b***/public_html/system/');
define('DIR_IMAGE', '/var/sites/b/b***/public_html/image/');
define('DIR_STORAGE', '/var/sites/b/b***/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', '');
define('DB_USERNAME', '');
define('DB_PASSWORD', '');
define('DB_DATABASE', '');
define('DB_PORT', '');
define('DB_PREFIX', '');

(IGNORE THE *** AS THIS WAS TO ANONYMISE)

All caches are still turned off.

The only way, that you force php error to show, but they don't show is when you have custom php.ini / .user.ini file inside the opencart's root folder. In case you do have one or both of these files, please rename them to something else temporarily and try again but having the code I sent inside config.php file.

Unfortunately, no dev can help with the problem, if we don't know the actual problem and can't replicate it.

PS: I don't work for Facebook, I am just trying to help here on my free time :)

@TheLankyScottishNerd
Copy link

TheLankyScottishNerd commented Sep 28, 2020

Thanks @konstantinosbotonakis,

As a C#/VB developer in my own spare time, I fully understand.

I've checked my PHP settings and I do have a php.ini file within my site root which overrides the server provided default, a test of which you can see here.

You will see display errors is on and yet the 500 error page persists. I've removed the .ini and there is no change.

My .ini includes the following:

magic_quotes_gpc = Off register_globals = Off default_charset = UTF-8 memory_limit = 512M max_execution_time = 36000 upload_max_filesize = 999M safe_mode = Off mysql.connect_timeout = 20 session.auto_start = Off session.use_only_cookies = On session.use_cookies = On session.use_trans_sid = Off session.cookie_httponly = On session.gc_maxlifetime = 3600 allow_url_fopen = On display_errors = 1 error_reporting = E_ALL

To replicate, its fairly straight forward:

  1. Install OpenCart.
  2. install and enable Facebook extension v3.1.0.
  3. Experience the 500 page on cart and checkout.

I've added the following to the php.ini:

display_errors = 1
display_startup_errors = 1
error_reporting = E_ALL

I've added the following to .htaccess:
php_flag display_startup_errors on
php_flag display_errors on

and still I get the 500 error.

@konstantinosbotonakis
Copy link

@Dmasterz is this happening with OpenCart v.3.0.2.0 only? I've tried the latest OpenCart version 3.0.3.6 and cannot replicate it.

@TheLankyScottishNerd
Copy link

This is on OpenCart Version 3.0.3.3.

I've checked that error work on the site as you will see here so this is definitely something on the OpenCart end.

@konstantinosbotonakis
Copy link

FYI I made a quick video, with OpenCart 3.0.2.0 and installing the latest Facebook Extension v3.1.0 and as you can see it works as expected. That's the version that the original bug reported.

OpenCart 3.0.2.0 - Facebook Business Extension

@TheLankyScottishNerd
Copy link

TheLankyScottishNerd commented Sep 28, 2020

I think the issue presents itself only after actually finishing the set-up of the plugin (Linking to FB) as i've always fully linked to fb when installing, And I can only speak for OpenCart 3.0.3.3, on both new and existing installs, standard theme and various 3rd party themes.

I cannot upgrade and try any newer version of OpenCart due to a couple of current issues people are experiencing on the OpenCart github which i experienced on one of my other installs.

I'll install 3.0.3.6 on the same host in a subdomain and see if I can replicate and report back just shortly.

@TheLankyScottishNerd
Copy link

@konstantinosbotonakis ok, so I've installed 3.0.3.6 and now I'm getting a different issue which I believe you may be facing also as you missed a set-up step or 2 in your video.

After installing the module, you must turn the sass and theme cache off, enable the Facebook extension module and then refresh your modifications cache.

If you look at the facebook extension page within the admin I'm guessing you will have the following error at the top:

`We have detected the Facebook pixel is not correctly setup in your web store site. You can try these below steps to fix the problem.

  1. Ensure that you have given read+write permissions to the admin, catalog and system folders on your OpenCart webserver
  2. Ensure that you have Refresh the modifications, View steps
  3. For OpenCart 3.x, ensure that you have disabled the theme and SASS cache, View steps
  4. For OpenCart 3.x, ensure that you do not have modifications to the header design, View steps`

and as such your cart and checkout will work as the extension has not been fully installed.

I've just replicated this on 3.0.3.6.

@TheLankyScottishNerd
Copy link

TheLankyScottishNerd commented Sep 28, 2020

However, completing the install properly doesn't rid us of the above error on 3.0.3.6 though and the install never fully completes. Which is an entirely different issue.

@TheLankyScottishNerd
Copy link

I may have stumbled on another issue ticket where someone is seeing the error tagged above.

@TheLankyScottishNerd
Copy link

#479 - seems to be the same issue also.

@TheLankyScottishNerd
Copy link

TheLankyScottishNerd commented Sep 29, 2020

seeing as no-one can get past the 500 error and actually produce any usable errors/logs with errors as there quite simply not being generated it seems, im not sure how to proceed.

@konstantinosbotonakis - Would a zip of a site (inc. mysql dump) allow the debugging of this if it were to be restored your end?

One would assume that, if anything, this would eliminate the host variables and maybey allow you to see the error?

I'm curious if you received the error I mentioned above after your install test and if you experienced the error after successfully linking the plugin to facebook?

@konstantinosbotonakis
Copy link

#479 - seems to be the same issue also.

Nope, that's not the same. According to the actual code, if the extension is not installed from Extension -> Modules, that's normal error. This reply says it too: #479 (comment)

As per the second question, no, mysql dump won't help. The compatibility usually is because of other 3rd party extensions (files) not a config in DB. That's why I specifically requested the exact error that's shown when you get 500 error.

@TheLankyScottishNerd
Copy link

TheLankyScottishNerd commented Sep 29, 2020

I understand, which is why I asked if a full site dump would help including the mysql and not just a mysql dump.

I believe it is the exact same error as in that comment the op states "The setup gets completed but when I click add2cart it shows 500 error." which is exactly the same issue everyone is experiencing.

no one is getting the an error in either logs or on the 500 page regardless of php.ini's etc. On a local host this is the same behaviour even without any third party plugins.

As I stated though, you did not complete the Facebook set-up and so were still comparing oranges and apples until you actually link the facebook plugin to facebook and enable the required module as per the install instructions.

At the end of the day people are following the full install instructions, linking to Facebook and then testing their site and so to replicate I believe you should try the same as many people can replicate this now following the full install procedure, regardless of Opencart version.

If I upload the extension as you did, and simply refresh my modifications cache the cart and checkout works - follow the full instructions to set-up the plugin and they do not.

@TheLankyScottishNerd
Copy link

The latest version on the OpenCart Marketplace is plagued with weeks worth of comments with this exact issue, so this is very widespread it seems.

@TheLankyScottishNerd
Copy link

TheLankyScottishNerd commented Sep 29, 2020

I can now confirm that there are no errors being generated.

I've used a custom php.ini which overrides the server defaults and set:
log_errors = On error_reporting = 32767 error_log = ~/log/php_errors.log magic_quotes_gpc = Off register_globals = Off default_charset = UTF-8 memory_limit = 512M max_execution_time = 36000 upload_max_filesize = 999M safe_mode = Off mysql.connect_timeout = 20 session.auto_start = Off session.use_only_cookies = On session.use_cookies = On session.use_trans_sid = Off session.cookie_httponly = On session.gc_maxlifetime = 3600 allow_url_fopen = On display_errors = 1 display_startup_errors = 1 error_reporting = E_ALL

When OpenCart errors at the cart and checkout, no errors are generated to the log or the browser. Just the 500 error page.

When I run This Test and This Test 2, both of which are sitting right next to the opencart install, the error log defined in the .ini contains:

[29-Sep-2020 15:50:46 UTC] PHP Warning: include(my_script.php): failed to open stream: No such file or directory in /var/sites/b/bubblesboutique.biz/public_html/testerror.php on line 8 [29-Sep-2020 15:50:46 UTC] PHP Warning: include(): Failed opening 'my_script.php' for inclusion (include_path='.:/usr/local/php-7.3.3-flock/lib/php') in /var/sites/b/bubblesboutique.biz/public_html/testerror.php on line 8 [29-Sep-2020 16:38:35 UTC] PHP Warning: include(my_script.php): failed to open stream: No such file or directory in /var/sites/b/bubblesboutique.biz/public_html/testerror.php on line 8 [29-Sep-2020 16:38:35 UTC] PHP Warning: include(): Failed opening 'my_script.php' for inclusion (include_path='.:/usr/local/php-7.3.3-flock/lib/php') in /var/sites/b/bubblesboutique.biz/public_html/testerror.php on line 8 [29-Sep-2020 16:38:35 UTC] PHP Warning: include(my_script.php): failed to open stream: No such file or directory in /var/sites/b/bubblesboutique.biz/public_html/testerror.php on line 8 [29-Sep-2020 16:38:35 UTC] PHP Warning: include(): Failed opening 'my_script.php' for inclusion (include_path='.:/usr/local/php-7.3.3-flock/lib/php') in /var/sites/b/bubblesboutique.biz/public_html/testerror.php on line 8 [29-Sep-2020 16:38:39 UTC] PHP Warning: include(my_script.php): failed to open stream: No such file or directory in /var/sites/b/bubblesboutique.biz/public_html/testerror2.php on line 3 [29-Sep-2020 16:38:39 UTC] PHP Warning: include(): Failed opening 'my_script.php' for inclusion (include_path='.:/usr/local/php-7.3.3-flock/lib/php') in /var/sites/b/bubblesboutique.biz/public_html/testerror2.php on line 3

and so I can confirm this is not a server mis-config and something deeper as the PHP errors work as expected and so does the log.

To re-cap, my current situation is:

Environment: OpenCart 3.0.3.3 - FB Plugin 3.1.0.
Theme and SASS Cache' Disabled.
All FB Plugin setup steps complete and FB Linked.

If this helps, I've noticed that the messenger bubble, at the bottom right, shows on every page but the cart and checkout, but I'm not sure if this is by design.

Using the pixel checker plugin for chrome, I also see no pixel detected on the cart and checkout but , is present on other pages.

OCMOD Logs also show the following error for FB Plugin:

FILE: admin/language/en-gb/common/dashboard.php CODE: <?php LINE: 8 CODE: public function __construct($registry LINE: 37 CODE: while ($action instanceof Action) { LINE: 139 CODE: public function dispatch(Action $action, Action $error) { LINE: 60 CODE: while ($action) { NOT FOUND - OPERATIONS ABORTED! CODE: public function dispatch($action, $error) { NOT FOUND - OPERATIONS ABORTED! CODE: $result = $this->execute($pre_action); LINE: 74

@ventienda
Copy link

I have the issue. I use OC version 3.0.3.2 and Journal theme. FB Plugin Version: 3.1.0.
Evertything works great but Cart and checkout pages. An 500 error page is all I can find.

@TheLankyScottishNerd
Copy link

Hey @ventienda,

Do you get any errors in the OpenCart Error Log or Server PHP logs?

@Superstar18
Copy link

So it seems we are doomed :))) Facebook doesn't care about us anymore :)))

@TheLankyScottishNerd
Copy link

@Superstar18 ,

Did you manage to get the logs/errors you were asked for?

@Superstar18
Copy link

Hi @Dmasterz
I downgraded the module to a earlier version that workes because we can't stay with the website unfunctional for that long. We have much trafic and client on the website and this error keeps the website not functional in a major way.
So sending you error log now is not relevant because we don't have this version of the module live on the store.

I would gladly make a copy of the website on a subdomain and add it there but sadly i'm not a developer and i don't know how to do this.

@TheLankyScottishNerd
Copy link

ok @Superstar18,

It would be best if you had staging environment you mentioned as then all changes can be tested to save you and your customers headaches at times like this, but I understand its not feasible in all scenarios.

I was just double checking as I didn't think it was fair for you to imply that "Facebook Doesn't Care" when in actual fact the developers helping on the open source Facebook project cant get the required information from you to help resolve the issues you are having. If you had given up the info or had your developer interact here with us and then had no help, my feet would of course be on the other side of the fence.

Is your developer able to contribute here in anyway so as we and any other contributor here may assist you?

@Superstar18
Copy link

@Dmasterz As i understood from the discution, we don't have here any official developer that could solve the problem officialy. Just the people in this tread that try to help.
We all have the same issue si with or without my error log it surely makes no difference. Even if i would gladly send it to you, i don't have the skills to do what you said earlyier and the developer we work with is not available for now.

When i said "facebook doesn't care" it was just a joke but if you want to take the situation literally, there are dozens of people telling they have this error here in github (you can check the other issues opend) and also in opencart marketplace and no one is answering. Last year was a similar situation and they where very prompt, i really dont understand why, after 1 month, nobody tries to help.

@konstantinosbotonakis
Copy link

There's a known conflict when previous versions are installed. You need to delete all previous versions of the plugin, and clear the modifications. Then install only the latest version and refresh modifications. Problems with constant FACEBOOK_CUSTOMIZATION_GREETING_TEXT_CODE are resolved, only by this way.

@mkusma
Copy link

mkusma commented Oct 6, 2020

For the 500 error on checkout, if you replace DIR_STORAGE/modification/system/engine/router.php with the original version, then checkout will work, albeit without FB integration, but at least it works.

@Superstar18
Copy link

Hi @Dmasterz

You have attached the log file.

@konstantinosbotonakis i tried what you suggested but the issue is still the same.
log file.log

@abbywelford
Copy link

abbywelford commented Nov 4, 2020 via email

@yao-tx
Copy link
Contributor

yao-tx commented Apr 28, 2021

Hi all,

Please download the latest version of the Facebook Business Extension plugin for OpenCart (version 4.0.1) from OpenCart Marketplace. We have revamped the entire plugin, improved the plugin and resolved most of the bugs and issues that users are having with the previous versions.

To uninstall the existing FBE plugin (version 3.1.2 and below), please follow the guide here.

For installation of the latest FBE plugin (version 4.0.0 and above), please follow the guide here.

If you encounter any technical issues with the new FBE plugin, please feel free to reach out to us via our help desk.

Thank you!

@yao-tx yao-tx closed this as completed Apr 28, 2021
@yao-tx yao-tx reopened this Apr 28, 2021
@yao-tx yao-tx added the bug label Apr 28, 2021
@yao-tx yao-tx closed this as completed Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants