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

ALR hashes are added to source when DONOTROCKETOPTIMIZE is set to true #7029

Open
Mai-Saad opened this issue Oct 11, 2024 · 2 comments · May be fixed by #7238
Open

ALR hashes are added to source when DONOTROCKETOPTIMIZE is set to true #7029

Mai-Saad opened this issue Oct 11, 2024 · 2 comments · May be fixed by #7238
Assignees
Labels
effort: [XS] < 1 day of estimated development time module: ALR Issues related to the Automatic Lazy Rendering feature module: OCI Optimize Critical Images priority: low Issues that can wait quick win severity: moderate Feature isn't working as expected but has work around to get same value type: bug Indicates an unexpected problem or unintended behavior

Comments

@Mai-Saad
Copy link
Contributor

Mai-Saad commented Oct 11, 2024

Describe the bug
When DONOTROCKETOPTIMIZE is set to true , hashes are added to the page

To Reproduce
Steps to reproduce the behavior:

  1. add define('DONOTROCKETOPTIMIZE', true);
  2. Visit a page in incognito
  3. See the hashes are added

Expected behavior

  • Hashes aren't added if DONOTROCKETOPTIMIZE is set to true
  • No warmup for lrc/lcp
  • beacon still not injected

Additional context
Add any other context about the problem here.

@Mai-Saad Mai-Saad added module: OCI Optimize Critical Images priority: low Issues that can wait severity: moderate Feature isn't working as expected but has work around to get same value type: bug Indicates an unexpected problem or unintended behavior labels Oct 11, 2024
@piotrbak piotrbak changed the title LRC hashes are added to source when DONOTROCKETOPTIMIZE is set to true ALR hashes are added to source when DONOTROCKETOPTIMIZE is set to true Oct 16, 2024
@piotrbak piotrbak added quick win module: ALR Issues related to the Automatic Lazy Rendering feature labels Oct 16, 2024
@Khadreal Khadreal added the effort: [XS] < 1 day of estimated development time label Jan 22, 2025
@Khadreal
Copy link
Contributor

Scope a solution

To solve the issue, we need to add DONOTROCKETOPTIMIZE logic to `add_hashes. In this file we can modify this logic to be this

if ( empty( $html ) || rocket_get_constant( 'DONOTROCKETOPTIMIZE' ) ) {
//return early
}

Effort estimation:

XS

Khadreal added a commit that referenced this issue Jan 23, 2025
@Khadreal
Copy link
Contributor

Created a PR here

@Khadreal Khadreal self-assigned this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: [XS] < 1 day of estimated development time module: ALR Issues related to the Automatic Lazy Rendering feature module: OCI Optimize Critical Images priority: low Issues that can wait quick win severity: moderate Feature isn't working as expected but has work around to get same value type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants