Skip to content

Missing attachments.xml brakes joomla #150

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

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