title: Directories not writable

text:
# Question
Title: Directories not writable
After installing civicrm in wordpress i have this error, see screen cap, All my directories ../plugins/civicrm and ../uploads/civicrm have all permissions. And when i click on details, i have no response.  I have forgotten a directory ?

Thank you

# Answer
Ok, I found the problem, disk space exceeded on server. That is the reason it could not write.
> 2 votes

---
Tags: directory
---


# Question
Title: Error occurs : Unknown column 'relationship_civireport.contact_id_a' however not for "Super User" users
UPDATE 29th July :

Yes it's taken me this long to work it out so now I need some advice please. I have tracked the place where "rogue" SQL down is being created and it's source is in this hook : hook\_civicrm\_aclWhereClause. The PHP jumps around a little but calls "getSelectWhereClause" in civicrm-core/DAO.php which in turn calls "addSelectWhereClause" also in DAO.php.

I have traced what is returned and it is from here that the "rogue" SQL :

"AND `contact_civireport`.`is_deleted` != 1 AND `relationship_civireport`.`contact_id_a` IN .... etc."

is being generated. Looking around I see that a caveat for hook\_civicrm\_aclWhereClause is that it not be called at all if the logged in user has access to the "edit all contacts" permission which a "super-user" does. I went into Joomla and added that permission to my member category but the SQL is still incorrect.

My "fudge" (and before there are cries of outrage I know it's a fudge) is to comment out the lines in form/detail.php that append the field $this\>aclWhere to the "WHERE" clause.

My PHP skills are limited (but getting better) so what I need advice on is:

a) Did I edit the permission in the correct place? b) If I did then it didn't seem to work so where does the PHP look to generate this (what is to me incorrect) code:

Entering getSelectWhereClause tablename: contact\_civireport vals: Array ( ) vals: Array ( \[0\] =\> != 1 ) Evaluating vals now field: is\_deleted

Leaving getSelectWhereClause clauses :Array ( \[0\] =\> **`contact_civireport`.`is_deleted` != 1 )** clause: string(38) "`contact_civireport`.`is_deleted` != 1" ret: array(1) { \["civicrm\_contact.is\_deleted"\]=\> string(38) "`contact_civireport`.`is_deleted` != 1" }

UPDATE : 24th May

In my original post I said the issue appear to affect only those users that were designated as "Member". Doing some more playing around today it appears as if ALL users other than those designated as "Super Users" get the same issue with the rogue SQL being appended to the query.

We have a search defined in CiviCRM to look for various vehicles. If I log onto the site using my id which has **"Super User"** privileges I can run the query and results are returned. However, if I use an account which doesn't have the same privileges (i.e. a "normal" member account) I get a screen back saying "Sorry, but we are not able to provide this at the moment. DB Error: no such field"

I put debug on and it further reported:

Error Details

> Database Error Code: Unknown column 'relationship\_civireport.contact\_id\_a' in 'IN/ALL/ANY subquery', 1054.

When I look at the SQL it does indeed show that it can't resolve the field in question however my query is why would it work for an Admin user and not a normal one? It does seem to point a privilege issue somewhere but how can I identify what this is so I can fix it?

UPDATE:

Doing some more digging around it appears that the generated SQL for the non-Admin user includes these lines which is what causes the issue:

```
AND `contact_civireport`.`is_deleted` != 1
AND `relationship_civireport`.`contact_id_a` IN
  (SELECT `id` FROM `civicrm_contact` WHERE is_deleted != 1)
AND `relationship_civireport`.`contact_id_b` IN
  (SELECT `id` FROM `civicrm_contact` WHERE is_deleted != 1)

```

So logged in as Admin, run the report , SQL doesn't have those extra conditions in and the report runs.

Log in as "normal" member , run the report , those lines appear and, as it says, it can't find the field because it's trying to get it from something that isn't a part of the query!

UPDATE : 22nd May

The version is CiviCRM 4.7.19. In terms of the report I believe the underlying one to be from "Contacts" under the "Constituent Report (Detail)" template. It is trying to display all those people who own a car made in a certain year range.

UPDATE : 23rd May

I will try and precis the differences I can see in generating the reports

In the Member log I have this line which doesn't appear in the Admin log:

```
[info] $Query = SET @civicrm_user_id = 267

```

In the Admin log I have these lines which don't appear in the Member log :

```
[info] $Query = SELECT * FROM civicrm_uf_match WHERE (  civicrm_uf_match.domain_id = 1 )  AND (  civicrm_uf_match.uf_id = 187 )
[info] $Query =
SELECT    civicrm_contact.*,
          civicrm_email.email          as email
FROM      civicrm_contact
LEFT JOIN civicrm_email ON civicrm_email.contact_id = civicrm_contact.id
     AND  civicrm_email.is_primary = 1
WHERE     civicrm_contact.id = 10909

[info] $Query = SELECT *  FROM civicrm_contact_type  WHERE (  civicrm_contact_type.name  = 'Individual' )

[info] $Query = SELECT  id  FROM civicrm_uf_group WHERE (  civicrm_uf_group.name  = 'summary_overlay' )
[info] $Query =
SELECT type.*, parent.name as parent, parent.label as parent_label
FROM      civicrm_contact_type type
LEFT JOIN civicrm_contact_type parent ON type.parent_id = parent.id
WHERE  type.name IS NOT NULL

```

Then the two logs seem to follow the same route but the incorrect SQL generated in the Member log looks like this:

```
[info] $Query = SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, value_vehicle_1_civireport.car_year_1 as civicrm_value_vehicle_1_custom_1, value_vehicle_1_civireport.vehicle_make_2 as civicrm_value_vehicle_1_custom_2, value_vehicle_1_civireport.vehicle_model_3 as civicrm_value_vehicle_1_custom_3, value_vehicle_1_civireport.vehicle_model_code_31 as civicrm_value_vehicle_1_custom_31, value_vehicle_1_civireport.vehicle_body_style_4 as civicrm_value_vehicle_1_custom_4, value_vehicle_1_civireport.vehicle_body_description_29 as civicrm_value_vehicle_1_custom_29, value_vehicle_1_civireport.doors_5 as civicrm_value_vehicle_1_custom_5, value_vehicle_1_civireport.lhd_or_rhd_8 as civicrm_value_vehicle_1_custom_8, value_vehicle_1_civireport.body_serial_number_9 as civicrm_value_vehicle_1_custom_9, value_vehicle_1_civireport._of_cylinders_7 as civicrm_value_vehicle_1_custom_7, value_vehicle_1_civireport.engine_serial_number_10 as civicrm_value_vehicle_1_custom_10, value_vehicle_1_civireport.hudson_engine__11 as civicrm_value_vehicle_1_custom_11, value_vehicle_1_civireport.vehicle_condition_13 as civicrm_value_vehicle_1_custom_13, value_vehicle_1_civireport.vehicle_modified_32 as civicrm_value_vehicle_1_custom_32
FROM civicrm_contact contact_civireport
LEFT JOIN civicrm_value_vehicle_1 value_vehicle_1_civireport ON value_vehicle_1_civireport.entity_id = contact_civireport.id WHERE ( contact_civireport.is_deceased = 0 ) AND ( value_vehicle_1_civireport.car_year_1 IN (1909, 1910, 1911, 1912, 1913) ) AND ( ( value_vehicle_1_civireport.vehicle_make_2 IN ( 'Hudson') ) ) **AND `contact_civireport`.`is_deleted` != 1 AND `relationship_civireport`.`contact_id_a` IN (SELECT `id` FROM `civicrm_contact` WHERE is_deleted != 1) AND `relationship_civireport`.`contact_id_b` IN (SELECT `id` FROM `civicrm_contact` WHERE is_deleted != 1)**    ORDER BY value_vehicle_1_civireport.car_year_1 ASC, value_vehicle_1_civireport.vehicle_make_2 ASC, value_vehicle_1_civireport.vehicle_model_3 ASC  LIMIT 0, 10

```

Then these steps happen in the Member log which I assume is a "tidy-up":

```
[info] $Query = SELECT GET_LOCK( '181fec6b8c8018b4408d33805c7d9c73e37c2684', 3 )
[info] $Query = SELECT COUNT(*) FROM civicrm_cache WHERE group_name = "CiviCRM Session" AND path = "_CRM_Report_Form_Contact_Detail_d3ccfb3ef5be498a753ab5c22d2f11d4_7593_container"
 [info] $Query = INSERT INTO civicrm_cache (`component_id`,`created_date`,`data`,`group_name`,`path`) VALUES
(NULL,"2017-05-23 07:06:09","a:4:{s:8:\"defaults\";a:0:{}s:9:\"constants\";a:0:{}s:6:\"values\";a:1:{s:6:\"Detail\";a:0:{}}s:5:\"valid\";a:1:{s:6:\"Detail\";N;}}","CiviCRM Session","_CRM_Report_Form_Contact_Detail_d3ccfb3ef5be498a753ab5c22d2f11d4_7593_container")
[info] $Query = SELECT RELEASE_LOCK( '181fec6b8c8018b4408d33805c7d9c73e37c2684' )
[info] $Query = SELECT GET_LOCK( '70b6381734fcfe80b5c1603e4bcea118a9040f61', 3 )
[info] $Query = SELECT COUNT(*) FROM civicrm_cache WHERE group_name = "CiviCRM Session" AND path = "CiviCRM_CRM_Report_Form_Contact_Detail_d3ccfb3ef5be498a753ab5c22d2f11d4_7593"
[info] $Query = INSERT INTO civicrm_cache (`component_id`,`created_date`,`data`,`group_name`,`path`) VALUES
(NULL,"2017-05-23 07:06:09","a:3:{s:8:\"entryURL\";s:127:\"http://xxx.xxx.org/index.php?option=com_civicrm&task=civicrm/report/instance/181&option=com_civicrm&reset=1\";s:5:\"qfKey\";s:37:\"d3ccfb3ef5be498a753ab5c22d2f11d4_7593\";s:6:\"crmPID\";i:1;}","CiviCRM Session","CiviCRM_CRM_Report_Form_Contact_Detail_d3ccfb3ef5be498a753ab5c22d2f11d4_7593")
[info] $Query = SELECT RELEASE_LOCK( '70b6381734fcfe80b5c1603e4bcea118a9040f61' )

```

In the Admin log the SQL looks like this and then you can there is more activity afterwards which I assume is part of the report running correctly:

```
[info] $Query = SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, value_vehicle_1_civireport.car_year_1 as civicrm_value_vehicle_1_custom_1, value_vehicle_1_civireport.vehicle_make_2 as civicrm_value_vehicle_1_custom_2, value_vehicle_1_civireport.vehicle_model_3 as civicrm_value_vehicle_1_custom_3, value_vehicle_1_civireport.vehicle_model_code_31 as civicrm_value_vehicle_1_custom_31, value_vehicle_1_civireport.vehicle_body_style_4 as civicrm_value_vehicle_1_custom_4, value_vehicle_1_civireport.vehicle_body_description_29 as civicrm_value_vehicle_1_custom_29, value_vehicle_1_civireport.doors_5 as civicrm_value_vehicle_1_custom_5, value_vehicle_1_civireport.lhd_or_rhd_8 as civicrm_value_vehicle_1_custom_8, value_vehicle_1_civireport.body_serial_number_9 as civicrm_value_vehicle_1_custom_9, value_vehicle_1_civireport._of_cylinders_7 as civicrm_value_vehicle_1_custom_7, value_vehicle_1_civireport.engine_serial_number_10 as civicrm_value_vehicle_1_custom_10, value_vehicle_1_civireport.hudson_engine__11 as civicrm_value_vehicle_1_custom_11, value_vehicle_1_civireport.vehicle_condition_13 as civicrm_value_vehicle_1_custom_13, value_vehicle_1_civireport.vehicle_modified_32 as civicrm_value_vehicle_1_custom_32
        FROM civicrm_contact contact_civireport
LEFT JOIN civicrm_value_vehicle_1 value_vehicle_1_civireport ON value_vehicle_1_civireport.entity_id = contact_civireport.id WHERE ( contact_civireport.is_deceased = 0 ) AND ( value_vehicle_1_civireport.car_year_1 IN (1909, 1910, 1911, 1912, 1913) ) AND ( ( value_vehicle_1_civireport.vehicle_make_2 IN ( 'Hudson') ) )   ORDER BY value_vehicle_1_civireport.car_year_1 ASC, value_vehicle_1_civireport.vehicle_make_2 ASC, value_vehicle_1_civireport.vehicle_model_3 ASC  LIMIT 0, 10

[info] $Query = SELECT FOUND_ROWS();

[info] $Query =
SELECT cg.table_name, cf.id
FROM  civicrm_custom_field cf
INNER JOIN civicrm_custom_group cg ON cg.id = cf.custom_group_id
WHERE cg.extends IN ('Contact','Individual','Household','Organization') AND
      cg.is_active = 1 AND
      cf.is_active = 1 AND
      cf.is_searchable = 1 AND
      cf.data_type   NOT IN ('ContactReference', 'Date') AND
      cf.id IN (1,2,3,31,4,29,5,8,9,7,10,11,13,32)

[info] $Query = SELECT *  FROM civicrm_custom_field WHERE (  civicrm_custom_field.id = 1 )

< snip ; same sort of SQL >

[info] $Query = SELECT contribution_civireport.contact_id as civicrm_contribution_contact_id   FROM
                            civicrm_contact  contact_civireport
                            INNER JOIN civicrm_contribution       contribution_civireport
                                    ON contact_civireport.id = contribution_civireport.contact_id

[info] $Query = SELECT membership_civireport.contact_id as civicrm_membership_contact_id, membership_civireport.end_date as civicrm_membership_membership_end_date   FROM
                            civicrm_contact  contact_civireport
                            INNER JOIN civicrm_membership       membership_civireport
                                    ON contact_civireport.id = membership_civireport.contact_id
                         WHERE    contact_civireport.id IN ( 11791,11792,11843,11844,11846,11847,11853,11857,11858,11845 )

[info] $Query = SELECT participant_civireport.contact_id as civicrm_participant_contact_id   FROM
                            civicrm_contact  contact_civireport
                            INNER JOIN civicrm_participant       participant_civireport
                                    ON contact_civireport.id = participant_civireport.contact_id
                         WHERE    contact_civireport.id IN ( 11791,11792,11843,11844,11846,11847,11853,11857,11858,11845 )

[info] $Query = SELECT  id, label_a_b, label_b_a, contact_type_a, contact_type_b, contact_sub_type_a, contact_sub_type_b
 FROM civicrm_relationship_type  WHERE (  civicrm_relationship_type.is_active = 1 )

[info] $Query = SELECT relationship_civireport.relationship_type_id as civicrm_relationship_relationship_type_id, relationship_civireport.contact_id_b as civicrm_relationship_contact_id_b ,contact_civireport.display_name as contact_b_name,  contact_a.id as contact_a_id , contact_a.display_name  as contact_a_name  FROM
                            civicrm_relationship relationship_civireport

                            LEFT JOIN civicrm_contact  contact_civireport ON
                                contact_civireport.id = relationship_civireport.contact_id_b
                            LEFT JOIN civicrm_contact  contact_a ON
                               contact_a.id = relationship_civireport.contact_id_a
                         WHERE    (contact_civireport.id IN ( 11791,11792,11843,11844,11846,11847,11853,11857,11858,11845 )
                                  OR
                                  contact_a.id IN ( 11791,11792,11843,11844,11846,11847,11853,11857,11858,11845 ) ) AND
                                  relationship_civireport.is_active = 1 AND
                                  contact_a.is_deleted = 0 AND

[info] $Query = SELECT *  FROM civicrm_component

[info] $Query =
SELECT  v.label as label ,v.value as value, v.grouping as grouping
FROM   civicrm_option_value v,
       civicrm_option_group g
WHERE  v.option_group_id = g.id
  AND  g.name            = 'activity_type'
  AND  g.is_active       = 1  AND  v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  AND  ( v.component_id IS NULL OR v.component_id IN (1,2,3,4,6,8)) ORDER BY v.weight

[info] $Query =
SELECT  v.label as label ,v.value as value, v.grouping as grouping
FROM   civicrm_option_value v,
       civicrm_option_group g
WHERE  v.option_group_id = g.id
  AND  g.name            = 'activity_status'
  AND  g.is_active       = 1  AND  v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight

[info] $Query =
SELECT  v.label as label ,v.value as value, v.grouping as grouping
FROM   civicrm_option_value v,
       civicrm_option_group g
WHERE  v.option_group_id = g.id
  AND  g.name            = 'relative_date_filters'
  AND  g.is_active       = 1  AND  v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight

[info] $Query = SELECT * FROM civicrm_preferences_date WHERE (  civicrm_preferences_date.name  = 'searchDate' )

[info] $Query = SELECT * FROM civicrm_report_instance WHERE (  civicrm_report_instance.id = 181 )

[info] $Query = SELECT data FROM civicrm_cache WHERE group_name = "navigation" AND path = "navigationList"

[info] $Query =
SELECT id, title, description, visibility, parents
FROM   civicrm_group
WHERE  id IN (133,139,145,137,144,33,31,30,36,29,32,38,35,39,37,34,2,24,28,20,26,23,21,27,22,25,116,4,117,111,114,12,18,16,13,10,11,7,6,9,19,17,8,15,3,112,128,119,147,138,120,124,125,126,127,113,131,130,143,53,52,54,55,115,56,57,58,59,60,61,62,63,64,65,67,66,68,69,70,72,71,73,74,75,76,77,78,79,80,81,82,83,84,86,85,108,87,88,89,105,104,136,91,99,100,107,92,94,95,98,97,96,101,106,102,103,93,109,141,48,50,40,46,118,44,43,45,51,47,49,5,140,142,146,122,135,134)
 ORDER BY title

[info] $Query = SELECT *  FROM civicrm_navigation  WHERE (  civicrm_navigation.id = 483 )  AND (  civicrm_navigation.domain_id = 1 )

[info] $Query = SELECT GET_LOCK( '51f408a0235586dbe891208004a7e5fc67e72dad', 3 )

[info]  QUERY DONE IN 0.000398  seconds. Result is 1 rows by 1 columns.

[info] $Query = SELECT COUNT(*) FROM civicrm_cache WHERE group_name = "CiviCRM Session" AND path = "_CRM_Report_Form_Contact_Detail_6de5d8ad3d8789ed2d9a0038cbd3a7a6_5578_container"

[info]  QUERY DONE IN 0.000546  seconds. Result is 1 rows by 1 columns.

[info] $Query = INSERT INTO civicrm_cache (`component_id`,`created_date`,`data`,`group_name`,`path`) VALUES
(NULL,"2017-05-23 07:07:57","a:4:{s:8:\"defaults\";a:0:{}s:9:\"constants\";a:0:{}s:6:\"values\";a:1:{s:6:\"Detail\";a:0:{}}s:5:\"valid\";a:1:{s:6:\"Detail\";N;}}","CiviCRM Session","_CRM_Report_Form_Contact_Detail_6de5d8ad3d8789ed2d9a0038cbd3a7a6_5578_container")

[info] $Query = SELECT RELEASE_LOCK( '51f408a0235586dbe891208004a7e5fc67e72dad' )

[info] $Query = SELECT GET_LOCK( '431ea828bed0270e81256e366f6cf4b682d6cfac', 3 )

[info] $Query = SELECT COUNT(*) FROM civicrm_cache WHERE group_name = "CiviCRM Session" AND path = "CiviCRM_CRM_Report_Form_Contact_Detail_6de5d8ad3d8789ed2d9a0038cbd3a7a6_5578"

[info] $Query = INSERT INTO civicrm_cache (`component_id`,`created_date`,`data`,`group_name`,`path`) VALUES
(NULL,"2017-05-23 07:07:57","a:3:{s:8:\"entryURL\";s:127:\"http://xxxx.xxxx.org/index.php?option=com_civicrm&task=civicrm/report/instance/181&option=com_civicrm&reset=1\";s:5:\"qfKey\";s:37:\"6de5d8ad3d8789ed2d9a0038cbd3a7a6_5578\";s:6:\"crmPID\";i:1;}","CiviCRM Session","CiviCRM_CRM_Report_Form_Contact_Detail_6de5d8ad3d8789ed2d9a0038cbd3a7a6_5578")

[info] $Query = SELECT RELEASE_LOCK( '431ea828bed0270e81256e366f6cf4b682d6cfac' )

```

# Answer
> 4 votes
I just ran into this issue (on current Drupal, current CiviCRM setup) and confirmed that the way it's set now, a non-admin user needs the permission "access deleted contacts" to run this report.

Hope that's helpful - not much of an answer but I lost access to my old account and don't have enough rep to post a comment :)

---
Tags: custom-reports, sql
---


# Question
Title: Create address via API no longer working with Webform CiviCRM?
Since upgrading to Civi 4.7.28, webform submissions via the Drupal 7 module "Webform CiviCRM" have not been able to create a new address in a new CiviCRM contact. In the error log, I have these errors:

> The CiviCRM "address create" API returned the error: "A fatal error was triggered" when called by function "preSave" on line 178 of wf\_crm\_webform\_postprocess.inc with parameters:...

Are others having the same problem? I'm not clear whether it's a fault with the Drupal module or the Civi API. I can't recreate in the CiviCRM sandbox as I don't think that has the Webform module operational.

UPDATED FOLLOWING COMMENT.
Here is the backtrace:

```
 $backTrace =
0:/htdocs/sites/all/modules/civicrm/CRM/Core/Error.php(336): CRM_Core_Error::backtrace("backTrace", TRUE)
1:/htdocs/sites/all/modules/civicrm/CRM/Core/DAO.php(1101): CRM_Core_Error::fatal()
2:/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(1008): CRM_Core_DAO::getFieldValue("CRM_Core_DAO_Address", "null", "master_id")
3:/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(157): CRM_Core_BAO_Address::fixSharedAddress((Array:16))
4:/htdocs/sites/all/modules/civicrm/api/v3/Address.php(83): CRM_Core_BAO_Address::add((Array:16), TRUE)
5:/htdocs/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_address_create((Array:16))
6:/htdocs/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
7:/htdocs/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
8:/htdocs/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("address", "create", (Array:15), NULL)
9:/htdocs/sites/all/modules/webform_civicrm/includes/utils.inc(1534): civicrm_api("address", "create", (Array:15))
10:/htdocs/sites/all/modules/webform_civicrm/includes/wf_crm_webform_postprocess.inc(819): wf_civicrm_api("address", "create", (Array:15))
11:/htdocs/sites/all/modules/webform_civicrm/includes/wf_crm_webform_postprocess.inc(178): wf_crm_webform_postprocess->saveContactLocation((Array:14), "1276", 1)
12:/htdocs/sites/all/modules/webform_civicrm/webform_civicrm.module(222): wf_crm_webform_postprocess->preSave(Object(stdClass))
13:/htdocs/sites/all/modules/webform/includes/webform.submissions.inc(151): webform_civicrm_webform_submission_presave(Object(stdClass), Object(stdClass))
14:/htdocs/sites/all/modules/webform/webform.module(3394): webform_submission_insert(Object(stdClass), Object(stdClass))
15:/htdocs/includes/form.inc(1520): webform_client_form_submit((Array:34), (Array:26))
16:/htdocs/includes/form.inc(904): form_execute_handlers("submit", (Array:34), (Array:26))
17:/htdocs/includes/form.inc(386): drupal_process_form("webform_client_form_1688", (Array:34), (Array:26))
18:/htdocs/includes/form.inc(131): drupal_build_form("webform_client_form_1688", (Array:26))
19:/htdocs/sites/all/modules/webform/webform.module(2061): drupal_get_form("webform_client_form_1688", Object(stdClass), FALSE, FALSE)
20:/htdocs/sites/all/modules/webform/webform.module(2330): webform_node_view(Object(stdClass), "form")
21:/htdocs/includes/module.inc(926): webform_block_view("client-block-1688")
22:/htdocs/modules/block/block.module(911): module_invoke("webform", "block_view", "client-block-1688")
23:/htdocs/modules/block/block.module(690): _block_render_blocks((Array:2))
24:/htdocs/modules/block/block.module(319): block_list("content")
25:/htdocs/modules/block/block.module(270): block_get_blocks_by_region("content")
26:/htdocs/includes/common.inc(5901): block_page_build((Array:4))
27:/htdocs/includes/common.inc(2748): drupal_render_page((Array:4))
28:/htdocs/includes/common.inc(2621): drupal_deliver_html_page((Array:1))
29:/htdocs/includes/menu.inc(542): drupal_deliver_page((Array:1), "")
30:/htdocs/index.php(21): menu_execute_active_handler()
31 {main}

```

There was also a geocoding error logged at the same time, but I don't know why this happened, as we only add a few addresses each day, and I don't see that this should trigger a fatal error:

> $Geocoding failed. Message from Google: (OVER\_QUERY\_LIMIT) = You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=\_

# Answer
To solve this issue, you should apply this patch to your CiviCRM code (which wasn't merged in time for 4.7.29).

You'll find more information on this issue on this pull request and on this issue: CRM-21214.

Cheers, Olivier;
> 3 votes

---
Tags: api, webform-civicrm
---


# Question
Title: CiviContribute page broken after upgrade to CiviCRM 4.7.29
I am running Drupal 7.56, with PHP 5.6.31.

I upgraded to CiviCRM 4.7.29, and now my membership renewal page .../civicrm/contribute/transact?id=1 comes up with HTTP ERROR 500.

The PHP error log shows this: PHP Fatal error: require\_once(): Failed opening required 'CRM/Core/.php'

It is trying to load a ".php" with no name before the extension. What could cause that?

# Answer
> 2 votes
I am running Joomla and ran into the same issue. I was able to correct it by applying the changes on this page: https://github.com/civicrm/civicrm-core/pull/11454/files

---
Tags: civicontribute
---


# Question
Title: Where is the search and replace feature?
I want to replace the value in a field (yahoo Home) with another value for multiple contacts. The field is in the summary screen for contact types = Organization.

# Answer
> 5 votes
Not sure about "Search and Replace", but you can do the above from the "Update multiple contacts" task on the contacts returned on `Advanced Search`.

* All you need to do is add your field(I think it's `IM Screen name` in your case) to a profile (Created from Administer -\> Customize Data and Screens -\> Profiles).
* Use Search -\> Advanced Search to filter and get your contacts -\> Select `Update multiple contacts` on the Action dropdown.
* Select your profile where you've added the field in step 1.
* Enter the new value for the contact(You can also make use of Copy icon to copy text to all the rows) and click `Update Contacts` button.

---
Tags: search
---


title: CiviCRM birthday error PHP

text:
# Question
Title: CiviCRM birthday error PHP
Since I've updated my installation of Drupal - CiviCRM to version 4.7.27 we got some errors. If we edit or add a user we can't select the birthday for the user. Like you see on the screenshots, we get some initialization errors and the date picker only allows one date (the date of today).

Anyone who can help figure this out? Thx!

# Answer
After some debugging, i found out the CRM\_Core\_SelectValues was overridden by the com.klangsoft.flexiblejobs extension. After disabling this module or updating the code the problem was resolved.
> 1 votes

---
Tags: drupal, error
---


# Question
Title: Uncaught ReferenceError: CRM is not defined when trying to access mail templates
When I try to create and new, or edit an existing, message template in 'Mailings' \> 'Messsage Templates' I end up at a completely unstyled page. When I look at the console I see the following error:

```
Uncaught ReferenceError: CRM is not defined
at BtJa0AvQ:153

```

I then look at the 'file' that is being referenced and at the very last line I see:

```
})(CRM.$);

```

I have a Test server which is rendering the mail templates fine, it's simply the Prod server (which figures...) where I'm having this issue.

Any ideas where I can troubleshoot this issue?

I'm using the following:

* Drupal 7.56
* CiviCRM 4.7.22
* PHP 5.5.38
* Amazon Linux AMI release 2017.03
* Apache 2.4.27

I'm only using one extension but that extension has nothing to do with mailing and was actually added well after this problem surfaced.

# Answer
> 2 votes
Here are some places to check:

* The JavaScript file name you mentioned shows that you're using aggregated JavaScript. To troubleshoot this, temporarily disable aggregated Javascript.
* If that solves your problem by itself, it's probably just a caching issue. Clear caches and reenable JS aggregation. More likely though, it will just make debugging easier (e.g. by showing the actual JS file throwing the error).
* Use the "Network" tab in your browser's developer tools once JS aggregation is off to look for 404 errors.

# Answer
> 2 votes
I encountered the same issue and found that civicrm/packages/TbsZip/tbszip.php file is missing. Restoring the file fixed this issue.

---
Tags: error, mailing
---


# Question
Title: What is needed to make Payflow Pro Recurring Donations work?
CiviCRM supports comes with PayFlow Pro but it doesn't support recurring payments. I looked at the code and there's code for recurring. What is needed to finish this part of the payment processor? An IPN segment? I already know that it will take time, money and developers. I'm looking for what these items would be used for.

# Answer
This issue from 2009 seems to be the one to add payflow into the core:

https://issues.civicrm.org/jira/browse/CRM-5536

per Eileen comment:

> "Although the code is there to upload recurring transactions the customer opted not to complete the recurring payment side of things so this should be turned off in the payment\_processor\_type table for now.
>
> (code works but on-going querying of outcomes in incomplete)."

I would suggest you add a comment to this issue or contact Eileen on chat.civicrm if you want to know more about what's missing or an estimate of the number of hours need to make the recurring happen
> 1 votes

---
Tags: payment-processor, recurring-contributions
---


title: Safe to uninstall Mosaico extension?

text:
# Question
Title: Safe to uninstall Mosaico extension?
Last April, I installed the Mosaico extension on CiviCRM / WordPress. Although the install seemed to be successful (Mosaico shows up in the list of extensions as enabled), I get a message "ImageMagick is not installed" when I go to the CiviCRM dashboard.

I'd like to now to uninstall Mosaico. I found these instructions:

In order to uninstall extension, you need to disable it first - once disabled, you will see the "Uninstall" link. Click it in order to completely remove the extension from your system, including permanent deletion all of its custom data. To preserve the data, take a backup before uninstalling. (https://docs.civicrm.org/sysadmin/en/latest/customize/extensions/)

As far as I know I have never really used Mosaico. I do have a backup of the database and all files, but I'm just wondering before I proceed if uninstalling could cause any problems, or if there's anything else I might need to know.

Thanks!

# Answer
Mosaico doesn't create any custom data in CiviCRM, so it is safe to Uninstall the extension. However, any template created in Mosaico will be lost.

To uninstall the extension you will need to disable it.
> 7 votes

---
Tags: wordpress, extension, mosaico
---


title: Send new SMS from SMS callback function

text:
# Question
Title: Send new SMS from SMS callback function
I need to automatically send MT SMS message as a response to forwarded MO SMS message. For that purpose, I created a new `send_mt()` function, but I cannot access Provider object to pick up parameters like provider URL for sending, username/password, etc. When I do var\_dump, it shows that `_providerInfo` member is an empty array. Thank you for your help.

# Answer
To send a auto-reply for an incoming SMS you can use Auto-reply twilio extension. You can modify the extension to support for your provider as this extension supports for only Twilio.

HTH Pradeep
> 4 votes

---
Tags: developer, civisms
---


# Question
Title: Is it possible to export a newsletter to PDF
I have a newsletter that I have sent out to our contacts. I would like to export or save it as a PDF to post on our blog. I tried to copy the the HTML code into the blog, but the tables were not blog friendly. I am looking for 2 options 1) a way to remove the table formatting of the html code to then copy into a blog post 2) a way to export the newsletter that will preserve hyperlinks so that the PDF can be embedded in the web page.

Thank you

# Answer
If you using CiviMail for sending newsletter than you can view the html snippet that was sent as a email body. To view the html you can go navigate to Mailings \>\> Scheduled and Send Mailing.

Find the mailing/newsletter name you want to convert into PDF and then click on **report** link besides the name. You will be redirected to CiviMail Report: \[Name of Mailing\] page.

Under **Content / Components** section you will see **View Complete Message** link. Open the link in new tab to see the content that was sent.

You can print this page using any one of the following method:

1. Use browser print option to Print as PDF
2. Use wkhtmltopdf to print the page using the url `// example for drupal 7.
// http://yoursite.com/civicrm/mailing/view?reset=1&id=1
$ wkhtmltopdf content-url newsletter.pdf`
3. Use online tool to print pdf using url.
4. Use php to convert content of page into pdf.

**Note:** For #2 and #3 you will need to set **CiviMail: view public CiviMail content** permission for Anonymous user.

HTH

Pradeep
> 7 votes

---
Tags: export, mailing, pdf, newsletter
---


title: Edit Contribution Form for receipt

text:
# Question
Title: Edit Contribution Form for receipt
How do I edit a contribution form to show the name of the organization and to put a note in like membership allows?

# Answer
You can achieve this by creating a custom fields for Contribution i.e by creating 1. contact reference field that will list Organization. 2. Note field that will give you option to add notes.

Ref: https://docs.civicrm.org/user/en/latest/organising-your-data/creating-custom-fields/

HTH
Pradeep
> 1 votes

---
Tags: contributions, contribution-page, receipts
---


# Question
Title: CiviMail report not showing proper data after upgrade
I have recently upgraded CIVICRM to 4.7.27 and my wordpress version is 4.9.1. Before upgrade civimail report was showing proper data for example "Unique Opens", "Total Opens", etc. But now it's showing 0 value. I have checked all permission on files and folder and its default as

```
d -exec chmod 755

f -exec chmod 644

```

Please help me ASAP.

# Answer
> 0 votes
Arvind,

Are you facing problem in reports or when you view mailings?

---
Tags: wordpress, civimail, upgrade
---


# Question
Title: Sending SMS Error : Invalid or missing integration API Key
I just upgraded to 4.7.28 on wordpress 4.9.1 I am trying to setup my Clickatell SMS provider but I am getting a strange error;

However I have dobble checked the details and have tested it using the URl method:

```
http://api.clickatell.com/http/sendmsg?user=USERNAME&password=PASSWORD&api_id=3591165&to=6785470505&text=Message

```

and that work fine, I am just trying to send indervidual SMS's at the moment.

here are the setting I am using:

Any help or insight into where things are going wrong would be appriciated

# Answer
Zeak,

As per Clickatell api documentation the api url to send sms is `https://platform.clickatell.com/messages/http/send?apiKey=xxxxxxxxxxxxxxxx==&to=xxxxxxxxxxx&content=Test+message+text`

Please cross check in clickatell the api key under SMS Integration tab(it should be of 24 chars with '==' at the end).
> 3 votes

---
Tags: wordpress, 4.7, sms, civisms, clickatell
---


# Question
Title: CiviContribute: customize "find contributions" default view
I'm using CiviCRM 4.7.27 with Wordpress and am trying to figure out how to customize the default results table that is shown when "find contributions" is run. Normally, the search shows a table with the columns: name, amount, type, etc. I would like to customize which columns are shown for the search result but cannot for the life of me figure out how to do this.

I tried to create a profile with the columns I want to view and enabled "Used for: search views". However, when I tried to add a Contributions field to the profile, I got the error "Contribution cannot be used as a result column for profile searches."

Also, supposing I was able to create the profile with the fields that I want, it is not clear how to use it for the search view, since the "find contributions" page does not seem to allow a view to be chosen. Also, the "advanced search" page does not show the profile I created in the "Display Results As Views For Display Contacts" dropdown menu.

Any help would be much appreciated! BTW, this was the reference page I consulted to try to get this feature to work: https://wiki.civicrm.org/confluence/display/CRMDOC/Format+Advanced+Search+Result+Columns

# Answer
> 2 votes
Through UI there is no such settings to alter the columns of Components Search results such as Contribution, Membership etc. You can achieve this by using Search Column hook.

HTH
Pradeep

---
Tags: civicontribute, profile, search-results
---


# Question
Title: via api created only first particpant gets a line: "Contribution Amount: 1"
I register participants and payments via the API. Step 1: create a contribution for the buyer Step 2: create participants Step 3 create participant\_payments linking the above.

The weird thing is that civi adds a line to the fee\_level of the first participant stating "Contribution Amount: 1".

Why? Am I doing something wrong?

Following the suggestion of Jon G I have been able to pin this down to something related to price sets. Participants of events that do not use price sets do not get this "contribution amount: 1"-line.

Kind regards,

Janec

The api calls:

1) create participant:

```
public function createParticipant($civiEventId, $contactId, $customFields = [], $amount, $currency, $fee_level) {
$entity = 'Participant';
// Create filter.
$params = [
  'event_id' => $civiEventId,
  'contact_id' => $contactId,
  'status_id' => "Registered",
  'participant_role_id' => "deelnemer",
  'participant_fee_level' => $fee_level,
  'participant_fee_amount' => $amount,
  'participant_fee_currency' => $currency
];
if (count($customFields) > 0 && is_array($customFields)) {
  foreach ($customFields as $customFieldKey => $customFieldValue) {
    if(is_integer($customFieldKey)){
      $customId = "custom_".$customFieldKey;
    } else {
      $customId = $customFieldKey;
    }
    $params[$customId] = $customFieldValue;
  }
}
$action = "create";

return $this->query($entity, $params, $action);

```

}

2) create contribution

```
public function createContribution($financial_type, $total_amount, $civi_id, $mollie_id, $date) {
$entity = 'Contribution';
$action = 'create';
// Create filter.
$params = [
  'financial_type_id' => $financial_type,
  'total_amount' => $total_amount,
  'contact_id' => $civi_id,
  'custom_100' => $mollie_id,
  'receive_date' => $date,
  'currency' => "EUR",
  'source' => "Chiro.be via mollie",
];
return $this->query($entity, $params, $action);

```

}

3) create participantPayment

```
public function createParticipantPayment($participant_id, $contribution_id) {
$entity = 'ParticipantPayment';
$action = 'create';
// Create filter.
$params = [
  'participant_id' => $participant_id,
  'contribution_id' => $contribution_id,
];
return $this->query($entity, $params, $action);

```

}

using version 4.7.27.

# Answer
> 2 votes
This is not a right way of adding participant with contribution associated with it. When there is payment associated with Participants than we need to specify line items in create Participant and/or Contribution api. I would suggest to use Order api to achieve your needs as it is straight forward and handles in convenient way for adding payments in CiviCRM.

---
Tags: api, contributions, payment, participants
---


# Question
Title: civicrm_financial_item fails on update transaction
The IPN information from Paypal is not being transferred to financial\_item and financial\_trxn tables. Therefore all contributions made through paypal standard are still showing as pending in the user record. I've searched the forums but can't find anything that will fix the issue. Any help appreciated - the admin is going in and manually changing status and adding IPN from Paypal reports. Running Joomla 3.6.5 with Civicrm 4.6.33 on Php 5.6. Log entry reads:

---

```
Dec 14 10:41:41  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )
    [code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_financial_item (transaction_date , contact_id , description , amount , currency , financial_account_id , status_id , entity_table , entity_id ) VALUES ( 20171214104141 ,  0 , 'Fee' ,  0.85 , 'USD' ,  5 ,  1 , 'civicrm_financial_trxn' ,  6111 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`jgsny_jgs258`.`civicrm_financial_item`, CONSTRAINT `FK_civicrm_financial_item_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_financial_item (transaction_date , contact_id , description , amount , currency , financial_account_id , status_id , entity_table , entity_id ) VALUES ( 20171214104141 ,  0 , 'Fee' ,  0.85 , 'USD' ,  5 ,  1 , 'civicrm_financial_trxn' ,  6111 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`jgsny_jgs258`.`civicrm_financial_item`, CONSTRAINT `FK_civicrm_financial_item_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_financial_item (transaction_date , contact_id , description , amount , currency , financial_account_id , status_id , entity_table , entity_id ) VALUES ( 20171214104141 ,  0 , 'Fee' ,  0.85 , 'USD' ,  5 ,  1 , 'civicrm_financial_trxn' ,  6111 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`jgsny_jgs258`.`civicrm_financial_item`, CONSTRAINT `FK_civicrm_financial_item_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)

Dec 14 10:41:41  [info] $backTrace = #0 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: constraint violation", -3, 16, (Array:2), "INSERT INTO civicrm_financial_item (transaction_date , contact_id , descripti...")
#4 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-3, 16, (Array:2), "INSERT INTO civicrm_financial_item (transaction_date , contact_id , descripti...")
#5 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -3, NULL, NULL, "INSERT INTO civicrm_financial_item (transaction_date , contact_id , descripti...", "DB_Error", TRUE)
#6 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-3, NULL, NULL, NULL, "1452 ** Cannot add or update a child row: a foreign key constraint fails (`jg...")
#7 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_financial_item (transaction_date , contact_id , descripti...")
#9 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2442): DB_common->query("INSERT INTO civicrm_financial_item (transaction_date , contact_id , descripti...")
#10 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1060): DB_DataObject->_query("INSERT INTO civicrm_financial_item (transaction_date , contact_id , descripti...")
#11 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(442): DB_DataObject->insert()
#12 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Financial/BAO/FinancialItem.php(159): CRM_Core_DAO->save()
#13 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/FinancialTrxn.php(413): CRM_Financial_BAO_FinancialItem::create((Array:10), NULL, (Array:1))
#14 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Contribute/BAO/Contribution.php(2979): CRM_Core_BAO_FinancialTrxn::recordFees((Array:30))
#15 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Payment/BaseIPN.php(774): CRM_Contribute_BAO_Contribution::recordFinancialAccounts((Array:30), NULL)
#16 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php(290): CRM_Core_Payment_BaseIPN->completeTransaction((Array:30), (Array:9), (Array:7), Object(CRM_Core_Transaction), FALSE)
#17 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Payment/PayPalIPN.php(349): CRM_Core_Payment_PayPalIPN->single((Array:30), (Array:9), (Array:7), FALSE, FALSE)
#18 /home/jgsny/public_html/administrator/components/com_civicrm/civicrm/extern/ipn.php(52): CRM_Core_Payment_PayPalIPN->main()
#19 {main}

```

# Answer
> 0 votes
Can you check what value is set for 'CIVICRM\_DOMAIN\_ID' in your civicrm.settings.php?

and also please check the output of below query after replacing CIVICRM\_DOMAIN\_ID value `SELECT contact_id FROM civicrm_domain where id = [CIVICRM_DOMAIN_ID];`

---
Tags: joomla, paypal
---


# Question
Title: Strange Civi errors when editing contacts
When editing contacts in Civicrm i've been receiving one of two errors, I'm worried these are going to cause further issues down the line.

-An error with no error message:

***BACKTRACE***

```
#0 /var/www/elmsln/domains/community/sites/default/files/civicrm/ext/ca.bidon.reporterror/reporterror.php(266): reporterror_civicrm_generatereport("Marrickville Legal Centre", (Array:2), NULL, (Array:0))
#1 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Error.php(365): reporterror_civicrm_handler((Array:2))
#2 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/DAO.php(1094): CRM_Core_Error::fatal()
#3 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Contact/BAO/Contact/Permission.php(150): CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", NULL, "is_deleted")
#4 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Dashlet/Page/Activity.php(61): CRM_Contact_BAO_Contact_Permission::allow(NULL, 1)
#5 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Dashlet_Page_Activity->run((Array:3), NULL)
#6 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#7 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#8 /var/www/elmsln/domains/community/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
#9 [internal function](): civicrm_invoke("dashlet", "activity")
#10 /var/www/elmsln/domains/community/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#11 /var/www/elmsln/domains/community/index.php(21): menu_execute_active_handler()
#12 {main}

```

-And another:

***ERROR***

message: Could not find valid value for ct code:

***BACKTRACE***

```
#0 /var/www/elmsln/domains/community/sites/default/files/civicrm/ext/ca.bidon.reporterror/reporterror.php(266): reporterror_civicrm_generatereport("Marrickville Legal Centre", (Array:2), NULL, (Array:0))
#1 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Error.php(365): reporterror_civicrm_handler((Array:2))
#2 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Utils/Request.php(120): CRM_Core_Error::fatal("Could not find valid value for ct")
#3 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php(163): CRM_Utils_Request::retrieve("ct", "String", Object(CRM_Contact_Form_Contact), TRUE, NULL, "REQUEST")
#4 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Form.php(543): CRM_Contact_Form_Contact->preProcess()
#5 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(129): CRM_Core_Form->buildForm()
#6 /var/www/elmsln/domains/community/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contact_Form_Contact), "upload")
#7 /var/www/elmsln/domains/community/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "upload")
#8 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("upload")
#9 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#10 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Invoke.php(283): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
#11 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#12 /var/www/elmsln/domains/community/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#13 /var/www/elmsln/domains/community/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
#14 [internal function](): civicrm_invoke("contact", "add")
#15 /var/www/elmsln/domains/community/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#16 /var/www/elmsln/domains/community/index.php(21): menu_execute_active_handler()
#17 {main}

```

# Answer
> 5 votes
-An error with no error message:
The error looks like the user is not logged in. Did you faced the problem after logging out and logging in?

Could not find valid value for ct code: This happens when 'ct' (contact type) param is missing is url. Usually happens when you try to visit the New Contact form and you are log out and then after logging in you might face this type of error.

---
Tags: error
---


# Question
Title: The charts on the civicontribute dashboard do not display
Trying to figure out why the charts on the my WordPress / CiviCRM 4.7.27 CiviContribute dashboard are not displaying. We see no errors on the front end, but no charts appear.

Anybody have any good ideas on why this may be happening?

# Answer
This is usually because of flash player not allowing to load on all sites. I added the site in allowed section for flash. Here is what i did

1. Navigate to Chrome settings \>\> Privacy and Security \>\> Content Settings \>\> Flash.
2. Add site url under allow section.

HTH

Pradeep
> 5 votes

---
Tags: wordpress, civicontribute
---


# Question
Title: What is the purpose of the "default invoice payment page" field in the CiviContribute Component Settings page?
All i can find on this is a fairly unclear thread on this site at Pay later online? \- nothing in the documentation at all.

# Answer
"Default invoice payment page" setting is used to set contribution page that can be used to pay pending or partially paid contribution using payment processor.

More about the setting and uses:

Wiki: https://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=346750980

CRM Issue: https://issues.civicrm.org/jira/browse/CRM-19263

HTH
Pradeep
> 2 votes

---
Tags: civicontribute, invoice
---


# Question
Title: Unable to create or edit a contribution record
I'm on Drupal 7 and CiviCRM 4.6.25. Suddenly, I am no longer able to create or edit a contribution record. If I try to create a contribution record from a contact profile, the triangle spins eternally. If I try to create a contribution record from the menu Contributions \> new Contributions, Once I submit the contribution I get a blank page. All I can think of is that I tried to setup the CiviXero extension last week but never got around to finishing the setup. I tried disabling/uninstalling it but that did not help with the problem. The Drupal watchdog is not showing any errors.

# Answer
> 2 votes
civixero extension is build to use for CiviCRM version \>= 4.7 so there might be compatibility issue when installing for 4.6.25 as some function may not be present.

---
Tags: civicontribute
---


title: Contribution Amount does not work

text:
# Question
Title: Contribution Amount does not work
On civi 4.7.27 and wordpress 4.9

After recently upgrading both civi and wordpress I have noticed an issue that I have not been able to resolve. On the contribution pages, if I have Membership section enabled AND Contribution Amounts section enabled, everything works fine. If I have just Membership section enabled, everything work fine. However, if I have just the Contribution Amounts section enabled, after submitting the contribution, users will land on an error 500 page. The contribution will be completed and the record will be stored in civi,but the confirmation email will not be sent. After hours of trouble shooting I have narrowed it down to: this only happens when the Contribution Amounts section is enabled by itself. Everything was wirking fine, until the recent upgrades. The error logs I can find are not giving me any useful information.
Does anyone have any ideas?

Thank you.

# Answer
> 1 votes
Is there any suspicious info in CiviCRM or apache log? Can you try by applying https://github.com/civicrm/civicrm-core/pull/11454 patch works?

---
Tags: civicontribute
---


title: Show VAT on event registration page

text:
# Question
Title: Show VAT on event registration page
I have activated "Sales tax" as per \[the documentation\], including adding Financial Type and Accounts ("Arrangemangsavgift inkl. moms"):

I've also set my event to use the Finacial Type to the one in the picture. But there is no sign of any "moms" (=VAT). Particularly I'd like to have my event registration page clearly state the VAT.

Update: I have a Price Set which uses the Financial Type:

And I've explicitly set the Financial Type of the event to use it too:

I don't see any summary/breakdown with VAT on the registration page, and any contribution created by a registration does not have such a breakdown either.

What is a good checklist to get VAT for event registrations to work? Or maybe, why does not ours work ;-)

# Answer
> 3 votes
To enable Sales tax for an Event.

1. Enable **Enable Tax and Invoicing** setting in Administer \>\> CiviContribute \>\> CiviContribute Component Settings
2. Create a Financial Account of type Liability, Is Tax Enabled and Tax Rate \> 0.
3. Link Financial Account with Financial Type using 'Sales tax Account is'.
4. Use financial type configured for tax at #3 for event, price set, and price fields.

# Answer
> 2 votes
Look for the priceset that is being included in this event. This priceset should have the tax enabled financial type selected in settings.

If you haven't created a priceset - create one from `Administer -> CiviEvent -> New Priceset` and set the financial type to the one that has a sales tax. Use this priceset on the Event Page.

---
Tags: civievent, financial-accounts
---


# Question
Title: How to add a tag or group to a set of pre-existing contacts via import?
I have a list of contacts (names and email addresses). I know that all of these contacts are in the Civi database, but I want to add a tag or a group to all of them, and i have the list in a CSV file. What I should be able to do is simply import the contacts, setting 'Update' or perhaps 'Fill' as my duplicate matching option, and set the tag and/or group to be set in the import settings. Just tried it - several times, using various different options, and it failed every time, reporting that 0 records had been tagged (or added to the group). This is with Civi 4.7.19.

Is there a specific set of options that I need to know about to get this to work? This post (How to tag a contact when importing possible duplicates) suggests that this should just work. I followed that example and it failed.

# Answer
> 1 votes
To bypass this problem, I use Yes/No custom field to import the data "Belonging to A group". Then I use an advanced search to select those contacts and add them to the A group.

# Answer
> 1 votes
I also stumbled across this bug - when a user already exists, trying to import and assign tags using the email/dedupe failed.

Mentioned in one of the jira issues https://issues.civicrm.org/jira/browse/CRM-20739 is "When performing a contact import using the "fill" option and using a dedupe rule to match (i.e. not including the contact ID in the import structure), the contacts will not be added to a group."

I found that if I import based on the contact ID, the additional tag was added - may not be a great solution for everyone but it's a workaround I can live with for now.

# Answer
> 0 votes
I think I face the same issue.

I tried many thing (import more than email for this 2nd import, change group visibility, use a new group, etc.) but it is still the same.

The import report always mentions "One contact added to this existing group." But when I go to group panel, the group has no new contact.

---
Tags: import, groups, tags, data-import
---


title: WYSIWYG stopped working in title tab

text:
# Question
Title: WYSIWYG stopped working in title tab
I have civicrm 4.7.27 installed on Wordpress 4.9.1 Everything was fine yesterday when I created new contribution pages. Then this morning I noticed that the Introductory and Footer message textareas of the Title and Settings tab of the Contribution pages are not loading the WYSIWYG Editor. As far as I can tell, this is only happening in this area, and not any other area that relies on ckeditor/WYSIWYG, but I am concerned that because this came out of nowhere, that it will show up in other parts of the install. Does anyone know what is going on? Is it possibly a known bug with 4.7.27? See screen shot for error messages.

Thank you

# Answer
> 2 votes
Solved. The problem was caused by the new theme we installed. The theme Super Mag is not compatible with Civi and will break of the wysiwyg functions. Once uninstalled it worked properly again.

---
Tags: ckeditor, wysiwyg
---


# Question
Title: How to select multiple values in select2 control by jquery?
I want to select multiple options in a select2 multivalue control, when clicking a button. This is useful specially for searches where the user needs to select many option to one of the filters

any idea how to achieve it..? I found how to select an option in select2 single option dropdown, but not in a multiselect control for several options at the same time

# Answer
> 6 votes
Ok, I found the way. It's just passing an array of option values to 'val' argument:

```
$('#my_select2').select2('val', ["value1", "value2", "value3"]);

```

# Answer
> 1 votes
you can also do it this way by defining javascript array.

```
var Values = new Array();
Values.push("value1");
Values.push("value2");
Values.push("value3");

$("#my_select2").val(Values).trigger('change');

```

---
Tags: jquery, select2
---


# Question
Title: com_civicrm/civicrm/CRM/Core/BAO/SchemaHandler.php on line 730
**Do you have any information about the solution of the error found in the image?**

Joomla Version: 3.7.4
CiviCRM Version: 4.7.22

# Answer
> 1 votes
Have you tried clearing cache? And clearing Expired Cache? I had the same error, cleared cache/expired cache and the message went away. Also have you done the indices fix?

I found this to be useful https://issues.civicrm.org/jira/browse/CRM-21203

---
Tags: joomla, php, civicrm-home
---


# Question
Title: Multiple CiviHR installation in single Amazon AWS instance
I have installed multiple CiviHR on Amazon AWS.

And configured VirtualHost as given below. so I can use the same domain and demo1 and demo 2 as a subdomain of it.

Both CiviHR installation was successful but in domain.com/demo/hr-details I'm not able to see any data that I have added. It displaying blank.

If I click on edit my details button I'm able to see the data I have added.

Highlighted URLs redirecting to root folder of the server (domain.com/dashboard instead of domain.com/demo1/dashboard).

Is this issue with VirtualHost configuration or something else?

# Answer
> 5 votes
It's purely apache/httpd configuration issue. Create 2 subdomain demo1.domain.com and demo2.domain.com and have 2 conf file under sites-available and sites-enabled with following config

demo1.domain.com.conf

```
<VirtualHost *:80>

  DocumentRoot /var/www/html/demo1

  ServerName demo1.domain.com

  ServerAdmin admin@domain.com

  <Directory "/var/www/html/demo1">

    AllowOverride All

    Require all granted

    Options -Indexes

  </Directory>

  ErrorLog  /var/log/apache2/demo1.domain.com.error.log

  # Possible values include: debug, info, notice, warn, error, crit,

  # alert, emerg.

  LogLevel warn

  CustomLog  /var/log/apache2/demo1.domain.com.access.log  combined

</VirtualHost>

```

demo2.domain.com.conf

```
<VirtualHost *:80>

  DocumentRoot /var/www/html/demo2

  ServerName demo2.domain.com

  ServerAdmin admin@domain.com

  <Directory "/var/www/html/demo2">

    AllowOverride All

    Require all granted

    Options -Indexes

  </Directory>

  ErrorLog  /var/log/apache2/demo2.domain.com.error.log

  # Possible values include: debug, info, notice, warn, error, crit,

  # alert, emerg.

  LogLevel warn

  CustomLog  /var/log/apache2/demo2.domain.com.access.log  combined

</VirtualHost>

```

---
Tags: civihr
---


# Question
Title: System Status Critical, blank System Status page
After upgrading to Civi 4.7.29 on WordPress 4.9.1, it says System Status Critical (see screenshot at the bottom of this post), but the status page is blank.

The developers console in Chrome has a lot of messages similar to this:

```
GET https://mysite.org/homepages/34/d1234578/htdocs/tcp-wp/wp-content/uploads/civicrm/ext/org.civicrm.shoreditch/css/bootstrap.css?r=sZzwI net::ERR_ABORTED

```

I found this suggesting changing directory permissions to 755, which I did for /wp-content/uploads/civicrm/ but it doesn't seem to have helped.

After the upgrade, I got this warning, which may be significant. However, to me these two look like two ways of saying the same thing. However, I'm not sure what I might be looking for in the htaccess file.

```
There appears to be an inconsistency in the configuration of "Image Upload URL" and "Image Upload Directory".

imageUploadDir: /homepages/34/d12345678/htdocs/tcp-wp/wp-content/uploads/civicrm/persist/contribute/
imageUploadURL: http://mysite.org/homepages/34/d12345678/htdocs/tcp-wp/wp-content/uploads/civicrm/persist/contribute/
You may need to check that:

(a) the path and URL match,
(b) the httpd/htaccess policy allows requests for files inside this folder,
and (c) the web domain matches the normal web domain.
(Note: Although files should be readable, it is best if they are not listable or browseable.)

If this remains unresolved, then some important screens may fail to load.

```

==========================================

Tried updating resource URLs as suggested by fdarn. Now when I click on CiviCRM on the WordPress dashboard, I get the screen shown below. Clicking on "Configure Your Dashboard" doesn't seem to do anything. Clicking on CiviCRM in the upper left takes me back (see red arrow below) to basically the same screen, but without that link.

Any suggestions or enlightening explanations of what's happening would be most welcome.

# Answer
> 2 votes
Can you check Directory and Resource url settings if the paths are entered correctly.

# Answer
> 0 votes
I had the issue of our civimail and system status pages being blank after upgrading to 4.7.29. I am also on wordpress 4.9.1. I resolved this issue by using the absolute paths as the resource urls for images and extensions. Give that a try and see if it works. It should at least open up your system status page so you can see what needs to be upgraded or set up.

I had to upgrade our database after upgrading to civi 4.7.29. The link to upgrade the database is in the System Status page. That might be what your critical error is all about, but you can't get into the system status page to see that.

Try these urls for Resource URLs. See screenshot also. Keep in mind that the system status page will need a little time to load, so if it is still blank when you first land on it, wait a little bit.

https://yoursite.org/wp-content/uploads/civicrm/persist/contribute

https://yoursite.org/wp-content/uploads/civicrm/ext/

---
Tags: wordpress, status
---


# Question
Title: CiviCRM Database Upgrade from 4.7.16 to 4.7.28 is hanging
I am trying to upgrade my Joomla civiCRM database from 4.7.16 to 4.7.28. The component upgraded fine but when I try to upgrade the database after following all of the preparation steps, it hangs and makes not progress. I've looked at all of the similar problems, but nothing helps me with my error. I have two questions, how do I know what's going on? And my second question is what is going on and how to I get it to complete the upgrade?

# Answer
Can you check apache error and CiviCRM log? If you have database access can you paste the result of below query

```
SELECT id, version FROM civicrm_domain;

```
> 1 votes

---
Tags: joomla, upgrade, database
---


title: Data is not loading in CiviHR

text:
# Question
Title: Data is not loading in CiviHR
In the CiviHR installation, data is not displaying in self service portal. In menu like My Leave under self portal showing angular js error in console.

But in HR menu I'm able to see all my contacts. there are no errors at all.

This installation is hosted in DigitalOcean 2GB RAM and 2CPU.

Is CiviHR required more RAM?

# Answer
> 0 votes
Can you check if directory path and resource url is set for extension?

---
Tags: civihr
---


# Question
Title: Email Redirect to Database setting for civicrm-settings.php?
ola, i just stumbled upon the https://github.com/ixiam/com.ixiam.modules.mailreader extension and would love to use it on our dev/stage environment.

It enables a ui to read email that were redirected to the database. now my question is: is it possible to enable DB email redirect with a line of code in civicrm.settings.php?

When copying production databases to dev & stage it would be great to be able to override the mail setting to redirect to the database.

So far I only found define('CIVICRM\_MAIL\_LOG', 1); and define('CIVICRM\_MAIL\_LOG', '/dev/null'); as available settings in https://docs.civicrm.org/dev/en/latest/tools/debugging/

# Answer
> 7 votes
Yes its possible to set Outbound email to 'Redirect to Database' by simply adding 2 lines in your civicrm.settings.php

```
global $civicrm_setting;
$civicrm_setting['Mailing Preferences']['mailing_backend']['outBound_option'] = 5;

```

**Note:** If `global $civicrm_setting;` is already present then no need to add it.

# Answer
> 1 votes
$civicrm\_setting\['Mailing Preferences'\]\['mailing\_backend'\]\['outBound\_option'\] = 5;

---
Tags: civimail
---


# Question
Title: Can't Add a New Fee to an Existing Event in 4.7.20
I have created an event with several payment options and it works properly with no issues. However, when adding a new fee (there are 5 at the moment that works), It doesn't get saved and the loader spinner just spins forever.

Underneath, when inspecting the network when the form is submitted, I get this

> {status: "fatal",…} content : "Sorry but we are not able to provide this at the moment." crmMessages : \[{,…}\] 0 : {,…} options : null text : "We experienced an unexpected error. Please post a detailed description and the backtrace on the CiviCRM forums: http://forum.civicrm.org/" title : "Sorry an error occurred" type : "error" status : "fatal" title : "Configure Event - B1 Course" userContext : "/civicrm/event/manage?reset=1"

In the error logs, this detailed response is outputted:

```
There was a CiviCRM error at ISKCON London Ltd.
Date: 2017-06-11T12:52:30+01:00

***ERROR***
message:
code:

***LAST ERROR***

***LOGGED IN USER***
contact_id:         2
display_name:       Mr. Aashish Sharma
email_id:
email:
id:                 2

REMOTE_ADDR: 82.47.150.10
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

***SERVER***
PATH:               /usr/local/bin:/usr/bin:/bin
REDIRECT_STATUS:    200
UNIQUE_ID:          WT0u-sMI3iEAABks7HYAAABJ
TZ:                 Europe/Sofia
OMP_THREAD_LIMIT:   1
HTTP_AUTHORIZATION:
HTTPS:              on
SSL_TLS_SNI:        rldb.info
HTTP_HOST:          rldb.info
HTTP_CONNECTION:    keep-alive
CONTENT_LENGTH:     8826
HTTP_ORIGIN:        https://rldb.info
HTTP_USER_AGENT:    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
CONTENT_TYPE:       multipart/form-data; boundary=----WebKitFormBoundaryxVzJBFAoBtR543ba
HTTP_ACCEPT:        application/json, text/javascript, */*; q=0.01
HTTP_X_REQUESTED_WITH:XMLHttpRequest
HTTP_DNT:           1
HTTP_REFERER:       https://rldb.info/civicrm/event/manage/fee?reset=1&action=update&id=48
HTTP_ACCEPT_ENCODING:gzip, deflate, br
HTTP_ACCEPT_LANGUAGE:en-GB,en-US;q=0.8,en;q=0.6
HTTP_COOKIE:        SESSfdfbbafa8321456c2612c2aa8f3eb683=UM-Iryeyj-zQpNIzlWLda-cQEovuWWEBLfp_RW-LN-E; Drupal.tableDrag.showWeight=0; SSESSfdfbbafa8321456c2612c2aa8f3eb683=cOvpS0HYROxslVL4qewR4nCYYYg8VRpQZUmtSDA2Oik; has_js=1
SERVER_SIGNATURE:
SERVER_SOFTWARE:    Apache
SERVER_NAME:        rldb.info
SERVER_ADDR:        195.8.222.33
SERVER_PORT:        443
REMOTE_ADDR:        82.47.150.10
DOCUMENT_ROOT:      /home/rldb/www/www
REQUEST_SCHEME:     https
CONTEXT_PREFIX:
CONTEXT_DOCUMENT_ROOT:/home/rldb/www/www
SERVER_ADMIN:       admin@rldb.info
SCRIPT_FILENAME:    /home/rldb/www/www/index.php
REMOTE_PORT:        60253
REDIRECT_URL:       /civicrm/event/manage/fee
REDIRECT_QUERY_STRING:action=update&id=48&component=event&qfKey=8597fbacd761cbef1573e2c09b4cf85a_3956&snippet=json
GATEWAY_INTERFACE:  CGI/1.1
SERVER_PROTOCOL:    HTTP/1.1
REQUEST_METHOD:     POST
QUERY_STRING:       action=update&id=48&component=event&qfKey=8597fbacd761cbef1573e2c09b4cf85a_3956&snippet=json
REQUEST_URI:        /civicrm/event/manage/fee?action=update&id=48&component=event&qfKey=8597fbacd761cbef1573e2c09b4cf85a_3956&snippet=json
SCRIPT_NAME:        /index.php
PHP_SELF:           /index.php
REQUEST_TIME_FLOAT: 1497181950.1148
REQUEST_TIME:       1497181950
argv:               Array
(
    [0] => action=update&id=48&component=event&qfKey=8597fbacd761cbef1573e2c09b4cf85a_3956&snippet=json
)

argc:               1

***BACKTRACE***
#0 /home/rldb/www/www/sites/default/files/civicrm/ext/ca.bidon.reporterror/reporterror.php(251): reporterror_civicrm_generatereport("ISKCON London Ltd", (Array:2), NULL, (Array:0))
#1 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Error.php(365): reporterror_civicrm_handler((Array:2))
#2 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/DAO.php(1070): CRM_Core_Error::fatal()
#3 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Price/BAO/PriceFieldValue.php(65): CRM_Core_DAO::getFieldValue("CRM_Price_BAO_PriceFieldValue", NULL, "price_field_id")
#4 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Price/BAO/PriceFieldValue.php(127): CRM_Price_BAO_PriceFieldValue::add((Array:3), (Array:1))
#5 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Price/BAO/PriceField.php(184): CRM_Price_BAO_PriceFieldValue::create((Array:3), (Array:1))
#6 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Event/Form/ManageEvent/Fee.php(670): CRM_Price_BAO_PriceField::create((Array:9))
#7 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Form.php(447): CRM_Event_Form_ManageEvent_Fee->postProcess()
#8 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(169): CRM_Core_Form->mainProcess()
#9 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(136): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Event_Form_ManageEvent_Fee), "upload")
#10 /home/rldb/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Event_Form_ManageEvent_Fee), "upload")
#11 /home/rldb/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_ManageEvent_Fee), "upload")
#12 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("upload")
#13 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#14 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(284): CRM_Utils_Wrapper->run("CRM_Event_Form_ManageEvent_Fee", "Event Fees", NULL)
#15 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14))
#16 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#17 /home/rldb/www/www/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#18 [internal function](): civicrm_invoke("event", "manage", "fee")
#19 /home/rldb/www/www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#20 /home/rldb/www/www/index.php(21): menu_execute_active_handler()
#21 {main}

***POST***
qfKey:              8597fbacd761cbef1573e2c09b4cf85a_3956
entryURL:           https://rldb.info/civicrm/event/manage/fee?reset=1&action=update&id=48&component=event&qfKey=8597fbacd761cbef1573e2c09b4cf85a_3956
price_field_id:     168
price_field_value:  Array
(
    [1] => 537
    [2] => 538
    [3] => 539
    [4] => 540
    [5] => 541
    [6] =>
    [7] =>
    [8] =>
    [9] =>
    [10] =>
    [11] =>
)

discount_price_set: Array
(
    [1] =>
    [2] =>
    [3] =>
    [4] =>
    [5] =>
    [6] =>
)

cancelURL:          /civicrm/event/manage?reset=1
_qf_default:        Fee:upload
MAX_FILE_SIZE:      20971520
is_template:        0
is_monetary:        1
currency:           GBP
payment_processor:  1
pay_later_text:     I will send payment by cheque
pay_later_receipt:
fee_label:          Event Fee(s)
financial_type_id:  9
price_set_id:
label:              Array
(
    [1] => For all 6 Units of Bhakti Sastri
    [2] => If spouses/partners do course together. cost per participant
    [3] => Cost for One Unit
    [4] => For Temple Asrama
    [5] => Others - pay in 2 instalments
    [6] => test
    [7] =>
    [8] =>
    [9] =>
    [10] =>
)

value:              Array
(
    [1] => 275.00
    [2] => 250.00
    [3] => 50.00
    [4] => 0.00
    [5] => 137.50
    [6] => 50.00
    [7] =>
    [8] =>
    [9] =>
    [10] =>
)

default:            1
discount_name:      Array
(
    [1] =>
    [2] =>
    [3] =>
    [4] =>
    [5] =>
)

discount_start_date:Array
(
    [1] =>
    [2] =>
    [3] =>
    [4] =>
    [5] =>
)

discount_start_date_1_display_593d2e777d8ea:
discount_end_date:  Array
(
    [1] =>
    [2] =>
    [3] =>
    [4] =>
    [5] =>
)

discount_end_date_1_display_593d2e777ef79:
discount_start_date_2_display_593d2e77805c8:
discount_end_date_2_display_593d2e7781c84:
discount_start_date_3_display_593d2e778357c:
discount_end_date_3_display_593d2e7784b4b:
discount_start_date_4_display_593d2e7786147:
discount_end_date_4_display_593d2e7787771:
discount_start_date_5_display_593d2e7788e1e:
discount_end_date_5_display_593d2e778a52b:
_qf_Fee_upload:     Save

```

Any help would be much appreciated!

Thanks

Edit 1: Upgrading CiviCRM from 4.7.19 to 4.7.20 did not resolve the issue.

Edit 2: When creating a new event from scratch, I can add as many fee options as I want. But, if I save and then add a new fee, then these errors occur and I can't save.

Any help?

Edit 3: If I add a new fee (after it has been saved) and instead click on 'save and done', this is th emessage:

> Fatal error: Uncaught CRM\_Core\_Exception: \[0: Transaction integrity error: Expected to find active frame thrown in /home/rldb/www/www/sites/all/modules/civicrm/Civi/Core/Transaction/Manager.php on line 107

# Answer
> 1 votes
# TL;DR

Go to `<site>/sites/all/modules/civicrm/CRM/Price/BAO/PriceField.php` line 179

And to the following condition:

```
elseif (!empty($optionsIds)) {

```

Add another condition for verifying that the **`id` exists and is not `null`**, i.e. you may replace it with:

```
elseif (!empty($optionsIds) && isset($optionsIds['id'])) {

```

---

# Explanation

This simple resolution was due to the investigative work of Favio Manriquez (JIRA) where he explained the following:

> I was able to confirm this behavior. When debugging, if you print a stack trace at the Fatal Error location, you don't get a lot of information. By stepping through the code, I arrived at `CRM_Price_BAO_PriceField::create()`. I'll try to explain what is causing this error:
>
> * When you go to the configure screen for an Event, and then add a new fee (this doesn't happen for events that use price sets), the for loop goes through all fees, and updates or creates them as necessary. However, on the first if branch, the `$optionsIds` variable is set, and it is used again on the `elseif` branch at line 179 !!
> * It's only when you add a new Fee, that this `elseif` branch causes problems, because the last id in `$optionsIds` is `NULL` (for the new price that was created on first branch). This causes a fatal error via `CRM_Core_Error::fatal()` which forces a transaction rollback.
>
> This code change was introduced on this commit for CRM-19517, but on previous versions the `elseif` branch is not present, so I'm not exactly sure why this code is needed.
>
> I could add an easy PR to check if the id is `null`, but since this is related to CRM-19517, I would like to get more insight first.

As Favio explained, the `null` check is necessary because inside the `elseif` the value of `$optionsIds['id']` is used:

```
 $optionsLoad = civicrm_api3('price_field_value', 'get', array('id' => $optionsIds['id']));

```
1. If `$optionsIds['id']` is `null`, invoking:

`$options = $optionsLoad['values'][$optionsIds['id']]`

Would be equivalent to invoke:

`$options = $optionsLoad['values'][null]`

Which would only trigger an "undefined index" notice (not stopping the execution).
2. This would in turn provide `null` in `$options`, which are used later in: `CRM_Price_BAO_PriceFieldValue::create($options, $optionsIds);`
3. Therefore the `create` is attempted with invalid options and that is why the *Stacktrace* starts with:

> CRM/Price/BAO/PriceFieldValue.php(65): `CRM_Core_DAO::getFieldValue("CRM_Price_BAO_PriceFieldValue", NULL, "price_field_id")`

## Why the value is `null` there?

If we look back to line 99 of `PriceField.php`:

```
  $fieldOptions = civicrm_api3('price_field_value', 'get', array(
    'price_field_id' => $priceField->id,
    'sequential' => 1,
  ));

```

And think of the action we, as users, are trying to perform, i.e. editing/adding a new Fee field, the `$fieldOptions['values']` will not contain this new field.

Thus the next and only `foreach` that assigns the options to `$optionsIds` prior to that `elseif` block:

```
foreach ($fieldOptions['values'] as $option) {
  $optionsIds['id'] = $option['id'];
  ...
}

```

Will not not have an iteration for this new field. At the point where `civicrm_api3('price_field_value'` is invoked to get the field associated to an id, since the new field's id does not exist, `null` will show up.

Therefore, this particular `elseif` block should only be run only if the field has an id already associated to it, the `!empty($optionsIds)` condition only prevented part of possible failures in this sense.

# Answer
> 1 votes
It is a bug (see https://issues.civicrm.org/jira/browse/CRM-20729) and it is fixed in 4.7.22. If an upgrade is not an option you can manually apply the patch https://issues.civicrm.org/jira/browse/CRM-20729 .

# Answer
> 1 votes
This issue has been fixed at https://github.com/civicrm/civicrm-core/pull/10597/files for CRM issue https://issues.civicrm.org/jira/projects/CRM/issues/CRM-20760

# Answer
> 0 votes
@sovereign108 The issue on Jira has been updated with a comment by @favrik. The workaround for now is to use price sets, as that is not impacted.

---
Tags: civievent
---


# Question
Title: Manually started scheduled email not completing
I started a mailing yesterday using Administer-\>System Settings-\>Scheduled Jobs-\>Send Scheduled Mailings-\>More-\>Execute Now. The job started and sent about 5000 of 7000 emails but then seemed to hang. Over 2000 remain unsent, and the job log shows "Started..." but not "Finished...", and the status of the job is "Running." It's been more than a day since I started the job. Any idea what's going on?

# Answer
Do you have a cron job configured for CiviCRM that runs periodically?

Can you check CiviCRM and/or Apache Error log for any errors?

Scheduled Mailing jobs are executed in batches of 1000 or the batch limit specified under Administer \>\> CiviMail \>\> Mailer Settings.

If the recent Schedule job log says 'Started' then the last job was terminated because of error. This might be for several reasons like php time out, memory allocation, mysql connection time out, DB errors etc. To trace the problem you will need to check CiviCRM and Apache logs to see if any errors were recorded.

To complete the job you can re run the Send Scheduled Mailings manually if your system is not configured to do it automatically.
> 3 votes

# Answer
Have you tried manually running the job again? It's likely that you hit the maximum time for the process on your server and that is why it's hanging. I seem to remember having to do that when we did a large mailing before we got the ability to increase all of our PHP settings.
> 1 votes

---
Tags: civimail, scheduled-job
---


# Question
Title: Drupal issue if CiviContribute component is desactivated
On CiviCRM 4.7.29 and earlier versions, there is an Drupal issue when CiviContribute component is desactivated. This probably occurs only if the components had been activated once. But it is too late to test this. The issue dissapear when the CiviContribute component is reactivated. So in my case I can live w/ that, but it might be concerning an issue w/ the component. I don't know how to report that. My PHP is 5.6.30-0+deb8u1.

Here's the backTrace that shows when creating a new page in Drupal.

```
$backTrace = #0 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(945): CRM_Core_Error::backtrace("backTrace", TRUE) #1 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error)) #2 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error)) #3 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #4 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, NULL, NULL, "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...", "DB_Error", TRUE) #6 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8)) #7 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7)) #8 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...", "DB_Error", TRUE) #9 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...") #10 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError() #11 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #12 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2446): DB_common->query("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #13 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(441): DB_DataObject->_query("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #14 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php(575): DB_DataObject->find() #15 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/FinancialType.php(196): CRM_Core_PseudoConstant::populate(NULL, "CRM_Financial_DAO_EntityFinancialAccount", TRUE, "entity_id", NULL, "account_relationship = AND entity_table = 'civicrm_financial_type' ") #16 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Contribute/BAO/ContributionPage.php(843): CRM_Financial_BAO_FinancialType::getIncomeFinancialType() #17 /var/data/sites/photo/public_html/sites/all/modules/civicrm/api/v3/Generic.php(437): CRM_Contribute_BAO_ContributionPage::buildOptions("financial_type_id", NULL, (Array:2)) #18 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(86): civicrm_api3_generic_getoptions((Array:9)) #19 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9)) #20 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:7)) #21 /var/data/sites/photo/public_html/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("contribution_page", "getoptions", (Array:3), NULL) #22 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2667): civicrm_api("contribution_page", "getoptions", (Array:3)) #23 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2463): civicrm_entity_get_field_options("financial_type_id", "contribution_page") #24 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2341): civicrm_entity_get_field_widget((Array:14), "contribution_page") #25 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2191): _civicrm_entity_getproperties("contribution_page", "property_info") #26 /var/data/sites/photo/public_html/includes/module.inc(1163): civicrm_entity_field_extra_fields_alter((Array:61), NULL, NULL, NULL) #27 /var/data/sites/photo/public_html/modules/field/field.info.class.inc(468): drupal_alter("field_extra_fields", (Array:61)) #28 /var/data/sites/photo/public_html/modules/field/field.info.inc(690): FieldInfo->getBundleExtraFields("wysiwyg_profile", "wysiwyg_profile") #29 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/plugins/content_types/entity_context/entity_field_extra.inc(39): field_info_extra_fields("wysiwyg_profile", "wysiwyg_profile", "display") #30 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/content.inc(151): ctools_entity_field_extra_content_type_content_types((Array:16)) #31 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/content.inc(701): ctools_content_get_subtypes((Array:16)) #32 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/includes/common.inc(391): ctools_content_get_available_types((Array:0), FALSE, (Array:306), (Array:11)) #33 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/panels.module(1838): panels_common_get_allowed_types("panels_page", (Array:0)) #34 [internal function](): panel_context_panels_cache_get("page-test_bt::page_test_bt__panel::::") #35 /var/data/sites/photo/public_html/includes/module.inc(926): call_user_func_array("panel_context_panels_cache_get", (Array:1)) #36 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/panels.module(1706): module_invoke("panel_context", "panels_cache_get", "page-test_bt::page_test_bt__panel::::") #37 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/plugins/task_handlers/panel_context.inc(712): panels_edit_cache_get("panel_context:page-test_bt::page_test_bt__panel::::") #38 [internal function](): panels_panel_context_edit_content((Array:4), (Array:29)) #39 /var/data/sites/photo/public_html/includes/form.inc(842): call_user_func_array("panels_panel_context_edit_content", (Array:2)) #40 /var/data/sites/photo/public_html/includes/form.inc(351): drupal_retrieve_form("panels_panel_context_edit_content", (Array:29)) #41 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/wizard.inc(125): drupal_build_form("panels_panel_context_edit_content", (Array:29)) #42 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/page_manager/plugins/tasks/page.admin.inc(321): ctools_wizard_multistep_form((Array:12), "content", (Array:29)) #43 [internal function](): page_manager_page_add_subtask("page-test_bt", "content") #44 /var/data/sites/photo/public_html/includes/menu.inc(527): call_user_func_array("page_manager_page_add_subtask", (Array:2)) #45 /var/data/sites/photo/public_html/index.php(21): menu_execute_active_handler() #46 {main}

```

# Answer
Yes Agreed. This is a bug in CiviCRM Entity module as it is trying to fetch contribution pages even though the component is not enabled and also a core bug as account relationship option group is tied with CiviContribute Module and therefore it leads to DB:Syntax error.
> 2 votes

---
Tags: civicontribute
---


title: How to change date format in exports

text:
# Question
Title: How to change date format in exports
I am using Civi 4.7.29 on Wordpress 4.9.1

When exporting the membership list for postal mailing, the expiration date is shown as YYYY-MM-DD. I would really like it to be MM-DD-YYYY.

To export I go to Search\>Find Memberships, I select my membership type then scroll to the bottom and click search. On the next page I select All Records, then select Export Members from the drop down menu.

Is there a better way of doing this to get the date format I need, or are there some settings I can change? The Localization \> Date Formats do not seem to cover the exports.

Thank you.

# Answer
> 6 votes
Yes, Date fields in export do not respect Date formats set in Localization \>\> Date Formats. Can you try Format Date Column in Export extension? This extension allows to set Export Date format under Localization \>\> Date Formats and uses this to format the date fields while exporting.

---
Tags: export, date-preferences
---


# Question
Title: {domain...} tokens not parsed in regular mail?
Is it me, or are the {domain...} tokens not parsed in a private (non-civimail) mail ? Like, when sending a mail from a contacts page ?

If it isn't me, then the documentation here is wrong ? https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#domainaddress

Drupal 7.56, CiviCRM 4.7.27

# Answer
Domain tokens are not replaced when trying to send email activity for a contact. This seems like a bug in civicrm or wrong documentation. This can be fixed by applying below patch.

```
diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php
index 787a1c955d..35133010e1 100644
--- a/CRM/Activity/BAO/Activity.php
+++ b/CRM/Activity/BAO/Activity.php
@@ -1587,6 +1587,12 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
         $values = array_merge($values, $details["{$contactId}"]);
       }

+      $domainTokens = array_merge($subjectToken, $messageToken);
+      $domain = CRM_Core_BAO_Domain::getDomain();
+      foreach (['subject', 'text', 'html'] as $bodyType) {
+        $$bodyType = CRM_Utils_Token::replaceDomainTokens($$bodyType, $domain, TRUE, $domainTokens, TRUE);
+      }
+
       $tokenSubject = CRM_Utils_Token::replaceContactTokens($subject, $values, FALSE, $subjectToken, FALSE, $escapeSmarty);
       $tokenSubject = CRM_Utils_Token::replaceHookTokens($tokenSubject, $values, $categories, FALSE, $escapeSmarty);

```
> 6 votes

# Answer
I believe this is a missing feature is core. The documentation do suggest that custom tokens can be used in non-bulk mailings. However, tokens like actions, mailings are not replaced. One of our client wanted to have domain details send in non-bulk emails, we used tokens and tokenValues hooks to have {domain.xxx} work.
> 2 votes

---
Tags: drupal, email, tokens
---


title: Display Preferences Bug?

text:
# Question
Title: Display Preferences Bug?
we just tried to edit some of the display preferences (unticking various things we don't need) but upon clicking 'save' the changes do not hold, even though the green message box says "changes saved".

Is this a known bug? Is anyone having the same issue or know a solution?

# Answer
Can you try to increase php variable `post_max_size` in `php.ini` or using php function `ini_set()`.
> 1 votes

---
Tags: issues
---


# Question
Title: I need help finding an error in my installation
I am mostly finished with moving our website from a Joomla installation to a Wordpress installation. I have been having problems getting the dashboard on CiviCRM to show, but I can access specific pages (such as the configuration page) by entering it directly.

In all this, I found I was getting an error in our hosting logs about accessing a directory that is no longer in use (a test directory that the new website was installed in). Upon contacting my host (Siteground) to determine what file(s) were giving that request, they recommended a plug in to Wordpress - Better Search and Replace.

I found that there were some 400 or more old links in CiviCRM tables to 'public\_html/test' which was the test site. Since things are now moved to 'public\_html', I changed all of those links in the database.

Now, when I click the CiviCRM link on the dashboard, I simply get "Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.".

I pulled the CiviCRM logs after this found the following:

```
Jan 01 08:50:58  [info] $Fatal Error Details = Array
(
    [message] =>
    [code] =>
)

Jan 01 08:50:58  [info] $backTrace = #0 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(378): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(307): CRM_Core_Error::fatal()
#2 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:17))
#3 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#4 /home/nefc0709/public_html/wp-content/plugins/civicrm/civicrm.php(1216): CRM_Core_Invoke::invoke((Array:3))
#5 [internal function](): CiviCRM_For_WordPress->invoke("")
#6 /home/nefc0709/public_html/wp-includes/class-wp-hook.php(286): call_user_func_array((Array:2), (Array:1))
#7 /home/nefc0709/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#8 /home/nefc0709/public_html/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#9 /home/nefc0709/public_html/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
#10 {main}

```

If anyone has suggestions, I would appreciate it!

# Answer
> 1 votes
Couple of things I usually do after migration

1. Check path and save Administer \>\> System Settings \>\> Directories.
2. Check path and save Administer \>\> System Settings \>\> Resource URL.
3. Delete template\_c.
4. Rebuild menu and Trigger http://domain.com/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1&triggerRebuild=1
5. Run Cleanup and Cache.

(Also check if php CURL is installed on server)

---
Tags: wordpress, error
---


# Question
Title: Stop recur mails from sending out to users
Current civi behaviour is that whenever a recurring payment is made using a contribution page, two emails are sent.

* Contribution Receipt AND
* Recurring start notification.

Now, when the next scheduled date occurs, a contribution is recorded which additionally send an email to the user notifying about the recur payment.

We don't want this recur start, periodic emails and the end notification to be sent by CiviCRM.

We've written a small extension which is able to stop the start and end notification. Is there an existing way to stop periodic recur e-mails?

CiviCRM version 4.7.29.

# Answer
There is no such way to stop recurring notification being send out from CiviCRM. Current code at line 567 in CRM/Contribute/BAO/ContributionPage.php checks for $isEmailReceipt which is either set using is\_email\_receipt of contribution page or if recurring is recorded offline.

Two ways of handling this:

1. Change in core :

* Add checkbox field on payment processor form 'Notify user about recurring payments?'
    * Change code at line 567 in CRM/Contribute/BAO/ContributionPage.php to check if 'Notify user about recurring payments?' is TRUE.
2. Through extension:

* Add checkbox field on payment processor form 'Notify user about recurring payments?' using buildForm hook and store value in extension custom table.
    * Using alterMailParams hook abort the email if 'Notify user about recurring payments?' is true for the payment processor used and Message template == Recurring Noification.
> 3 votes

---
Tags: extension, email, recurring-contributions
---


# Question
Title: How much time it will take to build CiviCRM from scratch by single person?
This question is just to have an idea of the effort that has gone into building CiviCRM. How much time will it take to build CiviCRM from scratch by a single person? including testing and fixing the bugs.

# Answer
All of it? Probably 10 years.

(that's a serious answer - I know, as a member of the core team, I built a lot of it myself)
> 6 votes

# Answer
Building the entire thing? My guess is at this point it's tens of thousands of hours.
> 2 votes

# Answer
Considering you're attempting to create an ever-evolving target, I'd say that you'd never be able to do it.
> 0 votes

---
Tags: evaluating-civicrm, civicrm-home
---