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: Missing Template Error: Update ecoscore_details.tt.html to environmental_score_details.tt.html #11505

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JagjeevanAK
Copy link

@JagjeevanAK JagjeevanAK commented Mar 1, 2025

What

This PR updates references to ecoscore_details.tt.html, which was renamed as part of an earlier commit (#11142), to the new file name environmental_score_details.tt.html.

Issue Fixed

The website was displaying an error on this page: https://world.openfoodfacts.org/cgi/product_image.pl?code=8033028910213&id=front_en

file error - web/pages/product/includes/environmental_score_details.tt.html: not found

This happened because:

  • The ecoscore_details.tt.html template was renamed to environmental_score_details.tt.html as part of the Eco-Score transition.
  • Some parts of the code (Perl controllers, config files, or dynamic includes) were still trying to reference the old filename.

** Changes Made**

  • Updated all occurrences of ecoscore_details.tt.html to environmental_score_details.tt.html in:
    • Template files (.tt.html)
  • Also checked below file for occurrences of ecoscore_details.tt.html but there was no such thing present,.
    • Perl controllers (.pm)
    • Configurations (.conf, .json, .yml, etc.)
  • Verified that the [% INCLUDE ... %] statements correctly reference the new template.
  • Restarted the web server locally to confirm the fix.

Feature required changes

  • If any frontend dependencies reference ecoscore_details.tt.html, they may need updates as well.
  • This PR does not rename database fields or API endpoints—only the template reference.

This should be good for submission! Let me know if you need refinements. 🚀

``

Screenshot

Original

Screenshot 2025-03-01 at 11 59 14 AM

Updated change

Screenshot 2025-03-01 at 12 02 20 PM

Related issue(s) and discussion

#11142: Rename Eco-Score fields to Environmental Score

I above issue there was about renaming of ecoscore to environmental_score by stephanegigandet but file names in templates was not made.

If there is an issue in my Pull request then I am open to make necessary changes to it.

@JagjeevanAK JagjeevanAK requested a review from a team as a code owner March 1, 2025 06:41
@github-actions github-actions bot added the Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. label Mar 1, 2025
Copy link

sonarqubecloud bot commented Mar 1, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
32.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@JagjeevanAK JagjeevanAK changed the title #11277 issue: Fix Missing Template Error: Update ecoscore_details.tt.html to environmental_score_details.tt.html fix: Fix Missing Template Error: Update ecoscore_details.tt.html to environmental_score_details.tt.html #11277 Mar 1, 2025
@JagjeevanAK JagjeevanAK changed the title fix: Fix Missing Template Error: Update ecoscore_details.tt.html to environmental_score_details.tt.html #11277 fix: Fix Missing Template Error: Update ecoscore_details.tt.html to environmental_score_details.tt.html Mar 1, 2025
@JagjeevanAK JagjeevanAK changed the title fix: Fix Missing Template Error: Update ecoscore_details.tt.html to environmental_score_details.tt.html fix: Missing Template Error: Update ecoscore_details.tt.html to environmental_score_details.tt.html Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: environmental_score_details.tt.html: not found
1 participant