?
avatar DrZen33
DrZen33
30 Jan 2018

Steps to reproduce the issue

Install Joomla 3.8.4
Try logging into Kunena forum 5.0.13

Expected result

Successful login to Kunena forum

Actual result

User gets sent to 404 Error page
URL = **website.com/component/kunena/
Cannot login to Kunena forum

System information (as much as possible)

PHP 7.2.1
Database version 5.5.5-10.0.33-MariaDB

Additional comments

avatar DrZen33 DrZen33 - open - 30 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jan 2018
avatar DrZen33 DrZen33 - change - 30 Jan 2018
The description was changed
avatar DrZen33 DrZen33 - edited - 30 Jan 2018
avatar Quy
Quy - comment - 31 Jan 2018

I don't use Kunena, however, I installed it and logged in successfully. Is this an upgrade from v3.8.3? Have you posted in Kunena forum to see if this an issue with other users?

avatar DrZen33
DrZen33 - comment - 31 Jan 2018

Yes this was an upgrade from v3.8.3
I am just posting a message on the Kunena forum now.

avatar brianteeman
brianteeman - comment - 31 Jan 2018

Sounds like an issue with redirect on login

avatar DrZen33
DrZen33 - comment - 31 Jan 2018

I have posted a message on the official Kunena forum here and waiting for feedback.
I have been using Kunena for 5 years and not experienced a problem like this before.
https://www.kunena.org/forum/k5-0-support/150516-joomla-3-8-4-breaks-kunena-5-0-13-login

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

The same happened with several extensions of mine when performing a login.
It turns that this issue is related to the Language Filter plugin inside the onUserLogin method. Indeed it has been changed due to the 'looking for associations' purpouse.

I found that the line 647
$query = $this->app->getRouter()->parse($uri);
causes a login/redirect break when the $uri is empty.

avatar franz-wohlkoenig franz-wohlkoenig - change - 31 Jan 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 31 Jan 2018
Category Authentication
avatar infograf768
infograf768 - comment - 31 Jan 2018
avatar radioagent
radioagent - comment - 31 Jan 2018

I see that there is some problem with login, for example, with Community builder. After upgrade to 3.8.4 i can't login through CB in frontend. I see that not only me: https://www.joomlapolis.com/forum/145-community-builder/238466-community-builder-login-module?limitstart=0

avatar csthomas
csthomas - comment - 31 Jan 2018

I am seeking a solution for Language Filter plugin

avatar infograf768
infograf768 - comment - 31 Jan 2018

To all: does that mean that each of your sites is a multingual site and uses Associations?

avatar infograf768
infograf768 - comment - 31 Jan 2018

@csthomas
related? #19497

avatar radioagent
radioagent - comment - 31 Jan 2018

To all: does that mean that each of your sites is a multingual site and uses Associations?

For me it is true
But i am not sure that there is association with login module. At least i do not see this association in menu.

avatar some1new
some1new - comment - 31 Jan 2018

Same problem here.
Two languages on beta site

login redirect issue

see: https://next.talking-business.de/de/cb-login

avatar infograf768
infograf768 - comment - 31 Jan 2018

One solution for the moment, IF you your site is multingual and the languagefilter is set to use Associations, is to set automatic language change to "No".
screen shot 2018-01-31 at 09 12 16

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

For the moment one solution is to disable the 'Automatic language change' as @infograf768 said.
I had to patch and release an update for all my affected extensions. The solution is to set the 'login_redirect_url' param in the active menu that overrides the automatic change.

avatar brianteeman
brianteeman - comment - 31 Jan 2018

If only we had beta releases so that developers could test things first

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

@brianteeman it's not always easy to test everything during the beta release phase. Most of bugs bubble up when the stable is released.

avatar DrZen33
DrZen33 - comment - 31 Jan 2018

To all: does that mean that each of your sites is a multingual site and uses Associations?

My site is English only.
System/Language Filter was already Disabled and login via Kunena does not work.

Login via main website does work OK, but login via Kunena (inside of website) does not work.
If I login via website first and then go to Kunena, I am logged in and can access Kunena.
I can also Logout OK via Kunena.

avatar csthomas
csthomas - comment - 31 Jan 2018

Can you folks put value of the return field from the login forms?

It looks like <input name="return" value="aHR0cDovL2xvY2FsaG9zdC9+dG9tYXNoL2E0L2luZGV4LnBocC9lbi8=" type="hidden">

avatar Bakual
Bakual - comment - 31 Jan 2018

The Kunena login doesn't have a return field. The regular one has one. It should not be required anyway.

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

It's supposed that a return field must not be mandatory. Things must work anyway.

avatar csthomas
csthomas - comment - 31 Jan 2018

It is not mandatory.

I can not replicate the problem.
I installed kenuna on my local apache enable/disable multilingual, php 7.2 on ubuntu and all still works.

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

@csthomas have you tried even with multilanguage enabled and 'automatic language change' enabled?

avatar csthomas
csthomas - comment - 31 Jan 2018

Yes, I will check a few more things like install joomla on different domain.

avatar Bakual
Bakual - comment - 31 Jan 2018
avatar csthomas
csthomas - comment - 31 Jan 2018

So I have to start that https://www.bakual.net/component/kunena/ return 404 on GET request.

avatar csthomas
csthomas - comment - 31 Jan 2018

@Bakual How you set 404 on /component/kunena/?

avatar mbabker
mbabker - comment - 31 Jan 2018

it's not always easy to test everything during the beta release phase. Most of bugs bubble up when the stable is released.

The only way bugs creep in to a stable release that cannot be caught by running from the git development branch or installing nightly builds or tagged alpha/beta/RC packages is by way of security patches which are obviously not shared publicly until release. Over 99% of "bugs [that] bubble up when the stable is released" are bugs that live in the development branch.

avatar Bakual
Bakual - comment - 31 Jan 2018

How you set 404 on /component/kunena/?

I didn't set that myself and haven't debugged anything yet. My guess is just that some code tries to redirect to a page other than the currently active (forum.html) for whatever reason and that fails. I'm not even sure why /component/kunena fails because imho it should actually work. Similar links like https://www.sermonspeaker.net/component/sermonspeaker work fine.

But then, one shouldn't end up with "/component/kunena/" anyway because there is a perfectly valid menuitem and it should just redirect back to that forum page (used to do just that).

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

My guess is just that some code tries to redirect to a page other than the currently active (forum.html) for whatever reason and that fails.

The only that i found is the multilanguage plugin feature 'automatic language change'

avatar DrZen33
DrZen33 - comment - 31 Jan 2018

A member of the Kunena support forum has posted a temporary fix to this problem here:
https://www.kunena.org/forum/k5-0-support/150516-joomla-3-8-4-breaks-kunena-5-0-13-login#197954

He has advised to do this:
Replace libraries/src/Router/SiteRouter.php with the one from Joomla 3.8.3.

Temporary fix works on my site.

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

Replacing a core file is not a solution.

avatar csthomas
csthomas - comment - 31 Jan 2018

About Kunena,

Link to form action is generated as JRoute::_('index.php?option=com_kunena');, there is missing a view, therefore menu item can not be found.

Note: Maybe createUri method should check if view is set and if not then add active Itemid.

At kunena component people set in global kunena configuration option Direct Component Access = NO. After that login to kunena return error 404.

Temporary options for now:

  1. Direct Component Access set to Yes or
  2. If you change JRoute::_('index.php?option=com_kunena'); to JRoute::_('index.php'); at components/com_kunena/template/crypsis/layouts/widget/login/login/default.php then all back to normal.
avatar csthomas
csthomas - comment - 31 Jan 2018

This should help:

diff --git a/libraries/src/Router/SiteRouter.php b/libraries/src/Router/SiteRouter.php
index 6dbabc1ea0..9f8daaf833 100644
--- a/libraries/src/Router/SiteRouter.php
+++ b/libraries/src/Router/SiteRouter.php
@@ -708,7 +708,7 @@ class SiteRouter extends Router
 
                if ($itemid === null)
                {
-                       if (!$uri->getVar('option'))
+                       if (!$uri->getVar('option') || !$uri->getVar('view'))
                        {
                                $option = $this->getVar('option');
 
@@ -717,6 +717,13 @@ class SiteRouter extends Router
                                        $uri->setVar('option', $option);
                                }
 
+                               $view = $this->getVar('view');
+
+                               if ($view)
+                               {
+                                       $uri->setVar('view', $view);
+                               }
+
                                $itemid = $this->getVar('Itemid');
 
                                if ($itemid)
avatar Bakual
Bakual - comment - 31 Jan 2018

Link to form action is generated as JRoute::_('index.php?option=com_kunena');, there is missing a view, therefore menu item can not be found.

Then that is a bug as well. Because components have a "default view" feature which makes sure it will work. The router at least should return the first Itemid found for a given component if no view is specified. If the currently active one is from the active component, it should take that.

avatar Bakual
Bakual - comment - 31 Jan 2018

Direct Component Access set to Yes

That indeed works. Interesting enough the URL in the browser is still forum.html after login.

avatar csthomas
csthomas - comment - 31 Jan 2018

I added PR #19501 which should resolve one part of problem but I have not enough information about

I found that the line 647
$query = $this->app->getRouter()->parse($uri);
causes a login/redirect break when the $uri is empty.

@joeforjoomla
Can you test PR and check if it still generate a problem. Do you have any error log?
When you disabled the automatic change language, on what page are you redirected and on what page you should be redirected after enable the automatic change language.
The $uri link is some how restricted, only for registered?

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

@csthomas i tested the PR #19501 but it doesn't resolve the problem. At least not the one due to the language filter plugin. It seems a bit unrelated too.

My extension perform a login using the $app->login method and after that the login is successful there is a normal redirection to a component page.
The problem arises when the parse method is fired in the language filter plugin, indeed the $uri variable is empty. The user state 'users.login.form.return' is not defined (is not supposed to be mandatory). This causes the router parse method to redirect someway but i can't determine exactly how. On a website i got redirected to the home page, on another website i got a browser error ERR_INVALID_REDIRECT

avatar csthomas
csthomas - comment - 31 Jan 2018

A quick solution will be to check if "users.login.form.return" is not empty, and then generate the new JUri.
Because all new stuff may be reverted then I will wait with that patch.

avatar joeforjoomla
joeforjoomla - comment - 31 Jan 2018

I agree @csthomas

avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Feb 2018
Category Authentication Authentication Router / SEF
avatar brianteeman
brianteeman - comment - 3 Feb 2018

Closed as the routing changes have been reverted for 3.8.5 with #19512

avatar brianteeman brianteeman - change - 3 Feb 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-02-03 17:17:27
Closed_By brianteeman
avatar brianteeman brianteeman - close - 3 Feb 2018

Add a Comment

Login with GitHub to post a comment