J3.x

Difference between revisions of "Unable to use a none alphabethic first character in folder name/it"

From Joomla! Documentation

(Created page with "Informazioni Generali")
(Created page with "==Qual è la causa==")
Line 5: Line 5:
 
{{tip|This pertains only to Joomla! version(s): '''3.9.25'''|title=Informazioni Generali}}
 
{{tip|This pertains only to Joomla! version(s): '''3.9.25'''|title=Informazioni Generali}}
  
==What is the cause==
+
==Qual è la causa==
 
Due to a security update we no longer allow relative path strings in com_media configuration for image path and file path setting. The same filter is used in mod_random_image for the folder property. In case you try to use a character other then a-z as first character you get an error message that this path is not allowed for example "1-images".
 
Due to a security update we no longer allow relative path strings in com_media configuration for image path and file path setting. The same filter is used in mod_random_image for the folder property. In case you try to use a character other then a-z as first character you get an error message that this path is not allowed for example "1-images".
  

Revision as of 03:47, 30 March 2021

Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎中文(台灣)‎ • ‎中文(繁體)‎

Websites updating to Joomla 3.9.25 trying to set an image or file path in com_media or a folder in mod_random_image which doesn't start with an alphabetic leads to an error.

Versions affected

Informazioni Generali

This pertains only to Joomla! version(s): 3.9.25

Qual è la causa

Due to a security update we no longer allow relative path strings in com_media configuration for image path and file path setting. The same filter is used in mod_random_image for the folder property. In case you try to use a character other then a-z as first character you get an error message that this path is not allowed for example "1-images".

Informazioni importanti

When we talk about "folder" we only talk about the first main folder, not about subfolders. So creating "images/2021-03-01" is absolutely fine.

  • Hai cambiato la cartella principale delle immagini di default in Joomla! nelle opzioni com_media? Se non l'hai cambiata non avrai alcun problema
  • If "Yes", did you change the default images main folder to a folder starting with a non-alphabetic character (like "1-images" or "Ø-test")? If you didn't, you won't have any issues.
  • If "Yes" then you can't save the com_media options anymore. (But as mentioned before all media files are still working fine).

The same issue occurs in the "mod_random_image" module. Existing modules will continue working as before. If you create a new one and the first character in the folder path is a non-alphabetical character, you can't save the form.

How to fix

Update to Joomla 3.9.26 when it is released.

Use the following workaround only if you really need it!

In the meantime you remove the lines 53 to 56 in the file libraries/src/Form/Rule/FilePathRule.php (File on Github)