Topic-icon Not correct redirect after login [Solved]

Active Subscriptions:

None
1 year 5 months ago - 1 year 4 months ago #68319 by romagromov
Hello!
Not correct redirect after login.
For example, we are on item page:
directory.audio/sound-effects/interface-ui/17423-simple-pop-sound
User should be logged to download that sound.
Ok, we try to login, but after that we lose this page, because system redirects us to parent category
directory.audio/sound-effects/interface-ui
We can call it a disaster. Because users come to the site from a Google search and will no longer be able to easily find this page.
How to fix it?

 
Last edit: 1 year 4 months ago by romagromov.
The topic has been locked.
Support Specialist
1 year 5 months ago #68322 by alzander
Both the SCLogin module and JFBConnect have a "Login Redirection" option. Please make sure that's set to "Same Page". Once they log in, that should bring them back to the page they were logging in from.

If that doesn't work, let us know and we can investigate further.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
1 year 5 months ago #68328 by romagromov
Yes, both the module and JFB component have configured to redirect to same page.
Watch this video directory.audio/images/monopics/2022-11-11_12-09-52.mp4
But today I found that problem happens only when user login with user's access details (login and password).
When social networks used - redirection ok.
Watch how it goes directory.audio/images/monopics/2022-11-11_12-15-53.mp4
The topic has been locked.
Support Specialist
1 year 5 months ago #68334 by alzander
There are 2 things I'd ask you to check:
* Disable caching (as discussed in other posts)
* In the SCLogin module settings, change the Login Redirection URL to a specific menu item. Test if the user is redirected to that page. If they are still redirected to /interface-ui/ that would indicate some other extension (a plugin, component, etc) is detecting the login and redirecting the user. You'd need to determine what other code is forcing the redirection and disable it.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
1 year 5 months ago #68338 by romagromov
1. I disabled cache - no changes in behavior.
2. I changed the Login Redirection URL to a specific menu item no changes in behavior.

Actually, Login Redirection works ok on any page except item view.
So, when I log in on any items page, the site redirects me to the parent category page (not only in /interface-ui/).
The topic has been locked.
Active Subscriptions:

None
1 year 4 months ago #68342 by romagromov
Anybody here?
The topic has been locked.
Support Specialist
1 year 4 months ago #68345 by alzander
Are the item pages standard Joomla articles? If not, which extension are you using to create the directory of sounds on your site?

I just tried to look at the HTML on the site to determine what JFBConnect is setting as the redirect URL, but there is heavy combining and compressing of the HTML content. That makes it hard to debug but could also be altering some of the Javascript or HTML that JFBConnect relies on. In addition to disabling caching, can you disable all of the optimizations and test again? If it still fails, you can re-enable them.. but to debug further, we'd need to be able to see the actual HTML that's being generated before it gets altered.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
1 year 4 months ago - 1 year 4 months ago #68349 by romagromov
I'm using FlexiContent CCK. In fact, it's extended Joomla com_content.
About optimizations. It's JCH Optimize Pro.
Yes, I've tested with disabled JCH and it still fails.
I disabled JCH for you, but site is in Production Mode, so I can't wait a week for you to check it.
Last edit: 1 year 4 months ago by romagromov.
The topic has been locked.
Active Subscriptions:

None
1 year 4 months ago #68350 by romagromov
Ok, I found problem. But have no idea how to fix it.
System - Language Filter - overrides return URL.
The topic has been locked.
Support Specialist
1 year 4 months ago #68352 by alzander
That is interesting that it's the Language Filter. I'm familiar with FlexiContent, although it's been a couple of years since I've used it. It does extend Joomla content in the database, but it uses it's own URLs and routing to display that content, which means it's very different from Joomla content in the ways that matter for the issue you're having.

Looking at the page's HTML, even with JCH enabled, if you search for "jfbc.return_url", you'll see a long line like:
jfbc.return_url='L3NvdW5kLWVmZmVjdHMvaW50ZXJmYWNlLXVpLzE3NDIzLXNpbXBsZS1wb3Atc291bmQ=
That long string of garbage is the encoding for the current URL that JFBConnect uses to redirect the user after login. To decode it, you can paste it into www.base64decode.org/ and it will show the SEF URL. For example, above, the resulting url is the one you posted originally:

/sound-effects/interface-ui/17423-simple-pop-sound


So, the URL we're creating looks correct. Why that would be breaking isn't something.

Now, I just tested at the URL above and both after registering for the first time and then logging in I was left on the same page.

Is the Language Switcher Plugin currently disabled? If it's enabled, we'll need to understand better how to recreate the issue as it seems to be working properly now.

Thanks,
Alex
The topic has been locked.