Skip to content

[Issue] Replace {YYYY} in the copyright line by the current year #36776

@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #36754: Replace {YYYY} in the copyright line by the current year


Follow up for #5004

Description (*)

So many people spend time updating the copyright in their Magento installations every year. We want to save this time by introducing a simple solution - add a variable that will be automatically replaced with a current year.

Related Pull Requests

#5004

Manual testing scenarios (*)

  1. Set copyright string to Copyright 2013-{YYYY} in the design config
  2. Clear caches
  3. Check the frontend
  4. It displays (in this year) Copyright 2013-2023

Questions or comments

A note about caching: The currrent year is evaluated when the page is rendered. As pages might be in the full page cache, the year will not immediately update in midnight Jan 01st 0:00. Mitigating this would cause a lot of problems and complicate the solution. For example we might not want to clear the full page cache automatically as this will slow down the page.

When a page is invalidated by other reasons (for example a product update), the copyright year will update as well.
So in the end of the day, the copyright year is current when a page was recently changed which is just what a copyright year is supposed to be. If a page is not updated for a long time, it's believed to be okay to have an older copyright year.

We also added a note to hint users who want a consistent up-to-date copyright year to clear the full cache.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: UI FrameworkComponent: FrontendIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions