Just Install Alpha 8 and create a multilingual site with Cassiopeia
To have the french article ( Article (fr-fr) ) appear in front-end
I get this error
Il n'y a aucun article dans cette catégorie. Si des sous-catégories sont affichées sur cette page, elles peuvent contenir des articles.
The article is present and publish —>
Article (fr-fr) Alias: article-fr-fr
Category: Catégorie (fr-fr)
Mamp — PHP 7.2.1 — MYSQL 5.6.38
Status | New | ⇒ | Information Required |
I install the new language and content language by the administration after I use the “Install Multilingual” with every notes of success + Multilingual Status OK.
What is weird I even verified that both menu items are pointing to the right (french/English) Category Blog and both article are in their right specific category. I think I will reinstall from scratch to see if I can repeat the problem.
The site is on my local Mamp.
Ok I just reinstall the full Alpha 8 everything work well but see these 2 screenshot something is up?
When French is default
The english page have a french title and no article — The french page is ok
When English is default
The french page have an english title and no article — The english page is ok
Status | Information Required | ⇒ | Discussion |
I confirm.
The issue is with the router.
Category | Multilanguage | ⇒ | Multilanguage Router / SEF |
I am modifying the title of this Issue
Title |
|
Labels |
Added:
J4 Issue
|
This can be tested again on a 4.0-dev branch clean install.
Looks like it works fine for a monolingual site
Hint: the issue is only when SEF is on.
@infograf768 this has to do with Language Filter plugin changes in 3.9. See https://github.com/joomla/joomla-cms/pull/24192/files#diff-9a4ee24a09bcef172864692ed05135ca.
I confirm, i had a Joomla 4 multilanguage website working since months, once installed the latest Alpha 8 all pages throw a 404. Disabling the multilanguage filter plugin fixes the problem, so it must be something merged in recent days about multilanguage.
The issue is in the modification of the onAfterInitialise()
method.
It was
public function onAfterInitialise()
{
$this->app->item_associations = $this->params->get('item_associations', 0);
if ($this->app->isClient('site'))
{
$router = $this->app->getRouter();
// Attach build rules for language SEF.
$router->attachBuildRule(array($this, 'preprocessBuildRule'), Router::PROCESS_BEFORE);
$router->attachBuildRule(array($this, 'buildRule'), Router::PROCESS_BEFORE);
if ($this->mode_sef)
{
$router->attachBuildRule(array($this, 'postprocessSEFBuildRule'), Router::PROCESS_AFTER);
}
else
{
$router->attachBuildRule(array($this, 'postprocessNonSEFBuildRule'), Router::PROCESS_AFTER);
}
// Attach parse rules for language SEF.
$router->attachParseRule(array($this, 'parseRule'), Router::PROCESS_BEFORE);
}
}
it is now
public function onAfterInitialise()
{
$this->app->item_associations = $this->params->get('item_associations', 0);
// We need to make sure we are always using the site router, even if the language plugin is executed in admin app.
$router = CMSApplication::getInstance('site')->getRouter('site');
// Attach build rules for language SEF.
$router->attachBuildRule(array($this, 'preprocessBuildRule'), Router::PROCESS_BEFORE);
$router->attachBuildRule(array($this, 'buildRule'), Router::PROCESS_BEFORE);
if ($this->mode_sef)
{
$router->attachBuildRule(array($this, 'postprocessSEFBuildRule'), Router::PROCESS_AFTER);
}
else
{
$router->attachBuildRule(array($this, 'postprocessNonSEFBuildRule'), Router::PROCESS_AFTER);
}
// Attach parse rules for language SEF.
$router->attachParseRule(array($this, 'parseRule'), Router::PROCESS_DURING);
}
This last one works fine in 3.9 but breaks 4.0
Thanks for the clarification @infograf768 ... waiting for someone more expert to fix it
I confirm that the previous version of onAfterInitialise solves the problem with multilanguage on J4 Apha 8
Using Router::PROCESS_BEFORE
instead of Router::PROCESS_DURING
here appears to fix the issue.
$router->attachParseRule(array($this, 'parseRule'), Router::PROCESS_DURING);
This needs a lot of testing.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-03-24 08:02:33 |
Closed_By | ⇒ | infograf768 |
have you installed the multingual sample data through the module?
which precise url gives this result?