Problems with Database Contrib Module

kentbye's picture
| |

I just discovered first hand what separates the contributed Drupal modules (aka "contrib modules") from the modules included in the core release.

The contrib modules are able to scratch the itch of the developer, but they don't always scratch the itches of all Drupal users -- in other words it may not work with some particular core Drupal settings. A Drupal web admin can download a Drupal module from the list of modules, but it may have some unresolved issues that might conflict with your site.

I specified some problems I was having with the database module, and Moshe informs me:

I am seeing the same behavior. Based on the outstanding issues for this module, I guess that the module does not handle table prefixes properly. Your site uses prefixes which unfortunately increases chance for error when using contrib modules. some contrib module authors don't test that configuration.

You might want to contact the module author and let him know.

So now I have to figure out what table prefixes are and what the workaround to this is.

I ultimately need to run MySQL scripts, and I was planning on using the database module to do this. But here is the problem with the dba module that I specified to Moshe:

Subject: DBA module preventing access to module admin page
Hey Moshe,
I'm trying to install the database module in order to run the MySQL scripts for certain modules.

When I put the dba.module file is in the module->dba folder -- this somehow prevents me from accessing the ADMIN -> MODULE page.

Do you have time to see if you can access the
http://www.echochamberproject.com/admin/modules page?

When I delete the dba.module file, then I can access the Module Admin page.

Thoughts as to why this is happening?

-Kent.

Moshe informed me that the table prefixes may be the culprit here, and so I suggested three strategies:

* Make my site not have prefixes (if possible)
* Inform the module developer
* Figure out how to enter MySQL scripts via PHPMyAdmin

> Your site uses prefixes
I'm not sure what exactly this means.

Is there a way for the site to not have prefixes so I don't run into a slew of other problems?

Is this because my MySQL site is called Drupal_Echochamberproject and not Drupal?

> * Inform the module developer

I found this, but appears to be for 4.4
http://drupal.org/node/12195

The dba.module doesn't always honor database prefixes. This (untested) patch fixes the problem. Please check all queries in the module, I might have missed some.

> * Figure out how to enter MySQL scripts via PHPMyAdmin
If there is no way to make my site not have prefixes, then I guess I need to figure out a workaround for how to enter MySQL scripts in PHPMyAdmin.

I took a screenshot of the most likely PHPMyAdmin page where I would enter the proper scripts. But I thought I'd double check it before I start mucking around the core MySQL database before I really know what I'm doing.

Is this the right place to enter the MySQL scripts in order to get some of the modules working?

[inline:phpmyadminmysql.jpg=Screenshot of PHPMyAdmin for entering MySQL scripts]

UPDATE: Moshe informs me that this PHPMyAdmin page is indeed the proper place to run MySQL scripts in order to install some Drupal modules.

For example, the trackback module requires me to do the following steps:

(3) There is a file called trackback.mysql. You need to feed this to your mysql:

ON THE COMMAND-LINE
mysql -u user -p password

(4) Once you have done this, log in to your Drupal site as someone with permission to enable modules and enable trackback.

UPDATE: Here are the database module developers. I sent Jeremy an e-mail informing him of these database anomolies, and I passed along a link to this page.

UPDATE: I received the following e-mail back from Jeremy -- the database module developer:

Thanks. I will look into issues with getting the dba module working with table prefixes as soon as I am able. It was working in earlier releases, but evidently something has changed in 4.6.

I will not be able to get to this for 1-2 weeks, as I am currently on the road.