RTC PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
31 May 2024

Summary of Changes

The current Cassiopeia version has an inline onload event handler for the fontscheme.current css file. The inline event handler produces a warning in strict CSP mode and is redundant, as the lazy-loading functionality (that was the purpose of the handler) is handled in the template.js and trigger by the rel="lazy-stylesheet" attribute.

Testing Instructions

  • Configure the "roboto (local)" font as font in cassiopeia, verify that it's loaded by the browser using the browser dev tools.
  • Configure a strict ("script-src: 'self' 'unsafe-eval'") report-only script CSP using the Joomla HTTP Header plugin:
Bildschirmfoto 2024-06-01 um 14 20 13

Actual result BEFORE applying this Pull Request

  • CSS file loaded
  • Error message about forbidden unsafe-inline JS calls, caused by an "onload" handler of the mentioned CSS file in the browser console shown
Bildschirmfoto 2024-06-01 um 14 21 00

Expected result AFTER applying this Pull Request

  • CSS file loaded
  • Error message about unsafe-inline calls about the onload handler is gone

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • [x ] No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar SniperSister SniperSister - open - 31 May 2024
avatar SniperSister SniperSister - change - 31 May 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 May 2024
Category Front End Templates (site)
avatar brianteeman
brianteeman - comment - 31 May 2024

Please provide more test instructions and what is expected to be seen in the generated source

Maybe I am looking at this wrong but before this PR I see

<link href="/media/templates/site/cassiopeia/css/global/fonts-local_roboto.min.css?8eef51" rel="stylesheet" media="all" onload="this.media='all'">

With the PR applied I see

<link href="/media/templates/site/cassiopeia/css/global/fonts-local_roboto.min.css?447e02" rel="stylesheet" media="all" onload="this.media='all'">

avatar brianteeman
brianteeman - comment - 31 May 2024

Also does the same change need to be made in
templates\cassiopeia\component.php
templates\cassiopeia\error.php

avatar SniperSister SniperSister - change - 1 Jun 2024
Labels Added: PR-5.1-dev
avatar SniperSister
SniperSister - comment - 1 Jun 2024

Lesson learned: don't commit while listening to JDay presentations ;)

Sorry guys, now all required changes (removal of inline handler, removal of unused media attribute) have been performed in all relevant files and locations.

avatar brianteeman
brianteeman - comment - 1 Jun 2024

As stated before please provide more detailed test instructions. How can a tester replicate the error etc

avatar SniperSister SniperSister - change - 1 Jun 2024
The description was changed
avatar SniperSister SniperSister - edited - 1 Jun 2024
avatar SniperSister SniperSister - change - 1 Jun 2024
The description was changed
avatar SniperSister SniperSister - edited - 1 Jun 2024
avatar SniperSister SniperSister - change - 1 Jun 2024
The description was changed
avatar SniperSister SniperSister - edited - 1 Jun 2024
avatar SniperSister SniperSister - change - 1 Jun 2024
The description was changed
avatar SniperSister SniperSister - edited - 1 Jun 2024
avatar SniperSister SniperSister - change - 1 Jun 2024
The description was changed
avatar SniperSister SniperSister - edited - 1 Jun 2024
avatar SniperSister
SniperSister - comment - 1 Jun 2024

As stated before please provide more detailed test instructions. How can a tester replicate the error etc

Done!

avatar brianteeman brianteeman - test_item - 1 Jun 2024 - Tested successfully
avatar brianteeman
brianteeman - comment - 1 Jun 2024

I have tested this item ✅ successfully on f3bbd2d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43586.

avatar richard67
richard67 - comment - 2 Jun 2024

@SniperSister Shouldn't it be fixed in 4.4-dev, too (or only there and later be merged up to 5.1-dev)? If it's a bug fix we should to it also in 4.4-dev, and if it's a new feature (what I don't think) it should to into 5.2-dev.

avatar dautrich dautrich - test_item - 2 Jun 2024 - Tested successfully
avatar dautrich
dautrich - comment - 2 Jun 2024

I have tested this item ✅ successfully on f3bbd2d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43586.

avatar richard67 richard67 - change - 2 Jun 2024
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 2 Jun 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43586.

avatar SniperSister SniperSister - change - 3 Jun 2024
Labels Added: RTC
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jun 2024
Category Front End Templates (site) Administration Language & Strings Installation Libraries NPM Change Front End Templates (site) Unit Tests Repository JavaScript
avatar SniperSister
SniperSister - comment - 3 Jun 2024

Shouldn't it be fixed in 4.4-dev, too (or only there and later be merged up to 5.1-dev)?

@richard67 fair comment. I have rebased the PR as suggested!

avatar SniperSister SniperSister - change - 3 Jun 2024
Title
[5.1] Remove unused cassiopeia inline event handler
[4.4] Remove unused cassiopeia inline event handler
avatar SniperSister SniperSister - edited - 3 Jun 2024
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jun 2024
Category Front End Templates (site) Administration Language & Strings Installation Libraries NPM Change Unit Tests Repository JavaScript Front End Templates (site)
avatar MacJoom MacJoom - change - 14 Jun 2024
Labels Added: Language Change PR-4.4-dev
Removed: PR-5.1-dev
avatar MacJoom MacJoom - change - 14 Jun 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-06-14 17:52:49
Closed_By MacJoom
Labels Removed: Language Change
avatar MacJoom MacJoom - close - 14 Jun 2024
avatar MacJoom MacJoom - merge - 14 Jun 2024
avatar MacJoom
MacJoom - comment - 14 Jun 2024

Thank you!

Add a Comment

Login with GitHub to post a comment