I have created a WebToLead form and it doesn’t work. It just redirects the users to the default post address (http://mydomain.com/index.php?entryPoint=WebToLeadCapture?entryPoint=WebToLeadCapture) and it doesn’t record the lead generated.
I have created the form in sugar and added the HTML output to a page in our Drupal site. The goal is have users signup for a newsletter using this web form and then redirect them to a thankyou page in our Drupal website upon submission. We would like to record all users that submit their details as leads in our sugarcrm.
Right now I can’t use this feature because all it does is redirect the users to our sugarcrm website when they click in submit.
Before these used to work fine.
In my case it is the opposite i get redirects to a page where says that see the sugarcrm.log but it save the name of the lead but no other information such as email etc. …
Interesting, I don’t even get a lead name in sugar and the redirection is to our sugar website home page. I have tried everything, from using the html page sugar creates to copy the code inside a block in sugar, I have also added the js to the template and still doesn’t work.
Any tips please? I am stuck. Thanks!
I have not found the solution yet, and we are changing our strategy since we can’t count of this working. We are building the form now the CMS (drupal) form API. I’ll let you know if it works.
what do the SuiteCRM, php and Apache logs say?
Your screenshot says there is a database failure while your other link is a direct link to domain.com (not to a web to lead form)
where i can find that log
The SuiteCRM log is in the SuiteCRM main directory under the name sugarcrm.log. You can also view it from within the program: Aministrator->Admin->System Settings->view log (just above the save button at the bottom)->Next (or All)
The location of the other logs depends on your hosting provider. If you have Parallels panel or other similar tool, probably you will have access from there
It might also be worth looking in Studio under the Leads module for fields. chances are there could be a missing field “NULL” in the list this could cause the prroblem that you are seeing.
Chances are the sugarcrm.log will show the error in the query the sugarcrm log can be found as amariussi says or the raw file is in the SuiteCRM/SugarCRM dir /sugarcrm.log
i dont have any “NULL” field in Studio > Lead
here is my sugarcrm.log
Now thats a weird one.
Looking at the log it shows alot of mysql fatal errors with regards to duplicate entries into the database for the leads module.
looks like Suite is doing what it should be with regards to trying to save but failing on the ID not being unique.
The ID in issue seems to be different on each attempt which is weird also not like its the same on each attempt.
I wish this was a easy one. but this would need to be investigated further to be able to determine what is causing this,
I would start looking for the Id’s that it is clashing with. its trying to insert into the leads table with a ID that is already there, I would be interested to see if the data is the same as what is being entered.
The chances of the ID being recreated is very slim and the fact that its doing it more than just once is just confusing. if looking at the existing data doesnt help you would need to look at investiging the code and finding out where it is generating the ID and why it is managing to generate one which already exists.
the file which would be doing the work here is:
entrypoint=WebToLeadCapture - modules/Campaigns/WebToLeadCapture.php (line 85, 91->94)
it creates the ID in
include/untils.php (create_guid() ) but I dont think it will be that.