Jump to content

Edit History

hdebeuf

hdebeuf

Hi there,

 

I've found the issue and had to temporarily resolve it with a little tweak in the class files.

Actually, the Facebook plugin uses the same Sentry library as Cappasity 3D.

I don't know why but the Facebook plugin is attempting to use the wrong library.

 

To resolve this, I've forced the ModuleFilteredRavenClient to take the right Raven_Client class.

You should place this code in the following file : ps_facebook/classes/Handler/ErrorHandler/ModuleFilteredRavenClient.php

Between the 'namespace' and the 'use' statements like followed :

namespace PrestaShop\Module\PrestashopFacebook\Handler\ErrorHandler;

require_once(_PS_MODULE_DIR_ . 'ps_facebook/vendor/sentry/sentry/lib/Raven/Client.php');

use Raven_Client;

 

UPDATE

This trick works only if you use the backend hook.

If you would like to hook this plugin with another plugin that also uses Raven_Client, this trick doesn't work.

I've temporarily disabled Sentry in the following file ps_facebook/classes/Handler/ErrorHandler/ErrorHandler.php

Start the construct and handle functions with return; so it ignores this.

public function __construct(Module $module, Env $env)
    {
        return;
        $this->client = new ModuleFilteredRavenClient(
            $env->get('PSX_FACEBOOK_SENTRY_CREDENTIALS'),
            [
...
public function handle($error, $code = null, $throw = true, $data = null)
    {
        return;
        $this->client->captureException($error, $data);
...

 

I've reported this to the Facebook plugin support team.

 

Hope this helps.

 

Best regards,

hdebeuf

hdebeuf

Hi there,

 

I've found the issue and had to temporarily resolve it with a little tweak in the class files.

Actually, the Facebook plugin uses the same Sentry library as Cappasity 3D.

I don't know why but the Facebook plugin is attempting to use the wrong library.

 

To resolve this, I've forced the ModuleFilteredRavenClient to take the right Raven_Client class.

You should place this code in the following file : ps_facebook/classes/Handler/ErrorHandler/ModuleFilteredRavenClient.php

Between the 'namespace' and the 'use' statements like followed :

namespace PrestaShop\Module\PrestashopFacebook\Handler\ErrorHandler;

require_once(_PS_MODULE_DIR_ . 'ps_facebook/vendor/sentry/sentry/lib/Raven/Client.php');

use Raven_Client;

 

UPDATE

This trick works only if you use the backend hook.

If you would like to hook this plugin with another plugin that also uses Raven_Client, this trick doesn't work.

I've temporarily disabled Sentry in the following file ps_facebook/classes/Handler/ErrorHandler/ErrorHandler.php

Start the construct function with return; so it ignores this.

public function __construct(Module $module, Env $env)
    {
        return;
        $this->client = new ModuleFilteredRavenClient(
            $env->get('PSX_FACEBOOK_SENTRY_CREDENTIALS'),
            [
...

 

I've reported this to the Facebook plugin support team.

 

Hope this helps.

 

Best regards,

hdebeuf

hdebeuf

Hi there,

 

I've found the issue and had to temporarily resolve it with a little tweak in the class files.

Actually, the Facebook plugin uses the same Sentry library as Cappasity 3D.

I don't know why but the Facebook plugin is attempting to use the wrong library.

 

To resolve this, I've forced the ModuleFilteredRavenClient to take the right Raven_Client class.

You should place this code in the following file : ps_facebook/classes/Handler/ErrorHandler/ModuleFilteredRavenClient.php

Between the 'namespace' and the 'use' statements like followed :

namespace PrestaShop\Module\PrestashopFacebook\Handler\ErrorHandler;

require_once(_PS_MODULE_DIR_ . 'ps_facebook/vendor/sentry/sentry/lib/Raven/Client.php');

use Raven_Client;

 

I've reported this to the Facebook plugin support team.

 

Hope this helps.

 

Best regards,

×
×
  • Create New...