title: I Need a Mailings Tab

text:
# Question
Title: I Need a Mailings Tab
I do not have a "Mailings" tab in the menu at the top of my screen. How do I add "Mailings" to my list of tabs? See screenshot below, a "Mailings" tab should be there.

# Answer
> 4 votes
1. Can you check required drupal permission for role is enabled? Like Administer CiviMailings?
2. Navigate to Administer \>\> Customize data and screens \>\> Navigation Menu. Check if Mailings is disabled, if so right click and enable the menu.

# Answer
> 4 votes
In addition to Pradeep's suggestions, also check **Administer menu » System Settings » Components** to ensure that CiviMail is enabled.

---
Tags: mailing
---


# Question
Title: How to specify which Activity Types should trigger notifications to the Assignee
Currently the setting at civicrm/admin/setting/preferences/display?reset=1 (pls don't ask why it is a Display Preference!) is just an On/Off switch.

Looking in to providing an extension so the Activity Types could be specified to include/exclude.

Anyone taken any steps in this direction already?

# Answer
> 1 votes
This has now been added to core by the Fuzion team via this patch

# Answer
> 1 votes
Yes! This is one of the use cases described for CRM-20638 It provides a hook that your extension could use to select which activity types to include/exclude. There is a PR from May waiting for review if you can help with that.

---
Tags: email, activities
---


# Question
Title: How did my import result in the State for a different country to the one intended
How could a CiviCRM database have 2 Marylands with 2 different `state_province_code`s but both be identified with the same `country_code`?

1019 = Maryland 3497 = Maryland 1228 = United States

I only was alerted to this when my newly inherited client created a Smart Group to display all records with `postal_code` between 20601 and 21930.

Is my CiviCRM instance corrupt or has a bad import caused this? Can I manually adjust the offending records without cascading problems? How would you suggest a fix for this?

# Answer
It sounds like you're not using the latest version of CiviCRM (4.7.30 at the time of writing). It sounds like you're experiencing the bug that was described and fixed at CRM-19888. It's also related to this much older bug.

Please upgrade to 4.7.30 and try again?
> 2 votes

# Answer
I may not have quite understood you but if you have access to your database you can look in civicrm\_state\_province where you will see there is a Maryland MY in Liberia (1122) as well as a Maryland MD in the USA (1228)

When importing contacts with State/Province you may be better off if you either import the abbreviation (though even that might not be unique) or also import Country.
> 2 votes

---
Tags: database, data-import
---


title: Adding a Column to Membership Database

text:
# Question
Title: Adding a Column to Membership Database
I would like to add a column to our database membership reports that would indicate the members' county. At present, there is no column for this data. Can I add one? How do I do this?

# Answer
All you need is to create a custom field against membership

Please follow the below link

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

I guess this helps !!!
> 1 votes

---
Tags: civimember
---


# Question
Title: Link to Directly View Default List of Contacts (Drupal)
I would like to be able to link directly to the page listing contacts (same as if searching for a wildcard (searching without entering . Even better would be able to pass in variables through the link to filter the results.

At the very minimum I would like to show the list of contacts as if you just go to the search bar and press enter. I'm looking for a way to directly link to the list of contacts.

Is this possible?

**Clarification and thoughts...** Right now it appears that the only way you can repeatedly search for contacts is to manually do a search. This is tedious and very limited. Ideally there would be a way to pass in parameters through the URL to get search results. This would allow us to have direct links to a specific set of search results.

# Answer
Use the default (or customized) Constituent Report ( /civicrm/report/instance/1)

Add the URL to your default Drupal 7 shortcut list ( /admin/config/user-interface/shortcut/shortcut-set-1)

The user clicks one time, and sees the contact list you want, without any use of views.
> 1 votes

# Answer
There is no navigation that sends you to a 'list' of contacts. First you need to be clear on what that 'list' would show. Is it just the list that you get from going to Advanced Search and clicking on 'search' which is same as clicking in Quick Search and hitting 'enter/return' on your keyboard. If you don't want to build a View then perhaps make a Profile, add the fields you want in it, and set them to 'searchable' - but of course that all begs the question of 'what do you want people to be able to do once they see this list' which is something you haven't mentioned.
> 1 votes

# Answer
What CMS? Drupal, Joomla, Wordpress?

Why not make a View (if using Drupal) ?
> 0 votes

---
Tags: drupal, search, menu
---


# Question
Title: How to create the best front-desk contribution flow using CiviCRM?
The scenario is a "front-desk" form for new member signups. Organisation takes cash / card for payment on the day, so CiviCRM is not processing payments, and payments should be recorded as completed. Desk staff will use a form to record the new member's contact details, take payment, and initialise the membership.

The form should:

* Require first & last name & email
* Record amount taken for membership (may be weekly or annual fee)
* Save the new Contact
* Save the new Membership with 12 month expiry
* Save the initial Contribution and flag as completed
* If weekly option selected, perhaps create a pledge?
* If possible, option to select completed or pending status (latter for those setting up AP payment)
* Require minimal steps for entry (eg skip confirmation screen, don't require billing address etc)

The org will be offering self-service signups to the public via their website at the same time, but the ideal UX for staff vs new members is different so these are different requirements.

It's possible to use CiviCRM's regular Contribute form to achieve most of this, and there's a special `cid=0` parameter (`civicrm/contribute/transact?cid=0&id=X`) to use a Contribute form to sign up a user who is not the logged in user - but that means getting staff to use a public-accessible Contribute form, and lacks the ability for staff to record the payment as completed.

Can CiviCRM Profiles record a new contact, contribution and membership in one form submission? How else can this best be implemented?

Thanks!

# Answer
**Would something like this page work for you:**

**Or this one:**
> 1 votes

---
Tags: civicontribute, civimember
---


# Question
Title: Can you prevent invoices from being sent via Pay Later?
I'm setting up a Contribution Page to act as a sales desk at a silent auction. An operator will use the page to enter people's details and the payment that they made for any items, along with a textarea for recording item details.

In order to keep everything in the system, I have renamed "Pay Later" as "Cash Sale". Then afterwards we'll go through and mark all those items as Completed, which will e-mail through the receipts. (while it would be nice to avoid this step it's only a small inconvenience)

The only problem with this solution is that as soon as we use the Pay Later mechanism, an invoice is e-mailed through to the buyer. This is unnecessary and will be confusing.

Is there any way to prevent invoices from being sent when we use the Pay Now for a particular Contribution page? Any settings that I have missed, or even hooks?

Note that I'm not keen on doing the data entry in the back end (CiviCRM console) as the operator would have to create new Contact records for each person before the sale, and overall that would be far more work.

Thanks, Stephen

# Answer
If the invoice generation is linked to specific financial types, then in that the case you could create a new financial type which isn't linked to automatic invoice generation.
> 1 votes

# Answer
You can prevent invoices from being sent automatically navigating to: Administer - CiviContribute - Component settings

```
URL: civicrm/admin/setting/preferences/contribute

```

At the bottom there's a checkbox which says: Automatically email invoice when user purchases online

The drawback is that you'll have to send them manually, which can be done form the Advanced search or find Contributions menu, in the Actions menu there should be a Print/Email invoices which allows you to do it in batch, it also applies for receipts.
> 1 votes

# Answer
If you were using Drupal you could make a Webform for the 'pay later' that links to a contribution page that is set to not send out receipt/invoices
> 0 votes

---
Tags: payment-processor, hooks, invoice
---


# Question
Title: Sending PDFs on event notifications and reciepts - disabling
Why is it when you go to: civicrm/admin/setting/misc?reset=1 Admin-\>System Settings-\>Misc

And set "Attach PDF copy to receipts" to "no" that PDFs are still being attached to receipts?

This appears to impact both events and contributions.

# Answer
Turns out that there is an additional setting on CiviContribute Component Settings that appears to override the Misc System Settings which only becomes apparent when you turn on tax/invoicing. (/civicrm/admin/setting/preferences/contribute?reset=1)

"Automatically email invoice when user purchases online"

This is somewhat confusing.

Perhaps we should change the labels and descriptions such that it's more clear what these options mean.

1. Amend the setting on System-\>Misc page to reference the fact it might be overridden
2. Change the wording of Civicontribute settings so that it references that by "email invoice" it means attach a pdf (and will override what is set in 1).
> 3 votes

---
Tags: civievent, civicontribute, email, receipts, pdf
---


# Question
Title: How does CiviCRM handle international mailing addresses with unusual formats?
I'm working with a non-profit that is exploring CiviCRM as a successor to their old FileMaker database. I've been doing some experimenting with a demo site. One of the biggest problems with their existing FileMaker database is that international addresses don't all follow the same format as a US address.

What I mean by that, is US addresses all follow this:

\[Street Address 1\]
\[Street Address 2 (if needed)\]
\[City\], \[State Code\] \[Zip\]

This is problematic for countries without that same format.

I notice the fields all look the same style in CiviCRM. Is this problematic for users? I'm concerned both for data input issue as well as output, for example, trying to send out a mass mailing. Am I going to have issues with this as well?

I'm running CiviCRM on WordPress on a Digital Ocean Droplet.

# Answer
> 4 votes
You can control the address format in **Administer menu » Localization » Address Settings**, so your mailing labels generate how you'd like.

What CiviCRM does not currently do is print different mailing label formats based on the country of the record. I've got a proposal to a client who will fund this improvement if the proposal is accepted, but at this time I don't know. Feel free to connect with me on https://chat.civicrm.org (name is "junglebird") if you'd like to be kept in the loop.

---
Tags: addresses, localisation, address-labels
---


title: Need to reinstall a deleted contact

text:
# Question
Title: Need to reinstall a deleted contact
I have accidentally deleted a contact and need to get all their information back, how do I do this?

# Answer
Do you happen to know how it was deleted? Because there's actually two kinds of deleting - one is permanent, one is not.

Try the advanced search and turn on the option to search in the trash.

If they have been permanently deleted, then you won't be able to bring them back in the software - you'll need to find as much of the information elsewhere (backup of your database, emails you got from the system, etc) and manually recreate as much as you can.
> 6 votes

# Answer
If you have access to your log\_civicrm tables in the database (assuming you have logging turned on) then you should be able to dig out info about a contact who was Deleted (as opposed to just in Trash).

The rows relating to the contact (and related rows in eg log\_civicrm\_address etc) are not deleted when a contact is actually deleted.
> 1 votes

---
Tags: wordpress
---


# Question
Title: add to group automatically according to custom logic
When a user fills out a registration form to an event, I can set the profile up to add him automatically to a specific group. But how do I choose the group automatically according to what he filled out in the form? Specifically, according to his chosen preferred language, I need to add him to 1 of 4 different groups. How can this be done?

# Answer
Alternative is to use CiviRules extension: https://civicrm.org/extensions/civirules

Documentation can be found here: https://docs.civicrm.org/civirules/en/latest/
> 4 votes

# Answer
This is what Smart Groups can do for you. So instead of setting the Group in the Profile, just set up a Smart Group based on the field eg language.

Or if you need people to be added to a Group via the profile AND then set up subgroups based on language, add the primary Group X via the Profile, then create a Smart Group based on 'is added to Group X AND has preferred language = Mongolian"
> 5 votes

---
Tags: groups, online-registration
---


# Question
Title: Upgrade error from 4.6 to 4.7 - WordPress
I'm trying to upgrade, following the official guide, but when I get to the url : wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

I get the folowing error message :

```
Initialization Error

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => simpleHandler
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] =>
SELECT
   option_value.id          as id,
   option_value.label       as label,
   option_value.value       as value,
   option_value.name        as name,
   option_value.description as description,
   option_value.weight      as weight,
   option_value.is_active   as is_active,
   option_value.is_default  as is_default
FROM
   civicrm_option_value_fr_FR  as option_value,
   civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]
    [type] => DB_Error
    [user_info] =>
SELECT
   option_value.id          as id,
   option_value.label       as label,
   option_value.value       as value,
   option_value.name        as name,
   option_value.description as description,
   option_value.weight      as weight,
   option_value.is_active   as is_active,
   option_value.is_default  as is_default
FROM
   civicrm_option_value_fr_FR  as option_value,
   civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="
SELECT
   option_value.id          as id,
   option_value.label       as label,
   option_value.value       as value,
   option_value.name        as name,
   option_value.description as description,
   option_value.weight      as weight,
   option_value.is_active   as is_active,
   option_value.is_default  as is_default
FROM
   civicrm_option_value_fr_FR  as option_value,
   civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]"]
)

```

Any help would be greatly appreciated as I'm new to Civi... thanks!

# Answer
Turns out there's a problem if you're trying to move the Civi database from a server to another (in my case from production to my localhost).

You need to change the db user in the mysqldump file. We did it using a script and the sed command
> 0 votes

---
Tags: wordpress, upgrade, 4.7, 4.6
---


title: Creating ACL for Smart Groups

text:
# Question
Title: Creating ACL for Smart Groups
Is it possible to create an ACL associated with a Smart Group?

I'm attempting to create a members directory that is only accessible to members. I can't seem to get it working. Here's what I've done so far:

* I created a Smart Group called "Active Members" that includes any member of the club (status new, current or grace).
* I made the Group “Members” as the parent group of the Smart Group "Active Members" created above. This had the effect of making the Smart Group disappear, and when you click on the list of members of “Members” it lists everyone that matched the search criteria for the Smart Group.
* I created an ACL Role “Member”.
* I assigned the Group “Members” to the Role “Member”
* I created an ACL allowing anyone with the Role “Member” to access the Profile “Directory” to perform the operation “Search”

After doing all that, I figured I had it. This was going to work, and all would be right with the world. I was wrong.

The next thing I did was to create a new ACL allowing anyone with the role “Authenticated” to access the Profile “Directory” to perform the “Search” operation. Then it worked. However, if I understand this correctly, this means anyone that logs in, regardless of their membership status, will have access to the directory.

What troubles me is that the Member Role, which is associated with the “Members” group, which appears to contain all of the active members (by way of a child Smart Group) should have allowed it to work without having to widen the scope to “Authenticated”. I’m guessing that the child group doesn’t inherit the permissions of the parent group.

I don't want to manually add my members to the group members, I want that to be automatically governed by the status of their membership, hence the use of the Smart Group.

# Answer
> 4 votes
Smart Groups could be a pain in the ass in CiviCRM. They are a powerful feature but when it does not work it is hard to get it working again.

There are some alternatives to smart groups. The SQL Tasks Extension or CiviRules can add contacts to a regular group based on a Query (with SQL Tasks) or on a Trigger (with CiviRules). You can then setup this regular group as an ACL Group.

---
Tags: profile, groups, acl, roles
---


# Question
Title: WP - Errors after update from 4.6 LTS to 4.7
Upgrading seems to work fine, I checked folders and resources configuration because the paths weren't there anymore. Then when I try to access the extensions menu I get the following error :

```
Cannot read unrecognized property CRM_Core_Config::$defaultSymbol.

```

And the extensions list isn't being displayed. I tried turning debugging on but nothing shows

# Answer
This is highly due to one of the custom extension enabled on your site. Few steps you could try to fix this -

* Check if any of the extension overrides the file `CRM/Core/Config.php`. If you find it, move it outside the site dir and disable that extension after reloading the page.
* Manually disable the extension from the database one by one and try to reload the page. To disable the ext, set `is_active` value to 0 in `civicrm_extension` table. (Remember to revert it back if the page reload is still an error).
* Check if the custom php directory overrides the core file CRM/Core/Config.php. If yes, do the same as step 1.
> 1 votes

---
Tags: wordpress, upgrade, 4.7, 4.6
---


# Question
Title: Using an excel membership number list to compile a civi report of linked addresses
I have a list of membership numbers of approx 80 people. I need to use these numbers (saved in an excel spreadsheet) to run a report in Civi which will pull all the addresses and names linked to those numbers (with the number) into a new excel sheet which I will then use for a mail merge.

When in Civi I can see that you can import a spreadsheet but that seems to be to add new members. What I need is not to add memberships/individuals but to use the numbers to collate information linked to those numbers already in Civi.

Can anybody help with the best way to do this without adding any duplicate information to Civi, or manually typing/searching all 80 people?

Thanks in advance.

# Answer
If the "membership number" corresponds to the CiviCRM Contact ID, or to the External Identifier field, you can use **Contacts menu » Import Contacts** to import JUST the membership number. On the final field of the import, use the option to create a new Group of the imported records. Since all of the corresponding members exist in CiviCRM, this won't do anything except add everyone in your spreadsheet to the group.

Then you can do a Search for that Group, then do an export of the required fields.
> 3 votes

---
Tags: civimember, civireport, groups
---


# Question
Title: Questions About Mailer Settings - Suggested G Suite settings?
I have CiviCRM send scheduled mailings once every 15 minutes. Because our list is under 800 contacts - we have decided to use our GSuite account for CiviMail. The settings are all correct - but the mailer settings are confusing me.

**Mailer Batch Limit:** If I set this to 250 - Everytime the cron is run - up to 250 emails should be sent until entire mailing list is emailed - correct?

**Mailer Throttle Time:** If I set this to 10,000,000 - an email will be sent every 10 seconds correct? That also means the mailer will be working until all the emails are sent.

**Mailer Job Size:** I have no clue what this means but since our list is under 1000 - I take it it does not apply to us.

**Mailer Cron Job Limit:** This I actually understand - but if I have it set to 2 jobs, and a third job is scheduled to run while the other two are running, will it just queue that third job until one of the other jobs ends?

Also - Is there any reason why I shouldn't use GSuite as my CiviMail provider?

# Answer
> 2 votes
> Mailer Batch Limit: If I set this to 250 - Everytime the cron is run - up to 250 emails should be sent until entire mailing list is emailed - correct?

Yes

> Mailer Throttle Time: If I set this to 10,000,000 - an email will be sent every 10 seconds correct? That also means the mailer will be working until all the emails are sent.

No. It will carry on sending until the Mailer Batch limit is reached, or if no Mailer Batch limit is set, all emails have been delivered.

> Mailer Job Size: I have no clue what this means but since our list is under 1000 - I take it it does not apply to us.

This allows you to split the mail into smaller chunks that can be run in parallel.

> Mailer Cron Job Limit: If I have it set to 2 jobs, and a third job is scheduled to run while the other two are running, will it just queue that third job until one of the other jobs ends?

Yes, though that isn't really the point in this setting. You commonly see it used in conjunction with MailerJob size. Lets say you have a mailing that is to be sent to 100,000 addresses. You could split it into 100 Jobs of 1,000 and run 2 or more jobs in parallel if you like. Depending on what the limiting factor is, this may increase the rate at which you can send out mail. Which may or may not be a good thing for you :)

> Also - Is there any reason why I shouldn't use GSuite as my CiviMail provider?

Given the volume of email you mentioned, I am guessing you will be ok. There is nothing in the terms or service that would suggest you shouldn't be using it for your use case: https://support.google.com/a/answer/2956491?hl=en. As long as it can pass back bounce messages to CiviCRM (important if you do not want to be labelled as a spammer) you will probably be fine. Worth trying it out and reporting back at least.

---
Tags: civimail, email, g-suite
---


# Question
Title: Require suggestions on how to handle custom 'contribution'
I run a large non-profit dog registration system. One of the functions is to require all dogs to be registered with us for this particular sport.

The way I have it now, I have set up individual contacts and added custom, multiple entry custom fields. Individuals need to purchase a dog registration. I'm struggling with this setup since if the individual already has a dog registered, that dog info pops up in the form rather than it being blank. The only way I can see charging for registration of dogs in this manner is through CiviContribute. I would like: 1. Member accesses page to add a dog 2. Member enters dog info 3. Member enters payment info (I'm using iATS payment gateway) 4. On successful payment, the registration is completed.

Did I shoot myself in the foot by making these multiple custom fields under an individual? I had heard some suggestions where the dogs should be a sub-class of an individual and then use a membership status to charge for them? The issue with this is that there are way more fields then needed for a dog - how do I restrict which fields are visible on the backend for this type?

I'm looking for discussion and suggestions on this. Any help is much appreciated.

Norm

# Answer
I do not think I can give you just one answer. IMO you need to try a few ways before you make your final decision. Memberships certainly sound like a good idea to try.

I can imagine dogs would be a contact subtype with their specific fields, and the registration should be a relationship between the individual (owner - perhaps also a contact subtype) and a dog.
> 0 votes

# Answer
Yeah you probably want to add the custom fields to the contribution record, that way every new registration will be a new contribution and the fields will be blank each time for the user
> 0 votes

---
Tags: civicontribute, civimember, custom-fields
---


# Question
Title: Error on Member Dashboard after upgrading to PHP 7.0
After Upgrading to PHP 7.0 - I keep getting the following error on the Member Dashboard. Do you know what causes this? This happened to be before - I changed the resource URLs to Absolute and that fixed it - now this error is back.

\`Warning: get\_headers(): https:// wrapper is disabled in the server configuration by allow\_url\_fopen=0 in /home/sitename/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Check/Component/Env.php on line 903

Warning: get\_headers(): This function may only be used against URLs in /home/sitename/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Check/Component/Env.php on line 903\`

I should also note that the System Status Page mentions that the "The Resource URL is not set correctly." even though it is.

**Update:** Thanks to Yurg's answer below - I contacted the webhost - they store PHP options elsewhere - I was able to change settings to allow\_url\_fopen=1 and that fixed everything!

# Answer
Perhaps `allow_url_fopen=1` should be set in PHP.ini file on your web host.
> 1 votes

---
Tags: dashboard, user-dashboard
---


# Question
Title: How can a pull a report with notes includes
We are trying to export a list with notes included. We are creating a prospect list for Employment Engagement team. We will add names to the database, this list is obtained from events that we host. We will then take the names and information add to Civi and use notes to personal our contact engagement. We will then want to pull and export a specific list that would include notes from previous interactions, so we can keep track of conversations

# Answer
> 2 votes
Do a search to find the people who you want to pull information from, select the contacts and under actions select "export contacts." At step two select "select fields for export" and hit continue. Once on that page, choose any fields you want exported and there is an option for "Note(s)." I recommend saving the mapping so you do not have to choose which fields you want exported every time.

---
Tags: contacts, database
---


title: Redirect to page after Event Signup

text:
# Question
Title: Redirect to page after Event Signup
We'd love to build custom 'Thank you' pages for our events using Drupal 7x., instead of using the WYSIWYG editor field on the CiviEvent page. Is there a way we can use Rules or CiviRules to immediately direct someone to a custom page after they sign up for an event? We can't use Webform CiviCRM because it does not offer price set support.

If you're interested - backstory: We want to have better social media integration, "share this event", contact us info, maps, etc. on this page. It seems somewhat limiting to use CiviCRM templates for creating this functionality when our page editing tools in Drupal are wonderful and easy.

Does https://github.com/eileenmcnaughton/nz.co.fuzion.frontendpageoptions work on 4.7?

Drupal 7.x, CiviCRM 4.7.x

# Answer
https://civicrm.org/extensions/front-end-page-options is a likely solution and yes it works on 4.7 according to my list of which of our clients sites is using which extension ;-)
> 2 votes

---
Tags: civievent
---


# Question
Title: Tokens when setting up activity scheduled reminder
Using Drupal 7.34 and CiviCRM 4.6.4.

We are using civiCase and want to send a reminder to the manager of a case. When I try and set up a template, there does not seem to be a way of telling the manager which case it is they are being reminded about. The token *{contact.display\_name}* generates the name of the manager not the client they are dealing with. So although I can remind the manager to do something, I cannot say which client the reminder relates to.

I have explored the possibility of a custom token but cannot see a way around this.

Any suggestions?

Dave Smith

# Answer
Yes do add additional values to the template you need to create a tokens on your own by creating new extension or by adding token hook in the existing extension for example for creating tokens please refer to the below link

https://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens

https://book.civicrm.org/user/current/common-workflows/tokens-and-mail-merge/

If you haven't created New extension please refer to the below link

https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension
> 1 votes

# Answer
The CiviToken extension by Fuzion may help - or may be a good place to contribute any new tokens cre
> 0 votes

---
Tags: civicase, scheduled-reminders
---


# Question
Title: "On Behalf of" /Sender header for Emails
our setup does not allow us to change SPF records. Which is fine - but we would like to utilize the "On Behalf of" or "Via" by using a "Sender" mail header. This forum post from 2015 explains that CiviCRM does not have the "Sender" mail header - but is there any work on this? Both MailChimp and SalsaLabs have this feature.

# Answer
> 2 votes
I'm 99% sure there hasn't been any work on this.

---
Tags: civimail
---


# Question
Title: Drupal Views Integration with Drupal + CiviCRM databases on different hosts
A few weeks ago, we did a mainly successful migration of a Drupal/CiviCRM site from one hosting provicer to another one. Now, we realized, that some Drupal Views do not work anymore!

Configuring a Drupal Views CiviCRM Integration is well described in this document: https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/

And of course, we already put in the statements from civicrm/admin/setting/uf?reset=1

However, our new hosting provider puts the databases on different hosts (and is not able to move them to the same host)! However, the instruction in the above link says: "These instructions assume CiviCRM and Drupal are on separate databases located on the same physical host."

Any idea what I should put into the settings.php to get that to work?

(a workaround might be, migrating Drupal and CiviCRM into the same database - but that is something I would like to avoid...)

# Answer
You could try CiviCRM Entity in combination with the EFQ Views module. The entity field query views module uses an alternative query backend. Since CiviCRM Entity uses the api to load entities, it doesn't depend on the SQL being in a particular place. Disclaimer, I haven't tried this for your particular use case, and the field and filter handlers will be rough around the edges, but it won't take long to experiment.
> 2 votes

# Answer
It seems, that views integration will never work, if the Drupal and CiviCRM databases are located on different hosts.

If you encounter the same problem, and your hosting provider also were not able to move the two databases to the same host, maybe the following hack might help: When I create 2 new databases immediately one after the other, my hoster will most probably put them on the same host - and everything works well again. That helped for me...
> 1 votes

---
Tags: drupal, drupal-views
---


# Question
Title: Time increments in events only increasing by 15 minutes. Can't be specific
I was wondering if we could set time to be 11:50 instead of always being reverted back to 11:45.

# Answer
> 4 votes
That’s a Drupal screen -\> you need to go to Manage Fields (for the Content Type that this field is on) and hit Edit -\> change its configuration

---
Tags: civievent, drupal, webform-civicrm
---


# Question
Title: CiviMail Alternative Outbound Mailbox/From Address
We are using CiviMail, but I'm a bit confused on the purpose of the FROM field when sending mailings. We have about four different email addresses set up in the CiviMail From Email Addresses screen, all with the same domain for different administrators. However, no matter which FROM address is used, all the sent mail uses the same mailbox for sending. So when we look at our sent items folder, even if we used a different email address in the FROM field, it still uses the default mailbox.

Is it not possible to use the mailbox associated with the FROM address when sending mail using CiviMail? Or will it always use the mailbox that is specified in the Outbound Mail screen, no matter which FROM address is specified?

EDIT:

Just for clarity, in our Outbound Mail Settings we have selected SMTP not mail(). Not sure if this makes any difference.

# Answer
> is it not possible to use the mailbox associated with the FROM address when sending mail using CiviMail?

It is possible to send email using different from email address. The expected behaviour is that the email address you choose when composing a CiviMail is the email address that appears to the recipient in their email client.

It sounds to me like your SMTP service is rewriting the from address before sending the mail. That might be because the SMTP credentials you have supplied are only to be used to send email from that specific email account (in which case, it is not particularly well suited for use as a CiviMail mailer).

You might want to check with the email provider to see if that is the case. Or run a test using a different mailer in 'Settings - Outbound Mail' (e.g. 'Mail', or 'Redirect to database') and see what the From addresses look like when sent using these methods.
> 0 votes

---
Tags: civimail, email
---


# Question
Title: Mosaico Pre-header "View in Browser" broke all my tokens in the footer
Running: CiviCRM Drupal 4.7.30 Mosaico Ver 2-Beta3, Firefox 58.0.2 (64-bit), Chrome Version 64.0.3282.140 (Official Build)

I love the Mosaico extension but ran into a technical difficulty with tokens in the footer. The tokens in my footer worked as expected in the email, but when I click on the pre-header option "View in Browser" the tokens return the following error: *Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred. Invalid form parameters.*

If I happened to be logged out of CiviCRM when I test my received email the "View in Browser" link returns an "Access Denied" error.

Is this a permissions issue? How is it corrected

# Answer
I can't speak to the first issue, but the second issue (can't "View in Browser" when logged out), I have a solution.

You're looking for the permission labeled *CiviMail: view public CiviMail content*. Go to CiviCRM's **Administer menu » Users and Permissions » Permissions (Access Control)**. Select **\[Drupal/WordPress/Backdrop/Joomla\] Access Control**, and check the appropriate box for anonymous users to view public CiviMail content.
> 2 votes

---
Tags: extension, email
---


# Question
Title: Price is not showing up on the registration page after Joomla to Wordpress integration
So I'm moving my site from Joomla! to Wordpress, and I need to move my CiviCRM database and everything related to it. I did manage to do that by installing the same version of CiviCRM on Wordpress as the one i was using on Joomla(4.7.14) and than copying the civicrm database. All the data is there, all the pages, all good. The only thing I have issues with is the Price(Fee) field, it is not showing up on the Registration pages for some reason. I added some screenshots how it looks like on frontend and backend.

Any help you can provide would be more than welcome, thank you in advance!

# Answer
> 1 votes
I'd try upgrading Civi to a more more recent version.

If that does not fix it, I'd look for a plugin/theme conflict. Disable all plugins except Civi and try it. If it works, start enabling plugins until it fails again. If it still does not work, try a basic WP twenty-something theme and see if it works.

---
Tags: wordpress, civievent, registration, price-sets, online-registration
---


# Question
Title: "Could not find valid value for id" when processing contribution batch
When pushing the button "Validate & process batch" after entering contributions, the screen seems to refresh... but nothing is processed: no contribution is added, no confirmation email is sent.

Drupal watchlog shows this backtrace:

```
$backTrace =
#0 .../sites/all/modules/civicrm/CRM/Core/Error.php(378): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 .../sites/all/modules/civicrm/CRM/Utils/Request.php(120): CRM_Core_Error::fatal("Could not find valid value for id")
#2 .../sites/all/modules/civicrm/CRM/Batch/Form/Entry.php(89): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Batch_Form_Entry), TRUE)
#3 .../sites/all/modules/civicrm/CRM/Core/Form.php(543): CRM_Batch_Form_Entry->preProcess()
#4 .../sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#5 .../sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Batch_Form_Entry), "display")
#6 .../sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Batch_Form_Entry), "display")
#7 .../sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#8 .../sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#9 .../sites/all/modules/civicrm/CRM/Core/Invoke.php(282): CRM_Utils_Wrapper->run("CRM_Batch_Form_Entry", NULL, (Array:0))
#10 .../sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:12))
#11 .../sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#12 .../sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
#13 .../includes/menu.inc(527): civicrm_invoke("batch", "entry")
#14 .../index.php(21): menu_execute_active_handler()
#15 {main}

```

Where to find (or add) this id value? Or is it another issue?

CiviCRM 4.7.29 Drupal 7.56

# Answer
> 0 votes
It is very strange that it does not find and id here. The error occurs in the php file CRM/Batch/Form/Entry.

Can you try this issue on one of the demo sites (https://civicrm.org/demo) so you can check if this is a core bug or a problem in your installation?

---
Tags: civicontribute, batches
---


title: CiviMail fatal error in 4.6.4

text:
# Question
Title: CiviMail fatal error in 4.6.4
Since upgrading to 4.6.4 I get this error whenever trying to schedule a mailing:

> A fatal error was triggered: is not of the type Int

And this error when trying to send a test mailing:

> Error in call to Mailing\_send\_test : Error in call to MailingJob\_create : A fatal error was triggered: is not of the type Int

This is on WordPress 4.2.4

# Answer
> 3 votes
There was a bug in CiviCRM 4.6.4 that triggered the same error 'A fatal error was triggered: is not of the type Int' when trying to rebuild the smart group cache so this could be related, especially if U used smart groups for your maling. I would suggest upgrading to 4.6.6 on a copy installation to see if that resolves the issue. Since this is not a real answer to your question I wanted to post this as a comment but I don't have sufficient reputation points to do that. I myself upgraded to 4.6.6 after experiencing too many problems with the 4.6.4 upgrade.

# Answer
> 0 votes
I just report a bug that could be related Error on action "Email - schedule/send via CiviMail" with multiple event names filter

---
Tags: civimail
---


# Question
Title: Emails templates in the language of the receiver
I am working on a project in Belgium, where they speak French and Dutch. Now I want to send an email in the language of the receiver, using a standard template. Does CiviCRM offer options to support this (other than coding this with smarty if then else)?

# Answer
> 3 votes
I think there is no approach for this on CiviCRM beyond smarty approach. We workaround this by splitting receivers groups by their language preferences and sending their separate mails from templates builded in different languages.

This approach its fine for us. See this feature request on Mosaico project with the aim of facilitating work in this direction.

Also, maybe it would be better to find a language preference filter directly on the CiviMail UI without the need to have to separate the mailing groups by language previously.

---
Tags: email, message-templates, localisation, language
---


title: Add language files in civibuild

text:
# Question
Title: Add language files in civibuild
Checking the civibuild create parameters I do not see an option to include the translation/language files? That would be really helpfull, I now add them manually after a civibuild.

# Answer
> 1 votes
What build type are you using, Erik?

The translation files are included in drupal-demo but are commented out in drupal-clean.

Uncommenting the line:

```
 # extract-url --cache-ttl 172800 civicrm=http://download.civicrm.org/civicrm-l10n-core/archives/civicrm-l10n-daily.tar.gz

```

in `app/config/drupal-clean/download.sh` in your local buildkit will mean that localisation files are downloaded as part of the download.

You could go a step further and submit a PR that uncommented that line in buildkit, but that is probably for another day.

---
Tags: developer, civicrm-buildkit, civibuild
---


title: Buildkit and php binary is called php56

text:
# Question
Title: Buildkit and php binary is called php56
I have buildkit installed on my computer however the php command is called php56.

The civibuildkit command fails because it is looking for a command called php.

Is there an easy way I could change the settings in buildkit so it will use the php56 command?

**Solution**

I put a symlink in /home/jaap/php56/php to the php56 binary and then I created a wrapper script.

```
mkdir /home/jaap/php56
ln -s /usr/bin/php56 /home/jaap/php56/php

```

Then I created a script in /home/jaap/bin/civibuild.sh:

```
#!/bin/bash

export PATH="/home/jaap/php56:$PATH"
/home/jaap/bin/civicrm-buildkit/bin/civibuild $@

```

# Answer
I just took a look and the reference to `php` in the bash scripts seems to be hardcoded. I'm assuming there's already a `php` app with a different version, or else you could just put a symlink from `php56` to `php` somewhere in your path. So I think your best bet is to:

* Create that symlink anyway, but don't put it in your default path. E.g. `ln -s /usr/bin/php56 /my/folder/php`.
* Add a line to `civibuild` (or call from a wrapper script) that puts the symlink at the BEGINNING of your path, so it's found before your regular php. E.g. `PATH="/my/folder:$PATH"`.

By putting the symlink in the path only when `civibuild` is called it won't cause interference with your other applications that rely on a different PHP version to run.
> 2 votes

# Answer
Buildkit comes with a configuration file `app/civibuild.conf.tmpl` (that essentially functions as a wrapper script) that you should consider using instead of writing your own.

Copying it to app/civibuild.conf and adjusting the path to suit your needs should do the trick.

You'll still need to manage the symlink (as you and Jon mentioned).
> 0 votes

---
Tags: civicrm-buildkit
---


# Question
Title: How can I configure the automated messages such that when someone sings up to list A they get message A, and for list B, they get message B?
When someone signs up to a Civi mailing list group through a profile or webform, they get sent the default automated subscription confirmation message.

Is there any way of customising that message such that different messages can be sent based on the group/s that are being signed up to?

This looks like it might be a useful way to get around the limitations of CiviCRM in this respect? How to create custom opt-in email for webforms

# Answer
Perhaps turn off the automated sub and then use CiviRules to fire out an email based on which Group you added them to.
> 2 votes

---
Tags: civimail, groups, confirmation
---


# Question
Title: Can I change the text "[CíviMail Draft]" in a language that local users underdtands?
My fellow boardmembers of our marineclub are less familiair with bulk-mailings and concepts. They reply on the draft mail, as if it was the right mail. I think if I change the text "\[CíviMail Draft\]" into some text in local language, I will have a better response. Where and how can I change this text?

# Answer
CiviCRM has a feature called 'Word Replacement' which you can find under Admin \> Customise, or at civicrm/admin/options/wordreplacements?reset=1 which I think is worth trying out.
> 1 votes

---
Tags: civimail
---


# Question
Title: CiviBanking : No valid booking date detected. Not imported!
I am using civicrm extension CiviBanking https://github.com/Project60/org.project60.banking/blob/master/doc/civibanking-getting-started.md I created a record in the table civicrm\_bank\_plugin\_instance, with config data in JSON format where my booking\_date is configured as given below While trying to use the CSV Importer plugin in CiviBanking https://www.example.com/civicrm/banking/import

```
{
  "namespaces": {
    "camt": "urn:iso:std:iso:20022:tech:xsd:camt.053.001.02"
  },
  "probe": "camt:BkToCstmrStmt/camt:GrpHdr/camt:MsgId",
  "rules": [
    {
      "comment": "statement name is MsgId/LglSeqNb",
      "from": "xpath:camt:BkToCstmrStmt/camt:GrpHdr/camt:MsgId",
      "to": "tx_batch.reference",
      "type": "set"
    },
    {
      "comment": "statement name is MsgId/LglSeqNb",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:LglSeqNb",
      "to": "tx_batch.reference",
      "type": "append:/"
    },
    {
      "comment": "statement sequence number",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:LglSeqNb",
      "to": "tx_batch.sequence",
      "type": "set"
    },
    {
      "comment": "IBAN preset for payments",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:Acct/camt:Id/camt:IBAN",
      "to": "tx._IBAN",
      "type": "set"
    },
    {
      "comment": "BIC preset for payments",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:Acct/camt:Svcr/camt:FinInstnId/camt:BIC",
      "to": "tx._BIC",
      "type": "set"
    },
    {
      "comment": "starting time",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:FrToDt/camt:FrDtTm",
      "to": "tx_batch.starting_date",
      "type": "strtotime"
    },
    {
      "comment": "ending time",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:FrToDt/camt:ToDtTm",
      "to": "tx_batch.ending_date",
      "type": "strtotime"
    },
    {
      "comment": "statement currency",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:Bal[1]/camt:Amt/@Ccy",
      "to": "tx_batch.currency",
      "type": "set"
    },
    {
      "comment": "statement starting balance. FIXME: include condition instead of position",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:Bal[2]/camt:Amt",
      "to": "tx_batch.starting_balance",
      "type": "amount"
    },
    {
      "comment": "statement starting balance. FIXME: include condition instead of position",
      "from": "xpath:camt:BkToCstmrStmt/camt:Stmt/camt:Bal[1]/camt:Amt",
      "to": "tx_batch.ending_balance",
      "type": "amount"
    }
  ],
  "payments": {
    "path": "camt:BkToCstmrStmt/camt:Stmt/camt:Ntry",
    "rules": [
      {
        "comment": "booking date",
        "from": "xpath:camt:BookgDt/camt:Dt",
        "to": "booking_date",
        "type": "strtotime"
      },
      {
        "comment": "value date",
        "from": "xpath:camt:ValDt/camt:Dt",
        "to": "value_date",
        "type": "strtotime"
      },
      {
        "comment": "Amount",
        "from": "xpath:camt:Amt",
        "to": "amount",
        "type": "amount"
      },
      {
        "comment": "Currency",
        "from": "xpath:camt:Amt/@Ccy",
        "to": "currency",
        "type": "set"
      },
      {
        "comment": "party IBAN",
        "from": "xpath:camt:NtryDtls/camt:TxDtls/camt:RltdPties/camt:DbtrAcct/camt:Id/camt:IBAN",
        "to": "_party_IBAN",
        "type": "set"
      },
      {
        "comment": "party BIC",
        "from": "xpath:camt:NtryDtls/camt:TxDtls/camt:RltdAgts/camt:DbtrAgt/camt:FinInstnId/camt:BIC",
        "to": "_party_BIC",
        "type": "set"
      },
      {
        "comment": "transaction message",
        "from": "xpath:camt:NtryDtls/camt:TxDtls/camt:AddtlTxInf",
        "to": "purpose",
        "type": "set"
      },
      {
        "comment": "party name",
        "from": "xpath:camt:NtryDtls/camt:TxDtls/camt:RltdPties/camt:Dbtr/camt:Nm",
        "to": "name",
        "type": "set"
      },
      {
        "comment": "party address",
        "from": "xpath:camt:NtryDtls/camt:TxDtls/camt:RltdPties/camt:Dbtr/camt:PstlAdr/camt:StrtNm",
        "to": "street_address",
        "type": "set"
      },
      {
        "comment": "party address",
        "from": "xpath:camt:NtryDtls/camt:TxDtls/camt:RltdPties/camt:Dbtr/camt:PstlAdr/camt:TwnNm",
        "to": "city",
        "type": "set"
      },
      {
        "comment": "party address",
        "from": "xpath:camt:NtryDtls/camt:TxDtls/camt:RltdPties/camt:Dbtr/camt:PstlAdr/camt:Ctry",
        "to": "country",
        "type": "set"
      }
    ]
  }
}

```

and my CSV has data as given below

```
"Datum","Naam / Omschrijving","Rekening","Tegenrekening","Code","Af Bij","Bedrag (EUR)","MutatieSoort","Mededelingen"
"20180212","STICHTING GYM-SUPPORT","NL21INGB111111111","NL76RAB11111111","OV","Bij","100,00","Overschrijving","Naam: STICHTING GYM-SUPPORT Omschrijving: Bestelling Lyme magazine IBAN: NL76RAB11111111"

```

I tried changing type for booking date from "type": "strtotime" to "type": "strtotime:Ymd" but it still gives error. How can I fix it? My civicrm version is 4.6.22

# Answer
Your configuration seems not to be correct. And to me it looks like you have set up a configuration for an XML (CAMT0.53) file and your example looks like a CVS file.

You can use one of the examples from the CSV directory as an example and the tweak it to your needs: https://github.com/Project60/org.project60.banking/tree/master/configuration\_database/importer/csv

Below a configuration which works with the example csv file you provided in the question:

```
{
  "delimiter": ",",
  "encoding": "UTF8",
  "header": 1,
  "defaults": {},
  "rules": [
    {
      "from": "Datum",
      "to": "booking_date",
      "type": "strtotime:Ymd"
    },
    {
      "from": "Datum",
      "to": "value_date",
      "type": "strtotime:Ymd"
    },
    {
      "from": "Naam / Omschrijving",
      "to": "name",
      "type": "set"
    },
    {
      "from": "Bedrag (EUR)",
      "to": "amount",
      "type": "amount"
    },
    {
      "from": "_constant:EUR",
      "to": "currency",
      "type": "set"
    },
    {
      "from": "Mededelingen",
      "to": "purpose",
      "type": "set"
    },
    {
      "from": "Tegenrekening",
      "to": "_party_ba_id",
      "type": "set"
    },
    {
      "from": "Rekening",
      "to": "_bank_id",
      "type": "set"
    }
  ]
}

```

**A few remarks**:

I dont know what would happen if a write-off is present in the file. Is that indicated by a negative amount? Or is the column Bij Af / set to Af.

The name in the *from* part of a rule is the name of the column in the csv file. However there is also a from which sets a constant value to EUR.

The name in *to* part is the name of the field in the CiviBanking transaction. You could define new fields here as you can use existing ones (like booking\_date, value\_date, amount and purpose). The new ones can be used in the configuration of the matchers. However I have not defined any new fields here.
> 2 votes

---
Tags: civibanking
---


# Question
Title: Which contacts in Civi are wordPress user as well?
I have 500 contacts on my CiviCRM groups and also I have 250 users for my WordPress, I am wondering to know is any way to find which one of my civiContacts are in WordPress?

# Answer
> 2 votes
You should be able to search via Adv Search and find a button called CMS User.

---
Tags: wordpress, contacts, user
---


# Question
Title: How can I select all countries to be available for address fields in CiviCRM 4.7?
I am asking this question to clarify the issue raised in this question: Available countries list won't appear when set in Localization

The user interface on the 'Settings - Localization' page (admin/setting/localization) has changed in CiviCRM 4.7. As a result there doesn't seem to be an easy way to select all countries to be available for address fields.

In CiviCRM 4.6 and before you could simply select the whole list of countries and click 'Add' to make them all available. However in CiviCRM 4.7 you appear to have to add each country individually, which is a time-consuming task as there are a large number of countries.

This appears to be a step backwards in terms of the user experience. Is this a bug or am I missing something?

Also the help text for this fields needs updating. It currently reads as follows:

> **Available Countries**
>
> Which countries are available in the Country selection field when adding or editing contact addresses. Profile and Custom 'Country' fields also use this setting. To include ALL countries, leave the right-hand box empty.

In CiviCRM 4.7 there is only one box. There is no right-hand box. If you leave the box blank and click save it will revert to the default country (i.e. 'United States').

# Answer
While a better user interface would be preferable, there IS a pretty decent solution for technical users suggested here: https://civicrm.stackexchange.com/a/10013/12
> 1 votes

# Answer
Yes: There is option to enable other countries.

Go the **Administer-\>Localisation-\>Languages, Currency, Location.**

Now select countries and add them. Now you will see this countries in Registration page.
> 0 votes

---
Tags: localisation, 4.7, settings
---


# Question
Title: Can webform be used to terminate one Case Role and create a replacement?
Scenario:

A case has a Purchasing Partner role. Sometimes that needs to be changed and we want to do so via a webform (from a View with links containing whatever cid1 etc it needs).

My testing shows that if I try with just the cid1 (who is case client) and cid2 (who is existing PP) in the url and add a third cid for the new partner, when we submit the form we hope it will

* terminate the Relationship between cid1 and cid2 (which seems to be how I can do this on a contacts record directly in civi itself and the only way i can approach this on the webform since there is no option to eg specify 'remove existing case role') and
* create a Case Role for cid 3

the outcome is that

* the original relationship between cid1 and cid2 remains untouched, and a new disabled (due to End Date) relationship is created between cid1 and 2
* a new case role and relationship is created for cid 3

Should we be able to do this as webform code stands? Does adding the caseid=x help (i did test that but saw no difference)

# Answer
I just did a simple test and it appears to be working ok. This is what I did (using the latest version of CiviCRM and Webform-CiviCRM):

* Create a simple webform with 2 contacts
* Contact 2 - relationship to contact 1 (sibling) - relationship is active: "User Select"
* Contact 2 "existing contact" field - autocomplete.
* Submit the form with relationship is active: yes
* Observe the active relationship in CiviCRM
* Submit the form with the same 2 contacts, relationship is active: no
* Observe the same relationship in CiviCRM is no longer active. No duplicate relationship created.

EDIT by pmoz: I wanted to make sure that the next time I need this I have clear documentation.

Create the webform with 3 contacts (Case Client, Old Case Coordinator and New Case Coordinator) and 1 ongoing case.

On the Old Case Coordinator Civi-webform settings enable relationships and select Case Coordinator as the relationship to participant and user select for is active.

You do not need to enable relationships on the New Case Coordinator Civi-webform settings. I only enable the existing contact field.

On the Civi-webform Case page, select Update Open cases, and under roles set the case client as contact 1 and the case coordinator as New Case Coordinator (contact 3).

That's it for the Civi -webform settings.

In the webform components, navigate to the Old Case Coordinator edit page and add the case role to prefill the field on the webform.

To access the form use node/111?cid1=*caseclientid*&case1=*caseid*. The form should be prefilled with the case client, old case coordinator and the case type if you have multiple case types.

This is the only combination that I could get to correctly add the relationship within the case.
> 1 votes

# Answer
This is not currently possible so I have opened issue here.
> 2 votes

# Answer
If I understand the issue correctly, it sounds like there's a bug where webform attempts to disable a relationship but instead creates a *new* disabled relationship. This may be due to recent upstream changes in the Civi api - iirc the v3 relationship api is a little odd.
> 0 votes

---
Tags: webform-civicrm, civicase, relationships, roles
---


# Question
Title: Webform CiviCRM, Membership and # of Terms
If we use Webform CiviCRM latest on Drupal 7 and CiviCRM 4.7.x, Paypal WPS, and sell a Membership with 2 terms, Annually, with 2 installments, it should bill them once a year for two years (automatically).

Once the first payment is created, CiviCRM sets their membership end date as two years in the future. So It would be 2/18/2020 if someone paid today.

Question: what happens if they miss their second payment due to the card being declined? Does the membership get canceled on 2/17/2019? Or do they keep their membership, without paying the second annual payment?

Thank you. This question comes up due to the way Webform CiviCRM handles "recurring" payments.

# Answer
> 2 votes
The API we're using to tell CiviCRM to generate this recurring series - is the

```
ContributionRecur API:
$resultRecur = wf_civicrm_api('ContributionRecur', 'create', $contributionRecurParams);

```

I don't know how that API connects with PayPal WPS; one of the $contributionRecurParams is the PaymentProcessor, but I don't have any clients on PayPal WPS - so can't test how well it works for IPN payment processors.

**Here's what to do:** Create a Membership Type with duration: 1day and minimum fee = $1; then do what you describe above (live): purchase 2 terms on your Webform; and pay in 2 installments; That should:

* result in Contact getting the Membership
* result in Contact having a Contribution in his record: $1 receive date today
* result in Contact having a Recurring Series (at the bottom of the Contribution tab) in his record: status: in progress, 2 installments, daily, next scheduled date: tomorrow

**Tomorrow:** \- hopefully - another $1 contribution is generated and the Recurring Series status is updated to completed;

**Update:** you told me that the second $1 payment was indeed processed in PayPal WPS - so that's great; your CiviCRM did not receive the IPN so you had to manually reconcile - that's an issue between PayPal WPS and your CiviCRM \[unrelated to Webform CiviCRM\]

I really don't know how PayPal WPS handles expired/lost/stolen credit cards; and I don't know what business logic/consequences may be attached to a failed recurring payment; For the iATS Extensions we handle different Failed attempts - differently; but what we don't do is add any business logic - as many orgs will have different logic e.g. whether or not memberships should be canceled automatically on a failed recurring contribution.

**Conclusion:** if you setup Membership recurring with CiviCRM native - the code will do some things differently compared to when (we're on the outside - interacting with CiviCRM via the API) you use Webform CiviCRM; I can really only confirm that this is working fine for 4.6 and 4.7 when using an inline payment processor - like our iATS extension; but we've not coded anything specific to iATS about this. Again, we're using the CiviCRM API to create RecurringSeries - it's possible though that the API needs some improving.

---
Tags: civimember, webform-civicrm
---


# Question
Title: Install CiviCRM alone or as Wordpress plugin?
I need your advice. What is the best ? Install CiviCRM alone or as Wordpress plugin ?

I have a wordpres website for a NPO, and I want to manage members with CiviCRM.

We are not big, and will manage approximately 100 members.

I would like to take registration for new members and cotisation (Paypal or Stripe).

There will also be fee-paying events, so I would like to make forms so that members can register for events and pay for them.

I'm afraid about integrate CiviCRM with Wordpress.I don't know if from a management point of view it wouldn't be better to have it separately.

What is your opinion on that?

Thanks a lot !

# Answer
> 5 votes
You cannot install CiviCRM standalone, you need to install it as part of a Drupal / WordPress / Joomla! / Backdrop CMS system.

# Answer
> 5 votes
As has already been said, CiviCRM has to be installed on top of a CMS such as Drupal, WordPress or Joomla. I have it on WordPress and it's working fine. Some documentation about how to install on WordPress can be found here at https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/ It can work using the same database as WordPress but, my advice would be to have 2 separate databases.

As you will see from the documentation, It wont install like a conventional WordPress plugin. There is considerable more work to do. If you are concerned about installing it as part of your main Wordpress site, you could perhaps open a subdomain such as members.mydomain.org with its own wordpress installation, and then install CiviCRM on the subdomain with appropriate links. However this would require much more Admin.

Hope this helps.

# Answer
> 4 votes
CiviCRM can not be installed *alone*. You CAN install it on a server within the CMS Drupal, Joomla!, Wordpress or Backdrop but actually not make it available to the internet. You then have in actual fact probably what you would call CiviCRM *alone*.

If you do not need a website I would certainly recommend you to do that as it is much more secure :-)

# Answer
> 0 votes
Lots of people have already chimed in - but I wanted to share that you should not be concerned with integrating CiviCRM with your Wordpress installation. The only concern you may have is if you don't want the Administrators of your Wordpress site to have access to CiviCRM. However - you can setup permission in Wordpress and create different roles using the Members plugin and you can manage permissions there and within CiviCRM.

---
Tags: wordpress, installation
---


# Question
Title: Why does setting my Directories or Resources not save?
On some sites Civi gives users a warning about 'Directory Paths: Make them portable' and the warning directs them to the Directories page to fix them.

The user makes the changes and saves them, but may find the System Status warning remains - so they go back and look in Directories and guess what, the changes have not been saved

Why does this happen and what can be done to reduce the frustration of this?

# Answer
> 1 votes
The changes are not being saved because the settings are being overridden by civicrm.settings.php

To improve this we have made a PR to help clarify to the user what is happening by providing a pop up message saying "Fields Inputs loaded as 'readonly' as they have been set (overridden) in civicrm\_settings.php"

---
Tags: civicrm.settings.php
---


# Question
Title: webform event registration - no receipts from contribution page?
I have a webform that registers one participant for multiple events. payment is handled through one specific contribution page, that is set to send receipts.

But it sends nothing. Other webforms (like member fees) do send receipts.

* could it be a problem that there are multiple items on the webform ?
* am i supposed to enable 'online registration' for one, or all, of the events, and send receipts from there instead ?

I would prefer a single receipt for the whole transaction, but sending 10 receipts is better than sending none ...

# Answer
Yes you need to enable receipts on all the events as the receipt being sent is an event registration receipt rather than the contribution page receipt if the webform involves event registration.

When registering for multiple events via a webform only one email gets triggered even if you are signing up to multiple events. If I recall correctly it just used the email from the first event. We had to make a lot of changes to the event template to get the correct information in the email and created a custom extension in order to provide more tokens for the event template. We will attempt to get these bundled up so we can release this back to the community

We also made a change via a custom extension to allow you to turn on and provide the details for the email without having to turn on online registrations for the event.
> 1 votes

# Answer
To issue civicrm native event participant receipts when using webform civicrm module you must enable receipting for both the Contribution page as well as the Event page (in your CiviCRM) - for all Events; And yes that will be a number of receipts.

If multiple receipts is a problem - you can use webform native receipting + use CiviRules and custom (last) contribution tokens - to send a transaction rceipt;

If you’d like to try that - Register for CiviCamp Calgary - it's a form where orgs can sign up 3 participants for up to 4 events/each in on one page;

**Added:** webform civicrm works with CiviCRM via it's API: from adding donations to memberships and sign up for multiple events all in one form and using sendConfirmation api to send out the native CiviCRM event receipts; CiviCRM gets a little confused we're able to get all that in one payment \[natively that's not possible\] - reason why I tend to dispatch my own receipts with Rules/Message templates and some custom tokens;
> 2 votes

---
Tags: civievent, civicontribute, webform-civicrm, receipts, 4.7.27
---


title: How can I extend the search builder

text:
# Question
Title: How can I extend the search builder
I'm looking to extend the search builder to accept a custom value which then can be used to filter the search results. Thanks in advance.

# Answer
> 1 votes
Create custom fields under Administer - Custom Data and Screens - Custom fields.

Make sure you check the box for "is this field searchable".

Then the field should be available for searching in Advanced Search or Search Builder.

---
Tags: 4.7
---


title: Integration with G Suite

text:
# Question
Title: Integration with G Suite
I wonder what is the best configuration for CiviCRM if it is supposed to serve an organisation which uses G Suite? Can I use any hosting company that handles Drupal?

# Answer
> 4 votes
**Choosing a webhost:**

Sounds like you are new to CiviCRM and you are starting a new site. To your second - easier question - you can use any host for CiviCRM - if you have the budget - I would go with an expert that can implement everything to meet your needs on a VPS. Otherwise if you are on a tight budget - these are two shared web hosts that I recommend (In No Particular Order):

1. CiviHosting \- Supporting Partner of CiviCRM
2. Namecheap Stellar Business \- Not a partner of CiviCRM

I have used the above for different deployments and have been very happy. Alternatively - these are the requirements for CiviCRM, choose whatever hosting company you are comfortable or have experience with and make sure they meet the requirements for CiviCRM, any extensions you may use, and your CMS. In addition - I would recommend that you choose a web host that supports PHP imagemagick library.

**CiviCRM - GSuite Integration**

There has been a bit of work on this and I recommend you check these extensions out:

1. CiviGmail Integration with Gmail
2. Google Groups CiviCRM Integration
3. Google Apps Sync
4. CiviCRM - Google Script/Drive Integration
5. Integrating Email Client into CiviCRM
6. Inbound Email

Lastly - with all external integration - outlook, gmail, etc. - you should focus on getting your staff to use CiviCRM first. For example, don't place an item on your google calendar first - add it to Civi first - then you can have events assigned to you sync or be sent to your calendar. I am not sure what Google Drive integration would even look like - can't help you there.

Ill also say this - take baby steps - and you will learn how best to implement this for your organization. Maybe tight integration with G Suite isn't the best use of your time - maybe creating an interface in which Civi and G Suite are easily accessible from each other is an easier option. In the end - practice makes perfect.

---
Tags: civimail
---


# Question
Title: How do you set the displayed text of a custom field ("view-only")?
I am using Drupal and I have an extensions that I am running this code on.

I've seen several threads attempting to help with this. I haven't found any that really make it clear. From what I understand I set a hook, then update the value.

I have a custom field that I have set to "view only". This particular field is on a contact. When the contact is viewed I want the text I have generated to display for that field.

How do you actually do this? What hook? How do I update the displayed value? What specific API call?

# Answer
You might want to expand the question a bit and be more specific about your custom field. What does it depend on? When should it be updated?

To the general question:

A view-only custom field is just like any other custom field, except that you can't edit it via the GUI. It exists in the database and is displayed just like a 'normal' custom field.

Which hook you need depends on what should cause an update to the custom field value. If for example, it is based on the contact's name then you could use hook\_civicrm\_post so that your code gets run after the name is created or updated.

For setting the value, you can use the Contact.create API as the field is on a contact. Specify the existing contact id and the new value of the custom field - eg:

```
$result = civicrm_api3('Contact', 'create', array(
  'sequential' => 1,
  'id' => 203,
  'custom_2' => "M",
));

```

Your code relates to writing the value of the custom field to the database, not the display of it.

\[Update\] Here's a quick demo:

* create a new custom field group for contacts
* add an Integer field 'Set me'
* add a view-only Integer field 'Doubled'

Put the following in an extension and adjust the groupid and fieldids to match your values:

```
function viewonlydemo_civicrm_custom($op, $groupID, $entityID, &$params) {
  $groupid_to_watch = 15;
  $fieldid_to_watch = 31; // 'Set me' field
  $fieldid_to_set = 32; // 'Doubled' field
  if ($groupID == $groupid_to_watch) {
    foreach ($params as $cf) {
      if ($cf['custom_field_id'] == $fieldid_to_watch) {
        civicrm_api3('Contact', 'create', array(
          'id' => $entityID,
          'custom_' . $fieldid_to_set => $cf['value'] ? $cf['value'] * 2 : "",
        ));
      }
    }
  }
}

```

When you change 'Set me' you should see 'Doubled' updated to be twice the value of 'Set me'.

Be aware that the hook will be called when you update 'Set me', and also by the API call in the hook so you need to be careful not to get stuck in a loop.
> 1 votes

---
Tags: custom-fields, hooks
---


# Question
Title: Contact Names showing up on Google Search even when they are not public
All of our contact first name & last name are appearing visible on our site even when they have requested not to be. It is pulling their contact id and putting it into a public directory drupal view. We have an opt-in public directory that shows certain fields when the radio button is "Yes". We've been able to hide the email address, etc. but the name should not even appear unless we give it permission. Anyone else has this problem? Thanks in advance.

# Answer
I took a look at this. The pages that listed individuals' names were pulling the Display Name for the page title via `civicrm_entity`. So even when though the filtering was working correctly to not display the View, the name would still come through. It was corrected by giving a generic title and moving the name into the View.
> 1 votes

# Answer
Oh shoot - it sounds like your View is not properly filtering out the "not Yes" radio value.

1. Check your View carefully -\> especially the Filter section
2. Post your View here (screenshot -\> not of the data -\> but the Views config screen itself)
3. Look for and at other Pages/Blocks generated by your View \[if there are more than one -\> it's possible that Google has indexed Contact Names on that page View only\]
> 0 votes

---
Tags: drupal, contacts, drupal-views
---


# Question
Title: Can't select Mailing Template in CiviMail after upgrading CiviCRM to 4.7.30
After upgrading Civi to 4.7.30 the Template dropdown on the New Mailing screen has disappeared - the only option is to save to a new one:

We upgraded from Civi 4.7.29 to 4.7.30 on Joomla 3.8.5, but the same happens in a pristine 4.7.30 on Wordpress 4.9.4 environment.

Opening the Javascript Console in Firefox gave me this:

It appears a ~/crmMailing/Templates.html is missing, called from Templates.js in the same folder /civicrm/ang/crmMailing/.

Anyone able to reproduce this?

Thanks for your help,

# Answer
This is a bug in 4.7.30. See CRM-21759. There is now a patch for it, or you can wait for 4.7.31.

> in 4.7.30 there is a call to a non existent angular templates file. This means that the Message Templates section of a new mailing doesn't load.
> 1 votes

---
Tags: civimail, message-templates
---


# Question
Title: How to send an email message with CiviMail to a certain % of contacts in a group
I want to send a newsletter twice (or more) a week to certain contacts in a group, but I don't want to send people more than one e-mail per week. In this scenario, what I need is to limit the number of people whom I will send the first newsletter (let's say the 50% of the group) just to keep some users to send them the second newsletter (let's say the other 50%).

Is there any option to limit the number of recipients in CiviMail? Or any other ideas?

Thanks!

# Answer
> 2 votes
CiviMail allows you to *exclude recipients of a previous mailing*. I think this is what you need.

Lets say you are sending to the *Newsletter Subscribers* group:

1) Send your *First mailing* of the week out as normal

2) When you are ready to send the *Second mailing*, choose the same newsletter group as last time, but choose to exclude recipients of the *First mailing*.

In your case, it sounds like you want to send out a message to an arbitrary 50% (now I understand why you asked the question!) or so of the first group. Unfortunately, there is no *limit to 50%* button. One approach would be to create another group based on *Newsletter subscribers* that contains ~50% of your initial group and use this for the first mailing. Another approach might be to do an **Advanced Search** with the criteria a) Newsletter recipients b) some other criteria that splits the group in half (a smart group for users with an odd contact ID, maybe?!) and then choose the action **Email - schedule/send via CiviMail**.

Whichever method you choose, once the first email has been sent, you can use the approach mentioned above to send the second email.

# Answer
> 0 votes
Only for you to make sub-groups from your main target group and send it to each sub-group in turn. Perhaps if you explain 'why' you want to limit it you may get a more useful answer if your actual concern is about avoiding the mail crashing and burning.

---
Tags: civimail, email
---


# Question
Title: What is the better CiviCRM Administration theme on Drupal to apply shoreditch extension?
Can you suggest me the better CiviCRM Administration theme to apply shoreditch extension? For my experience is Adminimal but I'd like your opinion. Thanks

# Answer
I found that Shoreditch had the least issues using the Seven Administration theme but I prefer Adminimal for my drupal side. My settings are as follows:

* Administration Theme - Adminimal (also used for editing and creating content)
* CiviCRM Administration Theme - Seven
* CiviCRM Public Theme - Our main theme
> 2 votes

# Answer
Shoreditch uses bootstrap so you might try the Drupal bootstrap theme, or a subtheme that is based on it.
> 1 votes

---
Tags: extension, shoreditch
---


title: Need to enlarge the field box size

text:
# Question
Title: Need to enlarge the field box size
I've created some custom fields for a profile and would like one of them to have a larger text box than the default size. How do I enlarge the field box size?

# Answer
> 5 votes
I usually change the field type to be 'Note' when I need a longer length - then you specify length and number of lines - and it's expandable - if the user needs to add more they can resize the box.

---
Tags: custom-fields
---


# Question
Title: Can we add Register buttons to the public-facing Events Listing page?
Is there a way to add **Register** buttons to the public events listing page (.../civicrm/?page=CiviCRM&q=civicrm/event/ical&reset=1&list=1&html=1)? I'd like a website visitor to be able to choose to register from this listing, rather than having to go first to the event detail page to find the **Register** button.

Using 4.7.29 on Wordpress 4.9.2.

Thanks for any help!

# Answer
> 2 votes
Despite it not really being best practice, but lacking programmers to work thru the API, I created a customized template directory structure as described here. Then I made a copy of the ICalendar.tpl file (the default one found at **wordpress/wp-content/plugins/civicrm/civicrm/templates/CRM/Event/Page**), placed it in **wordpress/wp-content/civicrm-custom/CRM/Event/Page**, and made the modifications to show the registration links (see here for how to locate your template file). The modifications were:

* Before the table begins, add the line `{* CNP force registration links *} {assign var="registration_links" value=true;}`. This is because the registration link code is actually already there but hidden by default (unless you use the Shopping Cart mode - then it becomes an "Add to Cart"). This sets it to show by default.
* In the table's header row, the line `{if $registration_links}<th>{ts}Register{/ts}</th>{/if}` is good as is.
* In the body of the table, I modified the existing IF as so: `{if $registration_links}<td><a {* CNP orig was href="{$event.registration_link}" *} href="{crmURL p='civicrm/event/register' q="id=`$event.event\_id`"}" >{$event.registration_link_text}</a></td>{/if}`.
* I also moved that link column to be the 2nd column on the event listings page, but that's a matter of personal choice.

Afterwards, remember to add this custom template path in CiviCRM at **System Settings, Directories, Custom Template Directory** (my path was `[cms.root]/wp-content/civicrm-custom/`).

# Answer
> 1 votes
Perhaps this file is worth checking: civicrm/templates/CRM/Event/Page/DashBoard.tpl; you may want to have a customized version of the template and put something like a piece of code below into an appropriate place of HTML markup:

`<a href="{crmURL p="civicrm/event/register" q="reset=1&id=`$id`"}" title="{ts}Register now{/ts}">{ts}Register now{/ts} </a>`

Please do not forget to follow all CiviCRM guides regarding custom templates creation.

---
Tags: civievent, online-registration, button
---


# Question
Title: Need to search for the contacts who's email greeting or Addressee fields have been left blank
When trying to send out mass emails, there are contacts (members) who's email greeting or addressee fields have been left blank in their contact information. Is there a way to search for all these individuals and have them on a list, that way I can go through and add their email greeting? Trying to make sure that emails sent out to the public do not start with... "Dear \___," and are more personable. Thank you.

# Answer
> 2 votes
IF you use Search Builder you should be able to build a query like Contacts + Addressee + Is Null

Ditto for 'email greeting'

Good luck

---
Tags: email
---


title: Delivery mail status - unknown

text:
# Question
Title: Delivery mail status - unknown
Is the delivery mail status 'unknown' a case of Civi not having sent the mail out at all and is still effectively in the queue to send?

Having lots of problems sending bulk mailing e.g. where only 30 out of 78 emails are successful and the rest set to unknown (as opposed to legitimate bounces)

# Answer
Please check this related question Unknown mailing status on few mailings recipients to check if it fits to your case.

What version of civicrm do you use?
> 1 votes

---
Tags: civimail, email, mailing
---


title: how do I use phpcbf?

text:
# Question
Title: how do I use phpcbf?
When I run civilint in the build kit I get a long report which ends with this line:

`PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY`

Well that sounds great! Where is this mythical `phpcbf` and how do I use it?

When I ran it with just the name of the file it really broke things!!

# Answer
> 2 votes
The phpcs/phpcbf standard in use is a modified Drupal standard, so you call the standard of "Drupal": `phpcbf --standard="Drupal" filename.php` However, if you ALSO have unmodified copies of the Drupal standard installed, the trick is to make sure that you're calling the correct version of phpcbf. For instance, I get this: `mycomputer» which phpcbf
/home/jon/local/civicrm-buildkit/bin/phpcbf` If your default phpcbf isn't the one installed with `civicrm-buildkit`, make sure to specify the full path to the one that is.

If that doesn't work: `civilint` is a script. So you can edit it in a text editor. In the latest version, line 179 reads: `xargs $BINDIR/phpcs --standard="$PHPCS_STD" < "$TMP/php.txt"` Add an "echo" into it like so: `xargs echo $BINDIR/phpcs --standard="$PHPCS_STD" < "$TMP/php.txt"`

Run civilint again: `civilint myfile.php` Instead of outputting the result of `phpcs` it should instead show the command it WOULD have run. In my case, it's: `/home/jon/local/civicrm-buildkit/bin/phpcs --standard=/home/jon/local/civicrm-buildkit/vendor/drupal/coder/coder_sniffer/Drupal fastactionlinks.php`

Change `phpcs` to `phpcbf` and run that command: `/home/jon/local/civicrm-buildkit/bin/phpcbf --standard=/home/jon/local/civicrm-buildkit/vendor/drupal/coder/coder_sniffer/Drupal fastactionlinks.php`

**Note** Don't forget to remove the `echo` when you're done!

# Answer
> 1 votes
One use of `phpcbf` is as a way to automatically format (or'beautify' the code you write in your editor (providing your editor supports it).

For example, Atom supports `phpcbf` via the beautify package.

Buildkit provides a wrapper (or two) around `phpcbf` set up with appropriate defaults. You can find it in the civicrm-buildkit/bin directory. Specifying that your editor use this file will ensure that your code is 'beautified\` the CiviWay.

In my case, I set the phpcbf executable to be `/home/michael/src/civicrm-buildkit/bin/phpcbf-civi` in Atom's *Settings \> Packages \> Atom Beautify \> Executables*.

# Answer
> 0 votes
fixing code automatically is hard, and can break things indeed.

I'm assuming you ran this one?

https://github.com/squizlabs/PHP\_CodeSniffer/wiki/Fixing-Errors-Automatically

if you git diff the file you "fixed", what did you see?

---
Tags: php, coding-standards
---


# Question
Title: Very slow mailing job with Mosaico with Imagick and UrlFilter.php errors
I have a problem where my mailing is being sent crazy slow, like hundred emails an hour. At the same time my cpu utilization is of the charts where apache2 is using like 99% of the cpu. In the php error.log I'm getting the message for UrlFilter.php repeating for the line 62,63,64,65,and 68.

```
Maximum execution time of 30 seconds exceeded in /var/www/mysite/sites/default/files/civicrm/ext/uk.co.vedaconsulting.mosaico/CRM/Mosaico/UrlFilter.php on line 62

```

These are the affected lines:

```
    62 $htmls = preg_replace_callback(';(\<img [^>]*src *= *")([^">]+)(");i', $callback, $htmls);
    63 $htmls = preg_replace_callback(';(\<img [^>]*src *= *\')([^">]+)(\');i', $callback, $htmls);
    64 $htmls = preg_replace_callback(';(\<table [^>]*background *= *")([^">]+)(");i', $callback, $htmls);
    65 $htmls = preg_replace_callback(';(\<table [^>]*background *= *")([^\'>]+)(\');i', $callback, $htmls);
    66 // WISHLIST: CSS backgrounds?
    67 return $htmls;
    68 }

```

My CiviCRM log gets flooded with the following message:

```
Jan 18 15:30:08  [info]
$Fatal Error Details = array(3) {
  ["message"]=>
  string(116) "The path is a directory: /var/www/mysite/sites/default/files/civicrm/persist/contribute/images/uploads/static/"
  ["code"]=>
  NULL
  ["exception"]=>
  object(ImagickException)#114 (7) {
    ["message":protected]=>
    string(116) "The path is a directory: /var/www/mysite/sites/default/files/civicrm/persist/contribute/images/uploads/static/"
    ["string":"Exception":private]=>
    string(0) ""
    ["code":protected]=>
    int(1)
    ["file":protected]=>
    string(104) "/var/www/mysite/sites/default/files/civicrm/ext/uk.co.vedaconsulting.mosaico/CRM/Mosaico/Utils.php"
    ["line":protected]=>
    int(514)
    ["trace":"Exception":private]=>
    array(10) {
      [0]=>
      array(6) {
        ["file"]=>
        string(104) "/var/www/mysite/sites/default/files/civicrm/ext/uk.co.vedaconsulting.mosaico/CRM/Mosaico/Utils.php"
        ["line"]=>
        int(514)
        ["function"]=>
        string(11) "__construct"
        ["class"]=>
        string(7) "Imagick"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(1) {
          [0]=>
          string(91) "/var/www/mysite/sites/default/files/civicrm/persist/contribute/images/uploads/static/"
        }
      }
      [1]=>
      array(6) {
        ["file"]=>
        string(104) "/var/www/mysite/sites/default/files/civicrm/ext/uk.co.vedaconsulting.mosaico/CRM/Mosaico/Utils.php"
        ["line"]=>
        int(324)
        ["function"]=>
        string(11) "resizeImage"
        ["class"]=>
        string(17) "CRM_Mosaico_Utils"
        ["type"]=>
        string(2) "::"
        ["args"]=>
        array(4) {
          [0]=>
          string(0) ""
          [1]=>
          NULL
          [2]=>
          int(0)
          [3]=>
          int(0)
        }
      }
      [2]=>
      array(4) {
        ["function"]=>
        string(10) "processImg"
        ["class"]=>
        string(17) "CRM_Mosaico_Utils"
        ["type"]=>
        string(2) "::"
        ["args"]=>
        array(0) {
        }
      }
      [3]=>
      array(4) {
        ["file"]=>
        string(67) "/var/www/mysite/sites/all/modules/civicrm/CRM/Core/Invoke.php"
        ["line"]=>
        int(275)
        ["function"]=>
        string(14) "call_user_func"
        ["args"]=>
        array(1) {
          [0]=>
          array(2) {
            [0]=>
            string(17) "CRM_Mosaico_Utils"
            [1]=>
            string(10) "processImg"
          }
        }
      }
      [4]=>
      array(6) {
        ["file"]=>
        string(67) "/var/www/mysite/sites/all/modules/civicrm/CRM/Core/Invoke.php"
        ["line"]=>
        int(84)
        ["function"]=>
        string(7) "runItem"
        ["class"]=>
        string(15) "CRM_Core_Invoke"
        ["type"]=>
        string(2) "::"
        ["args"]=>
        array(1) {
          [0]=>
          array(14) {
            ["id"]=>
            string(3) "443"
            ["domain_id"]=>
            string(1) "1"
            ["path"]=>
            string(19) "civicrm/mosaico/img"
            ["title"]=>
            string(24) "Integration with Mosaico"
            ["access_callback"]=>
            string(1) "1"
            ["access_arguments"]=>
            array(2) {
              [0]=>
              array(1) {
                [0]=>
                string(14) "access CiviCRM"
              }
              [1]=>
              string(3) "and"
            }
            ["page_callback"]=>
            array(2) {
              [0]=>
              string(17) "CRM_Mosaico_Utils"
              [1]=>
              string(10) "processImg"
            }
            ["breadcrumb"]=>
            array(1) {
              [0]=>
              array(2) {
                ["title"]=>
                string(7) "CiviCRM"
                ["url"]=>
                string(16) "/civicrm?reset=1"
              }
            }
            ["is_public"]=>
            string(1) "1"
            ["is_ssl"]=>
            string(1) "0"
            ["weight"]=>
            string(1) "1"
            ["type"]=>
            string(1) "1"
            ["page_type"]=>
            string(1) "0"
            ["page_arguments"]=>
            bool(false)
          }
        }
      }
      [5]=>
      array(6) {
        ["file"]=>
        string(67) "/var/www/mysite/sites/all/modules/civicrm/CRM/Core/Invoke.php"
        ["line"]=>
        int(52)
        ["function"]=>
        string(7) "_invoke"
        ["class"]=>
        string(15) "CRM_Core_Invoke"
        ["type"]=>
        string(2) "::"
        ["args"]=>
        array(1) {
          [0]=>
          array(3) {
            [0]=>
            string(7) "civicrm"
            [1]=>
            string(7) "mosaico"
            [2]=>
            string(3) "img"
          }
        }
      }
      [6]=>
      array(6) {
        ["file"]=>
        string(69) "/var/www/mysite/sites/all/modules/civicrm/drupal/civicrm.module"
        ["line"]=>
        int(448)
        ["function"]=>
        string(6) "invoke"
        ["class"]=>
        string(15) "CRM_Core_Invoke"
        ["type"]=>
        string(2) "::"
        ["args"]=>
        array(1) {
          [0]=>
          &array(3) {
            [0]=>
            string(7) "civicrm"
            [1]=>
            string(7) "mosaico"
            [2]=>
            string(3) "img"
          }
        }
      }
      [7]=>
      array(2) {
        ["function"]=>
        string(14) "civicrm_invoke"
        ["args"]=>
        array(2) {
          [0]=>
          &string(7) "mosaico"
          [1]=>
          &string(3) "img"
        }
      }
      [8]=>
      array(4) {
        ["file"]=>
        string(39) "/var/www/mysite/includes/menu.inc"
        ["line"]=>
        int(527)
        ["function"]=>
        string(20) "call_user_func_array"
        ["args"]=>
        array(2) {
          [0]=>
          &string(14) "civicrm_invoke"
          [1]=>
          &array(2) {
            [0]=>
            string(7) "mosaico"
            [1]=>
            string(3) "img"
          }
        }
      }
      [9]=>
      array(4) {
        ["file"]=>
        string(31) "/var/www/mysite/index.php"
        ["line"]=>
        int(21)
        ["function"]=>
        string(27) "menu_execute_active_handler"
        ["args"]=>
        array(0) {
        }
      }
    }
    ["previous":"Exception":private]=>
    NULL
  }
}

Jan 18 15:30:08  [info] $backTrace = #0 /var/www/mysite/sites/all/modules/civicrm/CRM/Core/Error.php(456): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/mysite/sites/all/modules/civicrm/CRM/Core/Invoke.php(55): CRM_Core_Error::handleUnhandledException(Object(ImagickException))
#2 /var/www/mysite/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
#3 [internal function](): civicrm_invoke("mosaico", "img")
#4 /var/www/mysite/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#5 /var/www/mysite/index.php(21): menu_execute_active_handler()
#6 {main}

```

Restarting apache fixes the problem temporarily. The mails get sent as they should the errors stop, but the problem is reoccurring couple of weeks when I'm sending my next mailing. Is my system missconfigured in some way?

I'm using CiviCRM 4.7.27 on Drupal 7.56 with Matt Wire's Mosaico 2.0-beta3-mjwconsult3

# Answer
> 0 votes
I have found the workaround for my problem. If you change the setting in my CiviCRM instance to send mailings in batches, by setting Mailer Batch Limit (to let's say 100 mailings every one or two minutes) this problem disappears.

I guess that system gets overwhelmed when trying to process n URLs in couple of thousands emails, at the same time.

---
Tags: civimail, email, php, mailing, mosaico
---


# Question
Title: Contribution Reports and disabled Financial Types
What is the expected behaviour for Contribution Reports in regard to disabled Financial Types (for example, a Financial Type that was used some years ago but is not used for current contributions)?

* Should the FT for contributions of a Financial Type that has been disabled show up in the reports?
* Should we be able to run a report with a Financial Type that is disabled as a filter?

I would expect the answers to be yes and yes, but I'm not sure if everyone shares that assumption. At least currently, the functionality seems to be no and no (the contribution shows up but the FT column is blank; the filters only allow active FTs), so I'm wondering if it's a bug or if it's meant that way.

# Answer
I'll go with "Yes" and "Often". This is a long-standing issue that extends beyond financial types and reports. It's also searches, and almost anything that can be disabled.

An elegant solution might require some thinking through. My suspicion is that we'll need a new database field to distinguish these two use cases. You definitely DO want some disabled option values not to be searchable. I'm not sure if you want to ever not have them appear though.
> 1 votes

---
Tags: civicontribute, civireport, financial-types
---


# Question
Title: Issues while geocoding Brazilan addresses with Google API on version 4.7
Geocoding is not working for my addresses, I tried everything I could find on the web.

We are using the CiviCRM version 4.7 with Wordpress 4.9.4. We are adding contacts mainly using the REST API.

I have Google geocoding setup with an valid and tested API Key.

My current address format is the default one, but my **parsing is disabled**.

```
{contact.address_name}
{contact.street_address}
{contact.supplemental_address_1}
{contact.supplemental_address_2}
{contact.supplemental_address_3}
{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
{contact.country}

```

When I run the scheduled job, it just says that it processed hundreds of contacts, but none of them was geocoded, displaying no errors at all.

Job params:

```
geocoding=1
parse=0
start=0
end=500
throttle=0

```

*I have also tried with throttling.*

Job Log:

```
Summary
Finished execution of Geocode and Parse Addresses with result: Sucesso (Endereços Avaliados: 483 Endereços Geodificados: 0 )
Details
Parameters raw (from db settings):
geocoding=1
parse=0
start=0
end=500
throttle=0

Parameters parsed (and passed to API method):
a:6:{s:7:"version";i:3;s:9:"geocoding";s:1:"1";s:5:"parse";s:1:"0";s:5:"start";s:1:"0";s:3:"end";s:3:"500";s:8:"throttle";s:1:"0";}

Full message:
Finished execution of Geocode and Parse Addresses with result: Sucesso
(Endereços Avaliados: 483
Endereços Geodificados: 0)

```

Also, when I add a new contact.. even if it has a valid address, it also doesn't work.

Can someone help me? I am really confused.

OBS: I have tried the OSM extension, but only 7 of 500 addresses were geocoded.

# Answer
I have fixed the issue!

It seems that Google API does not support restricting DNS in server geocoding mode, I have created a new API key with IP restriction.

Beware people, it can cause you headaches.
> 2 votes

---
Tags: wordpress, geocoding
---


# Question
Title: How to export civievent participant list to a csv file?
How can I add the ability to export to a csv file? Right now the only export option on the actions menu is to a Microsoft Excel file.

# Answer
What version of Civi are you using?

Under Events \> Reports \> Participant List, Mine shows "Export CSV" as an Action Option

Under Search \> Find Participants, it just says "Export List", But when I export it I get a CSV file.

But even if you get a .xls or other Excel file you can always save it as a .csv in Excel. If you do not have Excel, then run it through an online file converter. You can even open the Excel file in Google Sheets and then download it as a csv to convert it.
> 1 votes

# Answer
Pls be specific about the route you used to get where you are seeing this, and the wording you see or attach a screenshot. I checked on demo and under Adv Search and under Find Participants i do not see where it specifies the download is an Excel document.
> 0 votes

---
Tags: civievent, export, csv
---