Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7265 fatal error with 3.18.1.2 #7267

Merged
merged 6 commits into from
Jan 31, 2025
Merged

Fix #7265 fatal error with 3.18.1.2 #7267

merged 6 commits into from
Jan 31, 2025

Conversation

Khadreal
Copy link
Contributor

@Khadreal Khadreal commented Jan 31, 2025

Description

Fixed fatal error with 3.18.2

Fixes #7265

Type of change

  • Bug fix (non-breaking change which fixes an issue).

Detailed scenario

Create a template that doesn't have a closing </body> tag

Technical description

Check if the closing body tag is present and if not, add the script to the html

Documentation

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

@Khadreal Khadreal changed the title Fix #7265 Fix #7265 fatal error with 3.18.1.2 Jan 31, 2025
Copy link

codacy-production bot commented Jan 31, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -0.10%) 100.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (910100e) 38785 17155 44.23%
Head commit (3000c7f) 38787 (+2) 17157 (+2) 44.23% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#7267) 3 3 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@Khadreal Khadreal self-assigned this Jan 31, 2025
@Khadreal Khadreal added the type: bug Indicates an unexpected problem or unintended behavior label Jan 31, 2025
@Khadreal Khadreal requested a review from a team January 31, 2025 10:01
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Jan 31, 2025

@Khadreal Thanks for the pr, working fine now.
on PR
(no fatal error)
page with double body => script injected, lrc applied to 1st body, lcp applied
page with no body at all => script injected, lcp applied, lrc not applied "no hashes added"
page with no body closure => no script injected
normal page => beacon injected , lrc/lcp applied
testrail-report-692.pdf
on 3.18.1.1
(fatal is there)
page with double body => script injected once, hashes added to 1st body, lcp/lrc applied
page with no body at all => no script injected
page with no body closure => no script injected
normal page => script injected , lrc applied, lcp no applied (for 2021 but lcp is there on 2020)

updated note on PR (no fatal)
with space in body and html tag => beacon isnot injected
space in body => beacon injected after html
Body => beacon injected after html

on 3.18=> beacon wasn't injected in these cases, for Body hashes added while no beacon

@Khadreal Khadreal added this pull request to the merge queue Jan 31, 2025
Merged via the queue into develop with commit 1218936 Jan 31, 2025
14 checks passed
@Khadreal Khadreal deleted the fix/7265-fatal-error branch January 31, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fatal error with 3.18.1.2
3 participants