Just another little treat thrown at us today. I tried to login and got stuck on the It’s time to update your password page. I updated my password, logged out, cleared cache, cleared cookies, logged back in, tried changing the password again. Blah! Still stuck on that darned page.
This problem is documented in the magento2 github repository of course but none of the suggested fixes helped me. I’m special that way!
So I couldn’t get into the dashboard. But I could get into phpmyadmin and because this was the dev Magento site I felt real relaxed about poking at the tables.
Hold up! If you have the same issue and you Googled it right you’d land here https://github.com/magento/magento2/issues/4331 and if you are really lucky one of the suggested fixes will help you fix it. But if they do not help you and you are stuck on the It’s time to update your password page, try what I did.
Login to phpmyadmin or whatever db tool you use. Locate the admin_users table and note your user_id number. Then go to the “admin_passwords” table. You will see there is a row for Expires. That seemed suspiciously like a place I could extend the expiration of my password. For some reason each user_id has 2 password_ids. Don’t ask me why.
What we want to do here is edit the number under Expires.
My Expires number was something like 1569633535. I changed it to 1969633535 for both of the password_ids that were listed for my user_id. I could then login and go to other places in the Magento admin.
For ages I was able to avoid the nightmare that is Magento because I was focussed entirely on freelance jobs working with LightSpeed Webstore.
Once in awhile someone would try to ruin my life with a Magento project (usually fixing something that had worked then “mysteriously” just broke) but I had so much LightSpeed Webstore stuff going I could just say no, thanks.
Irony is now I provide support to a folks running Magento stores. Ha Ha! It’s what I do from 10 am to 6pm. Every day. And when I got started I knew only that Magento was a beast like creature of terrible proportions and that it would make me cry. Because it breaks like all the time. I was totally spoiled by other eCommerce shop platforms because they don’t break nearly as easily. I still have a site with an online store built with a really old version of WordPress e-Commerce plugin. It’s so old it should be on life support. But it’s fine. We keep everything else updated, of course. But even applying the latest version of WordPress doesn’t break the store. See? Spoiled.
Magento releases patches that break stuff. All the time. That’s why I have a job. I shouldn’t complain. Except I have to because I’m alive.
We had this little bit of animation in place to make 2 sets of numbers count up to the actual stats we wanted to display. The counter action should trigger whenever the div was in view: by scrolling down the page to the stats div, the numbers should start “counting up” and then stop on the right number. And it should fire more than once. Go back to the top and scroll down again no matter how many times the numbers should count and stop on the right numbers. It worked OK until around the 5th or 6th time you scrolled down. Then line 62 of jquery.counterup.js would throw an error: Uncaught TypeError: Cannot read property ‘shift’ of null. Stats would still animate but the final numbers would be the wrong ones.
CounterUp is in GitHub https://github.com/bfintal/Counter-Up and I tried digsite’s fork . This fork fixes the problem when jquery.counterup.js is used with the more current versions of waypoints.js. But then it only allows the stats animation to trigger once. We wanted it to be triggered any time the stats div came into view. Then I want back to the original and found this issue: https://github.com/bfintal/Counter-Up/issues/23 which was fixed around a week ago – just when I needed to wrap up my little web project! A web miracle! The same error (Uncaught TypeError: Cannot read property ‘shift’ of null) is logged in Console but the stats numbers stay correct each time the animation is triggered and then stops, thanks to the fix by https://github.com/zxl9171.