J3.x

Impossibile usare un primo carattere non alfanumerico nel nome della cartella

From Joomla! Documentation

This page is a translated version of the page J3.x:Unable to use a none alphabethic first character in folder name and the translation is 47% complete.

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

I siti web che aggiornano a Joomla 3.9.25 cercando di impostare un'immagine o un percorso di file in com_media o una cartella in mod_random_image che non inizia con un alfabeto porta a un errore.

Versioni interessate

Informazioni Generali

Questo riguarda solo la(e) versione(i) di Joomla!: 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)