CybotAS / CookiebotWP

This repository contains Addons that will make other plugins work with Cookiebot.
https://wordpress.org/plugins/cookiebot/
GNU General Public License v2.0
38 stars 25 forks source link

Fatal Error in 2.0.0 #85

Closed Design-Depot closed 6 years ago

Design-Depot commented 6 years ago

I'm getting the following error after updating to 2.0.0

Fatal error: Uncaught Error: Class 'DI\Definition\Helper\ObjectDefinitionHelper' not found in /home/dnl1/domains/.nl/public_html/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/functions.php:45 Stack trace: #0 /home//domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php(114): DI\object('cookiebot_addon...') #1 /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php(69): cookiebot_addons\Cookiebot_Addons->build_container() #2 /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php(156): cookiebot_addons\Cookiebot_Addons->__construct() #3 /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/cookiebot.php(87): include_once('/home/dnl1/d...') #4 /home/dnl1/domains/d.nl/public_html/wp-includes/class-wp-hook.php(286): Cookiebot_WP->cookiebot_init('') #5 /home/dnl1/domains/d.nl/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->ap in /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/functions.php on line 45

phpgeek commented 6 years ago

@Design-Depot Are you sure you uploaded all files? The class is defined in: /lib/ioc/php-di/php-di/src/DI/Definition/Helper/ObjectDefinitionHelper.php

Can you see if the file is included in your installation?

Design-Depot commented 6 years ago

Hi @phpgeek

Yeah, i checked, it's there. Here are the contents:

`<?php /**

namespace DI\Definition\Helper;

/**

Just to be sure i uninstalled the plugin and installed it again, and i'm getting the same error.

phpgeek commented 6 years ago

Hi, The file should look like this (only pasted the first few lines):

<?php
/**
 * PHP-DI
 *
 * @link      http://php-di.org/
 * @copyright Matthieu Napoli (http://mnapoli.fr/)
 * @license   http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
 */

namespace DI\Definition\Helper;

use DI\Definition\ObjectDefinition;
use DI\Definition\ObjectDefinition\MethodInjection;
use DI\Definition\ObjectDefinition\PropertyInjection;

/**
 * Helps defining how to create an instance of a class.
 *
 * @author Matthieu Napoli <matthieu@mnapoli.fr>
 */
class ObjectDefinitionHelper implements DefinitionHelper

It seems like you are pasting where the interface is defined (it is in addons/lib/ioc/php-di/php-di/src/DI/Definition/Helper/DefinitionHelper.php - and you confirm addons/lib/ioc/php-di/php-di/src/DI/Definition/Helper/ObjectDefinitionHelper.php exists too). Just making sure if it is a problem with the release - or a code file.

Can you give me information about what PHP version you are using? Trying to recreate the issue - however I have not been able to yet.

Design-Depot commented 6 years ago

Thanks. I got it working now. That was the content of the file i posted above, however, it seems i misconfigured PHPstorm auto up- and download feature which was messing up my files as soon as they hit the server.

Stupid mistake.

Thanks for the help though!