Open stevekessler opened 8 years ago
Hi Steve - before any fields can be updated, you have to configure the extension by going to Administer -> Customize fields and Data -> Summary fields. On that screen, choose the fields you want and how you want them configured. Then, save.
The scheduled job will only run if there is a new configuration saved.
Let me know if that does the trick.
We figured out what needed to be done with the fields. If we enable event fields we got "Finished execution of Call SumFields.Gendata API with result: Failure, Error message: DB Error: value count on row" when running the scheduled job. It is working great with the contribution fields which is what we need as of now.
Thanks!
Hi - thanks for the update. Do you by chance have a full SQL statement that caused the errors with the Events? It might be in your ConfigAndLog directory? I'd like to track down what went wrong.
Jamie - here is the trace for this error. Apparently the query at net.ourpowerbase.sumfields/sumfields.php(490) is incorrect: 1136 \ Column count doesn't match value count at row 1. This happens when it is called from net.ourpowerbase.sumfields/CRM/Sumfields/Form/SumFields.php(266): sumfields_gen_data((Array:0)) [NOTE the empty array argument].
civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...")civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...")civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...", "DB_Error", TRUE)civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...")civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...")civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...")civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...")civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...", TRUE)civicrm_temp_f460a1b031f85d06f47757b4a7028c1d
SELECT contact_id...")Thanks for posting - I really need the full SQL statement that fails though. Any chance that's in your ConfigAndLog folder? The sumfields_gen_data should get an empty array (it's passed in by reference).
I'm beginning to suspect that the problem may be that there are missing event settings (like what event types should be included, etc.) but can't tell for sure.
There you are:
[to_string] => [db_error: message="DB Error: value count on row" code=-22 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_temp_f02862bf38982b9794f768f2872e3118
SELECT contact_id,
(SELECT civicrm_event.title AS summary_value
FROM civicrm_participant t1 JOIN civicrm_event ON t1.event_id = civicrm_event.id
WHERE t1.contact_id = t2.contact_id AND t1.status_id IN (2)
AND civicrm_event.event_type_id IN (1,2,3,4,5,6) ORDER BY start_date DESC LIMIT 1),
(SELECT e.start_date AS summary_value FROM civicrm_participant t1 JOIN civicrm_event e ON
t1.event_id = e.id WHERE t1.contact_id = t2.contact_id AND t1.status_id IN (2)
AND e.event_type_id IN (1,2,3,4,5,6) ORDER BY start_date DESC LIMIT 1),
(SELECT COUNT(id) AS summary_value FROM civicrm_participant WHERE contact_id = t2.contact_id),
(SELECT COUNT(e.id) AS summary_value FROM civicrm_participant t1 JOIN civicrm_event e ON
t1.event_id = e.id WHERE t1.contact_id = t2.contact_id AND t1.status_id IN (2)
AND e.event_type_id IN (1,2,3,4,5,6)),
(SELECT FORMAT(IFNULL((SELECT COUNT(e.id) AS summary_value FROM civicrm_participant t1 JOIN civicrm_event e ON
t1.event_id = e.id WHERE t1.contact_id = t2.contact_id AND t1.status_id IN (2)
AND e.event_type_id IN (1,2,3,4,5,6)), 0) / IFNULL((SELECT COUNT(id) AS summary_value FROM civicrm_participant WHERE contact_id = t2.contact_id), 0), 2) * 100 AS summary_value),
(SELECT COUNT(e.id) AS summary_value FROM civicrm_participant t1 JOIN civicrm_event e ON
t1.event_id = e.id WHERE t1.contact_id = t2.contact_id AND t1.status_id IN (3)
AND e.event_type_id IN (1,2,3,4,5,6)),
(SELECT FORMAT(IFNULL((SELECT COUNT(e.id) AS summary_value FROM civicrm_participant t1 JOIN civicrm_event e ON
t1.event_id = e.id WHERE t1.contact_id = t2.contact_id AND t1.status_id IN (3)
AND e.event_type_id IN (1,2,3,4,5,6)), 0) / IFNULL((SELECT COUNT(id) AS summary_value FROM civicrm_participant WHERE contact_id = t2.contact_id), 0), 2) * 100 AS summary_value) FROM civicrm_participant
AS t2 JOIN civicrm_contact AS c ON t2.contact_id = c.id GROUP BY contact_id [nativecode=1136 \ Column count doesn't match value count at row 1]"]
)
I have installed version 2.0.5 in CiviCRM 4.6.12. We have made sure the scheduled job but none of the fields have been updated. Can you please advise on what we might not have configured?
Please let me know if you need more information.
Thanks, Steve