Problem/Motivation

When updating matomo but not drupal/core, the JavaScript cache-busting parameter remains the same (e.g. ?v=10.4.8). When updating drupal/core but not matomo, the JavaScript cache-busting parameter changes.
LibraryDiscoveryParser applies the Drupal version to every library that uses version: VERSION. It does not use the modules version.
If the version is omitted, the content of referenced CSS/JS files is utilized in the hash.

Steps to reproduce

First case

  • Use matomo 1.24, use drupal/core 10.4.8
  • Disable JS preprocessing
    $config['system.performance']['js']['preprocess'] = FALSE;
  • Look at sites source code and see
    <script src="/modules/contrib/matomo/js/matomo.js?v=10.4.8"></script>
  • Update matomo to 1.25
  • Look at sites source code and see
    <script src="/modules/contrib/matomo/js/matomo.js?v=10.4.8"></script>

Second case

  • Use matomo 1.25, use drupal/core 10.4.7
  • Disable JS preprocessing
    $config['system.performance']['js']['preprocess'] = FALSE;
  • Look at sites source code and see
    <script src="/modules/contrib/matomo/js/matomo.js?v=10.4.7"></script>
  • Update drupal/core to 10.4.8
  • Look at sites source code and see
    <script src="/modules/contrib/matomo/js/matomo.js?v=10.4.8"></script>

Proposed resolution

Remove version: VERSION from matomo.libraries.yml

Issue fork matomo-3537836

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hosterholz created an issue. See original summary.

hosterholz’s picture

Issue summary: View changes
hosterholz’s picture

Status: Active » Needs review
grimreaper’s picture

Assigned: Unassigned » grimreaper

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.