No Code Attached Yet bug
avatar Orgoth
Orgoth
15 Oct 2022

Steps to reproduce the issue

  • install fresh joomla4
  • create a folder assets and a subfolder images
  • login to backend
  • click on content
  • click on media
  • click on options
  • change Path to File Folder to assets
  • change Path to Images Folder to assets/images

64wuji4wj6iw46jki

  • save & close
  • move the content of the images folder to the new location assets/images

fcgvtrzdetczhgu657r4edftgzh65u7

  • delete the old images folder within the root path
  • access the media manager again
  • An error has occurred. 0

Expected result

New defined folder assets should be used by the media manager and no error should occur.

Actual result

https://github.com/joomla/joomla-cms/blob/4.2-dev/plugins/filesystem/local/src/Adapter/LocalAdapter.php#L69

w4zhsaw4rzhqa3etz

System information (as much as possible)

Linux dd39602 4.15.0-192-generic #203-Ubuntu SMP Wed Aug 10 17:40:03 UTC 2022 x86_64
PHP Version 8.0.20 FPM

/etc/php80/cgi/conf.d/04raphf.ini, /etc/php80/cgi/conf.d/10mysqlnd.ini, /etc/php80/cgi/conf.d/10pdo.ini, /etc/php80/cgi/conf.d/15xml.ini, /etc/php80/cgi/conf.d/bcmath.ini, /etc/php80/cgi/conf.d/bz2.ini, /etc/php80/cgi/conf.d/calendar.ini, /etc/php80/cgi/conf.d/ctype.ini, /etc/php80/cgi/conf.d/curl.ini, /etc/php80/cgi/conf.d/dba.ini, /etc/php80/cgi/conf.d/dom.ini, /etc/php80/cgi/conf.d/exif.ini, /etc/php80/cgi/conf.d/fileinfo.ini, /etc/php80/cgi/conf.d/ftp.ini, /etc/php80/cgi/conf.d/gd.ini, /etc/php80/cgi/conf.d/gettext.ini, /etc/php80/cgi/conf.d/gmp.ini, /etc/php80/cgi/conf.d/iconv.ini, /etc/php80/cgi/conf.d/imagick.ini, /etc/php80/cgi/conf.d/imap.ini, /etc/php80/cgi/conf.d/intl.ini, /etc/php80/cgi/conf.d/kas_memory_limit.ini, /etc/php80/cgi/conf.d/ldap.ini, /etc/php80/cgi/conf.d/mailparse.ini, /etc/php80/cgi/conf.d/mbstring.ini, /etc/php80/cgi/conf.d/mongodb.ini, /etc/php80/cgi/conf.d/mysqli.ini, /etc/php80/cgi/conf.d/nmmconfig.ini, /etc/php80/cgi/conf.d/oauth.ini, /etc/php80/cgi/conf.d/odbc.ini, /etc/php80/cgi/conf.d/pdo_dblib.ini, /etc/php80/cgi/conf.d/pdo_firebird.ini, /etc/php80/cgi/conf.d/pdo_mysql.ini, /etc/php80/cgi/conf.d/pdo_odbc.ini, /etc/php80/cgi/conf.d/pdo_pgsql.ini, /etc/php80/cgi/conf.d/pdo_sqlite.ini, /etc/php80/cgi/conf.d/pgsql.ini, /etc/php80/cgi/conf.d/phar.ini, /etc/php80/cgi/conf.d/posix.ini, /etc/php80/cgi/conf.d/pspell.ini, /etc/php80/cgi/conf.d/shmop.ini, /etc/php80/cgi/conf.d/simplexml.ini, /etc/php80/cgi/conf.d/soap.ini, /etc/php80/cgi/conf.d/sourceguardian.ini, /etc/php80/cgi/conf.d/sqlite3.ini, /etc/php80/cgi/conf.d/sysvsem.ini, /etc/php80/cgi/conf.d/sysvshm.ini, /etc/php80/cgi/conf.d/tidy.ini, /etc/php80/cgi/conf.d/tokenizer.ini, /etc/php80/cgi/conf.d/xmlreader.ini, /etc/php80/cgi/conf.d/xmlwriter.ini, /etc/php80/cgi/conf.d/xsl.ini, /etc/php80/cgi/conf.d/zip.ini

Folder Permissions
Folder Status
‎administrator/components Writable
‎administrator/components/com_joomlaupdate Writable
‎administrator/language Writable
‎administrator/language/de-DE Writable
‎administrator/language/en-GB Writable
‎administrator/language/overrides Writable
‎administrator/manifests/files Writable
‎administrator/manifests/packages Writable
‎administrator/manifests/libraries Writable
‎administrator/modules Writable
‎administrator/templates Writable
‎components Writable
‎assets/images Writable
‎images/thumbnails Writable
‎images/podcasts Writable
‎images/vbs Writable
‎images/svg Writable
‎images/icagenda Writable
‎images/convertforms Writable
‎images/Dokumente Writable
‎images/banners Writable
‎images/icons Writable
‎images/djevents Writable
‎language Writable
‎language/de-DE Writable
‎language/en-GB Writable
‎language/overrides Writable
‎libraries Writable
‎media Writable
‎modules Writable
‎plugins Writable
‎plugins/workflow Writable
‎plugins/actionlog Writable
‎plugins/console Writable
‎plugins/extension Writable
‎plugins/task Writable
‎plugins/easyblog Writable
‎plugins/search Writable
‎plugins/webservices Writable
‎plugins/convertformstools Writable
‎plugins/editors Writable
‎plugins/fields Writable
‎plugins/convertforms Writable
‎plugins/privacy Writable
‎plugins/system Writable
‎plugins/behaviour Writable
‎plugins/sampledata Writable
‎plugins/multifactorauth Writable
‎plugins/installer Writable
‎plugins/captcha Writable
‎plugins/authentication Writable
‎plugins/media-action Writable
‎plugins/quickicon Writable
‎plugins/content Writable
‎plugins/user Writable
‎plugins/filesystem Writable
‎plugins/editors-xtd Writable
‎plugins/api-authentication Writable
‎plugins/finder Writable
‎templates Writable
‎configuration.php Unwritable
‎administrator/cache (Cache folder) Writable
‎media/cache (Media Cache folder) Writable

PHP Built On Linux dd39602 4.15.0-192-generic #203-Ubuntu SMP Wed Aug 10 17:40:03 UTC 2022 x86_64
Database Type mysql
Database Version 5.7.37-nmm1-log
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption Yes
PHP Version 8.0.20
Web Server Apache
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 4.2.3 Stable [ Uaminifu ] 27-September-2022 15:35 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36

Additional comments

The background for this change is relatively simple.
I want a strict separation of the media.
PDF files do not belong in the folder for images.
Also other files like MP3, MP4, ... do not belong in the path for the images.

The Media Manager is set to images, but offers the possibility to define other paths within the options.

Other plugins/extensions like Yootheme Pro take this information and path into account.
Please check the problem and adjust the Media Manager accordingly.
A search on Google and the issues here in the repo did not help.

One extra note.
The Media Manager forwards to the path by itself.
/administrator/index.php?option=com_media -> /administrator/index.php?option=com_media&path=local-images:/

avatar Orgoth Orgoth - open - 15 Oct 2022
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Oct 2022
avatar Orgoth Orgoth - change - 15 Oct 2022
The description was changed
avatar Orgoth Orgoth - edited - 15 Oct 2022
avatar brianteeman
brianteeman - comment - 15 Oct 2022

Not of much help to you but basically that param doesnt work in j4 - no idea why its not removed.

In the plugins you will find "Filesystem-local" which should do what you require

avatar Orgoth Orgoth - change - 15 Oct 2022
The description was changed
avatar Orgoth Orgoth - edited - 15 Oct 2022
avatar Orgoth
Orgoth - comment - 15 Oct 2022

Not of much help to you but basically that param doesnt work in j4 - no idea why its not removed.

In the plugins you will find "Filesystem-local" which should do what you require

Thanks, that fixed the PHP error message.
Unfortunately now the message "The Account was not found." keeps coming up.

35h35uz35uhz3e54rhzu7

avatar dgrammatiko
dgrammatiko - comment - 15 Oct 2022

Unfortunately now the message "The Account was not found." keeps coming up.

Please test #38934 which solves exactly this bug

avatar dgrammatiko
dgrammatiko - comment - 15 Oct 2022

Not of much help to you but basically that param doesnt work in j4 - no idea why its not removed.

@brianteeman that was one of the things that should have been done better. At the moment the best thing is to change that field to readonly and add a note field explaining that the folders are defined in the filesystem plugins (with a link to the filtered plugins). FWIW if the expansion of types would have been done earlier probably this would have been fixed but nobody thought that this inconsistency worth a release blocker, ref: #34634 (comment) and #34634 (comment)

avatar shobeyone
shobeyone - comment - 17 Oct 2022

I too am having this very same issue. My entire website for Joomla 3 hinges on an earlier decision I made to isolate my site's PHP custom code, images and PDFs under a different folder on Joomla's root folder/directory. In Joomla 3, I overwrote the default settings for both "Path to Files Folder" and "Path to Images Folder" from 'images' to 'MyFolder/media' (I didn't actually use 'MyFolder', but some other name that I don't want disclosed here) and then under 'MyFolder/media' there are two folders 'images' and 'pdfs'. When accessing Joomla 3's media manager, it only lists the folders 'images' and 'pdfs' along with their trees while showing 'MyFolder/media' as the base. Works exactly as I expect and prevents anyone from accessing other folders I also have under SFA but are not media related.

Your decision to not consider this worthy of a release fix has compromised my ability to move forward with migrating to Joomla 4. I have many articles and modules that depend on the media path base being set to 'MyFolder/media' and is not something I desire to go and change (even for the interim). I would very much like to know when this bug can get fixed and released so that I can get on with migrating to Joomla 4, especially since Joomla 3 is now out-of-support for any fixes.

Just another observation if it is not obvious... I've not made any references to absolute folders (beginning with '/', only relative folders so that I can back up the database and restore to a different domain's database with relative ease.

avatar shobeyone
shobeyone - comment - 17 Oct 2022

image

image

avatar shobeyone
shobeyone - comment - 17 Oct 2022

I also noticed in Joomla 4, the "FileSystem - Local" plugin does NOT allow selection of a folder/directory 2+ levels deep, thus does not allow backwards compatibility to Joomla 3's media manager options. In my example shown previously, it allows me to select 'MyFolder', but does NOT allow me to select 'MyFolder/media'. For this to work, I would need to be able to remove 'images' (the default) and add 'MyFolder/media'.

avatar brianteeman
brianteeman - comment - 17 Oct 2022

The reason it doesn't was because the performance of that page was terrible when recursive folders were allowed in that field.

I wonder if a possible solution would be to have an additional field that allowed you to manually type the path?

avatar brianteeman
brianteeman - comment - 17 Oct 2022

Or maybe even replace the folderlist field with a text input?

avatar shobeyone
shobeyone - comment - 17 Oct 2022

In an earlier comment, it seems it was suggested the system configuration for media that allows specification of both the files and images path was obsolete and should be removed (assuming it has been replaced by FileSystem-Local). I may have misunderstood this. Though I am a developer, I'm not a developer for this project, so I'm not too inclined to be answering questions about implementing a solution. Still, from a user perspective, it is much more intuitive the way it worked in Joomla 3 because it was all about "media" and not the more obscure "filesystem". Configuration of the media options were under system, and not tucked away in a plugin. For this reason, my only opinion is to stick with what is best for the user if possible.

avatar wojtekxtx
wojtekxtx - comment - 30 Oct 2022

Or maybe even replace the folderlist field with a text input?

@brianteeman easy:

this.getElementById('folder-list-id').replaceWith(this.getElementById('text-input-id'));

Customize it to suit J! of course.

avatar brianteeman
brianteeman - comment - 30 Oct 2022

@wojtekxtx I have no idea why you wrote that. It would do absolutely nothing to help resolve this issue.

avatar chmst
chmst - comment - 30 Oct 2022

@wojtekxtx you seem to bea real expert. Your help in resolving issues would be highly appreciated. Could you provide pull requests for the issues where you wrote comments? If not, please stop writing nonsense comments.

avatar Quy
Quy - comment - 2 Feb 2023

Related #35689

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment