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

Fixes #6972 Prevent injecting Beacon script when DONOTROCKETOPTIMIZE is defined #7022

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

remyperona
Copy link
Contributor

Description

Fixes #6972

Prevent injecting Beacon script when DONOTROCKETOPTIMIZE is defined

Type of change

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

Detailed scenario

Steps are available in the issue #6972

Technical description

Documentation

Check for DONOTROCKETOPTIMIZE before injecting beacon

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.

@remyperona remyperona added type: bug Indicates an unexpected problem or unintended behavior module: OCI Optimize Critical Images module: ALR Issues related to the Automatic Lazy Rendering feature labels Oct 8, 2024
@remyperona remyperona added this to the 3.17.2 milestone Oct 8, 2024
@remyperona remyperona requested a review from a team October 8, 2024 19:06
@remyperona remyperona self-assigned this Oct 8, 2024
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for d99bce01 100.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d99bce0) Report Missing Report Missing Report Missing
Head commit (b70336f) 37746 16587 43.94%

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 (#7022) 2 2 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

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@Mai-Saad
Copy link
Contributor

@Tabrisrp Thanks for the PR. Currently, beacon script won't be injected with define( 'DONOTROCKETOPTIMIZE', true ); but hashes are added. can you please check 🙏

@remyperona
Copy link
Contributor Author

The hashes are not mentioned in the issue, if we need to also prevent them, we can do a new issue and PR.

@Mai-Saad Mai-Saad added this pull request to the merge queue Oct 15, 2024
Merged via the queue into develop with commit 7f4f533 Oct 15, 2024
17 checks passed
@Mai-Saad Mai-Saad deleted the fix/6972-donotrocketoptimize branch October 15, 2024 13:54
wordpressfan added a commit that referenced this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: ALR Issues related to the Automatic Lazy Rendering feature module: OCI Optimize Critical Images type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wpr-beacon.min.js is added even if DONOTROCKETOPTIMIZE is set to true
3 participants