Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After the survey is completed, users are redirected back to the main site and the answers are automatically synced.
But, for some of the synced content, the user name is blank and the system reports the author as "anonymous (not verified)."
Oddly, this does not happen with all of the content (most of it, though).
Any idea why this might happen and how I can fix it? It matters mostly b/c I have a rule set up to send emails after the import. But, without the user name, it can't find the relevant user info to send the emails.
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#2 | Screen Shot 2013-09-13 at 6.05.39 AM.png | 89.14 KB | jarman |
#2 | Screen Shot 2013-09-13 at 6.04.51 AM.png | 64.21 KB | jarman |
Comments
Comment #1
thedut CreditAttribution: thedut commentedHello jarman,
In order to save the author, you have to set specific options on your LimeSurvey Admin interface :
You can check those 2 parameters from your survey view page.
For a better support, provide some informations :
Comment #2
jarman CreditAttribution: jarman commentedThanks for the feedback. I'm sorry I didn't provide more information. Here is my set up:
I am using Limesurvey v2.
It is a multi-page survey.
My Drupal site only allows registered users the ability to see the link (to the survey) and create the content.
Token-based response persistence is not enabled.
The token table has not been created.
The weird thing is that it occasionally works. I cannot replicate the error, but it happens quite often. I have completed the survey nearly a dozen times without a problem. But, most every other user, upon redirection from the survey back to the drupal site, receives an error code (because the site automatically imported their content as anonymous and couldn't find their email address). I attached a screen shot to help show that. And, a screen shot of most imports showing as anonymous, but not the one I just completed.
Any help is greatly appreciated.
Comment #3
thedut CreditAttribution: thedut commentedTry to change thoses 2 parameters according to #1 from your limesurvey admin interface and test again.
You will probable need to desactivate the survey first, then change parameters, and at last activate your survey again.
Comment #4
jarman CreditAttribution: jarman commentedI made the changes to the parameters, but that did not fix the problem. Here is what happens: when the user creates a new answer, the system now reports the user name and the survey in the log (ie, survey #32). Then, when they are done with the the survey, and redirected back to the drupal site, the log shows an entry from ls_answ from "anonymous" with the message "the answer has just been edited." It continues to show the mail error (b/c the user is now anonymous. And, there is a new error from PHP: "Strict warning: only variables should be passed by reference in lime survey_sync_answ_set_invit()" from line 397 of lime survey_sync_api_answ.inc. This started to appear after I checked the box to "fill the token table of the LimeSurvey database with corresponding usernames and emails" (at least, I think that's when it started).
My goal is to have Rules automatically email the user when they are redirected back to the site. But, as long as the ls_answ shows the action by anonymous, it can't find the user's email.
Thanks so much for continuing to help with this.
Comment #5
jarman CreditAttribution: jarman commentedJust an update. I have a solution that I wanted to share. Instead of relying on the sync to correctly identify the author of the post, I just included the user profile information on the response content type. Then, in Rules, I accessed that info with [node:field-profile-last] instead of [site:current-user:field-profile-first].
Thanks so much for this great module.
Comment #6
thedut CreditAttribution: thedut commentedGreat !
As a conclusion, you have to target the node author instead of the current user for Rules.
I will dig on the error message you provide. Maybe it is just a notice error.