No Code Attached Yet
avatar Mich-es
Mich-es
18 Jun 2023

Steps to reproduce the issue

Create a folder with more than 500 images in the Joomla Media Manager. Add the following to the .htaccess:

Oops, I can't insert source code here? Use a picture instead

grafik

Connect your PC to a smartphone with a poor internet connection!

Expected result

I now expect that after calling up the folder once, all images/graphics are saved in the browser cache

Actual result

J4 attaches a timestamp to "EVERY" image/graphic, which bypasses the .htaccess rules.

System information (as much as possible)

PHP 8.1
10.5.18-MariaDB
J4.3.2

Additional comments

I love Joomla, but I work a lot on the road and have image folders with a lot of content. I recently became desperate because I could no longer select images while on the road. The connection to the internet was bad and the Joomla media manager completely reloaded the images every time. Working was not possible because the media manager always bypassed the settings in the .htaccess with the timestamp behind each graphic.

Fortunately, I was able to get help:
https://forum.joomla.de/thread/18614-der-media-manager-in-j4-ist-suboptimal-timestamp-bei-bilder/?postID=132406#post132406

Suggestion: Why don't you just add a timestamp only to the pictures/graphics that were actually edited? Then it will work again and I think that will not only reduce the traffic on the Internet, but will also be a great thing for many people.

avatar Mich-es Mich-es - open - 18 Jun 2023
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jun 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Jun 2023
avatar Mich-es Mich-es - change - 18 Jun 2023
The description was changed
avatar Mich-es Mich-es - edited - 18 Jun 2023
avatar Mich-es Mich-es - change - 18 Jun 2023
The description was changed
avatar Mich-es Mich-es - edited - 18 Jun 2023
avatar Mich-es Mich-es - change - 18 Jun 2023
The description was changed
avatar Mich-es Mich-es - edited - 18 Jun 2023
avatar Mich-es Mich-es - change - 18 Jun 2023
The description was changed
avatar Mich-es Mich-es - edited - 18 Jun 2023
avatar Mich-es Mich-es - change - 18 Jun 2023
The description was changed
avatar Mich-es Mich-es - edited - 18 Jun 2023
avatar brianteeman
brianteeman - comment - 18 Jun 2023

The comments in the german language forum post from @bembelimen and @SniperSister are more helpful than using the local cache

avatar dgrammatiko
dgrammatiko - comment - 19 Jun 2023

The fix is easy, add a conditional to use the this.item.date_modified (it might be named differently) if exists or fallback to the existing api.mediaVersion here:

getURL() {
if (!this.item.thumb_path) {
return '';
}
return this.item.thumb_path.split(Joomla.getOptions('system.paths').rootFull).length > 1
? `${this.item.thumb_path}?${api.mediaVersion}`
: `${this.item.thumb_path}`;
},

EDIT it's this.item.modified_date

* - modified_date: The date modified

Test: #40893

avatar richard67 richard67 - close - 19 Jun 2023
avatar richard67
richard67 - comment - 19 Jun 2023

Closing as having a pull request. Please test #40893 . Thanks in advance.

avatar richard67 richard67 - change - 19 Jun 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-06-19 16:25:50
Closed_By richard67

Add a Comment

Login with GitHub to post a comment