Web Marketing ROI Posted February 27, 2015 Share Posted February 27, 2015 (edited) Hi there, One of our clients is using Prestashop version 1.5 and we've been seeing a strange PHP error message after clicking on the verification link in the 'Password Reset' email. It says: "Notice: Undefined index: email in /var/www/html/cache/smarty/compile/4e/06/fc/4e06fc94b46a62394c4907eaeb1442eb841e3394.file.password.tpl.php on line 50". I've tried clearing the smarty cache both via the admin panel as well as manually but the error persists. Does anyone have any pointers? Thank you! Edited February 28, 2015 by WebMarketingROI (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted February 27, 2015 Share Posted February 27, 2015 It is a warning, not an error. you appear to have debug mode enabled for some reason. you should disable it and you will not see these warning messages. Besides seeing the warning message, does it not work? 1 Link to comment Share on other sites More sharing options...
Web Marketing ROI Posted February 28, 2015 Author Share Posted February 28, 2015 (edited) Thanks bellini13. Right, you are. I had a look at `config/defines.inc.php` and found: define('_PS_MODE_DEV_', true); We've changed this over to: define('_PS_MODE_DEV_', false); And tested it again - it works perfectly (It did work before, just displayed an error) with no error message. However, after clicking the password reset token link, it displays the following: Your password has been successfully reset and a confirmation has been sent to your e-mail address: Interestingly, line 50 in /cache/smarty/compile/4e/06/fc/4e06fc94b46a62394c4907eaeb1442eb841e3394.file.password.tpl.php has the following code: <?php echo stripslashes(smarty_modifier_escape($_POST['email'], 'htmlall', 'UTF-8'));?> From a PHP perspective, how can this page print out the e-mail from $_POST['email'] if they've gotten to this page by visiting http://domain.com.au/password-recovery?token=PasswordResetToken? As far as I can see, there's nothing sent via $_POST whatsoever, so this seems to be flawed. We didn't write this code ourselves (it may have been from some of the inherited code from previous developers) - is it part of the PrestaShop core? Edited February 28, 2015 by WebMarketingROI (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted February 28, 2015 Share Posted February 28, 2015 i went back as far as PS v1.5.1 and I do not see the usage of _POST['email'] in the password.tpl file. So I suspect you are using a third party theme (not the default theme), or it has been customized. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now