1

I created a simple component, which appears as expected at the admin side.

If I link the component using a menu item, everything seems to be finde. Component appears in selector, component's views appear as selectable items. No errors when saving the menu item.

the menu item editor shows this link just fine:

index.php?option=com_eventcalendar&view=featured

But if I reload the front-end, the menu item appear with no path component.

It just shows the link http://localhost/JTestFolder/, and not this one: http://localhost/JTestFolder/index.php?option=com_eventcalendar&view=featured

But why doe the parameters get lost??

Additionally, I installed to MyWalk sample extension. Works just fine.

It does generate a SEF /KPFJoomla/index.php/walks2.

I searched the extension's code for walks or walks2, but failed. How does this short hand URL gets generated?

2
  • 1
    Do you have a ..\components\com_inventory\src\Service\Router.php defined in the front end?
    – Irata
    Apr 15 at 10:16
  • That solved it. Thx! If you provide an answer, I'm happy to accept it.
    – SteAp
    Apr 15 at 13:06

2 Answers 2

0

You may need to have a ..\components\com_inventory\src\Service\Router.php defined in the front end?

1

Try disabling the SEF Url's. If (JTestFolder) is your namespace in your provider, then it can potentially be Search Engine Friendly URL.

TO disable:

To test if this is the issue, you can try disabling SEF URLs in Joomla's Global Configuration. To do this, go to System > Global Configuration > SEO Settings and set "Search Engine Friendly URLs" to "No". Save your changes and then reload the front-end to see if the issue persists.

3
  • This does disable SEO link, as I see in the MyWalks sample extension. But still, my extension linked to a menu item doesn't get the path / parameter path set.
    – SteAp
    Apr 14 at 13:28
  • Am I right regarding my expectation, that I need to implement a router class to implement SEF?
    – SteAp
    Apr 14 at 13:30
  • 1
    Yes. You need to add a RouterService to your provider, register it and setup the rules for your SEF URL's.
    – DeesreX
    Apr 18 at 9:36

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.