1

I have gone through the steps provided here:

https://docs.joomla.org/J3.x:Developing_an_MVC_Component

I am currently on

https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_backend_actions

When I login to my administration portion of my joomla page and go to my component under components menu to access its default page. I get the normal fields you would see to make any changes. The tutorial adds 3 fields with JToolbarHelper::. These fields are new,edit,and delete. When I click any of the buttons to progress to another screen such as edit,add,or delete it brings me to an error page. complaining about the component not being found.The reason is a messed up link.

The link for the site now turns into

https://example.demojoomla.com/administrator/index.php?option=com_com_example&view=example&layout=edit

it should be

 https://example.demojoomla.com/administrator/index.php?option=com_example&view=example&layout=edit

Somewhere an extra com_ is being added and I have looked everywhere. Does anyone understand why or where I should look to fix this issue?

within the form action for the admin page if i remove the com_ from that action it remove the com_com_ and reduce it to https://example.demojoomla.com/administrator/index.php?option=example&view=example&layout=edit

im starting to think that this is being caused by the controllers and or tasks but i cannot pin point the issue still

3
  • Have you done a full search of your code for the text "com_com"? A typo in the form action sounds a likely cause.
    – RichardB
    Mar 22, 2017 at 14:00
  • i have checked with windows explorer,my ftp clients, and i have looked at all the files that i think could have the mistake.
    – onLoad
    Mar 22, 2017 at 14:10
  • i added to the question as i noticed if the remove com_ from teh form action it will remove the extra com_ but still mess up.
    – onLoad
    Mar 22, 2017 at 14:23

1 Answer 1

0

After looking further into it it seems i had miss named my controller classes for the legacy calls. Once I had fixed that it led me down a rabbit hole of renaming classes until it finally started working properly. The below code was not set proerply.

$controller = JControllerLegacy::getInstance

The hardest part of the MVC tutorial is that they use HelloWorld for everything and i must have gotten confused as to how it was working. In the next remake of my component i will use better classes that are more unique.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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