DB insert failed when showing the configuration page

Scorp - September 28, 2009 - 09:48
Project:phplist Integration Module
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:fixed
Description

The module is trying to insert translations and create cache in the wrong database (he is using the phplist one i configured instead of the drupal one)

    * user warning: Table 'volagivo_phplist.locales_source' doesn't exist query: SELECT s.lid, t.translation, s.version FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'it' WHERE s.source = 'no connection' AND s.textgroup = 'default' in /home/volagivo/public_html/modules/locale/locale.module on line 365.
    * user warning: Table 'volagivo_phplist.locales_source' doesn't exist query: INSERT INTO locales_source (location, source, textgroup, version) VALUES ('/admin/settings/phplist', 'no connection', 'default', '6.14') in /home/volagivo/public_html/modules/locale/locale.module on line 381.
    * user warning: Table 'volagivo_phplist.cache' doesn't exist query: DELETE FROM cache WHERE cid LIKE 'locale:%' in /home/volagivo/public_html/includes/cache.inc on line 175.
    * user warning: Table 'volagivo_phplist.locales_source' doesn't exist query: SELECT s.lid, t.translation, s.version FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'it' WHERE s.source = 'connection OK' AND s.textgroup = 'default' in /home/volagivo/public_html/modules/locale/locale.module on line 365.
    * user warning: Table 'volagivo_phplist.locales_source' doesn't exist query: INSERT INTO locales_source (location, source, textgroup, version) VALUES ('/admin/settings/phplist', 'connection OK', 'default', '6.14') in /home/volagivo/public_html/modules/locale/locale.module on line 381.
    * user warning: Table 'volagivo_phplist.cache' doesn't exist query: DELETE FROM cache WHERE cid LIKE 'locale:%' in /home/volagivo/public_html/includes/cache.inc on line 175.

#1

paulbeaney - September 29, 2009 - 10:20

Hi,

This is a new one on me. Can you describe the exact steps you took for this problem to arise?

Regards,

- Paul

#2

stanley78 - October 2, 2009 - 09:35

hi. the same here:

    * user warning: Table 'stasark_plst1.drupal_locales_source' doesn't exist query: SELECT s.lid, t.translation, s.version FROM drupal_locales_source s LEFT JOIN drupal_locales_target t ON s.lid = t.lid AND t.language = 'ru' WHERE s.source = 'no connection' AND s.textgroup = 'default' in /home/stasark/public_html/scm-book.ru/modules/locale/locale.module on line 365.
    * user warning: Table 'stasark_plst1.drupal_locales_source' doesn't exist query: INSERT INTO drupal_locales_source (location, source, textgroup, version) VALUES ('/admin/settings/phplist/settings', 'no connection', 'default', '6.14') in /home/stasark/public_html/scm-book.ru/modules/locale/locale.module on line 381.
    * user warning: Table 'stasark_plst1.drupal_cache' doesn't exist query: DELETE FROM drupal_cache WHERE cid LIKE 'locale:%' in /home/stasark/public_html/scm-book.ru/includes/cache.inc on line 175.
    * user warning: Table 'stasark_plst1.drupal_locales_source' doesn't exist query: SELECT s.lid, t.translation, s.version FROM drupal_locales_source s LEFT JOIN drupal_locales_target t ON s.lid = t.lid AND t.language = 'ru' WHERE s.source = 'connection OK' AND s.textgroup = 'default' in /home/stasark/public_html/scm-book.ru/modules/locale/locale.module on line 365.
    * user warning: Table 'stasark_plst1.drupal_locales_source' doesn't exist query: INSERT INTO drupal_locales_source (location, source, textgroup, version) VALUES ('/admin/settings/phplist/settings', 'connection OK', 'default', '6.14') in /home/stasark/public_html/scm-book.ru/modules/locale/locale.module on line 381.
    * user warning: Table 'stasark_plst1.drupal_cache' doesn't exist query: DELETE FROM drupal_cache WHERE cid LIKE 'locale:%' in /home/stasark/public_html/scm-book.ru/includes/cache.inc on line 175.

it happens right after configuring db access for phplist (fresh install).

stasark_plst1 - the db of phplist
phplist_ is the prefix for phplist

stasark_scmbook is the db for drupal and drupal_ is the corresponding prefix.

it seems like the module is a bit confused with all these prefixes :)

#3

paulbeaney - October 6, 2009 - 11:57

Hi,

Please see #1 - I need as much detail on the exact steps taken to get this problem (other modules installed, Drupal version etc. etc.) This module doesn't create any caches of its own, nor any translation tables, so no idea where these issues are coming from.

Regards,

- Paul

#4

stanley78 - October 13, 2009 - 18:01

hi

as you can see these errors are produced by drupal 6.14 cache anf locale module. probably drupal tries to translate strings like 'no connection' but uses wrong db prefix.

steps are standard:

copy module code to /sites/all/modules
turn it on
fill necessary settings like prefix, db, user/pass
save

#5

paulbeaney - October 15, 2009 - 17:30

Hi,

I have just installed the latest D6-DEV PHPlist module on a D6.20 installation with the Locale module enabled and I haven't had any problem at all. Had you configured the PHPlist module at the time the errors occur, or did they happen the very first time you went to the configuration screen, or was it just the fact of enabling the module that broke the system?

So many questions, I know... please provide as much detail as precisely (and concisely) as possible to allow me to help you.

Regards,

- Paul

#6

johnmullin2003 - October 27, 2009 - 00:50

hello Paul,

same error on a fresh new drupal 6.14 website.

locale module enabled.

Error code:

* user warning: Table 'plst1.locales_source' doesn't exist query: SELECT s.lid, t.translation, s.version FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'it' WHERE s.source = 'no connection' AND s.textgroup = 'default' in /home/****/public_html/modules/locale/locale.module on line 365.
* user warning: Table 'plst1.locales_source' doesn't exist query: INSERT INTO locales_source (location, source, textgroup, version) VALUES ('/admin/settings/phplist', 'no connection', 'default', '6.14') in/home/****/public_html/modules/locale/locale.module on line 381.
* user warning: Table 'plst1.cache' doesn't exist query: DELETE FROM cache WHERE cid LIKE 'locale:%' in /home/****/public_html/includes/cache.inc on line 175.
* user warning: Table 'plst1.locales_source' doesn't exist query: SELECT s.lid, t.translation, s.version FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'it' WHERE s.source = 'connection OK' AND s.textgroup = 'default' in /home/****/public_html/modules/locale/locale.module on line 365.
* user warning: Table 'plst1.locales_source' doesn't exist query: INSERT INTO locales_source (location, source, textgroup, version) VALUES ('/admin/settings/phplist', 'connection OK', 'default', '6.14') in /home/****/public_html/modules/locale/locale.module on line 381.
* user warning: Table 'plst1.cache' doesn't exist query: DELETE FROM cache WHERE cid LIKE 'locale:%' in /home/****/public_html/includes/cache.inc on line 175.

probably I'm wrong, but it seems that drupal's locale module doesn't find a translation for 'connection OK' string and then it prints those warnings....

any way to fix?

thanks all

#7

stanley78 - October 29, 2009 - 09:26

hi!

hmm... I don't know anything about D6.20 :) I'm trying 6.14

1. install the module
2. goto conf page
3. fill necessary fields in the form.
4. press save.
5. see the above message.

I suppose it happens when module checks connection and then tries to execute

      if ($connection_ok == 3) {
        $message = t('connection OK');

with locale enabled and default language set to non-en.

ps. currently i'm not sure if it's the phplist problem.

#8

paulbeaney - October 29, 2009 - 09:46

Hi stanley78,

hmm... I don't know anything about D6.20 :) I'm trying 6.14

Yeah, yeah, so I'm confusing my D5 and D6 releases... :D

...and default language set to non-en.

Now *that* is the key! I just tried installing the module on my only non-English installation and I got the exact same errors as everyone else straight away. I have had to move around a couple of the lines which select which database is currently in use, and the problem looks like it's fixed. The changes should show up in D6-DEV in the next couple of hours.

Regards,,

- Paul

#9

stanley78 - October 30, 2009 - 14:48

thanks, paul.

I supposed that might be important ;)

will check new version...

#10

paulbeaney - November 26, 2009 - 11:18
Status:active» fixed

Assuming fixed due to lack of feedback.

 
 

Drupal is a registered trademark of Dries Buytaert.