Skip to content

Installation error on Joomla 6 #188

Closed

Description

@tiamat52

With Joomla 6.03, there is a 500 internal error when installing the package.
To correct it, there is to do the following.

In install.attachments.php, replace:
_use Joomla\CMS\Filesystem\Folder;

by:
_use Joomla\Filesystem\Folder;

And in packages/attachments_component.zip/install.attachments.php, replace:
_use Joomla\CMS\Filesystem\File;
_use Joomla\CMS\Filesystem\Folder;

by:
_use Joomla\Filesystem\File;
_use Joomla\Filesystem\Folder;

By doing so in the package zip, I was able to install the package correctly.

Activity

  1. tiamat52 commented on Feb 28, 2026

    @tiamat52
    Author

    By the way, once installed, the component doesn't work anymore with Joomla 6.03 if you don't do the same with other files in the package.
    There are errors like Joomla\CMS\Filesystem\Folder not found when uploading files.

    So, besides the changes in:
    pkg_attachments/install.attachments.php
    attachments_component/install.attachments.php

    There is to update the following files:
    attachments_component/site/src/View/AttachmentsFormView.php
    attachments_component/site/src/Controller/DisplayController.php
    attachments_component/admin/src/Controller/AttachmentsController.php
    attachments_component/admin/src/Helper/AttachmentsUpdate.php
    attachments_component/site/src/Helper/AttachmentsHelper.php
    attachments_component/admin/src/Controller/AttachmentController.php

    By replacing the uses of:
    _use Joomla\CMS\Filesystem\File;
    _use Joomla\CMS\Filesystem\Folder;

    by:
    _use Joomla\Filesystem\File;
    _use Joomla\Filesystem\Folder;

  2. parapente commented on Feb 28, 2026

    @parapente
    Collaborator

    @tiamat52 is the joomla compatibility plugin enabled in your joomla installation? I will have a look at the issue but I think it is caused because some namespaces are deprecated/modified in Joomla6

  3. parapente commented on Feb 28, 2026

    @parapente
    Collaborator

    Indeed a clean joomla 6 install with the compatibility plugin disabled doesn't allow the extension to be installed. With compatibility enabled, the extension works as expected. I will put a warning in install script if it isn't enabled for now.

  4. self-assigned this
    on Feb 28, 2026
  5. added a commit that references this issue on Feb 28, 2026
    4e148ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions