Hello, for a social/political website I have tried running drupal 4.6 with civicrm 1.6 and the latest HEAd of the lobby.module. I have installed all on my host using mysql 4.1 and php 4.
I know and have tested that both drupal and civicrm are working correctly, but I can't seem to get the lobby module to work correctly.
The problem I am facing is that the lobby module doesn't seem to work with creating a direct target. I get the error:
warning: mysql_real_escape_string() expects parameter 1 to be string, resource given in /MYSITE/drupal-46/includes/database.mysql.inc on line 239.
warning: Cannot modify header information - headers already sent by (output started at /MYSITE/drupal-46/includes/common.inc:384) in /.../drupal-46/includes/common.inc on line 192.
The target however is created in administer/lobby targets
I can't find the target in vivicrm though.
I am able to create a lobby without any problems and lobby does create a group in civicrm.
When a user participates in a lobby I get an error, which I can't recreate right now.
I think I used some wrong setting in the BE_DO.ini file.
I also understand there needs to be
Comments
Comment #1
mgiffordWe've rewritten the code for 4.7 and will be posting that shortly. Would you be able to upgrade the the newer code?
Comment #2
martron commentedFrom the lobby readme file under the "current issues" section:
The upgrade work I've done to get lobby working on php5/4.7 has not addressed this issue. But it is something worth looking into.
The only thing in BE_DO.ini that needs to be set is the mysql path and just under that, the database name.
DB DataObject must be installed correctly for lobbies to work successfully. http://pear.php.net/package/DB_DataObject/
If it is, then try setting the debug level to 5 in BE_DO.ini to see if you get meaningful error messages.
As far as participating in lobbies (and not the target/civicrm issue), the upgrade to 4.7 will likely help things a bit.
Comment #3
vierjar commentedThanks for your quick respons(es)
I am eagerly awaiting the update for 4.7. That would help a lot. ga
In the BE_DO.ini file in line 37 it says:
class_location = "/var/www/html/civicspace/modules/lobby/DO"Shouldn't I change that to sometihing like "drupal/modules" ?
I am not sure that package is already installed on my server. I will try to find out (you probaly already figured out by now I am somewhat of a novice.;) )
Since I only plan to use the module for "direct" targets, I was wondering if DB_DataObject is necessary for me.
ALso I was wondering if you would recommend a specific version of civicrm for your module.
Thanks again for your help. We have only recently started using drupal, so please forgive me if I am asking very stupid queastions. Still on the beginning of the steep learningcurve!
Comment #4
vierjar commentedHi,
We checked and the correct PEAR modules are installed, but we just can't get the lobby module to work with drupal 4.6, 4.7 or higher. Is there a configuraton or instalation set up where the lobby module works? We've tried every combination we can think of and are thinking of adapting another easier module like citizenspeak. We would really like to get lobby to work however since it is absolutely perfect for our website.
We used the following set ups
drupal 4.6 + CivicRM 1.5 + lobby 4.6
drupal 4.7 + CivicRM 1.5 + lobby 4.6 (HEAD 3 feb)
Thanks for your help.
Comment #5
mgiffordHey vierjar,
Can you give us some details on the errors your seeing. What's in the CVS should mostly work with Drupal 4.7. We should be making another change to the CVS later on today to deal with a couple bugs that we discovered last night. The CVS version will not work with 4.6.
Can you send us a URL directly so that we can look at your install?
We would really like to get lobby to work however since it is absolutely perfect for our website.
We'd like to have you using the code too.
Mike
Comment #6
martron commentedWell vierjar, if the problem you are experiencing is the fact that lobby emails report to send but don't actually arrive at the proper address that you've set, then I know how to help you.
edit /lobby/config.php and either comment out the following lines, or set them to your own address for testing purposes:
It seems like you did have things working, since I was receiving a number of your test emails (but I was discarding it as spam...). Now things make a little more sense.
Comment #7
vierjar commentedahhh the latest cvs' make the difference!
We are now able to: create target, create a lobby and participate in a lobby (and thus sending the lobby to the target)...
It is starting to look better...
The only problems we are stil facing are the following:
a single user can only create one target. When a user creates another the following error is given:
user warning: Duplicate entry '48' for key 1 query: INSERT INTO be_contact SET contactID=48, contactType=0, displayName='asda tweede target', title='asda', firstName='tweede', lastName='target', salutation='asda target', companyName='sadfa', city='asfa', email='tweedetarget@xxxx.com', phoneNumber='', faxNumber='', dateCreated=1171384376, dateModified=1171384376, author_id=6 in /home/users/vierkftp/xxx/drupal/includes/database.mysql.inc on line 121.Also in the latest builds the participants don't seem to be "inserted" in the lobby group of civicrm. The lobby groups are now without any members.
Also the opt- in funcion " Yes, I would like to receive campaign updates via email" doesn't work. Already in the preview page it always says: You have opted to NOT receive updates on this campaign...
I have send Mike the adress of our website so you can look there for yourself...
thanks again!!!
Flip
Comment #8
mgiffordHey Flip,
Thanks for the additional testing. I think we've nailed down these bugs. These should now be fixed in the cvs version.
1) a single user can only create one target. When a user creates another the following error is given:
- there was a problem with auto increments that we've resolved.
2) Also in the latest builds the participants don't seem to be "inserted" in the lobby group of civicrm. The lobby groups are now without any members.
- When viewing a lobby node if you have the proper permission you see the participants tab (ie http://prax.ca/node/81/participants ). From here you can navigate into CiviCRM and see what groups they are associated with. Please let us know if you see the tab and if this works for you.
3) Also the opt- in funcion " Yes, I would like to receive campaign updates via email" doesn't work. Already in the preview page it always says: You have opted to NOT receive updates on this campaign...
- fixed in the cvs. Logic wasn't included for some reason.
We want to rewrite this module to make it much simpler and easier to use and debug. Just haven't had the client willing to pay for that just yet.
Mike
Comment #9
vierjar commentedHey Mike,
Bugs 1 and 3 are now gone. Many thanks.
Bug 2 however persists..
I can indeed see participants tab in drupal. So that works fine. But the module doesn't link participants to the group in civicrm. That is.... It doesn't link anonymus participants to the group. Authentcated users are correctly linked.
For anonymus users I get the error:
Linking partipant to Lobby, could not add anonym1@xxx.xx to CRM group with name=Lobby9I've tried fiddling with the civicrm permissions in drupal, but I can't seem to figure out what the problem is...
Flip
Comment #10
mgiffordHi Flip,
In our testing environment, everyone has access to:
send lobby to target
Anonymous users don't have any access to any elements of the
civicrm module
What version of CiviCRM are you using?
On line 198 of civicrm/api/Group.php the function that is giving you problems is:
function crm_add_group_contacts
Can you add some php echo statements here to see where it is failing? Even adding something crude like this (preferably customized to fit the variable that is failing) before the returns in this function:
echo 'crm_error 1' . $group->id ; exit();
It is hard to debug this as we aren't seeing this problem.
Mike
Comment #11
vierjar commentedHey Mike
The permissions are set the same way. So that can't be it...
I will put the php echo statement in tomorrow and let you know
---What version of CiviCRM are you using?
We are using civicrm 1.5.
Flip