'Component install error: JInstaller: :Install: File does not exist
I have created a component simply by following this video. I have created my component named admin.zip. I am getting this following warning while installing in joomla 3.0.
Warning
JInstaller: :Install: File does not exist C:\wamp\www\Content\tmp\install_52009de34a2c1\site\language\en-GB.com_helloworld.ini
JInstaller: :Install: File does not exist C:\wamp\www\Content\tmp\install_52009de34a2c1\admin\language\en-GB.com_helloworld.ini
I am getting helloworld component under component menu. but when i click on it it gives me error . It should show me Hello world as shown in the video.
my wamppserver version is 2.4 and using joomla 3.0.
how can i correct this problem
The error while clicking on hello world component is like this
my helloworld.xml file contains this code
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5.0" method="upgrade">
<name>com_helloworld</name>
<creationDate>November 2009</creationDate>
<author>David Thorn</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.example.org</authorUrl>
<copyright>Copyright Info</copyright>
<license>License Info</license>
<version>1.0.0.1</version>
<description>Description of the Hello World component ...</description>
<files folder="site">
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<folder>css</folder>
<folder>js</folder>
<folder>views</folder>
<folder>models</folder>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>language</folder>
</files>
<languages folder="site">
<language tag="en-GB">language/en-GB.com_helloworld.ini</language>
<language tag="en-GB">language/en-GB.com_helloworld.sys.ini</language>
</languages>
<administration>
<menu>com_helloworld</menu>
<files folder="admin">
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<folder>css</folder>
<folder>js</folder>
<folder>views</folder>
<folder>models</folder>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>language</folder>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB.com_helloworld.ini</language>
<language tag="en-GB">language/en-GB.com_helloworld.sys.ini</language>
</languages>
</administration>
</extension>
In my helloworld.php i have this code
<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import joomla controller library
jimport('joomla.application.component.controller');
// Get an instance of the controller prefixed by HelloWorld
$controller = JController::getInstance('Helloworld');
// Perform the Request task
$input = JFactory::getApplication()->input;
$controller->execute($input->getCmd('task'));
// Redirect if set by the controller
$controller->redirect();
?>
Update
I did this successfully in joomla 2.5 but it is not working in the latest version of joomla. what should i do to make it work in joomla 3.0
Solution 1:[1]
check if you have added this code to your XML:
<languages>
<language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworld.ini</language>
<language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworldt.sys.ini</language>
</languages>
and:
<administration>
...
<languages>
<language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworld.ini</language>
<language tag="en-GB" client="site">language/en-GB/en-GB.com_helloworld.sys.ini</language>
</languages>
...
</administration>
and check if the files are included in your installation ZIP - in right folder, e.g.:
language/en-GB/ ...
Be aware, the path to the file can be different for your extension.
Jan
Solution 2:[2]
You are missing en-GB subfolder declaration in your xml file path. xml: language/en-GB.com_helloword.sys.ini while it should be language/en-GB/en-GB.helloworld.sys.ini and path: language/en-GB/en-GB.helloworld.sys.ini same pattern goes for the other language files of course.
*since your edit and source code inclusion,including your full xml code with the corrections (filepath and extension closing tag)
`
<?xml version="1.0" encoding="utf-8"?>
<name>com_helloworld</name>
<creationDate>November 2009</creationDate>
<author>David Thorn</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.example.org</authorUrl>
<copyright>Copyright Info</copyright>
<license>License Info</license>
<version>1.0.0.1</version>
<description>Description of the Hello World component ...</description>
<files folder="site">
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<folder>css</folder>
<folder>js</folder>
<folder>views</folder>
<folder>models</folder>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>language</folder>
</files>
<languages folder="site">
<language tag="en-GB">language/en-GB/en-GB.com_helloworld.ini</language>
<language tag="en-GB">language/en-GB/en-GB.com_helloworld.sys.ini</language>
</languages>
<administration>
<menu>com_helloworld</menu>
<files folder="admin">
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<folder>css</folder>
<folder>js</folder>
<folder>views</folder>
<folder>models</folder>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>language</folder>
</files>
<languages folder="admin">
<language tag="en-GB">language/en-GB/en-GB.com_helloworld.ini</language>
<language tag="en-GB">language/en-GB/en-GB.com_helloworld.sys.ini</language>
</languages>
</administration>
` (can not include the extension opening and closing tag, for some reason it wont be printed, please make sure to include them correctly)
for your other issue, in your helloworld.php you probably need to import the joomla controller library:
jimport('joomla.application.component.controller');
after the
defined('_JEXEC') or die('Restricted access');
and replace this:
$controller = JController::getInstance('Helloworld');
with this one:
$controller = JControllerLegacy::getInstance('Helloworld');
Solution 3:[3]
Remove folder ="admin" from languages tag
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Phoca |
Solution 2 | |
Solution 3 | Arzit Mahajan |