Magento 1.9.24 upgrade - reset password issue - magento

I upgrade my magento store to the last version, after this I can't reset the customer passsword in frontend, so:
I press on Forgot Your Password button
Complete with my email password and press Submit
In the received email I press on "RESET PASSWORD" button and I am redirected to the store and I have this error: Your password reset link has expired.
How I can solve this?

I had the same, but a second error message appeared
which said that a required field is not filled out.
In general: when anything goes wrong when saving the customer,
the said error message "Your password reset link has expired" shows up.
So, pay attention to any additional error messages showing up or in your log files.
If you want to find out what's happening in detail,
go to the file
"app/code/core/Mage/Customer/controllers/AccountController.php"
and modify the method resetPasswordPostAction temporarily.
Inside the } catch (Exception $exception) { directive, add Mage::logException($e);.
After you have seen the error again,
you can find the real error message in the file var/log/exception.log.
Ref Link: https://magento.stackexchange.com/questions/84605/magento-reset-password-link-not-working-after-upgrade
Hope this will help you!!

Related

Why cypress loads login page again instead of home page?

I wrote a cypress script to log in to the application ( enter the user id, password and click the log-in button), and expecting to load the home page. Cypress enters the user id, password and clicks the button but, loads the login page again instead of the home page.
Below is my script to login:
`
cy.visit('https://digitalxq1.com/sis/basic?accountNumber=123456');
cy.enterText(txtUserID, userid);
cy.enterText(txtPwd, 121212);
cy.clickElement(btnPwd);
Has anyone faced a similar issue? And, Does anyone knows the solution? Please assist.
The nature of the application forced me to log in first without account no- " cy.visit('https://digitalxq1.com/sis/basic'" and reload the app with account number after that - "cy.visit('https://digitalxq1.com/sis/basic?accountNumber=123456')" ).
I made mistake of doing the refresh immediately after clicking on login button as below:
cy.visit('https://digitalxq1.com/sis/basic');
cy.enterText(txtUserID, userid);
cy.enterText(txtPwd, 121212);
cy.clickElement(btnPwd);
cy.visit('https://digitalxq1.com/sis/basic?accountNumber=123456'
Somehow cypress unable to respond to the refresh and loaded the login page again. As a solution, I did validate whether the app is loaded or not after clicking login button. Then proceeded with refresh as below:
cy.visit('https://digitalxq1.com/sis/basic');
cy.enterText(txtUserID, userid);
cy.enterText(txtPwd, 121212);
cy.clickElement(btnPwd);
cy.get(#testElement). should('have.length',2);
cy.visit('https://digitalxq1.com/sis/basic?accountNumber=123456'
This approach resolved my issue.
Try this cy.reload(); this will work.
If you want to reload the page with cache then try this cy.reload(true)

Square payment form cannot execute requestCardNonce() to get nonce in Firefox 48.0.2

I've also submitted a request to Square support and hope to hear back soon.
Steps to reproduce
Load the Square payment form (copy-pasta from https://docs.connect.squareup.com/articles/adding-payment-form/#samplewebpage and add your Application ID and uncomment the lines to submit a request to the server) in Firefox 48.0.2 (latest release as of today). Here's a test URL: https://wideningwontwork.org/test.html
Leave all fields blank.
Click "Submit Query" button.
Expectation
All fields should be highlighted in red to indicate they are required.
Observation
Firefox cannot fire the event requestCardNonce() because it is not defined. Error message in Firefox console:
ReferenceError: event is not defined
requestCardNonce() payment:121
onclick() payment:1
Form is submitted to the server with nonce = "" (empty string or NULL).
Unfortunately, we've published a bug in the documentation We're working on it. Firefox requires an event to be passed as an argument to the function, whereas chrome and safari don't. If you edit the definition of requestCardNonce that you copied from the example to instead be the following, it should work for you:
function requestCardNonce(event) {
event.preventDefault();
paymentForm.requestCardNonce();
}
Notice the event argument. That's the part you have to add. Sorry for the confusion. We'll fix the docs.
edited to include a current screenshot as of 2016-08-31 17:04:43. This is the location in the script where you need to add an event argument to the function definition, and then where you need to provide the event argument to the function call on the submit button.
Having added event in both places, using firefox, I've gotten the following with your test form:

Wicket invalidate session & login on same event

When I try to log in while I'm already logged in, wicket gives me a LoginException; Additional Logins are not allowed. This makes sense of course.
What I want to do, is invalidate the session if there is already a user logged in, and log in in the same event.
if (((AuthenticatedWebSession) getSession()).isUserAuthenticated()) {
((AuthenticatedWebSession) getSession()).invalidateNow();
}
((AuthenticatedWebSession) getSession()).login(secureLoginContext);
It seems invalidateNow is completed after the onSubmit event, because Wicket still gives me the same LoginException.
Any ideas how to make this work?
Why do you want to log in again? Are you trying to log in with different credentials?
I have once written a panel where a user (already logged in) could log in as another user if he had sufficient rights. I ran into a similar problem and fixed it by forcing wicket to make a new session with ThreadContext.setSession(null).
So you code would become:
if (((AuthenticatedWebSession) getSession()).isUserAuthenticated()) {
((AuthenticatedWebSession) getSession()).invalidateNow();
ThreadContext.setSession(null);
}
((AuthenticatedWebSession) getSession()).login(secureLoginContext);

MsgBox on server side

I am trying to display a popup message on my web app. When i run my app normally on my local pc, i get the pop up message boxes appear. However when i publish the app they dont.
here's how it will work:
a button is pressed, it will pick up a file from a directory, then it will check another directory to see if the file the exists...if the file exists then a pop up is needed to inform "File already exists. do you want to continue?" if the user clicks yes it carried on with the code, if they click no then the process is ended.
do anyone have any idea how to do this?
my code so far:
If System.IO.File.Exists(acceptedExistsuNKNOWN) And System.IO.File.Exists(rejectedExistsUNKNOWN) Then
'IF BOTH EXIST
If MsgBox(acceptedExistsuNKNOWN & " & " & rejectedExistsUNKNOWN & "files already exists, do you want to rerun the process?", MsgBoxStyle.YesNo, "Files Exists") = MsgBoxResult.Yes Then
(continur
else
System.Diagnostics.Process.GetCurrentProcess.Kill()...
many thanks
The problem with your idea is that someone would need to sit logged in to the server to interact with the modal popup boxes; that is, if this was even possible, since it would need to be that person on the server who does the action on the page in order to be the recipient of the popup, so it's not like other users can issue a popup to him.
What you do on the server side executes on the server side.
I think you really want ti to show on the client side, but want the logic to make it happen on the server side. It doesn't work this way. Instead, what you might do is output something n the response that indicates a client-side popup should be shown. For instance, you could have a hidden field on the page and set a value, then use JavaScript to show an alert if that value meets your criteria.
Think about what you are asking. If a dialog pops on the server side, the user will not be able to see it (they are on the client side). Moreover, the code will be at a standstill until someone dismisses that dialog, which the user cant see. Only individuals with access to the server will be able to see this. Do you intend to have someone watching the server 24/7? Instead, you probably want to alert the user. This can be done my returning a response from the server code to the client code to display a dialog. The simplest method would be to throw an error and redirect the user to a new page to display an error. If you want something more fluid, you can use updated panels and the AjaxControlToolkit's modal pop up extender. Another way would be to use ClientScript, like this:
try
{
//check for files here
}
catch (Exception ex)
{
string script = "<script>alert('" + ex.Message + "');</script>";
if (!Page.IsStartupScriptRegistered("myErrorScript"))
{
Page.ClientScript.RegisterStartupScript("myErrorScript", script);
}
}

Magento backend error: Edit user

I get an error in Magento 1.6.1.0 backend:
System -> Permissions -> Users -> Edit user
When I try to access this page nothing gets loaded into content area. Page layout and menus are displayed but the form for user editing is not.
In Firbug it throws the following error:
$("user_user_roles") is null
This line comes from
app/design/adminhtml/default/default/template/permissions/user_roles_grid_js.phtml
which has not been touched.
I did an update from 1.6.0.0 to 1.6.1.0 ... could create and edit users in the old version but I am not able to do it now. Could not find anything on the web for this error.
Please let me know if there is a fix to this.
I also got this error. Here is what I did to fix.
Open file Roles.php in app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php and add getRowUrl() function:
public function getRowUrl($row) {
return $this->getUrl('*/*/edit');
}
Hope this helps,
Neo.

Resources