From 7e4f113e248eaabe023589eea945d015ddf16e10 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Tue, 19 Nov 2024 14:33:44 +0530 Subject: [PATCH 1/6] fix: load textdomain issue with WP 6.7 --- inc/admin/dashboard/main.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/admin/dashboard/main.php b/inc/admin/dashboard/main.php index 1f06563171..ccd65b8f8f 100755 --- a/inc/admin/dashboard/main.php +++ b/inc/admin/dashboard/main.php @@ -81,7 +81,6 @@ public function __construct() { */ public function init() { - $this->setup_config(); add_action( 'init', [ $this, 'setup_config' ] ); add_action( 'admin_menu', [ $this, 'register' ] ); add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] ); From bbe4997de9c67016878b4ae132bc0e9cbb750af2 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Tue, 19 Nov 2024 15:18:14 +0530 Subject: [PATCH 2/6] fix: e2e error with global colors --- .../specs/customizer/general/custom-global-colors.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts index 6a71257c4a..6eaa6832d7 100644 --- a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts +++ b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts @@ -33,6 +33,9 @@ test.describe('Custom Global Color Control', () => { ); await clearWelcome(page); + await page.waitForTimeout( 200 ); + await page.locator( '.block-editor-default-block-appender__content' ).click(); + await page.locator('.block-editor-rich-text__editable').first().click(); // use Background color control to open the color picker, available since WP 6.1 await page.getByRole('button', { name: 'Background' }).click(); From 2a922b7618e1ff4c149bfd86bb925c913378119f Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Tue, 19 Nov 2024 16:35:06 +0530 Subject: [PATCH 3/6] fix: e2e issue with wp 6.7 --- .../customizer/general/custom-global-colors.spec.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts index 6eaa6832d7..755f74b20a 100644 --- a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts +++ b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts @@ -33,10 +33,12 @@ test.describe('Custom Global Color Control', () => { ); await clearWelcome(page); - await page.waitForTimeout( 200 ); - await page.locator( '.block-editor-default-block-appender__content' ).click(); - - await page.locator('.block-editor-rich-text__editable').first().click(); + const iframeElement = await page.waitForSelector('iframe'); + const frame = await iframeElement.contentFrame(); + if (frame) { + await frame.waitForSelector('.block-editor-rich-text__editable'); + await frame.locator('.block-editor-rich-text__editable').first().click(); + } // use Background color control to open the color picker, available since WP 6.1 await page.getByRole('button', { name: 'Background' }).click(); await page.getByRole('option', { name: 'Color: Custom 1' }).click(); From e3b750cea76ac24dfbee9a55740a743af0c1ea0d Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Tue, 19 Nov 2024 18:48:43 +0530 Subject: [PATCH 4/6] fix: e2e issue nav menu item --- .../hfg/hfg-menu-item-description.spec.ts | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts b/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts index afbf8c701c..ae9514f310 100644 --- a/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts +++ b/e2e-tests/specs/customizer/hfg/hfg-menu-item-description.spec.ts @@ -28,11 +28,12 @@ test.describe('Menu item description', function () { await page.getByRole('button', { name: 'Add New Category' }).click(); await page.goto('wp-admin/nav-menus.php'); - await page - .getByRole('heading', { - name: 'Categories Press return or enter to open this section ', - }) - .click(); + await page.waitForSelector('.menu-name'); + await page.locator('.menu-name').fill('My New Menu'); + await page.getByLabel('Primary Menu').check(); + await page.locator('#save_menu_footer ').click(); + + await page.locator('#add-category h3').click(); await page .locator('#taxonomy-category-tabs') .getByRole('link', { name: 'View All' }) @@ -51,6 +52,25 @@ test.describe('Menu item description', function () { await page.keyboard.press('End'); await page.waitForTimeout(500); + await page.locator('#add-post-type-page h3').click(); + await page + .locator('#posttype-page-tabs') + .getByRole('link', { name: 'View All' }) + .click(); + await page.getByLabel('Sample Page').last().check(); + + await Promise.all([ + page.waitForResponse( + (res) => + res.url().includes('wp-admin/admin-ajax.php') && + res.status() === 200 + ), + page.getByRole('button', { name: 'Add to Menu' }).click(), + ]); + + await page.keyboard.press('End'); + await page.waitForTimeout(500); + await expect( page.locator('#menu-to-edit li.menu-item:last-child a.item-edit') ).toBeVisible(); From c45b26fc679314bfc2bbdc90962545e1545ff744 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 21 Nov 2024 14:26:42 +0530 Subject: [PATCH 5/6] fix: resolved issue with neve-pro-addons --- inc/admin/dashboard/main.php | 1 + start.php | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/inc/admin/dashboard/main.php b/inc/admin/dashboard/main.php index ccd65b8f8f..1f06563171 100755 --- a/inc/admin/dashboard/main.php +++ b/inc/admin/dashboard/main.php @@ -81,6 +81,7 @@ public function __construct() { */ public function init() { + $this->setup_config(); add_action( 'init', [ $this, 'setup_config' ] ); add_action( 'admin_menu', [ $this, 'register' ] ); add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] ); diff --git a/start.php b/start.php index 00f352ddf1..1e2e26eb27 100644 --- a/start.php +++ b/start.php @@ -53,7 +53,14 @@ function neve_run() { } $autoloader->register(); +} + +neve_run(); +/** + * Load core modules. + */ +function neve_core_loader() { if ( class_exists( '\\Neve\\Core\\Core_Loader' ) ) { new \Neve\Core\Core_Loader(); } @@ -71,5 +78,4 @@ function neve_run() { \Neve_Pro\Core\Loader::instance(); } } - -neve_run(); +add_action( 'after_setup_theme', 'neve_core_loader' ); From 3d5670c7a126fa187e18041843a49aee221b3ff7 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 21 Nov 2024 14:50:21 +0530 Subject: [PATCH 6/6] fix: remove other after_setup_theme hook --- inc/compatibility/web_stories.php | 2 +- inc/core/core_loader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/compatibility/web_stories.php b/inc/compatibility/web_stories.php index 430c67c42d..e287645e5f 100644 --- a/inc/compatibility/web_stories.php +++ b/inc/compatibility/web_stories.php @@ -37,7 +37,7 @@ private function should_load() { * Load hooks. */ private function load_hooks() { - add_action( 'after_setup_theme', array( $this, 'setup' ) ); + add_action( 'init', array( $this, 'setup' ) ); add_action( 'wp_body_open', array( $this, 'embed' ) ); } diff --git a/inc/core/core_loader.php b/inc/core/core_loader.php index 6db32b3578..b35be758dc 100644 --- a/inc/core/core_loader.php +++ b/inc/core/core_loader.php @@ -174,7 +174,7 @@ function () { ); $front_end = new Front_End(); add_action( 'wp_enqueue_scripts', array( $front_end, 'enqueue_scripts' ) ); - add_action( 'after_setup_theme', array( $front_end, 'setup_theme' ) ); + add_action( 'init', array( $front_end, 'setup_theme' ) ); add_action( 'widgets_init', array( $front_end, 'register_sidebars' ) ); add_filter( 'load_script_translation_file', array( $front_end, 'fix_script_translation_files' ), 10, 3 ); }