Closed tn3rb closed 3 months ago
When I go to the Feature flag page I found some warning at the top:
Also, when I made some changes and saved the page I found this error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function EventEspresso\core\domain\services\capabilities\FeatureFlagsConfig::saveFeatureFlagsConfig(), 0 passed in C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\barista\lib\FeatureFlagsAdminPage.php on line 113 and exactly 1 expected in C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\domain\services\capabilities\FeatureFlagsConfig.php:88 Stack trace: #0 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\barista\lib\FeatureFlagsAdminPage.php(113): EventEspresso\core\domain\services\capabilities\FeatureFlagsConfig->saveFeatureFlagsConfig() #1 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page.core.php(1146): EventEspresso\Barista\FeatureFlagsAdminPage::processFeatureFlagsConfigForm(Object(Maintenance_Admin_Page)) #2 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page.core.php(876): EE_Admin_Page->_route_admin_request() #3 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page.core.php(686): EE_Admin_Page->route_admin_request() #4 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page.core.php(285): EE_Admin_Page->_page_setup() #5 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page_Init.core.php(472): EE_Admin_Page->initializePage() #6 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page_Init.core.php(315): EE_Admin_Page_Init->_initialize_admin_page() #7 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page_Loader.core.php(186): EE_Admin_Page_Init->do_initial_loads() #8 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin_Page_Loader.core.php(95): EE_Admin_Page_Loader->findAndLoadAdminPages() #9 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\admin\EE_Admin.core.php(198): EE_Admin_Page_Loader->init() #10 C:\Users\star\Local Sites\barista-test\app\public\wp-includes\class-wp-hook.php(324): EE_Admin->init('') #11 C:\Users\star\Local Sites\barista-test\app\public\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #12 C:\Users\star\Local Sites\barista-test\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #13 C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\EE_System.core.php(1183): do_action('AHEE__EE_System...') #14 C:\Users\star\Local Sites\barista-test\app\public\wp-includes\class-wp-hook.php(324): EE_System->initialize_last('') #15 C:\Users\star\Local Sites\barista-test\app\public\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #16 C:\Users\star\Local Sites\barista-test\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array) #17 C:\Users\star\Local Sites\barista-test\app\public\wp-settings.php(695): do_action('init') #18 C:\Users\star\Local Sites\barista-test\app\public\wp-config.php(103): require_once('C:\\Users\\star\\L...') #19 C:\Users\star\Local Sites\barista-test\app\public\wp-load.php(50): require_once('C:\\Users\\star\\L...') #20 C:\Users\star\Local Sites\barista-test\app\public\wp-admin\admin.php(34): require_once('C:\\Users\\star\\L...') #21 {main} thrown in C:\Users\star\Local Sites\barista-test\app\public\wp-content\plugins\event-espresso-core\core\domain\services\capabilities\FeatureFlagsConfig.php on line 88
@Saam01
sry this branch requires cafe branch NEW/CORE/easy-digital-downloads
pushed a fix for the warnings though
All good in my end.
@tn3rb Can see the feature flag page fine, but the function is not working properly.:
@Saam01 re:
@tn3rb Can see the feature flag page fine, but the function is not working properly.:
What do you mean by "the function is not working properly" ???
what's not working properly?
I've checked out this branch (which can now be used with Cafe DEV
branch) and saving options works fine. Is there something else you found that isn't working?
https://github.com/eventespresso/barista/assets/99984614/cad39543-05b2-4cfd-8b07-f66328712235
he he... this PR is JUST for testing the Feature Flags admin page
some of those features are still a work in progress which is why they are behind a feature flag
Discovered that the Feature Flags admin was not working properly because the Barista add-on was being initialized too late in the core loading process. This prevented the ability to manage feature flags properly.
This PR: