NeosIT / active-directory-integration2

WordPress plug-in "Next Active Directory Integration"
https://https://wordpress.org/plugins/next-active-directory-integration/
GNU General Public License v3.0
54 stars 25 forks source link

Conflict with The Events Calendar #181

Closed rbaugh closed 1 year ago

rbaugh commented 1 year ago

Prior to ADI v 3.0 these two plugins existed next to each other and had no issues until the 3.0 release. Seems there is an issue in which the AD plugin (this plugin) is listening in on actions that somehow are being used by other vendors and therefore causing the issue.

Fatal error:  Uncaught TypeError: Dreitier\Nadi\Vendor\Monolog\Logger::pushHandler(): Argument #1 ($handler) must be of type Dreitier\Nadi\Vendor\Monolog\Handler\HandlerInterface, Monolog\Handler\ErrorLogHandler given, called in /user/public_html/wp-content/plugins/next-active-directory-integration/vendor-repackaged/monolog/monolog/src/Monolog/Logger.php on line 263 and defined in /user/public_html/wp-content/plugins/next-active-directory-integration/vendor-repackaged/monolog/monolog/src/Monolog/Logger.php:231
Stack trace:
#0 /user/public_html/wp-content/plugins/next-active-directory-integration/vendor-repackaged/monolog/monolog/src/Monolog/Logger.php(263): Dreitier\Nadi\Vendor\Monolog\Logger->pushHandler()
#1 /user/public_html/wp-content/plugins/the-events-calendar/common/src/Tribe/Log/Service_Provider.php(138): Dreitier\Nadi\Vendor\Monolog\Logger->setHandlers()
#2 /user/public_html/wp-content/plugins/the-events-calendar/common/vendor/lucatume/di52/src/tad/DI52/Container.php(281): Tribe\Log\Service_Provider->build_logger()
#3 /user/public_html/wp-content/plugins/the-events-calendar/common/src/Tribe/Log/Service_Provider.php(161): tad_DI52_Container->make()
#4 /user/public_html/wp-includes/class-wp-hook.php(308): Tribe\Log\Service_Provider->dispatch_log()
#5 /user/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#6 /user/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /user/public_html/wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/Models/Model.php(267): do_action()
#8 /user/public_html/wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/Models/Builder.php(682): TEC\Events\Custom_Tables\V1\Models\Model->validate()
#9 /user/public_html/wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/Models/Builder.php(718): TEC\Events\Custom_Tables\V1\Models\Builder->check_find_value_column()
#10 /user/public_html/wp-content/plugins/events-calendar-pro/src/Events_Pro/Custom_Tables/V1/Updates/Events.php(512): TEC\Events\Custom_Tables\V1\Models\Builder->find_all()
#11 /user/public_html/wp-content/plugins/events-calendar-pro/src/Events_Pro/Custom_Tables/V1/Updates/Controller.php(195): TEC\Events_Pro\Custom_Tables\V1\Updates\Events->delete_occurrence_transients()
#12 /user/public_html/wp-content/plugins/events-calendar-pro/src/Events_Pro/Custom_Tables/V1/Updates/Provider.php(302): TEC\Events_Pro\Custom_Tables\V1\Updates\Controller->delete_occurrence_transients()
#13 /user/public_html/wp-includes/class-wp-hook.php(310): TEC\Events_Pro\Custom_Tables\V1\Updates\Provider->delete_occurrence_transients()
#14 /user/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#15 /user/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#16 /user/public_html/wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/Updates/Controller.php(330): do_action()
#17 /user/public_html/wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/Updates/Provider.php(287): TEC\Events\Custom_Tables\V1\Updates\Controller->delete_custom_tables_data()
#18 /user/public_html/wp-includes/class-wp-hook.php(310): TEC\Events\Custom_Tables\V1\Updates\Provider->delete_custom_tables_data()
#19 /user/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#20 /user/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#21 /user/public_html/wp-includes/post.php(3459): do_action()
#22 /user/public_html/wp-includes/revision.php(466): wp_delete_post()
#23 /user/public_html/wp-includes/post.php(3430): wp_delete_post_revision()
#24 /user/public_html/wp-admin/post.php(325): wp_delete_post()
#25 {main}
  thrown in /user/public_html/wp-content/plugins/next-active-directory-integration/vendor-repackaged/monolog/monolog/src/Monolog/Logger.php on line 231

For the time being, I have added the following code at line 263 of Logger.php

if( 'Dreitier\Nadi\Vendor\Monolog\Handler\HandlerInterface' === gettype($handler) ) {
         $this->pushHandler($handler);
}
rbaugh commented 1 year ago

Forgot to mention some other details for this. NADI is now running on 3.0.2 TEC is running on 6.0.10 WP 6.1.1

schakko commented 1 year ago

@rbaugh Can you check out da6e204 and see if the issue persists?

rbaugh commented 1 year ago

@schakko, It seems to resolve the issue by reverting my changes and updating the stubs.php with the commit referenced.