# Question
Title: API error: DB Constraint Violation - domain_id should possibly be marked as mandatory for Dashboard,create API. If so, please raise a bug report
I am running CiviCRM 5.0.0 on WordPress 4.9.5 and got a DB Constraint Violation each time I try to active/deactivate an extension (after the validation screen) or when I validate the WordPress Access Control panel of CiviCRM. Despite the error message, the required action is completed.

This is an error that is present since some month and therefore some releases (I do not remember when exactly).

The detailed error message:

```
Apr 18 00:12:41  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] =>
                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                  VALUES  ( 7, 2 ), ( 7, 9 ), ( 7, 10 ), ( 7, 12 ), ( 7, 13 ), ( 7, 19 ), ( 7, 20 ), ( 7, 21 ), ( 7, 22 ), ( 7, 31 ), ( 7, 36 ), ( 7, 39 ), ( 7, 76 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key const
raint fails (`aquaparismcivi`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_dashboard_id` FOREIGN KEY (`dashboard_id`) REFERENCES `civicrm_dashboard` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error
    [user_info] =>
                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                  VALUES  ( 7, 2 ), ( 7, 9 ), ( 7, 10 ), ( 7, 12 ), ( 7, 13 ), ( 7, 19 ), ( 7, 20 ), ( 7, 21 ), ( 7, 22 ), ( 7, 31 ), ( 7, 36 ), ( 7, 39 ), ( 7, 76 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key const
raint fails (`aquaparismcivi`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_dashboard_id` FOREIGN KEY (`dashboard_id`) REFERENCES `civicrm_dashboard` (`id`) ON DELETE CASCADE)]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="
                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                  VALUES  ( 7, 2 ), ( 7, 9 ), ( 7, 10 ), ( 7, 12 ), ( 7, 13 ), ( 7, 19 ), ( 7, 20 ), ( 7, 21 ), ( 7, 22 ), ( 7, 31 ), ( 7, 36 ), ( 7, 39 ), ( 7, 76 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key const
raint fails (`aquaparismcivi`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_dashboard_id` FOREIGN KEY (`dashboard_id`) REFERENCES `civicrm_dashboard` (`id`) ON DELETE CASCADE)]"]
)

```

The trace

```
Apr 18 00:12:41  [info] $backTrace = #0 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(948): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: constraint violation", -3, 16, (Array:2), "\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...
")
#3 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-3, 16, (Array:2), "\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...")
#4 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -3, 16, (Array:2), "\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...", "DB_Error"
, TRUE)
#5 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#6 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-3, NULL, NULL, "\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...", "1452 ** Cannot add or update
 a child row: a foreign key constraint fails (`aq...")
#7 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...")
#9 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2446): DB_common->query("\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...")
#10 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1635): DB_DataObject->_query("\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...")
#11 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(392): DB_DataObject->query("\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...")
#12 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1348): CRM_Core_DAO->query("\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...", TRUE)
#13 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(467): CRM_Core_DAO::executeQuery("\n                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, con...")
#14 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(416): CRM_Core_BAO_Dashboard::addContactDashlet(Object(CRM_Core_DAO_Dashboard))
#15 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(50): CRM_Core_BAO_Dashboard::addDashlet((Array:3))
#16 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/api/v3/utils.php(1288): CRM_Core_BAO_Dashboard::create((Array:3), (Array:1))
#17 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/api/v3/Dashboard.php(51): _civicrm_api3_basic_create("CRM_Core_BAO_Dashboard", (Array:3), "Dashboard")
#18 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_dashboard_create((Array:3))
#19 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#20 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#21 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Dashboard", "create", (Array:3), NULL)
#22 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(290): civicrm_api("Dashboard", "create", (Array:3))
#23 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(196): CRM_Core_ManagedEntities->disableEntity(Object(CRM_Core_DAO_Managed))
#24 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(123): CRM_Core_ManagedEntities->reconcileDisabledModules()
#25 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(395): CRM_Core_ManagedEntities->reconcile()
#26 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Extension/Manager.php(252): CRM_Core_Invoke::rebuildMenuAndCaches(TRUE)
#27 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Extension/Manager.php(289): CRM_Extension_Manager->install((Array:1))
#28 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/api/v3/Extension.php(135): CRM_Extension_Manager->enable((Array:1))
#29 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_extension_enable((Array:2))
#30 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#31 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#32 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("Extension", "enable", (Array:2))
#33 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php(195): civicrm_api3("Extension", "enable", (Array:2))
#34 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(447): CRM_Admin_Form_Extensions->postProcess()
#35 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#36 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), "next", "Next")
#37 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), "next")
#38 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), "next")
#39 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
#40 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(398): CRM_Core_Controller->run()
#41 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(156): CRM_Core_Page_Basic->edit(32, NULL)
#42 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(121): CRM_Core_Page_Basic->run()
#43 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Admin_Page_Extensions->run((Array:3), NULL)
#44 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:16))
#45 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#46 /home/aquaparism/www/wp-content/plugins/civicrm/civicrm.php(1246): CRM_Core_Invoke::invoke((Array:3))
#47 /home/aquaparism/www/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
#48 /home/aquaparism/www/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#49 /home/aquaparism/www/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#50 /home/aquaparism/www/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
#51 {main}

```

A second error coming at the same time.

```
Apr 18 00:12:41  [info] $ManagedEntities_failed = Array
(
    [entity] => Dashboard
    [action] => create
    [params] => Array
        (
            [version] => 3
            [id] => 7
            [is_active] => 0
        )

    [result] => Array
        (
            [error_code] => constraint violation
            [sql] =>
                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                  VALUES  ( 7, 2 ), ( 7, 9 ), ( 7, 10 ), ( 7, 12 ), ( 7, 13 ), ( 7, 19 ), ( 7, 20 ), ( 7, 21 ), ( 7, 22 ), ( 7, 31 ), ( 7, 36 ), ( 7, 39 ), ( 7, 76 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key const
raint fails (`aquaparismcivi`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_dashboard_id` FOREIGN KEY (`dashboard_id`) REFERENCES `civicrm_dashboard` (`id`) ON DELETE CASCADE)]
            [tip] => add debug=1 to your API call to have more info about the error
            [is_error] => 1
            [error_message] => DB Constraint Violation - domain_id should possibly be marked as mandatory for Dashboard,create API. If so, please raise a bug report.
            [debug_information] =>
                  INSERT INTO civicrm_dashboard_contact ( dashboard_id, contact_id )
                  VALUES  ( 7, 2 ), ( 7, 9 ), ( 7, 10 ), ( 7, 12 ), ( 7, 13 ), ( 7, 19 ), ( 7, 20 ), ( 7, 21 ), ( 7, 22 ), ( 7, 31 ), ( 7, 36 ), ( 7, 39 ), ( 7, 76 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key const
raint fails (`aquaparismcivi`.`civicrm_dashboard_contact`, CONSTRAINT `FK_civicrm_dashboard_contact_dashboard_id` FOREIGN KEY (`dashboard_id`) REFERENCES `civicrm_dashboard` (`id`) ON DELETE CASCADE)]
        )

)

```

As suggested in various answers, I rerun the upgrade script with no success: my database is already upgraded.

Any idea from where it is coming and how I could solve it? This is a running database and I would like to not loose any data on it.

# Answer
> 2 votes
In the end I found the raison: on entry was missing in `civicrm_dashboard`. No entry with `id` `7`. Since this entry was not their, the insertion in `civicrm_dashboard_contact` was failing for this entry as said in the logs.

It appear that I was missing the `civizualize/contacts` snippets. I just add the corresponding entry in `civicrm_dashboard` to solve the error.

Thanks to @kevin-cristiano for pointing me were to look for.

# Answer
> 1 votes
I had this error on a site where there was an entry in `civicrm_dashboard` that did not have a value in the `domain_id` column.

I backed up `civicrm_dashboard` and `civicrm_dashboard_contact` and then removed the row that had no domain\_id from `civicrm_dashboard` and any corresponding rows from `civicrm_dashboard_contact` and I was fine.

Looking back on this, a better way would have been to first insert the proper domain\_id in the `civicrm_dashboard` table.

Just be sure to backup the database and tables you are editing in case you hit a problem.

---
Tags: wordpress, database
---


title: Can I create triggers in the database?

text:
# Question
Title: Can I create triggers in the database?
We are trying to setup CiviCRM in Wordpress.

Our Database is on GoDaddy, but we are running into a problem:

"Could not create a database trigger."

The Database Settings appear to be correct.

Any thoughts on how to fix this error?

Thanks!

# Answer
> 1 votes
If the Setup Screen tells you that the database settings are correct, it means you can login into the database with the username and password that you entered. However, it does not guarantee that the MySQL database user has enough privileges to perform all necessary database actions. CiviCRM needs *trigger support* and in the System Administrator Guide at https://docs.civicrm.org/sysadmin/en/latest/requirements/#mysql-permissions is described what this entails.

If you are not able to grant the correct privileges in the control panel of your internet service provider, you have to contact their service desk.

# Answer
> 1 votes
This occurred to me too, my website was hosted with godaddy, i contacted them and they refused to allow 'Triggers' privileges on database while website is hosted with GoDaddy shared hosting plan. So i had to shift to iPage which allows the required privilege.

Hope this helps.

# Answer
> 0 votes
You might not be able to create triggers and stored procedures in shared hosting and might need to move to a cloud. I remember having these issues on godaddy too and moved to Ubuntu cloud. Call them and check. As I recall as a DBA you cannot create these without the super user privilege which isn’t possible in shared environments

# Answer
> 0 votes
Usually cheap hosting costs you more in the longer run. There are some civi-specific hosting providers (CiviHosting springs to mind) & using one of them will make you less sad

---
Tags: wordpress, error, database
---


title: Merging two contacts

text:
# Question
Title: Merging two contacts
I am looking to merge two contacts together as they are duplicate records. I want to ensure all the tags, groups and contributions all carry over too. I just want to do this on an individual record and not merge an entire group of contacts. i have looked at the 'Find and merge duplicate contacts' tab, however that seem to be only for groups. Does anyone know how to do this for one person who has two records please?

Thanks,

Grace

# Answer
To merge 2 contact records, select both contacts from a list then select the action 'Merge contacts' from the 'Actions' drop down. In the resulting screen you will see there are several options that you can check/uncheck - one of the most useful ones is the option near the top of the screen to 'flip' the 2 contacts - the left hand one is regarded as the duplicate. Also, the deleted record goes in the trash so if you make a mistake you can always retrieve it.
> 5 votes

---
Tags: duplicate-contacts
---


title: Contribution Widgets

text:
# Question
Title: Contribution Widgets
Is anyone doing any work on Contribution widgets? We use them all the time, but they have problems on our end - specifically they do not update immediately when new donations are made - we have to personally clear browser cookies in order to see updated information. (this is likely a local issue - not civicrm)

Is anyone working on a Contribution Widget plugin for core or wordpress (our current setup) - paid or otherwise? Something more visually appealing or dynamic than what we have now?

Many thanks!

# Answer
> 1 votes
Here is a plugin that makes embedding the widgets easier: https://wordpress.org/plugins/civicrm-contribution-page-widget/. But I'm guessing it may not meet your 'nicer looking' requirement as it is just using what widget settings you have but I started using this when I started having issues using the code snippet.

Working fine on my instances.

---
Tags: civicontribute, widget
---


# Question
Title: How can I create early bird fees with Webform CiviCRM?
In native CiviCRM I would do this with a priceset; how do I do this with Webform CiviCRM?

# Answer
1. Add a field of type Date to the webform -\> set it to default: now - and set it such that start date = now and end date = now; deselect the Enable popup calendar
2. Conditionals: example:
3. Hide the date field with CSS and hide your element with CSS - as you can see above mine is called today:

> ```
> .webform-component--today {
>   display: none;
> }
>
> ```
> 5 votes

---
Tags: webform-civicrm, price-sets
---


title: GDPR - updating preferences / forgetme

text:
# Question
Title: GDPR - updating preferences / forgetme
Wordpress 4.9.5 / CiviCRM 4.7.31 / GDPR extension 2.1

How do I pass tokens to the GDPR communications preference page (using Veda's extension)?

I've got the Communications Preference link working (not quite as formatted in the extension control panel, I think it's a Drupal / WP thing);

https://yoursite.org/civicrm/?page=CiviCRM&q=civicrm/gdpr/comms-prefs/update

Which works great (when I'm logged in). However, when I visit as an anonymous user, I get a blank page. I could ask all my contacts to re-type their details in, however, the scope for errors / duplication / drop-out makes this less than ideal.

I can format an email to send a token to update a profile but that doesn't pick up the GDPR consent date / data:

https://yoursite.org/?page=CiviCRM&q=civicrm/profile/edit&reset=1&gid=profileID&id=userID&cs=checkSum

When I try and pass those tokens I get a blank form, so it's not picking up the userID and loading the relevant data from the db:

https://yoursite.org/civicrm/?page=CiviCRM&q=civicrm/gdpr/comms-prefs/update&id=userID&cs=checkSum

I'm pretty sure this is possible (the built in tokens should provide this function), however, the built in tokens don't seem to generate valid links or URLs (or indeed anything).

{contact.comm\_pref\_supporter\_link}

{contact.comm\_pref\_supporter\_url}

I can include {contact.checksum} and preview email as html and see a checksum, but the comm\_pref tokens stay as {contact....}

If someone can post a valid tokenised Communications Preference page I can probably reverse engineer something.

So again, not sure if Drupal / WP related or some other missing dependancy?

# Answer
We've addressed this issue in v2.3 of the extension Two new tokens have been introduced for mass mailing and they keep the URL in tact.
> 2 votes

# Answer
I had a similar issue and posted here: https://github.com/veda-consulting/uk.co.vedaconsulting.gdpr/issues/50

I have not had a chance to see why the tokens were not working for me, but I can add them manually:

```
https://example.org/wp-civicrm-basepage/?page=CiviCRM&q=civicrm/gdpr/comms-prefs/update&reset=1&{contact.checksum}&cid={contact.contact_id}

```

Replace example.org with your domain and wp-civicrm-basepage with your slug for the basepage you are using.

Update: Version 2.2 of the extension has fixed the issue with tokens
> 4 votes

---
Tags: wordpress, upgrade, gdpr
---


title: Calculated member fees

text:
# Question
Title: Calculated member fees
Currently exploring CiviCRM as a possible replacement for our current CRM. Our members are all union organisations and the membership dues are a calculation based on a fee x number of members in the affiliated organisation. This means that every member pays a different amount and we need to be able to calculate the fee for each member. From what I've seen you can set up multiple membership types and price sets but I haven't found anything for doing calculated fees. Do any of you do this or know if it's possible?

Many thanks in advance. Chris

# Answer
> 2 votes
If you run your CiviCRM on a Drupal instance you can use Webform CiviCRM module in combination with Webform Calculator module that you can use for that exact scenario.

Alternatively - see here for an example of how you can use conditionals to build your own fees: How can I create early bird fees with Webform CiviCRM? \- the example is for a participant (event) fee, but a membership fee can be built similar to this.

# Answer
> 2 votes
It could also be achieved within CiviCRM using a fairly simple custom extension to do the calculation.

---
Tags: civimember, webform-civicrm, evaluating-civicrm, price-sets
---


# Question
Title: Disabled contribution page and recurring transactions
Can recurring contributions originally set up with "Contribution Page A" still occur if Page A is subsequently disabled?

Civi 4.6 LTS with iATS payments

# Answer
Yes - absolutely - the recurring series only stops if its status is switch to: cancelled or the number of installments have been completed (both are native CiviCRM behaviour).
> 4 votes

---
Tags: contributions, contribution-page, recurring-contributions, iats
---


# Question
Title: Is CiviCRM planning a 'cloud' version of civicrm (perhaps using AWS or Azure)?
This is a question about future development of Civicrm

# Answer
> 4 votes
Yes, if by "cloud version" you mean an on-demand managed service. CiviCRM LLC is currently trialing Spark, a hosted entry-level CiviCRM offering.

This service is currently in beta, and you can sign up at the link above. From the linked page:

> CiviCRM Spark — currently in Beta — allows you to get your own installation of CiviCRM up-and-running in minutes, with a specially-customized version including the new Shoreditch interface.
>
> Spark is ideal for organizations of any size wanting to test and trial CiviCRM, or for smaller organizations and activities with up to 2000 contacts.

This offers an easy entry point to running CiviCRM, without the ongoing effort of managing a server.

Note the mentioned 2000 contact limit (as of April 2018), beyond which you could consider hosting with other providers, eg those mentioned in Erik's answer, or running your own version.

# Answer
> 3 votes
First of all, what do you mean by 'CiviCRM'? In your question it is almost as if you expect a company? It is a community of committed individuals and partners, and therefore not 'planning' in the sense you seem to suggest.

In our community it would actually be CiviCRM partners that provide services amongst which could be CiviCRM in the cloud.

There are already a few CiviCRM partners that deliver a 'cloud' version of CiviCRM. I know of a few:

And I am sure there are more! Check https://civicrm.org/partners-contributors for a partner near you and check if they provide cloud services?

# Answer
> 3 votes
Yes, if by "cloud version" you mean a runnable VM template. This is provided via Bitnami.

That Bitnami Stack offers launch against Google Cloud, AWS, Azure and other platforms.

This offers an easy way to spin up a CiviCRM instance in a preconfigured state, but requires ongoing maintenance and configuration to suit your specific needs.

It also might not be exactly the CiviCRM your org needs - depending on which CMS it uses, or which MTA, or what base OS, or any of the other variables in play.

# Answer
> 2 votes
I run CiviCRM with Drupal on AWS Ubuntu instance. It's been that way since 2012. So in answer to your question yes it's supported. But there's no prefab. You must build it. It's not too difficult and takes a few hours. You install Lamp stack into Ubuntu and then Drupal and then Civi. If you message me I'll explain in detail. If you understand AWS concepts then this is very simple. Matter of fact this is the ideal way to run is in cloud so you have full root access. You could also use WordPress as CMS but I prefer Drupal since it has many modules and runs better on that platform. I tried putting Civi onto shared hosting and had several issues. This is a very cost effective way to implement.

---
Tags: civievent, civicontribute, civicrm-spark
---


# Question
Title: Moodle Integration Sample Sites or the way to do it
Where can I find a successful Moodle Integration example or see a sample site? If not how to go about doing the integration? Thanks

# Answer
No such integration exists today so there is no sample. To implement such integration, I would recommend building an extension for CiviCRM that could interface with Moodle's APIs:

https://docs.moodle.org/dev/Core\_APIs

You could also consider the opposite, creating a Moodle plugin that would interface with the CiviCRM API:

https://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
> 1 votes

# Answer
I worked on some CiviCRM-Moodle integration in 2017 with Monish Deb. The main product of that work is CiviMoodle.

With CiviMoodle, users can be created in Moodle from CiviCRM. It also adds a field on the back end of Civi events with a drop-down of all Moodle courses. If you select one, someone registering in Civi will have their corresponding Moodle user registered for that course.

A second extension was written, to bring grades in Moodle into Civi custom fields. However, this isn't really useful to others except perhaps as an example.
> 1 votes

---
Tags: integration
---


title: Global editing of CiviCRM fields

text:
# Question
Title: Global editing of CiviCRM fields
How can I globally edit a particular CiviCRM Contact field? For example, I would like to search for a specific set of contacts, then assign them all a particular Contact Subtype.

# Answer
> 6 votes
This is possible using Update contact using profile. Below are the step to achieve this

1. Create a Profile with Contact Sub-type field.
2. Do Contact Search and select contact(s) you want to update and select '**Update multiple contacts**' from **Actions** dropdown.

3. You will be redirected to Profile selection page. Select the profile you had created at #1 from 'select profile' dropdown and click on continue.

4. You will be redirected to a page where you wii see fields against each contact. Select the contact subtype for each contact and then click on Update Contacts. You can also click on Copy image (besides column title) to copy the content of 1st field into rest of fields beneath it.

HTH

Pradeep

---
Tags: contacts, contact-types
---


# Question
Title: How to display an Event's custom field on its registration form
I have a custom field set with fields used for managing extra data on the event. I want one of the custom fields' value to be shown in its registration form. What is the Smarty expression to put in the 'Register.tpl' file so that I could show this custom field in the registration form. Clarification - this custom field is not on a Participant, but on the whole event.

# Answer
I guess the custom fields for Event are not available in smarty on Event registration form but are available on Event information page. But you can retrieve the custom fields for an Event using api. You can use below snippet in tpl file to get custom field data

```
{crmAPI var='result' entity='Event' action='getsingle' return="custom_81,custom_82" id=$event.id}

```

The return value specifies list of custom fields that i would like to retrieve. You can remove return option if you would like to get all the Event data including custom fields.

> To print you can use {$result} variable eg. in above case i would use `{$result.custom_81}` and `{$result.custom_8}`

HTH

Pradeep
> 3 votes

---
Tags: civievent, custom-fields
---


title: membership approval

text:
# Question
Title: membership approval
I’m very new to CiviCRM. I’m testing it with a Drupal 7 install. Can someone give me advice what is the best way to achieve my requirements, which are:

• Users signup for a membership account

o membership types: organisation ordinary, organisation associate, organisation affiliate, organisation friend, individual associate, affiliate individual, individual friend.

o Different data will need to be collected for organisations and individuals.

o Membership levels pricing are different.

o During this process the user will enter a username/password to allow them to login to Drupal once membership has been approved.

• The application has to be accepted by the board of directors.

• User pays for membership

• Once payment has been accepted user can sign into the site.

Memberships lasts for a year, resubscribing doesn’t need to be approved.

Any help would be great. Thanks

# Answer
A tweak to Jon's answer since you specify that

> • Once payment has been accepted user can sign into the site.

You can set the Profile up to create the User account when the contact submits the payment form - but this will result in the User being created even if payment fails. An alternative is to use Drupal Rules (as Jon suggests) so that the User Record is only created once a contact is given a specified Membership status (eg New or Current) and hence will not get a login for Pending membership.

However in general there is no 'problem' with giving someone a user account before they become a member, so long as 'authenticated' gets no permission. You can then use the CiviCRM Memb Synch module to set the user 'role' based on membership type and status - which is something you probably want to be doing to remove permissions (ie Roles) once a Membership expires.

ADDENDA

In an effort to Answer questions that Ben added in another Answer.

> Once membership status has been approved how do I forward payment link and signup page to the user?

To fwd emails about payments you can either do this via Scheduled Reminders, or, depending on what you are using to 'trigger' the process, via CiviRules, or simply by manually emailing from the contact record using a template which includes the checksum

> (re attaching Profile to the Drupal Core registration form) Can I expose membership types from CiviCRM? Or do I have to add this through the content type in Drupal Core?

No you can't add Membership fields as part of the User profile - it needs to be done either as a Contribution Page or as a Webform (which still requires you to create a Contribution page before you can set up the webform).
> 1 votes

# Answer
Create two forms - an application form and a payment form.

The application form can be a Profile or (better) a Webform with CiviCRM integration. Place contacts in an "Applicants" group. Include user registration on the form.

Have the reviewers manually approve someone by sending them an email and removing them from the applicants group, and direct them to the payment form.

Depending on your Drupal experience, you may want to tighten up the workflow with Rules.
> 2 votes

---
Tags: civimember
---


# Question
Title: Is it feasible to use CiviPledge as a microloan management system?
I haven't done much with CiviPledge but am curious about the potential of re-purposing it for a slightly different use to make CiviCRM work as a management tool for a nonprofit's microloan project. Would there be any downsides to doing something along these lines?

* Rename it with string replacement so "CiviPledge" becomes "CiviLoan", "pledge" becomes "loan", etc.
* Set up a "pledge" on an account when a microloan is given out.
* Record a "pledge payment" when a loan repayment is received.

# Answer
> 3 votes
It could work, (but if there is an interest, as Laryn mentioned)

Two other tools you might want to look at:

1) civiCampaign: you could have one campaign per loan (with deadline an financial goal) and record the payments as donations associated to this campaign.

(probably easier than pledge if the frequency of the payments is not very regular)

2) civicase: if you have a lot of other activities around a microloan beside the financial one (eg if there is an approval process before the loan, if there is a set of action in case on delay on payments....)

have a look at civicase, it's a powerful tool that might take you some time to set up, but that will help you enforce consistent workflow to support your work

---
Tags: civipledge
---


# Question
Title: Looking for a Wordpress template to integrate CiviCRM
We have some issues about wordpress themes we bought at theme forest and CiviCRM. When i google I find a a lot of same problems other users have with the CiviCRM backend and some wordpress themes. Before I buy any new one I really wanna be sure that there are no problems with CiviCRM. Is there any list of compatible wordpress themes somewhere here? Or what kind of creative themes do you guys use together with CiviCRM? Thanks for any suggestions and help.

# Answer
> 1 votes
Assuming you are using the latest and greatest Civi and Wordpress - most themes should work fine.

There was an issue with backbone conflicts that may have caused issues with some themes- but that was addressed in 4.7.31. Outside of that - I never had an issue with the CiviCRM backend when using any front end theme. However, I have had conflicting CSS on the front end that can typically be fixed by changing some lines in your CSS.

As for what theme I use - a modified version of twentyseventeen.

---
Tags: wordpress, templates, integration
---


# Question
Title: Bug in CiviContribute - PayPal Express not working for recurring contributions
I have set up a test PayPay Express payment processor and created a contribution page that allows the user to create a recurring donation.

When I use this page, I get the "PayPal Checkout" button appears and takes me to PayPal. Everything proceeds as expected with the PayPal screens and I get taken back to my site, where I am told I need to click the "Make Contribution" button. I do that and get back a page that says:

```
Notice: Undefined index: returnURL in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 372 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: cancelURL in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 373 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: installments in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 380 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: transactionid in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 399 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: amt in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 400 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: feeamt in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 401 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: settleamt in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 402 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: paymentstatus in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 406 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: pendingreason in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 407 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: payment_status_id in CRM_Contribute_BAO_Contribution_Utils::processConfirm() (line 198 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution/Utils.php).

```

It also says that the payment was successful, but when I look at it in CiviCRM, it has a status of "Pending" and my PayPal account shows no notification was sent.

I have done some digging. After the "Make Contribution" button is pressed, the application ends up in PayPalImpl.php, createRecurringPayments(...). This never sets the $param\['payment\_status\_id'\]. Later on, the application gets to Confirm.php, completeTransaction(), which looks for $result\['payment\_status\_id'\] of 1. Only if this is true does the transaction get marked as completed.

So, the question is, should createRecurringPayments() set the payment\_status\_id, and to what?

Note that if I try with a single donation, it works ok (i.e. the transaction is marked as complete).

Thanks

# Answer
> 1 votes
Ok, I think I have *finally* got to the bottom of this.

Firstly, one of the problems was that I had not got the payment notifications set up in PayPal (mea culpa).

However, even with this fixed, the notifications were not being processed. I narrowed this down to the handlePaymentExpress() method in PayPalProIPN.php. There are two errors here, both related to the "is test" status. At line 578, it attempts to get the Contribution record. However the call:

```
   $result = civicrm_api3('contribution', 'getsingle', array('invoice_id' => $input['invoice']));

```

only works for live contributions, it doesn't find test contributions.

The other error is at line 597:

```
    $paymentProcessorID = self::getPayPalPaymentProcessorID();

```

Again, this only works for live, not test.

I'd love to log the issue on the CiviCRM website, but two requests for an account have been ignored. Oh well.

---
Tags: civicontribute, paypal
---


title: Behavior of Tags

text:
# Question
Title: Behavior of Tags
In using tags and creating searches based on tags - I have run into some issues.

Tag Tree Example

```
Tag Set 1
     Parent A
          Child A1
             Child A1a
             Child A1b
                 Child A1ba
                 Child A1bb
             Child A1c
          Child A2
      Parent B
          Child B1
             Child B1a
             Child B1b
             Child B1c

```

In the above example - when I search for anyone tagged Parent A, I get every contact tagged Parent A and I get every contact tagged with any of the Children of Parent A. This is what we want, so its great. However, if I do a search for Child A1, I only get results for Child A1 and not the tags that Child A1 is the parent of.

Is this the correct behavior? Can we change it?

# Answer
> 3 votes
The tags hierarchy are only used as a way to visually cluster them, but they are separate, and if you search on a parent tag, you won't get the contacts that are tagged with a child tag. Perhaps unexpected for you, but some organisations are using it with the parent tag being a kind of "unspecified/other", for instance having a parent tag "media" and children tags "TV", "blog", "newspaper": if one contact is tagged "media", it means "other media", ie. not TV, blog or newspaper.

This is different than the groups, where if you search on a parent group, it will include all the contacts that belong to one of its child group

As of why you got got the contacts tagged with a child tag of parent A... it might be the behaviour you want, but IMO it's a bug and shouldn't behave that way.

---
Tags: contacts, tags
---


# Question
Title: Importing Notes with Privacy / Privacy level for Notes
We have a client that wants to import private notes.

(1) Is it possible to import note with privacy? There is not an option, when importing, to specify a particular row as "Author of"; any imported note will be attributed to the importer. Nor do I see an option to specify a particular row as "Privacy"; all notes I've imported thus far enter as privacy none.

(2) Under Option groups, there is a Privacy level for Notes. Within this section, you can add a privacy level beyond Author only or None. But I do not see what this group corresponds to.

# Answer
> 1 votes
You might want to check out the API Import extension which adds a lot more options than the Civi Import Wizard

---
Tags: import, privacy
---


# Question
Title: SQL Syntax Error - When starting civicrm with joomla
Please help, i have no idea what is wrong, all is fine until i open civicrm with joomla, it displays sql syntax error, then when I try to look at my db functions with phpmyadmin there will be a whole page of error, i will be kicked out and unable to login until i restart my computer
-joomla 3.8.7
-apache 24
-php 7.2.4
-mysql 8.0.11.0
-civicrm 5.0.1
-phpmyadmin 4.8.0.1

```
Apr 24 03:27:15  [info] $Fatal Error Details = Array
(
[callback] => Array
    (
        [0] => CRM_Core_Error
        [1] => handle
    )

[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] =>
SELECT  v.label as label ,v.name 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            = 'languages'
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 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping
FROM   civicrm_option_value v,
   civicrm_option_group g
WHERE  v.o' at line 1]
[type] => DB_Error
[user_info] =>
SELECT  v.label as label ,v.name 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            = 'languages'
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 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping
FROM   civicrm_option_value v,
   civicrm_option_group g
WHERE  v.o' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT  v.label as label ,v.name 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            = 'languages'
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 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping
FROM   civicrm_option_value v,
   civicrm_option_group g
WHERE  v.o' at line 1]"]
)

```

# Answer
it seems php 7.2 is not compatible with 5.x.x
or i do not know how to do the configuration
i think downgrade the php would be the best solution
but i wonder if there is other answer, and how to do it....

updates:
-downgrade php does not help, same error appears
**-downgrade mysql to 5.5 works!<br>**
> 4 votes

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


# Question
Title: Contribution - Invoice Address layout is wrong. How to fix?
I am on Civi 5.0.1 and Wordpress 4.9 Please see screenshots. I need to print and mail some Contribution invoices. I noticed that the address layout for the invoices is incorrect. I went to Administrator \> Communications \> Messages Templates \> System Workflow Messages. Then I clicked to Edit Contributions - Invoice.

I tried rearranging some of the tables and short codes to make it show up the way I need it to, but that just messed it up even more.

Can someone tell me the proper table and shortcode arrangement in Contributions - Invoice to get the address layout I need?

Thank you.

# Answer
Initially i thought the address are rendered using format defined at Address Settings but i was wrong when i checked the message template. The message template is designed to use address format as

```
Street Address Supplement Address
Supplement Address State Abbreviation
City Postal Code
Country

```

I did some modification to message template so that State Abbreviation is between City and Postal Code. Can you try after replacing the content of **Contributions - Invoice** message template with the content from here?

HTH

Pradeep
> 6 votes

---
Tags: pdf, invoice
---


title: Not able to print contribution invoice

text:
# Question
Title: Not able to print contribution invoice
CMS: Drupal 7

CiviCRM: 4.7.31

"*CiviCRM: access Contact Dashboard*" permission is set for authenticated user and logged in user has "*CiviCRM: view my invoices*" permission also.

User can access contact dashboard page with buttons to print invoice for contributions but get access denied message unless "*CiviContribute: access CiviContribute*" permission is also assigned to user role.

# Answer
> 3 votes
To print invoice the user should either have access CiviContribute or view my invoice permission. "CiviPay: access CiviPay" permission doesn't come with CiviCRM install. I feel CiviPay extension might be conflicting with Print invoice as the extension may be using same url as of print invoice i.e `civicrm/contribute/invoice`.

Pradeep

---
Tags: civicontribute, contributions, invoice, user-dashboard
---


title: How do I change the company logo

text:
# Question
Title: How do I change the company logo
Our company recently changed the logo design. how do I update the home page. I've already changed it in our outgoing emails.

# Answer
This configuration is at CMS level but not in CiviCRM. You can update the logo through theme config.

**For Drupal**

```
1. Navigate to Appearance >> Settings and under Logo image setting upload the new image and save.
2. Clear Drupal cache( and sometimes browser cache).

```

**For Wordpress**

```
1. Here it depends on the theme you using. For most of the theme you can change the logo by navigating to Appearance >> Header. You will be redirected to page where you can update the logo.
2. Save the theme setting.

```

HTH

Pradeep
> 5 votes

---
Tags: logo
---


title: Upgrading 4.6.14 LTS Upgrade

text:
# Question
Title: Upgrading 4.6.14 LTS Upgrade
Current system: Windows Server 2012 with IIS 8 Wordpress 4.4.2 PHP 5.5 MySQL 5.1.73

I am currently running CiviCRM 4.6.14 on a live system on which our users have found a problem when ordering custom date fields. This ordering issue does seem to be resolved in the latest version so I need to upgrade. I can upgrade to the latest LTS (4.6.36) without a problem but this does not resolve the issue and moving away from the LTS is proving difficult. I have tried upgrading to 5.0.1 and receive a HTTP 500 error after clicking the 'Return to homepage' link once the upgrade is complete. I then restored my server snapshot take after the successful 4.6.36 upgrade and tried 4.7.31 as this was the stable version released at the same time as the LTS version I can update to. Again, HTTP 500 error after the upgrade.

No errors are shown during the upgrade which is reported as successful.

Am I missing instructions somewhere for migrating out of the LTS branch or can someone help with the error please? My CiviCRM lof file is here: https://pastebin.com/Hw8qhmNN

Any help would be appreciated.

Thanks Russell

# Answer
> 4 votes
After looking Civi log it seems that problem is with civicrm\_uf\_group.frontend\_title field. I would suggest you to do incremental upgrade i.e

Upgrade CiviCRM to 4.6.x to 4.7.30 Upgrade CiviCRM to 4.7.31.

> On a separate note make sure you disable all the CiviCRM extension or wp plugin and also disable wp post or pages that have CiviCRM profile shortcode before upgrading.

HTH

Pradeep

---
Tags: upgrade, lts
---


# Question
Title: Unable to install CiviCRM 5.0.1 as Drupal site admin
Just been trying to install CiviCRM 5.0.1 in Drupal 7.58, and when I try to run the install script, I get a message saying I don't have permission to do so:

"You don't have permission to access this page The installer can only be run by a user with the permission to administer site configuration.

Refer to the online documentation for more information: Installation Guide"

It's a fresh installation of Drupal, and only has the initial admin user - there's nothing unchecked in the Drupal permissions for administrators (but obviously it doesn't have anything related to CiviCRM as the module isn't enabled).

# Answer
Below link might be useful for work around

Getting permission error when installing CiviCRM under Drupal

HTH

Pradeep
> 4 votes

---
Tags: drupal, installation
---


title: Program Question

text:
# Question
Title: Program Question
In the search feature, where is the date range filter? We recently transitioned to JManage, which uses your programming for their database. Their documentation specifies that one can filter the search through a date range but, after extensive research on our part through our own use of the program, we cannot find where this option lies. Any help you can provide would be greatly appreciated. Thank you!

# Answer
CiviCRM does provide date range search on Report Filter and Search form. Below are few examples
> 2 votes

---
Tags: search
---


# Question
Title: How to report on repeating custom fields
My client wants a report on a set of 10 repeating custom fields, each one of which has a date and one of a set of outcomes. e.g there is an 'Accommodation' custom field which has 2 fields - a date and a choice of various outcomes like 'homeless to hostel'. A person can of course have more than one 'Accommodation' outcome (it's a repeating custom field). The problem is the limitation of this type of field. Advanced search can find the data correctly (by using 'OR') but then they can't be exported as export doesn't support these fields. So over in Reports - which can export them ('Export to CSV') - they can't be reported on because if I select all 10 sets of fields it uses 'AND' (see the SQL that's generated) which isn't correct. I can't think of a way round this using the UI. Can anyone suggest a solution, or is this simply something that can't be done at the moment?

# Answer
I think you can do this either by

1. Creating a report and controlling the whereClause().
2. Use hook and alter the sql to use OR/AND.

HTH

Pradeep
> 1 votes

---
Tags: custom-fields, civireport, 4.7
---


# Question
Title: CiviCRM running very slow on local network
CiviCRM running very slow on local network, but index.php ,phpmyadmin and joomla are fine. What could be the problem? I tried this solution (https://processwire.com/talk/topic/8320-local-dev-server-running-slow-this-may-be-of-help/) to change localhost in conf.php into 127.0.0.1 and restart the server pc. But nothing changed. Plus the civicrm home page took almost 30 min to load the "better UI". Please help
-joomla 3.8.7
-mysql 5.5
-apache 2.4
-phpmyadmin 4.8.0.1
-civicrm 5.0.1
-php 7.1.16
The other problem is I could not save/edit anything on civicrm from another computer on the same network
-but editing/saving anything on joomla and phpmyadmin from other pc is fine
-plus on the server read/write have no problem
-civicrm css wont load on local network, but only works on localhost(server)

I'm really sorry if i made my question confusing, please bear with me.

# Answer
And once again I had found out the answer on my own, took a lot of time though... it is in **components** and **administrator**'s **civicrm.setting.php** (both php file!) just simply change both **localhost** (see the photos below) into **your server IP**
Simple as that (yeah I'm so noob TwT), I wish this can help those who have the same problem like mine, apology for my bad grammar english and stuffs :P
> 4 votes

---
Tags: joomla, php, civicrm-home, configuration, civicrm.settings.php
---


# Question
Title: Is the Max Participants setting on Events broken in 5.0?
Having recently upgraded to version 5.0 I'm now seeing that although I set the Max Number of Participants at a figure lower than the number of people registered for an event, I can still register for the event through the front end, and I'm not seeing the Event Full message. Anyone else seeing this issue?

# Answer
Just did a test with 5.0.1 and wordpress 4.9.5 and it worked like it should.

Have you tried clearing the cache?
> 1 votes

---
Tags: civievent, participants
---


# Question
Title: Why do 'track click through' links not redirect to correct address?
When I add links to external websites (such as www.wikipedia.org) to mailings and check 'track click through' the links go to a page on my website that says 'page doesn't exist'. The url is something like this: mysite/wp-content/plugins/civicrm/civicrm/extern/url.php?u=30&qid=44.

This is obviously a key reason for wanting to use civiCRM so it'd be great to have link tracking working.

I see people have had this problem in the past (see here and here) but I can't seem to find a solution for it.

I have looked at extern/url.php and TrackableURLOpen.php and there don't seem to be any problems. (gists: trackableURLOpen.php url.php)

I'm using wordpress and civicrm 4.6.

My civicrm files are here: http://mysite/wp-content/plugins/civicrm/civicrm/

My temp files are here: http://mysite/wp-content/plugins/files/civicrm/

My civicrm.settings.php file says:

```
global $civicrm_root;

$civicrm_root = __DIR__ . '/civicrm/';
if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
define( 'CIVICRM_TEMPLATE_COMPILEDIR', __DIR__ . '/files/civicrm/templates_c/' );
}

```

Should the root be **DIR** . '/civicrm/civicrm/'? because that doesn't work.

# Answer
If you have access to the database then try checking the civicrm\_mailing\_trackable\_url table to see exactly where the URL's are going to. This should identify if they're incorrect. You'll need to know the mailing id of the job you've run but you should be able to get that easily enough from the URL of the mailing reports.
> 2 votes

# Answer
This can have a lot of causes - but my guess is that there's a permission problem with extern.url. Please check to see that the permissions are correct for the user context in which your web server software runs. If it all looks OK, please update your question with that info (permissions of extern.url, owner/group of extern.url, and the user under which the web server software runs).
> 1 votes

# Answer
What happens when you goto the url:

mysite/wp-content/plugins/civicrm/civicrm/extern/url.php?u=30&qid=44

i assume u get a page does not exist

Can you tweak the above url to a url that actually works on your site? Once you get that working, u'll need to tweak the resource url in your admin section
> 0 votes

# Answer
Check the http error log. I get the following message.

```
[Thu May 25 04:49:23 2017] [error] [client 180.76.15.155] Re-negotiation request failed

[Thu May 25 04:49:23 2017] [error] SSL Library Error: 336068946 error:14080152:SSL routines:SSL3_ACCEPT:unsafe legacy renegotiation disabled

```

A security error, so rather than reconfiguring the server to allow these redirects I am turning off link tracking.

If this is the problem, then https://stackoverflow.com/questions/23883635/apache-ssl3-acceptunsafe-legacy-renegotiation-disabled may help.
> 0 votes

# Answer
I just had this problem. On a cPanel server I set permissions with the following commands and it solved the problem. From Drupal root:

`cd sites/all/modules
find civicrm/. -type d -exec chmod u=rwx,g=rx,o=rx {} \;
find civicrm/. -type f -exec chmod u=rw,g=r,o=r {} \;`
> 0 votes

# Answer
When I had this problem with Drupal, I had to delete everything inside the templates\_c folder. I believe it would be the same with your Wordpress installation and then make sure that you the contents of `templates_c` are owned by the group.

**Wordpress**

`rm -r /uploads/civicrm/templates_c/*`

**Drupal**

`rm -r /sites/default/templates_c/*`
> 0 votes

---
Tags: civimail, wordpress, email, links
---


# Question
Title: Constituent (summary) report: link to contact instead of link to constituent detail?
When opening the Constituent (summary) report and clicking on a name in the results list, the page which refers to the specific Constituent detail doesn't open. Reason for that seems to be the number of activities we have in our database.

Wouldn't it make more sense to change the report, so that, when clicking the name of the contact, it links to the specific contact page instead of linking to the Constituent detail report of that person?

*We are using CMS Drupal and CiviCRM 4.6.33.*

# Answer
> 2 votes
The "No Drill Down" extension will do that for you.

# Answer
> 1 votes
The extension didn't work for me, but I noticed the pattern that it was looking for is different on a WordPress installation. I'm no Civi expert, but I tried rewriting these two lines in nodrilldown.php:

```
/*
$pattern = '/\/civicrm\/report\/instance\/\d*\?reset=1&force=1&id_op=eq&id_value=/';
$replace = '/civicrm/contact/view?reset=1&cid=';
*/
$pattern = '/\=civicrm\/report\/instance\/\d*&reset=1&force=1&id_op=eq&id_value=/';
$replace = '=civicrm/contact/view&reset=1&cid=';

```

It seems to work on WordPress.

---
Tags: civireport
---


# Question
Title: How can I display that an event is full on a Drupal View?
Currently a user needs to click through to an Event info page before they know if it is full or not.

Is there a way to take this information:

> "This event is currently full."

and display it in a Drupal View/ Pane?

# Answer
One approach would be to use the views\_php module to embed a civicrm\_api3 call to find out if the event is full, then print the result into the view. E.g.

```
$event = civicrm_api3('Event', 'getsingle', array('return' => 'is_full', 'id' => $row->id));
if (!empty($event['is_full']) {
  print "Event is full";
}

```
> 5 votes

# Answer
We have been using the module "views conditional" to do that. Here's how it works:

1. install and enable the module "Views Conditional"
2. enable the relationship *Event -\> Participant* in the view
3. activate aggregation in the view in order to count the number of participants (hide it if necessary)
4. add the field to the view: *(Event -\> Participant) COUNT(CiviCRM Participants: Participant ID)* (hide it if necessary)
5. add the field to the view: *CiviCRM Events: Event Max-Participants*
6. add a global field (math expression) to the view and calculate the remaining places. The math expression could look like this (but depends on the name of your fields: \[max\_participants\] - \[id\_1\]
7. add a views conditional field and define it similar to this: Views: *Views Conditional (If expression is Less than 1, output FULLY BOOKED, else output REGISTRATION AVAILABLE)* (also see screenshot)

Be aware that this approach is also kind of a workaround and has some shortcomings. For example, the aggregation function would also count cancelled participants. You could set a filter but it may have undesired results on your view (such as not showing events without a registration).

Nevertheless, the views conditional module in combination with the aggregate function may open up new possibilities for you. Just make sure to test properly before productive use.
> 4 votes

# Answer
In the Drupal extension CiviCRM Entity 7.x-2.0-beta9 release there is a new feature that allows to check if an event is full as view extra.

> CiviCRM Views Extras -- Added Views field handler for CiviCRM Events - Event is Full - True if event is full false otherwise
> 3 votes

# Answer
Yes you can. You can create your own views based upon the CiviCRM event data what you need to do is probably build a check in your view which compares the number of registered people of the number of available places.
> 2 votes

# Answer
Just had to set this up, and the combo of civicrm entity 2.1 and views conditional works really well.

Make a view of civicrm event type. Add the "event is full" field and then make the views conditional based on whether event is full is 0 or 1.
> 2 votes

# Answer
We experience the same challenge. I see a solution with the views\_php module but that is not a recommended module. Another way would be to use a custom event field that has the number of registered people (filled after every registration by a custom extension). That field would be available in the views module. But easier would be if there was a way provided by civicrm core to retrieve the number of registered people in a view. That field I believe is not available (yet).
> 1 votes

---
Tags: civievent
---


# Question
Title: Restricting Access to Contribution Module
Is it possible to restrict access to the contribution module section of CIVICRM yet giving a person access to all the other portions of the program including contacts/groups, etc.? We only want certain individuals entering contributions and seeing who gave what. Thanks.

# Answer
> 3 votes
Yes, Its possible to give access to Contribution component to specific roles. You can set the permission to access different components at

**For Drupal:**

```
Navigate to CiviCRM >> Users and Permissions >> Permissions(Access Control) and click on **Drupal Access Control**.

```

**For Wordpress:**

```
Navigate to CiviCRM >> Users and Permissions >> Permissions(Access Control) and click on **Wordpress Access Control**.

```

HTH

Pradeep

---
Tags: accessibility
---


# Question
Title: Implementations Basics (Costs, Timescales, etc)
We're looking for indicative figures with regards to migrating across an Access Database to CiviCRM. Early stages (but we need to migrate soon as our Access config is grinding to a halt) so any ideas of the likely costs, timescales, other resource requirements, etc would be very much appreciated.

Kind regards,

Greg

# Answer
Honestly without a significant amount of detail regarding your current database, how you're going to use CiviCRM, what kind of site it is being connected to, etc, no one can give you anything but a huge range - I've seen it done for as cheap as $3,000 and as high as $30,000.

Some things to consider:

How clean is your data? Is there going to be a significant amount of data cleaning needing to be done by the person who works on your Civi install? I've done some where folks did not follow any sort of best practices with their data and you had state abbreviations mixed with state names, email addresses in phone fields, etc.

What is your list of fields needed? If a field is something other than a textfield, what are the options? Is it a single choice or multiple choice? Is it required?

What are you going to use CiviCRM for? What are you going to be doing with it? Membership? Donations? Paid events? Free event? Etc. You need a good list of how you as an organization plan to interact with Civi.

How is the public going to interact with it? What actions will they be able to take?

What kind of site is it going to be attached to (Drupal, Wordpress, etc)? Is it built already or will the developer need to do that as well?

Look - do you have an idea how you want your public facing Civi pages to look?

Your timescale is really going to depend on what all needs to be done, how responsive you guys can be regarding feedback, and the like.

Resources - obviously your database. There would need to be a development area to work on that isn't your live site. Most developers have their own if you don't have one available. That will allow the site to be worked on and developed, but blocked from view from the public. I've only ever used a Linux server for Civi setups. And they can quickly use up a lot of space because of the size of the database as well as a good amount of memory. As such, regular shared hosting is not recommended. There are hosts, though, who have configured a dedicated server specifically for Civi and then divide it into "shared" hosting. That gives you more resources than the typical shared hosting account.

Hopefully this at least gives you some idea of what to consider and look for. Please let me know if you have any questions. :)
> 6 votes

---
Tags: database, migration
---


# Question
Title: Tutorial for: "CiviCRM Event OG Config (sample)" Module
How does this integration work? What is required to set it up? Documentation is very sparse.

If we want every CiviEvent to have a corresponding OG with the participants synced - is this the solution? Or, is CiviRules/CiviEntity a better route?

# Answer
> 1 votes
I think the better solution is via Drupal Rules as per this pretty ancient blog

https://civicrm.org/blog/eileen/foray-rules-module

I know that since then we have rolled up modules for clients that deliver the various integrations along the lines of

* if Event has custom field = X then create an OG
* if a person with Event participant role Y is added to Event make then the OG Admin
* if a person registers for the event then create user (if not already have one) and add them to the OG.

---
Tags: civievent
---


# Question
Title: Getting Error Message from payment gateway
A payment processor configured for this page might be disabled (contact the site administrator for assistance) I keep getting the above error when I visit the live page of my contribution. what can i do about

# Answer
I did a workaround when i got this error:

* Edit the Contribution page
* Go to "Amounts"
* click "Test Processor"
* Save

I assume a prior processor wasn't showing up or configured after i reinstalled my server and re-enabled Drupal and CiviCRM.

By selecting a different processor, it fixes the problem. If you really need the original, i'm sure you can recreate the payment processor and set it.
> 2 votes

---
Tags: payment-processor
---


# Question
Title: Updating fields in existing records from csv file
Hopefully the title is self explanitory. I have uploaded contact data but forgot to include one field. I now need to update the relevant field on all the records with with the data held on the csv. I did upload a custom unique key field for each record when originally uploaded the data.

Any help would be appreciated.

John

# Answer
> 3 votes
Its possible to update the contact using the same csv if you have unique identifier for each row and the same is stored in CiviCRM database either as CiviCRM Contact ID or contact external identifier for each contact.

During import select 'Update' for duplicate contacts and then in mapping make sure you use either external identifier or contact id. If this 2 fields are used during import than the contact's are directly updated into the system without performing any dedupe checks like firstname-lastname or email which is again unique way of avoiding duplicate contact into system.

If you have stored `custom unique key field for each record` in contact's custom field then probably you will need to run a query which will update the external identifier for a contact and make it easy for you to import again using same sheet.

```
The sql would be something like:

UPDATE civicrm_contact cc
INNER JOIN civicrm_value_custom_table cv ON cv.entity_id = cc.id
SET cc.external_identifier = cv.custom_unique_id_field;

```

> **Note:** Backup your database before performing contact import or running any Insert/Update/Delete sql.

HTH

Pradeep

# Answer
> 0 votes
Simple. \- Use the same sheet. \- You have an option in the wizard to determine how to handle duplicates. Choose 'fill'. \- Only match the unique ID field to 'external id' and the missing collumn and hit import.

Always a good idea to backup your database before doing an import.

---
Tags: wordpress
---


title: Error when searching for Participants

text:
# Question
Title: Error when searching for Participants
I got the following fatal error in the "Find Participants" page (Events \> Find Participants), when I click on the Search button :

My website is using WordPress version 4.9.5 with PHP 7.0 and MySQL 5.7. This problem seems to occur in the 5.0.0 , 5.0.1 and 5.0.2 versions of CiviCRM. I've never seen this problem before version 5.0.0.

The SQL code in the error log :

```
SELECT

GROUP_CONCAT(DISTINCT contact_a.id) as contact_id,
GROUP_CONCAT(DISTINCT contact_a.contact_type) as `contact_type`,
GROUP_CONCAT(DISTINCT contact_a.contact_sub_type) as `contact_sub_type`,
GROUP_CONCAT(DISTINCT contact_a.sort_name) as `sort_name`,
GROUP_CONCAT(DISTINCT contact_a.display_name) as `display_name`,
GROUP_CONCAT(DISTINCT civicrm_event.id) as event_id,
GROUP_CONCAT(DISTINCT civicrm_event.title) as event_title,
GROUP_CONCAT(DISTINCT civicrm_event.start_date) as event_start_date,
GROUP_CONCAT(DISTINCT civicrm_event.end_date) as event_end_date,
GROUP_CONCAT(DISTINCT civicrm_event.default_role_id) as `default_role_id`,
civicrm_participant.id as participant_id,
GROUP_CONCAT(DISTINCT civicrm_participant.fee_level) as participant_fee_level,
GROUP_CONCAT(DISTINCT civicrm_participant.fee_amount) as participant_fee_amount,
GROUP_CONCAT(DISTINCT civicrm_participant.fee_currency) as participant_fee_currency,
GROUP_CONCAT(DISTINCT event_type.label) as event_type,
GROUP_CONCAT(DISTINCT civicrm_participant.status_id) as participant_status_id,
GROUP_CONCAT(DISTINCT participant_status.label) as participant_status,
GROUP_CONCAT(DISTINCT civicrm_participant.role_id) as participant_role_id,
GROUP_CONCAT(DISTINCT civicrm_participant.role_id) as participant_role,
GROUP_CONCAT(DISTINCT civicrm_participant.register_date) as participant_register_date,
GROUP_CONCAT(DISTINCT civicrm_participant.source) as participant_source,
GROUP_CONCAT(DISTINCT civicrm_note.note) as participant_note,
GROUP_CONCAT(DISTINCT civicrm_participant.is_pay_later) as participant_is_pay_later,
GROUP_CONCAT(DISTINCT civicrm_participant.is_test) as participant_is_test,
GROUP_CONCAT(DISTINCT civicrm_participant.registered_by_id) as participant_registered_by_id,
GROUP_CONCAT(DISTINCT discount_name.title) as participant_discount_name,
GROUP_CONCAT(DISTINCT civicrm_participant.campaign_id) as participant_campaign_id

FROM

civicrm_contact contact_a
    LEFT JOIN civicrm_participant
        ON civicrm_participant.contact_id = contact_a.id
    LEFT JOIN civicrm_event
        ON civicrm_participant.event_id = civicrm_event.id
    LEFT JOIN civicrm_option_group option_group_event_type
        ON (option_group_event_type.name = 'event_type')
    LEFT JOIN civicrm_option_value event_type
        ON (civicrm_event.event_type_id = event_type.value
            AND option_group_event_type.id = event_type.option_group_id )
    LEFT JOIN civicrm_discount discount
        ON ( civicrm_participant.discount_id = discount.id )
    LEFT JOIN civicrm_option_group discount_name
        ON ( discount_name.id = discount.price_set_id )
    LEFT JOIN civicrm_note
        ON ( civicrm_note.entity_table = 'civicrm_participant'
            AND civicrm_participant.id = civicrm_note.entity_id )
    LEFT JOIN civicrm_option_group option_group_participant_role
        ON (option_group_participant_role.name = 'participant_role')
    LEFT JOIN civicrm_option_value participant_role
        ON ((civicrm_participant.role_id = participant_role.value
            OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
            AND option_group_participant_role.id = participant_role.option_group_id )
    LEFT JOIN civicrm_participant_status_type participant_status
        ON (civicrm_participant.status_id = participant_status.id)

WHERE       ( civicrm_participant.is_test = 0 )
  AND       (contact_a.is_deleted = 0)

GROUP BY    civicrm_participant.id,
            participant_register_date desc,
            contact_a.id

ORDER BY    `participant_register_date` desc,
            `contact_a`.`id`

LIMIT 0, 50

```

The error :

```
[nativecode=1056 ** Can't group on 'participant_register_date']

```

I tested this code in phpmyadmin , and it works when I replace `participant_register_date` in the `GROUP BY` by `civicrm_participant.register_date` but I don't know which file I need to change in civicrm to do the fix...

Thank you in advance for your help!

# Answer
Kevin,

This is a core bug and is fixed under https://github.com/civicrm/civicrm-core/pull/11996/files

HTH

Pradeep
> 4 votes

---
Tags: civievent, participants, 5.0
---


# Question
Title: Does Drupal's read-only mode module work for Civicrm too?
Drupal 7 has a module, Read Only Mode, which allows your site to be viewed while in maintenance mode. No changes can take place to the database, but viewers can still see your site. This allows you to make your maintenance mode changes while not inconveniencing users who simply want to view your site.

Does this work with Civicrm as well? ie, does it prevent civicrm from changing its database while in maintenance mode?

We'd be very happy to be able to use Read Only Mode during Civicrm upgrades, which can take a while. Thanks for any thoughts!

# Answer
> 6 votes
In short - no. Moreover, if it did, it would be dangerous, because the Drupal module can't know which database writes are part of the legitimate upgrade and which aren't.

In my experience, only upgrades that add/remove indices take any appreciable amount of time. Is it possible that more frequent upgrades will result in shorter downtimes for your use case?

---
Tags: drupal, upgrade
---


# Question
Title: Updating Repeated CiviEvents in 4.7 and 5.0
Having an issue updating details of recurring events.

This is happening on a clients site (was happening in 4.7 versions and still occuring after upgrade to 5.0)

Have just recreated issue on sand box

1) Create event with 12 weekly repeats 2) Add event custom data 3) I can update the custom fields in one event instance, and get the dialog box to update all/ future events. If I select to update all events I get a confirmation notice that the event has been updated. But when I look at future events the changes haven't been saved there only on the event instance editted.

Has anyone seen anything like this before? Know of a quick fix

Not sure if it's related to issues raised here or not Backbone javascript conflict causing Configure Event / Repeat to fail

Conversely, when they set the event each session had a £20 session fee. They want one session to have a £25 session fee.

When they update the specific session fee tab and select update only this event, on saving fees for all events are updated.

I've been able to recreate that in sandbox also. Add a fee for the first event instance, and create recurring events.

Updating a fee in a later event instance, and saving this event only updates fees for all instances.

The client was using repeat events in their 4.6 install, and apparently these features worked fine. I've not used repeat events myself that much so have no experience prior to this.

# Answer
> 3 votes
I can assure you that custom fields never carried over to repeating events in Civi 4.6 - I had to write a lot of custom code to deal with the fact!

The issue you're describing is CRM-16902. It's marked as closed, but that's incorrect - a related issue, CRM-20787 was recently fixed.

Before CRM-20787 was merged, it WAS possible to change a single price on a repeating event. This might be the changed behavior your client is noticing. If selecting "this event only" isn't possible now, that's a regression and should be reported.

That said - dealing with price changes and price sets is very thorny. If I change event 3 (only) to have a different price, then I change a different event's price and say "change all events" - does event 3 have the new price? Or just the unchanged events?

In short - it's not a quick fix. It needs code to be written.

---
Tags: civievent, repeating-events
---


# Question
Title: Trying REST but get PHP Fatal error: Class 'JObject' not found in
I need make a query on civicrm project in joomla from REST. However, when I try: http://localhost/joomla/administrator/components/com\_civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api\_key=//user\_key//&key=//site\_key// I just get:

```
PHP Fatal error:  Class 'JObject' not found in /var/www/html/joomla/libraries/joomla/event/dispatcher.php on line 23

```

I already change manually the api\_key in mysql database, but I just can't make the access between api and database.

How I was afraid that problem envolve permission issues, I try with cv command too. Here is the command: cv api Contact.get debug=1 sequential=1

and exact same answer was showed up.

Can Someone help me to find the way toward resolve this problem?

thanks

# Answer
The question is old but for anyone searching for that error, see CRM-21203 and PR-11609 released in 5.1
> 1 votes

---
Tags: api, rest
---


title: Siteground Email - How to configure?

text:
# Question
Title: Siteground Email - How to configure?
I am on Siteground hosting services. Everything is great except for civiMail. The issue is their outbound service drops the majority of my bulk emails because I'm feeding their servers too fast. Their restrictions are:

* A single email should not have more than 80 recipients under the GoGeek plan.
* You can send up to 800 emails per hour.
* A single connection to the mail service should not trigger no more than 9 messages to be sent, trying to sent 10 or more will hit the limit.

I tried the throttling of email with a setting of 120000 msec, which I found somewhere but the wording is "single connection". So this means I need to disconnect and reconnect to the mail server, send 9 more, disconnect... etc... Is this even configurable in CiviMail?

# Answer
> 1 votes
I have actually switched to CiviSMTP and am very happy with it so far. No bounces or emails not making it to their destinations.

# Answer
> 4 votes
There few CiviCRM extension that use third party to send bulk emails or transactional emails.

1. FlexMailer
2. Sparkpost
3. Mandrill

Alternatively there are many SMTP providers that provides good bulk mailing service like Sendgrid, CiviSMTP etc. Here is the list of SMTP providers that CiviCRM bulk mailings are supported.

HTH

Pradeep

# Answer
> 3 votes
Original Answer Below - New Answer: Siteground has created a number of rules and restrictions to avoid you using their services for bulk mailing. May be worth looking into another host.

---

The 80 recipients siteground is referring to is if you were to send an email with 80 recipients using traditional email. Thats not how CiviMail works - its sending all emails with 1 recipient, or more if you chose to cc/bcc. However, they specifically use that 9 email limit to stop you from using their server for bulk email - however, if you still want to, based on your settings, I would use the following settings under Administer - CiviMail - Mailer Settings

* Mailer Batch Limit: 180
* Mailer Throttle Time: 0 (you can use this if you want - but I found it not very useful with shared hosts like siteground.)
* Mailer Job Size 0
* Mailer Cron Job Limit - 1 (you might be fine with 0.)

Then I would set the cron to run every 15 minutes.

Alternatively, I would ask Siteground, what they define as a connection. For them, it could be 20 seconds.

I also agree with others - you may want to use sparkpost or similar. However, there is no reason this should not work with your shared host.

Lastly - regarding spam with sparkpost - have you set up an SPF record?

# Answer
> 1 votes
Norm, You might want to consider connecting a service like SendGrid https://sendgrid.com to handle bulk emails. The issues you are referring to above will be resolved.

---
Tags: civimail, siteground
---


# Question
Title: Hook to stop a contact's email from being deleted
We have a new requirement to stop an admin from deleting a contact's email if that email is found in one of our other systems. I am trying to do this through a validateForm hook. I can figure out the logic of finding the email in another system. But how can I check: 1. That the form is trying to delete or update an email (vs adding an email)? 2. Identify which email is being deleted?

I can't tell where to find the action being taken, nor which email is being deleted. Also, if I set an error (as a test), the error shows correctly, but the deleted email is gone from the view of the form (I would like for it to stay there).

Is there another hook I should be using for this?

My other option would be to use the buildForm or similar hook to make that field readonly prior to the form showing up. But I feel it's safer to block a delete.

Would love some pointers on either method. Thanks!

# Answer
> 1 votes
You can use ValidateForm to check all form level action. Also you can use pre hook to check if email is being deleted or updated and then throw fatal error or exception.

HTH

Pradeep

---
Tags: email, hooks
---


# Question
Title: How to input URLs in CiviCRM fields (custom fields or standard fields) so that they're clickable
Does anyone know if this is possible? I want to save a URL in a CiviCRM field so that it's clickable when the field content is displayed eg in a report, or just in a normal CiviCRM page view.

Example: store the URL for a page on a contact's website, so that when I display the contact record, the website URL appears as a clickable link. I suspect it must be possible, but can't work out how to do it.

# Answer
There two ways a field which can be used as link.

1. **Contact's website field**
This is field is available for Contact of all type i.e Individual, Org etc. on new contact form or can also be added to profile.

2. **Custom field of type link**
CiviCRM provides custom fields for different type. You can use custom field of type **link** if you want it to be used as link as it provides validation.

HTH

Pradeep
> 4 votes

---
Tags: urls
---


# Question
Title: What is the latest version of CiviVolunteer?
I have version 4.7.21-2.2.3 of CiviVolunteer installed, but when I look at the list of extensions Civi recommends updating to 4.7.31-2.3.0 I am running 4.7.27 by the way, so I'm assuming that this release doesn't apply. Is that correct? The list of releases at https://civicrm.org/extensions/civivolunteer adds to the confusion as the 2.3.0 version was released *before* the 2.2.3 version. Can someone explain?

# Answer
> 4 votes
I think there is confusion on release date. Version 4.7.31-2.3.0 was released on March 2018 not March 2017. I guess the maintainer forgot to update the year to 2018 in info.xml file.

HTH

Pradeep

---
Tags: drupal, 4.7, civivolunteer
---


# Question
Title: wordpress edit multi-record profile fine when logged in but not retaining checksum for anonymous user
civicrm 4.7.24 wordpress 4.9.5

When logged in I can access, edit and add to a multirecord profile eg

When not logged in, using identical link (domain.org/civicrm/?page=CiviCRM&q=civicrm/profile/edit&gid=20&reset=1&id=NNNN&cs=c1ae6c62c8b56de0b98cc786cb7e96dc\_1523257945\_720)

the profile is displayed for the correct user (so the checksum is respected at this point) however the \[view\]\[edit\]\[delete\] buttons appear as 2 4 8 and (add new record) gives permission error

eg

The only way I can get it to work is by enabling "edit all contacts" for anonymous users. No thanks!

Please note that **it works fine when logged in as admin** so please no suggestions relating to the format of the link or multrecord profiles

I am unable to test on demo site as mail is disabled so I can't generate checksum

# Answer
> 1 votes
I was having a bugger of a time troubleshooting a similar problem with the checksum capability for anonymous users. After trying and identifying many different potential causes such as:

* *cid* versus *id* for the contact
* the order of the *checksum* or *contactid* tokens
* ACL permissions
* whether SSL or non-SSL made a difference
* update to CiviCRM 5.0 (currently on CiviCRM 4.7.30 with WP 4.9.5)

What fixed it was having %2F instead of the '/' in the query parameters of the URL. I needed to explicitly put the '%2F' (without the single quotes) in the URL instead of the '/'. For instance, in your example above the URL section:

> &q=civicrm/profile/edit

should be changed to

> &q=civicrm%2Fprofile%2Fedit

NOW my mailings work with checksums! Wahoo! Hope this helps someone else on WordPress.

# Answer
> 0 votes
I believe that Civi ACLs are not intended to work for anonymous users.

I get similar behavior to your example with Civi 5.0.0 and Wordpress 4.8.6 using ACLs for a user to create a profile and access specific custom data records. A logged in user with these ACLs can access the profile and custom data, but the same user coming from a checksum token link cannot. In this case the user is coming in with the anonymous CMS role. If the Wordpress access control for the anonymous user has create profile and custom data checked, then it works from a checksum token, but that's too coarse permission in some cases. This statement comes from the online documentation:

**Collecting data from anonymous visitors using profiles**

If you have built profiles to collect data from anonymous visitors through online forms (e.g. event registration pages, contribution pages and standalone profile forms), the permission profile create will need to be given to the "anonymous" role. Furthermore, should the profile contain any custom fields, an additional permission will need to be given, depending on the circumstances. Read "Accessing custom data" below.

# Answer
> 0 votes
Thanks for your help Phil and CB. I think maybe you're not using multi record custom fields? Having now duplicated this with Drupal I now suspect the add/edit functionality does not exist for MULTI-RECORD fields in public profiles. Makes sense really as although the checksummed profile displays OK to the anonymous user, the link to "add new record" ie "https://domain.com/index.php?q=civicrm/profile/edit&reset=1&id=2&multiRecord=add&gid=15&context=multiProfileDialog&onPopupClose=" no longer contains the checksum hence the permissions error. Hmm any developers out there like to give me a $quote?

---
Tags: wordpress, profile, permissions, checksum
---


title: How do I delete the "Recent Items"?

text:
# Question
Title: How do I delete the "Recent Items"?
The "Recent Items" list covers some of the buttons in CiviCRM. How can I empty the list of "Recent Items"?

# Answer
Eric, if you are using Drupal, "Recent Items" are contained in a block. You can disable the block and it will no longer display.
> 3 votes

# Answer
Though this question is pretty old, MillerTech recently developed this extension to add a button on the Drupal Recent Items block to clear the list. Hope this will be useful cheers!
> 3 votes

# Answer
Simply logout and log back in.

Just tested on demo - http://d46.demo.civicrm.org
> 2 votes

# Answer
If you're looking to see how that list is built, check out /civicrm/CRM/Utils/Recent.php. I think the quickest way to clear the list is to empty the relevant session var, like so:

```
$session = CRM_Core_Session::singleton();
$session->set('CRM_Utils_Recent', '');

```
> 1 votes

# Answer
i have never seen the content of this list, in a Drupal Block, extend beyond the block. I don't know your CMS but it sounds like it might be a theming issue.
> 0 votes

---
Tags: dashboard
---


# Question
Title: Wordpress Ajax & pictures not loading after upgrade to 5.0
I've updated from 4.7.29 to 5.0.0 The SQL update went well, but I've issues with JS/Pictures not loading. This is really blocking as for example, the "Create new contact" is not loading See screenshots below. Could you please advise ? Thanks

> Error at "Create new user page"

CiviCRM\_API3\_Exception: "DB Error: no such field"

# 0 /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFGroup.php(3341): civicrm\_api3("uf\_group", "get", (Array:3))

# 1 /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Edit/Address.php(226): CRM\_Core\_BAO\_UFGroup::getCreateLinks((Array:3), "shared\_address")

# 2 /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Location.php(107): CRM\_Contact\_Form\_Edit\_Address::buildQuickForm(Object(CRM\_Contact\_Form\_Contact))

...

# Answer
The issue was due to the missing field "frontend\_title" in "civicrm\_uf\_group" (mentioned in the DB error message"). To fix the issue I did drop the table and recreated it. No more JS error after that. Special thanks to @Jon G. for his follow-up, however : I could not access the APIv3 from civicrm (it uses JS and wasn't showing up due to the error), I don't know how to use CommandLine. By the way, the APIv3 is now accessible but once "system" is selected for "entity", the choice "rebuildmultilingualschema" for "action" is not proposed; maybe due to the fact that multilingual civicrm is not used on our domain. Thanks again, best regards
> 0 votes

# Answer
I can see the problem (I saw this myself recently), but I don't have a 100% answer. **However, the solution is usually to rebuild your multilingual schema.**

This problem is characterized by:

* Multilingual mode is activated on your CiviCRM site.
* Error in the browser console show files not found at a path with the word "undefined" in it.
* Also, "DB Error: no such field" errors (though this can also be caused by missing extensions or failing to upgrade the database after upgrading the CiviCRM files).

Based on these instructions, here's how you rebuild the multilingual schema:

### From within CiviCRM (CiviCRM 5.1+ only):

* Go to **Support menu » Developer » API Explorer**.
* Set *Entity* to **System** and *Action* to **rebuildmultilingualschema**.
* Press the **Execute** button.

### From the command line (Civi 5.0.1 and earlier):

**Drupal 7**

`drush php-eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'`

**Drupal 8**

`drush php-eval '\Drupal::service('civicrm')->initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'`

**WordPress**

`wp eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);'`
> 2 votes

---
Tags: wordpress, javascript, ajax
---


# Question
Title: Using CiviCRM shortcode (wordpress) for a profile in a popup
I want to include a Civi Profile (newsletter signup) in a popup. I have tried many popup plugins but none seem to work. The profile just does not load. Is this possible and if so, please point me in the right direction. Thanks.

# Answer
I have had success with Popup Builder \- the preview never works, but the embed on the page always works. This is a popup overlay - which I assume is what you are looking for. The free version is great if you just want a popup on a page of your choosing - the paid version is great if you want the popup to come up on any page a first time visitor first sees.
> 3 votes

---
Tags: wordpress
---


title: Fixed Period Rollover Day

text:
# Question
Title: Fixed Period Rollover Day
I'm having an issue where people signing up for a membership are getting an extra year added on (our fixed rollover date is July 1st).

All membership types are set to renew on Jul 1st (Membership Type Plan = Fixed, Membership Type Duration Unit = 1 year). I've set the Fixed Period Rollover Day to Jun 30th.

When a member signs up for a membership today, they are being automatically set to expire on June 30, 2019 -- instead of 2018. Doesn't seem to matter what I set the Fixed Period Rollover Day to.

Am I setting something up incorrectly?

# Answer
I set up same membership on dmaster.demo.civicrm.org and it all worked as expected giving me an End Date of June 30 2018.

The system resets data every 24 hours but it is there currently if you want to take a look.

Membership Type

Membership
> 1 votes

---
Tags: civimember
---


# Question
Title: Why would two distinctly separate custom fields share the same options?
Why would two distinctly separate custom fields {Constituent Info and Contribution Info} share the same options? How do I go about separating them? If I try to delete any option I get this notification.

These Multiple Choice Options are shared by the following custom fields: Marital Status, Appeal

# Answer
Civi allows you to set the same Options to be available on multiple fields. You do this by selecting an existing set of Options when creating the field, rather than creating a new set.

If you require different options for the second field then yes set that field to "Create a new set of options"

However that will mess with any existing data you may have. I would suggest you create a new Field with the new set of options, then, if required, you may be able to figure out how to review the existing data and use Batch Update via Profile to add the relevant data to the new field.
> 3 votes

---
Tags: custom-fields
---


# Question
Title: After applying for a CiviCRM account, how long does it take to approve?
We have applied for a CiviCRM account and wondering how long it would take to approve the application?

# Answer
> 2 votes
If you mean an account with civicrm.org then usually not so long. I have pinged someone on chat.civicrm.org to try and resolve this for you.

# Answer
> 2 votes
Accounts are manually approved (we used to get a lot of spam). It can take up to 1 or 2 working days. In some cases, account requests can get flagged as spam. You can also reach us on the chat (https://chat.civicrm.org). You can ping @bgm or @josh.

---
Tags: community
---


# Question
Title: What order are CiviMail emails sent from CiviCRM?
Is there a clear pattern to the order in which emails are sent from CiviMail queues? For example, *emails are sent from the queue*

* *in no specific order*
* *sorted alphabetically, A-Z*
* *sorted by contact ID ascending*
* *...*

Wondering after seeing this question.

# Answer
> 1 votes
I understood it was smallest civi id first (or "sorted by Contact ID ascending" to use your description)

---
Tags: civimail, email
---


# Question
Title: CiviCRM 5.01 Not Displaying Main Page (Page content is generated by CiviCRM)
Folks,

I have a barebones WordPress 4.9.5 install with only the Updraft plugin enabled (default theme etc.). I have configured the items listed in the CiviCRM (5.01) checklist, but am not able to get the main CRM page to load. The following URL only displays the "Do not delete this page. Page content is generated by CiviCRM." message.

https://staging.secondchancenc.org/wp\_2018/civicrm

I have confirmed that the CiviCRM resources are loadable from the path configure in CiviCRM:

https://staging.secondchancenc.org/wp\_2018/wp-content/plugins/civicrm/civicrm/gpl.txt

Any help/ideas would be appreciated.

Thanks, Tim

# Answer
> 1 votes
that page you are referring to is used to generate CiviCRM content. As for "main page", are you referring to the CiviCRM Dashboard? Your dashboard should be found at /wp-admin/admin.php?page=CiviCRM

---
Tags: wordpress, install
---


title: Mosaico blocks not staying in place

text:
# Question
Title: Mosaico blocks not staying in place
Mosaico has been loaded for use in CiviCRM 4.6.33 in a Drupal environment. However, when blocks are dragged to create a template they do not stay in place. Has anyone experienced anything similar and any idea what might be causing the problem?

Thank you.

# Answer
> 1 votes
We've seen some major improvements in the 4.7.x version (Mosaico 2.0) \[over the 4.6.x version\] - if a client wishes to use Mosaico we do recommend moving them up the 4.7.x first;

---
Tags: civimail, custom-templates, mosaico
---


title: How to Map Contacts?

text:
# Question
Title: How to Map Contacts?
When you open a Group and select Group members, you can run a "Map Contacts" Action (which, I suppose, would locate those members on a map).

But when I try, I get a message which tells me that the Contact Address does not contain Latitude/Longitude of the Contact.

I have tried to activate the "Geocode and Parse Address" CRON Job, but I get errors (last one : "A fatal error was triggered: Aborting batch geocoding. Hit the over query limit on geocoder.")

I did not find any detailed documentation about that.

Any help is welcome

# Answer
I finally succeeded :

* Administer \> Settings \> Addresses \> Address Editing with Latitude, Longitude, and Street Address Parsing enabled
* geocoding=1 and parse=0 in the Geocoding Parameters of the CRON job
> 3 votes

# Answer
Take a look at the docs about mapping Not much there, and I've found that if you're using Google then you do need an API key in order to raise the limit on the amount of geo coding requests. So in in Administer/System Settings/Mapping and Geocoding you can set the API key there. To request a Google API key there's info here
> 1 votes

# Answer
Now that you’ve got Latitute and Longitude - you can also map your contacts this way: How to put your CiviCRM Contacts on a Leafleft Map in 5min?
> 0 votes

---
Tags: geocoding
---