joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

Media Manager bypasses browser cache (.htaccess) #43761

Open Mich-es opened 4 months ago

Mich-es commented 4 months ago

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 246655720-7f3a3edb-824f-4322-8324-21a635580848

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.3.8 10.11.4-MariaDB J5.1.1

Additional comments

I got this Issue last Year an i think, it was fixed. But it seems not so: https://github.com/joomla/joomla-cms/issues/40787

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.

dgrammatiko commented 4 months ago

Could you visit the page your_domain/administrator/index.php?option=com_admin&view=sysinfo and report if you have an entry for fileinfo? Should look like

Screenshot 2024-07-09 at 6 17 40 PM

If not you need to ask your host to enable the PHP module

Mich-es commented 4 months ago

thanks for reply!

I got this: grafik

richard67 commented 4 months ago

Does the PHP ini value "disable_functions" contain any fileinfo functions?

Mich-es commented 4 months ago

@richard67 i checked this: grafik

But what occurred to me (because it is not immediately noticeable and you are asking me about system parameters), the phenomenon occurs with the change from PHP 8.2 to 8.3. I will switch back and test whether it is perhaps due to PHP 8.3

Hackwar commented 3 months ago

Any news @Mich-es? Did switching to PHP 8.2 help?

Mich-es commented 2 months ago

Back from holiday - after returning to PHP 8.2 I noticed an improvement. However, I cannot say 100 per cent whether this is related to PHP 8.3