Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Which User Disabled a Module?

Posted on 2013-11-21
11
Medium Priority
?
94 Views
Last Modified: 2014-12-11
On my production site, a User disabled the Homepage module, removing the majority of the site's front page.

1) How can I find out which User disabled the module?
2) How can I ensure that only Admins can enable/disable modules?
0
Comment
Question by:sandshakimi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 10

Expert Comment

by:oliverpolden
ID: 39665579
If database logging is turned on then you can check that:
admin/reports/dblog
Reports > Recent log messages

To ensure that only admins can enable/disable modules, only give the administrator user role to administrators!

Kind regards,
Oliver
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 39665585
Also, I would recommend using backup and migrate module. You can set it to automatically backup the database every hour and only keep say 24 or 48 backups.

https://drupal.org/project/backup_migrate

Then in this case you could just restore the backup from an hour ago but remember than any changes (content added, users created etc.) will be lost from the past hour.

Oliver
0
 

Author Comment

by:sandshakimi
ID: 39665980
admin/reports/dblog
Reports > Recent log messages

I got to this, now what am I looking for exactly?
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 10

Expert Comment

by:oliverpolden
ID: 39667066
If you filter by type system you should then see module disable messages together with the user.

Kind regards,
Oliver
0
 
LVL 2

Expert Comment

by:itkadmin
ID: 39668588
Check to see if the module was uninstalled. If it was only disabled, the data is still in the DB. Enable it and things will be back in place.

Fix your permissions. Only one person should be able to manage modules, if you really need more admins, have some sort of workflow process to keep track of who does what.

Use backup and migrate as mentioned above, or have a backup regime that backs up the DB directly. (I find B&M works fine). (We download the backed up DB and all the code and files every night and add them to the corporate backup regime)
0
 

Author Comment

by:sandshakimi
ID: 39668812
Ok, the incidenet occured on 11-20, between 3 - 4pm.

So it's been two days.

1) The dblog in the Admin interface doesn't go back that far.

2) I'm looking at one of our backup dumps, dated 11-20, 3pm. I imported into MySQL Workbench. I just don't know which table to check.

3) Also, how can I expand the dblog report in the Drupal GUI to retain messages for at least three days?
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 39669265
If you haven't already just re-enabled the homepage module then I would try that first as itkadmin suggested.

To change how many log records you keep go to:
Configuration > Development > Logging and errors

To check if the module is enabled in your backup you will need to check the "system" table which has a status column.

Something like: SELECT * FROM system WHERE name like "%homepage%";

Kind regards,
Oliver
0
 

Author Comment

by:sandshakimi
ID: 39676048
Ok, here's the result I got.

It seems it was already disabled at 3pm.

How can I find out which User disabled it?

Homepage Modulehomepage.JPG
0
 
LVL 10

Expert Comment

by:oliverpolden
ID: 39677450
You can't find out who disabled a module from the systems table. You need to look at the log as in my previous answers.
0
 
LVL 10

Accepted Solution

by:
oliverpolden earned 1500 total points
ID: 39677466
If your log doesn't go far that back then you will need to look at the log table in your backup. The table you need to look at is "watchdog".
0
 

Author Comment

by:sandshakimi
ID: 39677695
The 1pm database showed the "homepage" module as enabled.

The 3pm database showed the "homepage" modules as disabled.

But doing a search for string "homepage" in the 3pm database in Watchdog table didn't return results.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for those that are having major problems with users upload files such as pictures to their profile. The solution is simple and has to do with correcting the directory paths. With some experimenting and testing i got it fixed. Note…
RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question