2

I'm currently adapting a custom extension a former colleague of mine has developed for Joomla 2.5, so that it runs under Joomla 3.4.

The component in question uses com_categories for category management (index.php?option=com_categories&&extension=com_whatever).

When the categories view loads, however, some of the action buttons, namely "New", are now missing.

What shall I update in the component to make com_categories load the full set of action buttons?

Screenshot of the view: https://www.dropbox.com/s/60zfak311diin9w/Screenshot%202015-06-01%2022.52.22.png?dl=0

1

You need to define your access.xml properly in order to see the buttons. The two required permissions are core.create and core.edit.state

<section name="component">
    <action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
    <action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
    <action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />
    <action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
    <action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
    <action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
    <action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" />
</section>
<section name="category">
    <action name="core.create" title="JACTION_CREATE" description="COM_CATEGORIES_ACCESS_CREATE_DESC" />
    <action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
    <action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
    <action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
    <action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" />
</section>

You may want to define category level permissions as well here so that you can give granular permissions to your individual categories.

  • Actually, you should add an additional section with name "category" for category specific permissions. I think it gracefully falls back to component permissions if the category section is missing thought. – Bakual Jun 2 '15 at 6:25
  • 1
    Thanks. Yes, that why I mention about category section in last line of my answer. but anyway added category section in my answer to avoid any confusion. – Nagarjun Jun 2 '15 at 6:33
  • @Nagarjun thanks a lot for the pointers. The thing with this extension is that it has no ACL layer whatsoever and I am at a loss when it comes to committing all the required changes. – manchine Jun 2 '15 at 22:53
  • Interestingly, the only other view does show the item creation button (dropbox.com/s/r50cen0hilpcrkr/…). How exactly do I tell com_categories to load re buttons in the extension=com_whatever parameter? – manchine Jun 2 '15 at 23:00
  • When you add access.xml with above content, the categories page will automatically loads required buttons. No additional code changes required. – Nagarjun Jun 3 '15 at 3:17

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.