Hi, my client is seeing this error message on a survey-editing node:
user warning: Table 'limesurvey.url_alias' doesn't exist query: SELECT dst FROM url_alias WHERE src = 'backfromsurvey/assess_jobmatch' AND language IN('en', '') ORDER BY language DESC, pid DESC in /www/client-domain/docroot/includes/path.inc on line 72.
In this configuration, limesurvey is not sharing drupal's database. There are two mysql databases named limesurvey and d6, for limesurvey and drupal, respectively.
In the error message, the name of the table appears as "limesurvey.url_alias" which implies to me that it's looking in limesurvey's database for the drupal table url_alias.
I will attach a stack trace from the point where the error is noticed.
Best regards
Zane Dog
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | limesurvey_sync6.x-1.2(final release).zip | 171.93 KB | thedut |
| #9 | limesurvey_sync6.x-1.2(preview_fix-db).zip | 167.32 KB | thedut |
| #5 | limesurvey_sync-6.x-1.2(preview).zip | 167.62 KB | thedut |
| trace.txt | 79.31 KB | Zane Dog |
Comments
Comment #1
thedut commentedHi Zane Dog,
Thanks for reporting this issue concerning the LimeSurvey Sync Drupal 6 version.
I may have forgotten a limesurvey_sync_db_close(); function somewhere.
This function allows to switch back from the LimeSurvey database connexion to the Drupal database connexion.
Could you tell me when this issue occurs, it will help me to locate where I should fix the code.
You are talking about 'on a survey-editing node'.
I could be :
Comment #2
Zane Dog commentedThe error message appears when loading the drupal node.
Comment #3
thedut commentedI guess I figure out how to solve this.
The new limesurvey_sync release should fix it (available within 1 or 2 weeks).
Comment #4
Zane Dog commentedGood to hear, thanks!
Comment #5
thedut commentedHi Zane Dog
Here is the almost completed Drupal 6 new version of the LimeSurvey Sync module.
Could you please upgrade and tell me if it solve your issue, or report any issue you may met ?
Note, after install :
- run the update.php script
- check your Limesurvey synchronization setting page on 'admin/settings/ls_sync', making some changes if needed.
- optional : enjoy new features !
I don't officialy release it now because I need to fix the french translation and complete the Drupal 7 version to.
Comment #6
thedut commentedThis issue concerns the compatibility with the Path module. It occurs only if the Path core module is enabled and mets specifics settings. The Drupal 6 and Drupal 7 versions prior to 1.2 are affected.
However, I can't reproduce it.
Comment #7
Zane Dog commentedHi, sorry for the delay. My client installed the experimental version of the module, now we are seeing a bunch of errors. At the page admin/settings/ls_sync we get page after page of error messages that look like this. Let me know if I can capture any more info for you.
Comment #8
thedut commentedThanks a lot !
I understand the process, no need to post more informations.
I did not met this error messages on my server but I not very surprised.
I have used a mysql_db_connect result as key into an array. Php does not like such behavior.
I'm going to find another way in order to fix this issue.
Comment #9
thedut commentedHere a new version, does it solve this issue ?
Comment #10
Zane Dog commentedNew errors on admin/settings/ls_sync:
Comment #11
thedut commentedIt's my turn to sorry for the delay.
I'm going to explore this new issue, I will provide an update soon.
Your feedback is a great contribution for the LimeSurvey Sync module, thanks.
You have to know that I have complety rebuild the Connexion switch system since the 6x-1.1 version in order to avoid the risk of the issue you met on the first place. Unfornatelly, regarding to this new issue, this new system needs to be fixed.
At least, I guess that the node loading page is fixed.
Could you confirm that you are using the same driver (MySql, MySqli, PostgreSQL) for both Drupal and LimeSurvey ?
You can find this information into the sites/default/settings.php file (as an example below):
$db_url['default'] = 'mysql://root:password@localhostdrupal/databasedrupal';
$db_url['ls'] = 'mysql://root:password@localhostlimesurvey/databaselimesurvey';
Note that mysql is not the same that mysqli !
Comment #12
Zane Dog commentedHi, yes it looks like Drupal and LimeSurvey are using the same driver, but different usernames and databases (schemas).
Comment #13
thedut commentedOk, so your configuration is ok.
I have tested using the same configuration as yours and I can reproduce this issue now !
This issue only appears when using mysqli.
I solve it !
Here is the fix :
into the limesurvey_sync/ls_api/limesurvey_sync_api_sync file, on line 44, replace :
$j = array_search($active_db, $store_act_db);By
$j = array_search($active_db, $store_act_db, TRUE);I you agree with that, I am going to close this issue, as solve.
Comment #14
Zane Dog commentedThat small change seems to fix the problem. Thanks! I don't know much about using LS; I will get my client to put it through its paces and let you know how it goes.
Comment #15
Zane Dog commentedNow we are seeing this error in /node/add/survey. From the log detail:
Comment #16
Zane Dog commentedAh, client reports he eliminated that error by enabling the Locale module. A missing dependency perhaps?
Comment #17
thedut commentedYes, I have tracked this issue.
The _locale_parse_js_file() core function is called and it should not. This function query the {locales_source} table that only exists if the Locale module is enabled, causes error messages.
It starts from limesurvey_sync/ls_survey/ls_survey.incfile, line 1142, the ls_survey_language_name() function :
module_load_include('module', 'locale');Used to extract the locale_language_list() function;
The ls_survey_language_name() function allows to display 'french' instead of 'fr' for survey languages even if such language is not installed on the Drupal site.
When loading a page : the template_preprocess_page() is called, calling the drupal_get_js() function, containing the code :
Then the locale_update_js_files() function calls the _locale_parse_js_file() function , throwing the error messages.
Nice shot from your client : enabling the Locale core module does solve this issue. However, i will provide a real fix instead of a dependency.
Thanks for having reported this new issue.
You can keep on testing the module (with the locale module enabled) !
Comment #18
thedut commentedHi,
For your information, here is the lastest version, I will release it tomorrow.
It provides more features and bug fixes than the one above.
Don't hesitate to report any bug, if you can ;)
Comment #19
thedut commentedFixed into the LimeSurvey Sync 7.x-1.2 and 6.x-1.2 releases.