Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] buildSefRoute regression #19829

Closed
joeforjoomla opened this issue Mar 4, 2018 · 5 comments
Closed

[4.0] buildSefRoute regression #19829

joeforjoomla opened this issue Mar 4, 2018 · 5 comments

Comments

@joeforjoomla
Copy link
Contributor

joeforjoomla commented Mar 4, 2018

Steps to reproduce the issue

Trying to manage the Itemid inside a generic component router is no more possible. Indeed the buildSefRoute function of the SiteRouter has been modified so that the menu item is instantiated BEFORE the component router is executed, instead of AFTER has always been.

Expected result

Routing system still works for extensions managing the Itemid inside the component router 'build' method and extending the RouterBase class

Actual result

Menu alias is no more resolved being the component router executed AFTER the buildSefRoute get an instance of the current menu based on the current $query['Itemid']

Links are no more:
www.mysite.com/menualias/element

but:
www.mysite.com/component/mycomponent/element?Itemid=1111

System information (as much as possible)

Joomla 4.0

Additional comments

@Hackwar
Copy link
Member

Hackwar commented Mar 5, 2018

That is not a regression. First of all, Joomla 4.0 does allow breaks in backwards compatibility. Second of all, you are supposed to modify the Itemid of your component in the preprocess method of your router. Simply said, the explanation of @csthomas is right here (In #18924)

@joeforjoomla
Copy link
Contributor Author

Yes @Hackwar you are right. Indeed this is what i did.
But there should not be a sort of documentation about the new preprocess method?
As an extension developer should i guess what's changing in J4? Why nobody says nothing?

@infograf768
Copy link
Member

Why nobody says nothing?

I guess because nothing is written in stone.

@Hackwar
Copy link
Member

Hackwar commented Mar 5, 2018

Considering that the preprocess method has been a part of Joomla since 3.3, it isn't exactly new... And as @infograf768 wrote, 4.0 has not been released yet, so I wouldn't call it a big problem that the docs are not complete yet.

@wilsonge
Copy link
Contributor

I've added a docs required tag to the original PR (i'm slowly working by way through all those tags and puttings them into the J4 upgrade docs/relevant other docs). Closing this issue as a result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants