Wednesday, June 18, 2008, 08:03 PM - Joomla
Issue:
You are trying to load a template using the Joomla 1.5 MVC model, but you run into an error 500 - Layout "templatename" not found.
Solution:
Check for typos in the view name and template name. Use lowercase only.
Do not use the word "view" to start your view with. Joomla strips the word view of the template path only (I regard this as a bug, not a feature). It tolerates the word view when resolving the view.html.php file. So for example viewCustomer is not possible. This will resolve to customer for the template name. Try lookatcustomer instead (all lowercase).
| permalink |
Sunday, June 8, 2008, 01:34 PM - Joomla
Issue:
How to create a custom admin interface button in Joomla (1.5).
Solution:
The code to create the button should be as follows:
JToolBarHelper::custom("task","image1.png","image1Over.png","text for underneath the button",Check for list item (true/false),hide main menu after click (true/false));
| permalink |
Saturday, June 7, 2008, 11:30 AM - Joomla
Issue:
In Joomla 1.5 you try to create a new JTable object, but somehow it results in a blank screen. The apache log shows:
Call to a member function bind() on a non-object
Solution:
If it is a new JTable object from a self build component, the name and location of the object need to be in lowercase and as follows:
Location:
Use JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_yourcomponent'.DS.'yourtablesubdirectory');
to add the path of your JTable objects to the search path of Joomla.
Use lowercase directory names and file names only.
Name the JTable class file name to the object you are trying to load:
$table = & JTable::getInstance('nameofobject','Table');.
The nameofobject has to become your file name: nameofobject.php in the locate indicated in the addIncludePath.
| permalink |
Friday, June 6, 2008, 07:41 PM - Joomla
Issue:
After adding a view to a component in Joonla 1.5 you get an error 500, view not found, on linux when trying to access this view.
Solution:
Use the view name in lowercase, and also the directory name of the view in lowercase. This (combined with typing the correct view name) should result in a different response (maybe good, maybe a different error 500).
| permalink |
Monday, June 2, 2008, 09:19 PM - Joomla
Issue:
Joomla 1.5 fails to install a component with the following error:
Component Install: SQL error or missing or unreadable SQL file. DB function reports no errors.
Solution:
The installer looks for the files within the admin files folder. This means that the files also have to be placed like standard files. Example xml config file:
<..>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.sql</file>
</sql>
</install>
<..>
<administration>
<menu>Standard component name</menu>
<files folder="admin">
<filename>sql/install.mysql.sql</filename>
<..>
</administration>
<..>
| permalink |
Saturday, February 16, 2008, 10:53 PM - Joomla
Issue:
Extending group management in Joomla (1.0) does not seem to work with script from http://forum.joomla.org/viewtopic.php?f=231&t=257938.
Solution:
The table structure of the jos_core_acl_aro_groups changed slightly. The new script should look like:
SET @parent_name = 'Registered';
SET @new_name = 'Support';
-- Select the parent node to insert after
SELECT @ins_id := group_id, @ins_lft := lft, @ins_rgt := rgt
FROM jos_core_acl_aro_groups
WHERE name = @parent_name;
SELECT @new_id := MAX(group_id) + 1 FROM jos_core_acl_aro_groups;
-- Make room for the new node
UPDATE jos_core_acl_aro_groups SET rgt=rgt+2 WHERE rgt>=@ins_rgt;
UPDATE jos_core_acl_aro_groups SET lft=lft+2 WHERE lft>@ins_rgt;
-- Insert the new node
INSERT INTO jos_core_acl_aro_groups (group_id,parent_id,name,lft,rgt)
VALUES (@new_id,@ins_id,@new_name,@ins_rgt,@ins_rgt+1);
| permalink | related link |





