Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Simple:Press Login Component Not Working
Avatar
Jessica Lopez
Member
sp_UserOfflineSmall Offline
Jun 29, 2016 - 11:50 am

Our Simple:Press login component is not working: 

https://museumstoreassociation...../shoptalk/

When a user clicks the Simple:Press "Login" button, the page expands to show the login box for "Login name" and "Password".

When the user submits their account information, they are routed the My Account page, which is our site's login page, but they have not been logged in. They then need to re-enter their credentials to proceed. 

I'm guessing that the issue is occurring because we are not using the default Wordpress Login page, wp-login.php. 

How can I resolve this issue? Some options: 

  1. Change the login function URL - if this is an option, where can I find that code? 
  2. Change the login box code - if this is an option, where can I find that code? 
  3. Any other options? 

Any feedback on which the simplest approach and instructions is appreciated. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 29, 2016 - 12:04 pm

I would suggest you can either remove the login form completely and simply utilise whatever login procedures you are already using - or yes - you could change the url for sending the logon details to. Either will require a small edit to one of the forum templates.

We can tell you what to change of course but the first stage would be to create a child theme if you are not already using one - easy, quick and simple (https://simple-press.com/docum.....ild-theme/) from one of our free frameworks - and then tell us which forum theme you are using so we can target the correct template.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jessica Lopez
Member
sp_UserOfflineSmall Offline
Jun 29, 2016 - 12:40 pm

We are using a child theme for Reboot. Thank you! 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 29, 2016 - 3:44 pm

And do you want to remove or change the url?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jessica Lopez
Member
sp_UserOfflineSmall Offline
Jul 8, 2016 - 9:49 am

I would like to change the URL to utilize our custom login page (https://museumstoreassociation.....y-account/). 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 8, 2016 - 4:43 pm

You will need to make a small edit to the template display function in the head template. In the parent theme locate the templates folder. Under that are a desktop and a mobile folder each of which has a 'head' template (spHeadDesktop.php and spHeadMobile.php).

The first thing needed is to copy these templates to their respective folders in your reboot child theme. 

Then in both templates you will need to make a small edit to the template tag 'sp_LogInOutButton()'

Update the sp_LogInOutButton template tag from:

sp_LogInOutButton('tagClass=spButton spRight', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out'));

to

sp_LogInOutButton('tagClass=spButton spRight&logInLink=http://yoursite.com/mylogin', __sp('Log In'), __sp('Log Out'), __sp('Log in and log out'));

the change being adding:

&logInLink=http://yoursite.com/mylogin

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jessica Lopez
Member
sp_UserOfflineSmall Offline
Jul 11, 2016 - 9:38 am

Thank you for your response. I have implemented this on the spHeadDesktop.php. The results were different than I expected, so I apologize if I did not explain clearly.

Here is what is happening now that I've modified the code: 
On the forum login page (https://museumstoreassociation...../shoptalk/) when a user clicks the forum "Log In" button, the top area expands to display the login box (Login Name & Password). It displays for a couple seconds, then automatically refreshes the page to redirect to my site's login page (https://museumstoreassociation.....y-account/). 

Here is what I would like to happen: 
On the forum login page (https://museumstoreassociation...../shoptalk/) when a user clicks the forum "Log In" button, the top area expands to display the login box (Login Name & Password). The user enters their credentials, which routes through our site's login page (assuming that correctly resolves the issue of the login functionality not working), logs the user in, and returns them to the forum page (https://museumstoreassociation...../shoptalk/), logged in. 

Please let me know if this approach is possible, and if not, what options I have for accomplishing this login flow for the user. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 11, 2016 - 9:47 am

So you definitely do NOT want to use your own replacement login page? Which is what I thought you meant although admittedly missed a step on my instructions to remove the SP front login form.

Can you confirm this please?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jessica Lopez
Member
sp_UserOfflineSmall Offline
Jul 11, 2016 - 11:58 am

I do not want the user to have to go to our replacement login page -- unless necessary. 

Ideally, they will login using the simple:press login form -- but that is not working, presumably because we are not using the default WP login page (wp-login.php). 

Thank you for your help, and please let me know if this needs further clarification. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 11, 2016 - 12:49 pm

That actually looks like it is not possible (unless my colleague @mr-papa knows of a way) and that surprises me. I am going to suggest we change this so that it can be done.

Until then I think the best we can do is redirect to your own form. And that is working now but you should also comment out the display function:

sp_LoginForm($loginForm);

which will stop the forum form opening.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620