eventespresso / eea-attendee-mover

Addon for EE4+
GNU General Public License v2.0
0 stars 2 forks source link

Decaf Fixes - Fatal error: Uncaught TypeError: Argument 6 passed to SequentialStepFormManager::__construct() must implement interface EventEspresso\core\services\request\RequestInterface or be null, instance of EE_Request given #16

Closed Pebblo closed 2 years ago

Pebblo commented 3 years ago

Trying to use the attendee mover add-on with EE4 core master and I get this error:

( ! ) Fatal error: Uncaught TypeError: 
Argument 6 passed to EventEspresso\core\libraries\form_sections\form_handlers\SequentialStepFormManager::__construct() 
must implement interface EventEspresso\core\services\request\RequestInterface or be null, 
instance of EE_Request given, 
called in 
\eea-attendee-mover\form\StepsManager.php on line 56 
and defined in 
\event-espresso-core-reg\core\libraries\form_sections\form_handlers\SequentialStepFormManager.php on line 103
--

1 | 0.0007 | 468496 | {main}( ) | ...\admin.php:0
2 | 0.8973 | 55994944 | do_action( ) | ...\admin.php:237
3 | 0.8973 | 55995320 | WP_Hook->do_action( ) | ...\plugin.php:470
4 | 0.8973 | 55995320 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:327
5 | 0.8973 | 55996336 | Extend_Registrations_Admin_Page->load_page_dependencies( ) | ...\class-wp-hook.php:303
6 | 0.8973 | 55996336 | Extend_Registrations_Admin_Page->_load_page_dependencies( ) | ...\EE_Admin_Page_CPT.core.php:323
7 | 0.8973 | 55996336 | Extend_Registrations_Admin_Page->_load_page_dependencies( ) | ...\EE_Admin_Page_CPT.core.php:339
8 | 0.8976 | 56013288 | do_action( ) | ...\EE_Admin_Page.core.php:767
9 | 0.8976 | 56013664 | WP_Hook->do_action( ) | ...\plugin.php:470
10 | 0.8976 | 56013664 | WP_Hook->apply_filters( ) | ...\class-wp-hook.php:327
11 | 0.8977 | 56014680 | EED_Attendee_Mover::edit_attendee_selections_init( ) | ...\class-wp-hook.php:303
12 | 0.8977 | 56014856 | EED_Attendee_Mover->_edit_attendee_selections_init( ) | ...\EED_Attendee_Mover.module.php:422
13 | 0.8977 | 56014856 | EED_Attendee_Mover->get_form_steps_manager( ) | ...\EED_Attendee_Mover.module.php:435
14 | 0.8989 | 56015480 | EventEspresso\core\services\loaders\Loader->getShared( ) | ...\EED_Attendee_Mover.module.php:409
15 | 0.8989 | 56015480 | EventEspresso\core\services\loaders\Loader->load( ) | ...\Loader.php:105
16 | 0.9003 | 56091704 | EventEspresso\core\services\loaders\CachingLoader->load( ) | ...\Loader.php:82
17 | 0.9006 | 56091816 | EventEspresso\core\services\loaders\CoreLoader->load( ) | ...\CachingLoader.php:158
18 | 0.9006 | 56092192 | EE_Registry->create( ) | ...\CoreLoader.php:116
19 | 0.9010 | 56092272 | EE_Registry->_create_object( ) | ...\EE_Registry.core.php:784
20 | 0.9022 | 56167160 | newInstanceArgs ( ) | ...\EE_Registry.core.php:1275
21 | 0.9022 | 56167576 | EventEspresso\AttendeeMover\form\StepsManager->__construct( ) | ...\EE_Registry.core.php:1275
22 | 0.9022 | 56167576 | EventEspresso\AttendeeMover\form\StepsManager->__construct( ) | ...\StepsManager.php:56

Bug report or feature request?

Environment Data:

Version of EE core: Master

Version of this addon: Master

Steps to Reproduce (for bugs)

Just attempt to use the attendee mover add-on to move a registration.

In Event Espresso -> Registrations, click the icon on any registration: https://eventespresso.com/wiki/eea-attendee-mover/

The fatal should be thrown as soon as you click the icon.

harshadeventespresso commented 3 years ago

Gives Fatal error when moving attendees to another event in master

Fatal error: Uncaught TypeError: Argument 6 passed to EventEspresso\core\libraries\form_sections\form_handlers\SequentialStepFormManager::__construct() must implement interface EventEspresso\core\services\request\RequestInterface or be null, instance of EE_Request given, called in /Applications/MAMP/htdocs/ee/wp-content/plugins/eea-attendee-mover/form/StepsManager.php on line 51 and defined in /Applications/MAMP/htdocs/ee/wp-content/plugins/event-espresso-core-reg/core/libraries/form_sections/form_handlers/SequentialStepFormManager.php:103 Stack trace: #0 /Applications/MAMP/htdocs/ee/wp-content/plugins/eea-attendee-mover/form/StepsManager.php(51): EventEspresso\core\libraries\form_sections\form_handlers\SequentialStepFormManager->construct('http://localhos...', 'select_event', '', 'add_form_tags_a...', 'number_bubbles', Object(EE_Request)) #1 [internal function]: EventEspresso\AttendeeMover\form\StepsManager->construct('http://localhos...', 'select_event', '', 'add_form_tags_a...', 'number_bubbles', Object(EE_Request) in /Applications/MAMP/htdocs/ee/wp-content/plugins/event-espresso-core-reg/core/libraries/form_sections/form_handlers/SequentialStepFormManager.php on line 103

There has been a critical error on this website. Please check your site admin email inbox for instructions.

harshadeventespresso commented 3 years ago

Fixed in #3572 https://prnt.sc/1x313ct

Pebblo commented 3 years ago

@harshadeventespresso

When reporting your findings, please provide more in-depth details of what you have tested. Right now that's almost the exact same error as the one I included in the original post (with the exception of line numbers) so we have no idea where to even start looking other than what has already been done.

For example, what branch are you on within the attendee mover add-on when you get that error? You're line numbers don't match mine so I assume you are not on master but with no details above we can only guess.

What branch are you on for EE4 core?

We'd also ask what steps you have taken during the test to get to the point of the error, in this example it's obvious as the step is literally to click the icon but with other tickets, there may be many more steps to work through a test so adding more details helps.

In short, add a lot more context than just the error, an error on its own doesn't always show what the problem is. The 1 or 2 sentences that go with the error showing what has been done helps every else troubleshoot this.

Also, you've posted this is fixed, but what is fixed specifically? There are 2 different fixes linked to this thread and right now it looks like only one has been tested (the fix in core).

harshadeventespresso commented 3 years ago

With EE4 core master when using attendee mover add-on we get Fatal error as stated.

When tested with https://github.com/eventespresso/event-espresso-core/pull/3572 its fixed no more Fatal error

Pebblo commented 3 years ago

Spoke about this in slack a little to get some context, so I'll give an example of how providing more info here helps.

This is a better example of the above, its almost the same info but with much more context:


Tested using master branch on both EE4 core and Attendee mover add-on.

Confirmed the issue by clicking the attendee mover add-on icon which then threw this error:

Fatal error: Uncaught TypeError: Argument 6 passed to EventEspresso\core\libraries\form_sections\form_handlers\SequentialStepFormManager::__construct() must implement interface EventEspresso\core\services\request\RequestInterface or be null, instance of EE_Request given, called in /Applications/MAMP/htdocs/ee/wp-content/plugins/eea-attendee-mover/form/StepsManager.php on line 51 and defined in /Applications/MAMP/htdocs/ee/wp-content/plugins/event-espresso-core-reg/core/libraries/form_sections/form_handlers/SequentialStepFormManager.php:103 Stack trace: #0 /Applications/MAMP/htdocs/ee/wp-content/plugins/eea-attendee-mover/form/StepsManager.php(51): EventEspresso\core\libraries\form_sections\form_handlers\SequentialStepFormManager->__construct('http://localhos...', 'select_event', '', 'add_form_tags_a...', 'number_bubbles', Object(EE_Request)) #1 [internal function]: EventEspresso\AttendeeMover\form\StepsManager->__construct('http://localhos...', 'select_event', '', 'add_form_tags_a...', 'number_bubbles', Object(EE_Request) in /Applications/MAMP/htdocs/ee/wp-content/plugins/event-espresso-core-reg/core/libraries/form_sections/form_handlers/SequentialStepFormManager.php on line 103

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Switched EE4 core to use ease-off-request-interface branch as per #3572

Tested moving an attendee, no error: https://prnt.sc/1x313ct


The reason this is better is we know what has been tested and how and can then double-check if anything was missed before it is merged in core without having to ask for more details if unsure.

Right now it looks like #17 has not been tested against the current version and/or master of EE4 Core (there's a change to what the add-on does, those need to be tested against what users are currently using and 'master' (what they soon will be using)).