Don't process file items for assets on external domains

Created on 5 November 2023, 8 months ago
Updated 20 January 2024, 5 months ago

Problem/Motivation

The logs can be chatty when there are external js/css files in the markup as they are processed.

For example:

When running drush quant:run-queue and looking in the logs, there are [file_item]: /gtag/js logs which corresponds to:

    <script async src="https://www.googletagmanager.com/gtag/js"></script>

Other examples:

<script src="https://static.addtoany.com/menu/page.js" async></script>

has these logs: [file_item]: /menu/page.js

<img src="https://betteruptime.com/status-badges/v1/monitor/7ysw.svg" />

has these logs: [file_item]: /status-badges/v1/monitor/7ysw.svg

<script src="https://embed.small.chat/T01C33THNQHG01BJ2U4TE2.js"></script>

has these logs: [file_item]: /T01C33THNQHG01BJ2U4TE2.js

Steps to reproduce

  • Install Drupal 9 or 10
  • Install and configure quant/quant_api modules
  • Add Google Tag Manager script to page in the head (or any script that is on an external domain)
  • Add some nodes
  • Run a seed
  • Look at the logs
  • Result: Logs like [file_item]: /gtag/js or similar
  • Expected: No logs like this

Proposed resolution

Debug and fix.

Remaining tasks

  • Debug
  • Update code
  • Review and test
  • Commit :)

User interface changes

No file_itemlogs related to external websites.

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024