Please or Register to create posts and topics.

Login button doesn't come back to forum after logging in.

Page 1 of 2Next

Hi, and thanks for a really useful forum for wordpress!

The first page my forum users arrive at says “Sorry, only logged in users have access to the forum.” and so they use the Login button, in the blue bar, just above.
However, once successfully logged-in, they aren’t brought back to the correct page and they get the message “Oops! That page can’t be found.”.  For the moment, I’m telling them to then visit the forum URL again because they’re already logged-in.

I see that the Login button on that first page has the link:
https://www.mywebsite.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.mywebsite.com%2Fhome%2Fsample-page%2Four-forum%2F

The link should be slightly different for my site:
https://www.mywebsite.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.mywebsite.com%2Findex.php%2Fhome%2Fsample-page%2Four-forum%2F

If I past that URL into my browser, I can login just fine and I’m brought back to the right place for the forum.

How can I make this the default for the Login button, please?

Many thanks,

 

Hello Bicko,

which permalink-structure are you actually using in your WordPress settings? Are you using any third-party extensions for managing login/registration stuff?

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thanks for coming back to me.

It’s a good question. The permalinks section of the wpsettings is set to custom and has /index.php/%year%/%monthnum%/%day%/%postname%/   for the URL structure.  However, I notice that the links on the website aren’t following this convention.

I’m seeing https://www.mywebsite.com/index.php/home/(and/whatever/comes/next/) for nearly all of the areas of the website (never any year/month/day URLs) and for just one section of the site (which also contains the forum) I’m seeing https://www.mywebsite.com/index.php/home/sample-page/(and/whatever/comes/next/) – it has an extra “/sample-page/” in its URL.

This might not have anything to do with it though, since the Login button is missing the index.php part of the URL. The sample-page bits are always there.  I’m not using any third party extensions for logging in, and I have registrations disabled.

Does that help?
Thanks again.

 

Hello Bicko,

can you try to remove the /index.php part from the custom rule because it should be not necessary (any links are parsed against it anyway). I think this could also be the reason why it gets stripped away by the WordPress function which I am using to get the link of the forum site.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Hello, and sorry for the delay,

I’m more than a little nervous of changing the permalinks on a live site – is there a chance of breaking the site, or does wordpress handle all that nicely?  (obviously, I’ll backup beforehand!)

Thanks.

Normaly it should not break anything. It can only happen that your links changed so when you added some hard-coded links into the post/page content to your site there is the risk that they dont link to the correct location. But with a backup you will definitely be on the safe side.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Right… decision made.  Backups in place… time to change the permalinks!
I’ll report back later.

Thank you.

Deep breath – done it.

It’s working fine now.  Obviously, there aren’t any links remaining that include ‘index.php’ anymore and so the forum ‘login’ button isn’t having any trouble.

Really appreciate the pointers, thank you. I’m still a little puzzled as to why the permalink structure isn’t being observed on the site; /%year%/%monthnum%/%day%/%postname%/ shouldn’t be showing in a browser as /home/and/whatever/comes/next/, surely?  I’ll leave it now – that’s a pre-existing issue and not related to Asgaros forum.

Thank you.

Hello Bicko,

I am happy to hear that it is working now! 🙂 I think the permalink-settings are only used for blog-posts and not normal pages – but I am not 100% sure about it.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

I inherited a website with the same custom setting on permalinks starting with /index.php/ and had the same problem.  When I edited the custom setting to remove the /index.php part the logins started to work as they should, returning to the forum page.

Page 1 of 2Next