From 907534834c29d6022f9cd613f0243dcb46c1c38b Mon Sep 17 00:00:00 2001 From: rg755421 Date: Wed, 30 Sep 2026 09:09:58 +0545 Subject: [PATCH 1/2] Fix - Stop registering the IE-conditional html5shiv script that fires a deprecation notice (themegrill/radiate-pro#38) Co-Authored-By: Claude Sonnet 5.5 --- functions.php | 4 ++-- tests/e2e/specs/homepage/front-page-health.spec.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/functions.php b/functions.php index 1d8f4a8..8da9bf5 100644 --- a/functions.php +++ b/functions.php @@ -166,8 +166,8 @@ function radiate_scripts() { wp_enqueue_script( 'comment-reply' ); } - wp_enqueue_script( 'html5shiv', get_template_directory_uri() . '/js/html5shiv.js', array(), '3.7.3', false ); - wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' ); + // Empty handle kept so scripts that list 'html5shiv' as a dependency still load. + wp_register_script( 'html5shiv', false, array(), wp_get_theme()->get( 'Version' ), false ); } diff --git a/tests/e2e/specs/homepage/front-page-health.spec.ts b/tests/e2e/specs/homepage/front-page-health.spec.ts index 929dae9..e50938d 100644 --- a/tests/e2e/specs/homepage/front-page-health.spec.ts +++ b/tests/e2e/specs/homepage/front-page-health.spec.ts @@ -50,12 +50,12 @@ test("skip link is the first Tab stop and targets the content region @fresh @hom await expect(page.locator("#content")).toHaveCount(1); }); -// Quarantined: not fixed yet and no issue filed. Drop `.fixme` in the PR that fixes it. /** * @area homepage * @tier fresh + * @guards radiate-pro#38 * @source human 2026-09-24 - * @why functions.php:170 registers html5shiv with + * @why functions.php registered html5shiv with * wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' ), which * WordPress 6.9+ deprecates, so every front-end page prints a * "Deprecated: WP_Dependencies->add_data()" notice when WP_DEBUG_DISPLAY @@ -63,7 +63,7 @@ test("skip link is the first Tab stop and targets the content region @fresh @hom * debug display is enabled; on a site with it off this passes regardless. * Asserts no PHP notice markup in the body, not the absence of html5shiv. */ -test.fixme("front page prints no PHP notices or deprecations @fresh @homepage", async ({ +test("front page prints no PHP notices or deprecations @fresh @homepage", async ({ page, }) => { await page.goto("/"); From ecb57f016c4ae295ddb64ddbbdee562fbc2bbdcf Mon Sep 17 00:00:00 2001 From: rg755421 Date: Wed, 30 Sep 2026 09:17:45 +0545 Subject: [PATCH 2/2] Fix - Check the whole response for PHP notices and qualify the issue reference (themegrill/radiate-pro#38) Co-Authored-By: Claude Sonnet 5.5 --- tests/e2e/specs/homepage/front-page-health.spec.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/e2e/specs/homepage/front-page-health.spec.ts b/tests/e2e/specs/homepage/front-page-health.spec.ts index e50938d..9e7a5a3 100644 --- a/tests/e2e/specs/homepage/front-page-health.spec.ts +++ b/tests/e2e/specs/homepage/front-page-health.spec.ts @@ -53,7 +53,7 @@ test("skip link is the first Tab stop and targets the content region @fresh @hom /** * @area homepage * @tier fresh - * @guards radiate-pro#38 + * @guards themegrill/radiate-pro#38 * @source human 2026-09-24 * @why functions.php registered html5shiv with * wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' ), which @@ -61,13 +61,17 @@ test("skip link is the first Tab stop and targets the content region @fresh @hom * "Deprecated: WP_Dependencies->add_data()" notice when WP_DEBUG_DISPLAY * is on (confirmed on test-theme.local, WP 7.1). Only observable where * debug display is enabled; on a site with it off this passes regardless. - * Asserts no PHP notice markup in the body, not the absence of html5shiv. + * Asserts no PHP notice markup anywhere in the response (it is printed + * inside ), not the absence of html5shiv. */ test("front page prints no PHP notices or deprecations @fresh @homepage", async ({ page, }) => { - await page.goto("/"); - await expect(page.locator("body")).not.toContainText( - /(Deprecated|Notice|Warning|Fatal error):\s/, + // Read the raw response: PHP prints the notice while wp_head() runs, before + // , so a body locator would miss it. + const response = await page.goto("/"); + const html = await response!.text(); + expect(html).not.toMatch( + /(?:^|>|\s)(?:)?(?:Deprecated|Notice|Warning|Fatal error)(?:<\/b>)?:\s/, ); });