From 9bf05c169da5cbb1e22d4471f79138d853ee0aa3 Mon Sep 17 00:00:00 2001 From: Jariel Rodriguez Date: Wed, 15 Apr 2026 14:00:25 -0400 Subject: [PATCH 1/2] Create DP-46271.yml --- changelogs/DP-46271.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/DP-46271.yml diff --git a/changelogs/DP-46271.yml b/changelogs/DP-46271.yml new file mode 100644 index 0000000000..93050cc5b8 --- /dev/null +++ b/changelogs/DP-46271.yml @@ -0,0 +1,3 @@ +Fixed: + - description: Fix press release city injection to use the first paragraph even when the first p tag has attributes like lang. + issue: DP-46271 From 1515dfc97cad2d61fd2bb2d99cf0f90d1f351e0e Mon Sep 17 00:00:00 2001 From: Jariel Rodriguez Date: Wed, 15 Apr 2026 14:00:28 -0400 Subject: [PATCH 2/2] Update mass_theme.theme --- docroot/themes/custom/mass_theme/mass_theme.theme | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docroot/themes/custom/mass_theme/mass_theme.theme b/docroot/themes/custom/mass_theme/mass_theme.theme index be2e019302..eb23a875cb 100644 --- a/docroot/themes/custom/mass_theme/mass_theme.theme +++ b/docroot/themes/custom/mass_theme/mass_theme.theme @@ -3497,11 +3497,8 @@ function mass_theme_preprocess_node_news_full(&$variables) { $location = Helper::fieldFullView($node, $field['location']); $location_string = \Drupal::service('renderer')->renderRoot($location); $location = '' . $location_string . ' — '; - $body_array = explode('

', $body_string); - if (count($body_array) > 1) { - $body_array[1] = $location . $body_array[1]; - } - $body_string = implode('

', $body_array); + // Prefix the first paragraph content, regardless of attributes like lang. + $body_string = preg_replace('/(<\s*p\b[^>]*>)/i', '$1' . $location, $body_string, 1); } if (Helper::fieldValue($node, $field['news_type']) == 'press_release') { $ap_conformity = TRUE;