You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
MLP currently shows inconstistent behaviour when redirecting Users:
Using a static front page with missing content relation on all sites:
Have at least one site display a static front page ( wp-admin/options-reading.php )
This page is not linked to a page on the remote site you wish to redirect to
MLP will fail to redirect to the front page of the remote site, even though all other related settings have been set up correctly. This is because Mlp_Language_Negotiation::get_fallback_match() returns an empty URL if no matching content has been found, causing Mlp_Redirect_Response::redirect() to bail without further notice.
This behaviour differs from what the Language Switcher, Quicklinks - or more precisely Mlp_Helpers::show_linked_elements() would do: Redirect/Link to the home URL of the remote site.
Instead, the redirect feature simply does nothing at all, causing confusion among our users. Without being given any clue as to what went wrong, they might assume the feature is broken entirely and something is wrong with the MLP settings or the configuration of the Language Manager.
The obvious solution would be to make Mlp_Language_Negotiation::get_fallback_match() return the home URL of the most appropriate language/site and thus, mimick the behaviour of Mlp_Helpers::show_linked_elements().
But there's an edge case:
Using a static front page on one site, but with intact content relation:
Another implication of this behaviour is that it is currently not possible to have 2 sites use different setups for their front page:
Site A uses a static front page
Site B uses the regular "recent posts" view
The front page of site A has a working translation on site B
Now I am not sure if there is an actual use case for this kind of setup, but it poses a noteworthy question: What is the priority of "I am on the front page" vs. "There is a matching translation for the current content"? Does it differ between redirecting new users and showing translated content using Mlp_Helpers::show_linked_elements()?
The reason this setup is impossible is because a redirect to the home URL is merely a fallback if no Content ID is present. (And we're currently not even doing that, as pointed out above)
You could argue that new visitors should always be sent to their preferred language. And if they opened the home URL, that intention should be honored, instead of redirecting them "somewhere else".
But if a redirect to home is just a fallback, MLP would potentially ignore the intentions of both the visitor and the site owner (since he decided to use different front pages)
If we decide to consider this edge-case, the solution would probably be slightly more complex, but I haven't looked into it yet
The text was updated successfully, but these errors were encountered:
MLP currently shows inconstistent behaviour when redirecting Users:
Using a static front page with missing content relation on all sites:
MLP will fail to redirect to the front page of the remote site, even though all other related settings have been set up correctly. This is because Mlp_Language_Negotiation::get_fallback_match() returns an empty URL if no matching content has been found, causing Mlp_Redirect_Response::redirect() to bail without further notice.
This behaviour differs from what the Language Switcher, Quicklinks - or more precisely
Mlp_Helpers::show_linked_elements()
would do: Redirect/Link to the home URL of the remote site.Instead, the redirect feature simply does nothing at all, causing confusion among our users. Without being given any clue as to what went wrong, they might assume the feature is broken entirely and something is wrong with the MLP settings or the configuration of the Language Manager.
The obvious solution would be to make
Mlp_Language_Negotiation::get_fallback_match()
return the home URL of the most appropriate language/site and thus, mimick the behaviour ofMlp_Helpers::show_linked_elements()
.But there's an edge case:
Using a static front page on one site, but with intact content relation:
Another implication of this behaviour is that it is currently not possible to have 2 sites use different setups for their front page:
Now I am not sure if there is an actual use case for this kind of setup, but it poses a noteworthy question: What is the priority of "I am on the front page" vs. "There is a matching translation for the current content"? Does it differ between redirecting new users and showing translated content using
Mlp_Helpers::show_linked_elements()
?The reason this setup is impossible is because a redirect to the home URL is merely a fallback if no Content ID is present. (And we're currently not even doing that, as pointed out above)
You could argue that new visitors should always be sent to their preferred language. And if they opened the home URL, that intention should be honored, instead of redirecting them "somewhere else".
But if a redirect to home is just a fallback, MLP would potentially ignore the intentions of both the visitor and the site owner (since he decided to use different front pages)
If we decide to consider this edge-case, the solution would probably be slightly more complex, but I haven't looked into it yet
The text was updated successfully, but these errors were encountered: