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 google tag rendering #3978

Merged
merged 3 commits into from
Mar 13, 2024
Merged

fix google tag rendering #3978

merged 3 commits into from
Mar 13, 2024

Conversation

poyuki
Copy link
Contributor

@poyuki poyuki commented Mar 12, 2024

TR-6036

Summary

This PR aim to address issue with rendering of GA tag in some environments

Development impact

  • fixed usage of deprecated sort tag <? ?> (which at least on uat.eu.premium.lab.taocloud.org converted into html comment)
  • used $_ENV instead of getenv (usage of which discouraged by dotenv lib documentation )

Copy link

github-actions bot commented Mar 12, 2024

Front-end summary Node 18

💯 Total ✅ Passed ⏭️ Skipped ❌ Failed
161 161 0 0

Copy link
Contributor

@kilatib kilatib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now

Comment on lines 596 to 597
$gaTag = $_ENV['GA_TAG'];
$environment = $_ENV['NODE_ENV'] === 'production' ? 'Production' : 'Internal';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to check if the keys are set in $_ENV now before accessing them to avoid undefined-key warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually $_ENV['GA_TAG'] will be null if it not define as far as I can see

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But it will also raise a PHP warning :)

views/templates/layout.tpl Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.31%. Comparing base (4405ac4) to head (8b17b52).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3978   +/-   ##
==========================================
  Coverage      27.31%   27.31%           
  Complexity     11021    11021           
==========================================
  Files            927      927           
  Lines          33965    33965           
==========================================
  Hits            9276     9276           
  Misses         24689    24689           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Version

Target Version 54.6.1
Last version 54.6.0

There are 0 BREAKING CHANGE, 0 feature, 1 fix

@poyuki poyuki requested a review from wazelin March 13, 2024 11:04
Copy link
Member

@wazelin wazelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, @poyuki!

Let's merge and port to the March release:

  1. On top of https://github.com/oat-sa/tao-core/releases/tag/v54.2.2
  2. Then as part of TAO Community
  3. Then include TAO Community to https://github.com/oat-sa/taocloud-ami-luoss/blob/release-2024.03.2/composer.json#L103

Oh, and after that, April release will have to be updated too of course. I guess we can just set the latest tao-core version there.

@poyuki poyuki merged commit 25747b1 into develop Mar 13, 2024
6 of 7 checks passed
@poyuki poyuki deleted the fix/TR-6036/google-tags-rendering branch March 13, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants