I'm creating a component. I have put the images, css files, javascript files and other assets in com_mycomponent/media folder. And in my manifest file I have added this:

<media destination="com_mycomponent" folder="media">

However, when I access the server, inside the media/com_mycomponent, the directories and files are not there, the directory is completely empty.

My component directory structure is:

+-- admin/
+-- media/
+-- site/
+-- mycomponent.xml

Directory permission is 755 and it's to the user www-data.

Any ideas?

Thanks in advance.

  • post your full xml file – Nagarjun May 19 '15 at 2:50
  • Check your /media/com_mycomponent folder permissions. Your code looks correct. – Rene Korss May 19 '15 at 9:59

Solved the problem. In my xml file I was adding index.html in the <filename> tag, however there was no index.html file in media/ directory.

So basically, everything listed in the xml file must exist in the directory as well.

  • The index.html must be in the folder for security reason – stckvrw May 19 '15 at 19:08
  • Yes, I forgot to add it do the media/ directory. – rogcg May 19 '15 at 20:10

Just to clarify, place media folder at the "root" of your component directory structure - and not in any deeper location.

Then in the manifest file, try the following:

<media destination="mycomponent" folder="media/mycomponent">
  • But it is in the root of my component directory. I misstyped it, sorry. Tried your solution but it didn't work. Still not copying the files and folders. – rogcg May 18 '15 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.