0

I am developing a back-end Joomla! component, but after it is installed, I see an empty folder in the site part. How I can instruct Joomla! not to create the folder in the site part?

3

Unfortunately the directory is always gets created. File: libraries/cms/installer/adapter.php line 679

$this->createExtensionRoot(); 

The above line will create the extension root directory whenever you install the component.

The workaround for this is to delete the directory after installation. In your script.php file, delete the directory during postflight phase.

function postflight ($type, $parent)
{
  JFolder::delete(JPATH_ROOT.'/components/com_mycomponent');
}
  • It is not present, but the site-part folder is still created. – El cero Jun 13 '16 at 18:48
  • please see my edited answer. – Nagarjun Jun 13 '16 at 19:06

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.