2

I have a custom functionality added in our application in customer page in admin part of our Magento application. That custom functionality, a form that saves custom field of customers and sends an email, gives me a success message and an error message like this

An error has occurred. Please contact your site administrator.

The data are saved properly but the email is not sent.

My question is if there is a setup for magento to debug mode, so that it can tell me where does that come from.

| improve this question | | | | |
0

You can look into the var/report folder and see the report corresponding to your exception number that is printed on the error page.

That will give you details about the error.

You can also check the var/log/system.log and var/log/exception.log files.

| improve this answer | | | | |
0

Take a look in your root index.php file. There's a block for

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}

From there you can either add a line to your root .htaccess file, something like

SetEnv MAGE_IS_DEVELOPER_MODE true

or if you don't have access to the root .htaccess file, just go into your root index.php file and set the $_SERVER variable before the check like

$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;

and that'll activate Magento's developer mode and give you some more insight into what's going on. From there you could do what Digital Pianism suggested and check out your var/report folder, var/log/system.log, and var/log/exception.log. Depending on what the error is, it might be in your web server's error log as well.

Past that, if you've got a local build, you could install the XDEBUG PHP extension and plug it into an IDE (Eclipse, Netbeans, PHPStorm) and then step through the code with breakpoints to see exactly what's throwing the error.

| improve this answer | | | | |
0

Temporary comment if for developer mode in index.php as bellow

//if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
//}
| improve this answer | | | | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.