0

I Sent an email to Admin and the email contains some text and testimonial links and link URL is http://example.com/index.php/admin_test/adminhtml_testimonial/edit/id/1/key/91c0259ce0f94dda2cf0467d4f0bba97/ and Admin already logged in and when Admin clicks on the above link from gmail account it redirects dashboard page rather than the testimonial edit form page. I am using Magento 1.9.2 with all security patches.

I used this code for link url Mage::helper('adminhtml')->getUrl('admin_test/adminhtml_testimonial/edit', array('id'=> $testimonialId)

Why it redirect dashboard page ?

5
  • This depends on the router configuration in your module. Please update your question with that info
    – Sander Mangel
    Dec 29 '15 at 10:20
  • But if Admin logged in and I disable secret key from system > configuration > Admin and then send email and now link url is example.com/index.php/admin_test/adminhtml_testimonial/edit/id/… and when I click this link from email it will work and redirect to edit form page.issue about in secret key ? Dec 29 '15 at 14:08
  • Ah, yes, for those external links you do need to turn off the secret key, you might not want to do that.
    – Sander Mangel
    Dec 29 '15 at 16:21
  • it is stated that they have added secret key to URL for CSRF (Cross-site request forgery) Attack Prevention.Any Magento Email template available where link to redirect to admin edit form page ? Dec 29 '15 at 18:08
  • 1
    Since they key is based on a certain session I don't think it's possible to actually make a direct link to be honest. Not without sacrificing security
    – Sander Mangel
    Dec 30 '15 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.