Skip to content

Missing attachments.xml brakes joomla #150

Closed

Description

@yild

While creating new dev env I stumbled upon problem... while creating symlinks from my local repo dir to different directories inside joomla (components/plugins) I got this error for many plugins, i.e. show_attachments

Image

Everything coz repo doesn't contain attachments.xml file inside https://github.com/jmcameron/attachments/tree/master/attachments_component/admin directory. that if symlinked to /administrator/components/com_attachments is missing.

And code in plugins use this file to test if component is 'installed' (?), link to problematic code for show_attachments plugin:

if (!file_exists(JPATH_ADMINISTRATOR . '/components/com_attachments/attachments.xml')) {
// Exit quietly if the attachments component has been uninstalled or deleted
return;
}

With quick test I have found that this code should be moved to provider.php file with same result and no error like this above.

But this code is crude, rather than testing missing/existance of a file it should test if component is enabled, and give some response to user that something is wrong with component.

I lost few days to debug this issue - yes its silly to not found this - but I'm not in a mood to provide PR for this problem ATM, I just need some brake from this :/

Activity

  1. JLTRY commented on Jul 23, 2025

    @JLTRY
    Collaborator

    I am in vacation this week
    I came into same issue
    With development env you need also a link into admin folder pointing to xml

  2. self-assigned this
    on Jul 25, 2025
  3. parapente commented on Jul 25, 2025

    @parapente
    Collaborator

    @yild I don't think you can avoid such errors if the files are not well placed in the cms tree. I started removing those checks that where present before using namespaces for the plugins and adding friendlier messaes. The best place to look for things that have broken when such messages appear is at the files that appear in the backtrace that joomla presents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions