2

Magento Version: EE 1.12.02

I'm having an issue with all of my log_* tables being empty on my production site. Mage_Log is turned on, there are no errors in any of the Magento logs or system logs that would point to anything being wrong.

However the really odd part is when I follow these steps for bringing up my test environment so that I can troubleshoot the issue, the problem disappears. I'll list the instructions in case there's anything anyone can gleam from them.

1) I export my production database so that I can import it into development for troubleshooting.

mysqldump --add-drop-database -u prod -p prod_db > prod_db.sql

2) I sed the database with my development URL and turn off https.

sed s^prod.url^dev.url^g < prod_db.sql > dev_db_1.sql
sed s^https://dev.url^http://dev.url < dev_db.sql > dev_db_final.sql

3) I import this database over my development database for testing.

mysql -u dev -p dev_db < dev_db_final.sql

4) I log into my development setup, flush the cache, re-index and browse the site and all of my log_* tables start working.

There are no other changes during that process. The server is the same, the permissions are the exact same, the code is the exact same code as production.

  • I don't see anywhere that you've dropped the contents of dev_db — which means if you've ever loaded up that database with log entries they'll stick around. – Alan Storm Dec 12 '13 at 20:33
  • Isn't the default behaviour of mysqldump to output DROP TABLE IF EXISTS for each table? So I imagine that can't be the issue. EDIT: Just realised they're using --add-drop-database. – Peter O'Callaghan Dec 12 '13 at 21:04
  • The tables are empty on prod_db and yes, --add-drop-database drops the entire dev_db when I import it in. The moment I visit the dev site after importing the database the entries into the log_* tables begin. The online customer section starts working as well, due to the fact that the log_* tables start working. – jesseconnr Dec 13 '13 at 15:20
2

The result of this ended up being a third-party vendor disabling Mage_Log inside of my app/etc/local.xml which is not shared between environments.

I failed to check this location as the third-party had said they simply disabled the Mage_Log module output in the database core_config_data table, so that is also how I re-enabled it.

Obviously removing the code that disabled Mage_Log inside app/etc/local.xml got everything working again and the log_* tables began to work as intended.

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.