Support Forum

Password change in Profile->Account Settings screen not working

RV Roberto Villabona
Roberto Villabona
Member

Hi,

I’m testing on a development site that uses real forum data from a production site.  It’s being tested to see if upgrading the production site to the latest WP and Simple:Press versions are problem-free.

I’m running the dev site on WordPress 4.3.1 and Simple:Press 5.5.11 with all SP plugins updated.  The production runs on much earlier versions for both but is generally running fine.

Anyway, there’s one problem I detected and it’s that the password change screen in Profile->Account Settings doesn’t seem to be working.  I get the “Account Settings Updated” after entering the new password twice but no actual change to the password happens.

When I use the WordPress “Your Profile” screen to change the password it works.

I also have Woocommerce installed and using its account editing page I am also able to change the logged in user’s password.

I have an event logger that logs all WP password changes and from there I see that no password change actually takes place using the Simple:Press profile screen but the changes using the default WordPress and Woocommerce forms are working.  This actually works on the older website so I’m wondering if it may be an incompatibility with how WP4.3 now handles passwords.  Thanks!

20 Answers

New Answer

RV Roberto Villabona
Roberto Villabona
Member

Just some additional info.

My Profile->Account Settings screen doesn’t have the “Alternate Post by Email Address:” input box in my form.  Could that be a sign my dev site isn’t running the right version?  I’m seeing no messages that any of my SP plugins are out of date.

Also, I tested the password change form in this forum and it seems to be working 🙂 unlike my dev site 🙁

IK Ike
Ike
Member

Hey Roberto,

There was an issue with the profile password reset but it was more of a problem with typing the new password as opposed to saving it, but that was fixed up at least a month ago in 5.5.10..

Additionally there is a ticket open for an issue with password reset entitled ‘New password reset no longer redirects’ but I’m not sure on the specifics of it. It seems to be more a reference to redirecting back to the forum as opposed to the WP dashboard as WP 4.3 changed the whole password / registration system quite a bit, but for more info on that we’ll have to wait for Mr Papa to take a look as I think he might know more about it than me, or whether it will cause the problem you’re seeing.

Are you getting any errors in the browser console on that page?

As to the ‘Additional Post By Email’ box, are you running the Post By Email plugin?

RV Roberto Villabona
Roberto Villabona
Member

Hi Ike,

No, I’m not using the Post by Email plugin so I guess that explains the lack of that input box. 🙂

However updating the password just isn’t working.  I don’t have any errors in the browser console (Chrome) whether after loading the page or after updating the password.  In fact I get the message “Account Settings Updated” but still no actual password change happening.

On Firefox I get these security messages on the console once the “Account Settings” form is shown (since I’m not using HTTPS):

Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More] <unknown>
Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.[Learn More]

However I get identical results in that I see the “Account Settings Updated” message once I enter the new password in the two boxes.  I’ve tried this even on the basic Twenty-fifteen theme and I get the same results.

IK Ike
Ike
Member

The main difference here is that we are running SP 5.6 and I can’t see any tickets fixed in 5.6 that relate to this problem. I’m also not sure this has anything to do with the other recent password / registration problems.

It might be worth disabling other WP plugins and trying again just to try and narrow it down but after that I’m afraid we will have to wait for Steve (Mr Papa) to take a look as I’m really not sure what to suggest.

MP Mr Papa
Mr Papa
Member

correct was fixed and confirmed by multiple users…  and those are not errors, just warnings as you suspected by plaintext passwords with ssl…

after trying to save, anything in forum – toolbox – error log?  or in your server php error log?

RV Roberto Villabona
Roberto Villabona
Member

Hi,

Just did the test with all other plugins disabled (only Simple:Press activated).  Also used the Twenty-Fifteen theme with no custom functions.  Used the Reboot Child Framework theme without any customizations.  All Simple:Press plugins active.

I got the same result — no change to the password even as the message says the account info had been updated.  Just for kicks I also edited the email address and the password.  I logged out, tried to login using the new password and couldn’t get in.  Successfully logged in using my old password, looked at the Profile again and saw the email address had been updated even as the password wasn’t. 🙁

Next I deactivated all Simple:Press plugins on top of this yet I still got the same results.

I tried changing my password using the standard Your Profile screen and it worked.

There was one modification I had done before on the sp-load-forum.php file because of an incompatibility with the theme I’m using (Genesis Dynamik Website Builder) where I changed the parameter 10 in the call to add_filter in line 97 to the value 15 so it would work with my theme (it kept showing the Browser title in the viewport otherwise).  I don’t think it has anything to do with the problem I’m having but I changed that back to its original line but still got the same results.

Anything else I can do to help troubleshoot?  I was curious about the Data Inspector in the forum admin Toolbox but couldn’t find the docs on how to use it, or if at all it’s any use in this case.

EDIT: Forgot to mention there were no php nor forum-toolbox error logs in all cases.

RV Roberto Villabona
Roberto Villabona
Member

Hi, just some additional info which I’m not sure is relevant.

I was looking at Forum->Profiles and got this screen:

sp-profileoptions-ok.png

However when I click on the ‘Profile Options’ link in the Simple:Press admin menu (which should just take me to the same screen) I get this (filepath prefix intentionally blurred):

sp-profileoptions-error.png
IK Ike
Ike
Member

So is it only when you click on the SP Forum > Profile Options tab you get the error? By this I mean can you always access the profile options page by using the inline Forum menu embedded in the WP dash?

If so, can you try changing it to a ‘Forum Profile Page’ instead of popup?

This has cropped up once before and wasn’t something we could replicate. The error thrown there is a standard WP function that just checks for other plugins that might offer a profile like BuddyPress for example so it shouldn’t affect the SP profile at all.

Instead of SP error log, can you check your PHP error log? Make sure to clear it, re-run test and check it for errors only, not warnings or notices.

RV Roberto Villabona
Roberto Villabona
Member

So is it only when you click on the SP Forum > Profile Options tab you get the error? By this I mean can you always access the profile options page by using the inline Forum menu embedded in the WP dash?

If so, can you try changing it to a ‘Forum Profile Page’ instead of popup?

Yes, that’s correct.

I changed the settings to Forum Profile Page and that error still occurs and is recorded in the PHP error log.

I tried changing the password with the new Forum Profile Page enabled instead of Popup Window and still no password changes occur and apart from the error about the is_plugin_active() function missing, there were no other error logs, either from the PHP error log file or SP Toolbox Error Log.

So in summary I still get the same results — no password change takes place when I try to do so and I still get the is_plugin_active() error message when I select SP Forum > Profile Options tab.

IK Ike
Ike
Member

OK,

Sorry Roberto but will have to leave this one for @mr-papa.

RV Roberto Villabona
Roberto Villabona
Member

Hello,

I’ve found a solution although it doesn’t make sense to me yet why it worked.  What I did was to compare the source code of an old, working version (v.5.3.4) that’s running on the production site and that running on the dev (not working, v.5.5.11) site.  I’m no PHP programmer but have programmed enough in my lifetime to wade my way through understanding it on the fly with the help of google.

Anyway the culprit appears to be the latest version of the file simple-press/forum/profile/ahah/sp-ahah-profile-save.php.

In the older, working version lines 77 & 78 the index ‘password1’ and ‘password2’ are used as the index to the $_POST variable to retrieve value of the passwords entered in the account settings form.  The same for lines 120 & 121.

In the newer (v.5.5.11), non-working version those same lines use the index ‘pass1’ and ‘pass2’.

I looked for the file containing the input form code for the password change (in v.5.3.4) to verify what index name should be used and figured that file to be simple-press/forum/profile/forms/sp-form-account.php. Reading through the code, I saw the index name used was ‘password1’ and ‘password2’ (Lines 73 & 81 of v.5.3.4).

Out of curiosity and just to try something, I changed all occurrences of ‘pass1’ to ‘password1’ and ‘pass2’ to ‘password2’ in the 5.5.11 version of simple-press/forum/profile/ahah/sp-ahah-profile-save.php.

I then tested if I can change passwords and it worked!  Tested it repeatedly and it keeps working.

Then it occurred to me to compare the source code for the input forms which I figured to be simple-press/forum/profile/forms/sp-form-account.php for both versions.  From my fragmented knowledge of HTML/PHP, what I did shouldn’t have worked since the older and newer versions were using seemingly correct name attributes in relation to their respective sp-ahah-profile-save.php files. I also noticed that in v.5.5.11 those lines in question were using the same strings (‘pass1′,’pass2’) for both name and id attributes of their corresponding <input> elements, unlike in v.5.3.4 which used different strings for name and id in its corresponding <input> elements.  

Ok, in summary it’s working now with that edit I did to the sp-ahah-profile-save.php file, but I don’t understand why it’s working.

P.S.

One other curiosity is that the in both 5.3.4 and 5.5.11 versions of sp-ahah-profile.save.php, the part where it updates the user’s email (if changed) appears to use SQL instead of the standard WP API wp_update_user().  Is there any particular reason for this?

MP Mr Papa
Mr Papa
Member

so late to this game and very late tonight… but the issue is you are getting a is_plugin_active error?  or something else…

we have a pretty good clue on the error and if so, will look into in next day or two (short handed with Andy on vacation and me working long hours – Ike doing yeoman’s job around here!)…

or is the problem other and password just not saving?  sorry for my confusion…

RV Roberto Villabona
Roberto Villabona
Member

The problem in this thread is the password not being saved.  Please check out my most recent post (#12) about it since that’s the furthest I’ve gone so far in investigating the issue.  Thanks.

MP Mr Papa
Mr Papa
Member

okay, so nothing to do with is_plugin_active()…  reason I asked for clarity as this thread has wound around…

have opened a ticket and we will investigate… bit short handed with team vacations, but its high priority ticket…