The view in my custom component is no longer recognized in Joomla4 when passed as, for example, mycomponent/view/anotherinfo
.
In Joomla3, this worked normally. What happened? What do I need to change for J4?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityThe Router changed. In Joomla 3 you had a choice to use the legacy or the modern router, in Joomla 4 the legacy router is no longer available. It is possible, but without more details on your components code, that you are also relying on a couple of lines of code that were removed in the Joomla 4 version of the router.
My question, Joomla 4 no longer inserting the Itemid, the current or active menu , in the URL. Is this correct behavior? from last year shows my research into my components not working properly under J4 and the second answer is a small hack to get my components working until I can convert/replace them.
It might help you to understand what is going on in your code even though my issue was around the item id being dropped your example doesn't provide enough detail confirm it is is or isn't related.
If you look through the Joomla Github or Issue Tracker for Router changes you can learn a bit more about what has changed. I don't links to hand, but I recall finding a few pages via Google trying to explain how to use the new router.