Create a multilingual site with the multilingual sample data.
Make sure sef is on. Tested here with url rewriting
Load frontend home and switch language via the language switcher.
We should get urls of type
whatever/fr
whatever/en
We get
/en?view=category&id=8
and
/fr?view=category&id=9
When homes are single article or when homes are single contacts, the urls are correct.
This may come from #20692
Could not test with a contact category as I have
Fatal error: Cannot declare class Joomla\Component\Contact\Site\Helper\Route, because the name is already in use in /Applications/MAMP/htdocs/installmulti/joomla40/components/com_contact/helper/route.php on line 24
Labels |
Added:
J4 Issue
?
|
Status | New | ⇒ | Confirmed |
Category | ⇒ | Router / SEF |
@infograf768 when you revert #20692, does it work correctly then?
@infograf768 is this new Error connect with this Issue or should i open a new Issue?
Error gone by Reload.
Error gone by Reload.
What do you mean?
@infograf768 when you revert #20692, does it work correctly then?
Concerning the home being a category, yes, it works fine. I now get via the switcher or from home menu item
whatever/fr
whatever/en
For articles as home (with OR without #20692 )
If I use the switcher I do get
whatever/fr
whatever/en
as well when using another specific menu item displaying the same article
Without #20692 , If the article menu items are associated OR the articles concerned are associated AND they are not home (home is category), then when displaying an article via its menu item, when switching language the switcher directs to the home page with a link of type
whatever/en
With #20692 If the article menu items are associated OR the articles concerned are associated AND they are not home
The switcher flag for the language in use gives correctly
/en/modules-en-gb
but when switching to the other language, we get
`/fr?view=article&id=13&catid=12
EDIT: in this last case, it is interesting to Note that the "Also Available" link in the infoblock IS correct.
I mean the link from the flag here:
For single contact, no problem.
For contacts categories I have the same Fatal error (it is unrelated)
I mean which error was?
Screenshot deleted, can't say what the Error-message was.
Ok, understand now.
As far as i remeber got a 404, after reload of Page it works.
So this is the only thing which does not work correct since #20692?
No. remains the original issue when category is home
We get
/en?view=category&id=8
and
/fr?view=category&id=9
But I think I found the issue in the language switcher WHEN using #20692. Solution works for category and article!
Can you solve in the mean while the Fatal error for contact and newsfeed?
Could not test with a contact category as I have
Fatal error: Cannot declare class Joomla\Component\Contact\Site\Helper\Route, because the name is already in use in /Applications/MAMP/htdocs/installmulti/joomla40/components/com_contact/helper/route.php on line 24
And cannot define associations for a single contact in core.
The reason is that the code which solves the issue FOR articles and articles category in the switcher is a change in
if (isset($cassociations[$language->lang_code]))
{
$language->link = Route::_($cassociations[$language->lang_code] . '&lang=' . $language->sef);
If I change to
$language->link = Route::_($cassociations[$language->lang_code]);
Then all is OK.
Will it work for contact and newsfeeds is the matter.
If it does not (which I think is possible and I can't test without solving the specific errors for these components), then it means we have to add a conditional to deal with components which are not instanceof AssociationServiceInterface
Forgot to say that this works only perfectly when sef is on. When off we can get for homes a very long url or a simple one of type index.php?lang=en
OK. This modif does work for single newsfeed, after I corrected a wrong call to FeedFactory.
will make patch.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-16 10:59:36 |
Closed_By | ⇒ | infograf768 |
Issue confirmed.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21132.