# Question
Title: Shortcode and permissions for WordPress publicly searchable member directory
This is a fairly broad question: a client wants to have a publicly searchable member directory. So I'm looking at some old questions, such as Creating a public Members directory with CiviCRM in Wordpress using Profiles and Creating a public Members directory with CiviCRM in Wordpress using Profiles and shortcode with no luck.

Is there a shortcode for a publicly (not as member and not logged in) searchable member directory? *(I have told the client this has privacy implications.)*

This is currently being used but returns no results:

`[civicrm component="profile" gid="11" mode="search" hijack="0"]`

But not showing search results may be a result of no permissions for the anonymous user, as I read in one of the linked questions. I've given anonymous users the capabilities for profile listings and forms and profile listings in Administer \> WordPress Access Control. I've set up a Smart Group and a profile, outlined on https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/ . But that doesn't help.

Using: WP 5.2.4 CiviCRM 5.17.5

# Answer
> 2 votes
This problem turned out to be a Javascript error in the console:

`SyntaxError: expected expression, got '<' on civicrm:1`

A plugin must have been dumping in Javascript in the header or footer, and once it was deactivated, CiviCRM could render the search results in Javascript.

---
Tags: wordpress, civimember, search
---


title: Read only fields for interviewing

text:
# Question
Title: Read only fields for interviewing
I'm setting up a walklist for volunteers to interview people through civicampaign/civisurvey. While they are conducting interviews, I'd like it so that there is a read only field, address, that is listed. I made it a custom profile that includes address as a read only field, but when conducting a survey, only some addresses are read only, but others are editable. I'm unsure why some are read only and some aren't. Can anyone give some advice? Thanks!

# Answer
I found out the issue. The reason that some of them were read only and some weren't was due to a bad import. It seems like the Contacts that were having those issues, had more than 1 empty Supplementary Addresses. There would be 1 Main Address with it geocoded and filled in, but there would be like 4 empty address entries. Removing all the invalid supplementary addresses fixed the issue. Not too sure why those addresses would mess up the results but hey, at least it got fixed!
> 2 votes

---
Tags: wordpress, civicampaign, civisurvey
---


# Question
Title: Translation report field "Primary address?"
When you choose a report, i.e. Constituent Summary you have the Column "Primary Address?" That can not be translated because is it not in any po-file. There is "Primary Address". In CRM/Report/Form.php : ts('Primary Address?')

# Answer
> 0 votes
UPDATE: This should be available for translating in transifex now as per the recent announcement in the chat translation channel. This was updated today: https://lab.civicrm.org/dev/translation/blob/bb10330a29b701e898dd41ff062e6dd53075f512/po/pot/report.pot#L2162

---

It looks like that was only fixed in the code about 5 months ago (see here) so may not have moved into transifex yet. I'm not sure what the schedule is.

Probably the best place to ask language questions is at https://chat.civicrm.org in the Translation channel.

# Answer
> 0 votes
I think that i did my post on the wrong site. I used the last time, some time ago, the old site with jira, and this site is more for questions than for issues. For issues the right site wil be: lab.civicrm.org/groups/dev/-/issues (gitlab)

---
Tags: translation
---


title: May Notes contain emoji graphics?

text:
# Question
Title: May Notes contain emoji graphics?
I'm using Civi 5.18.3 on a demo site. I am trying to add the text of a Twitter bio as a new Note for a Contact, and it is not saving. The bio text contains these characters:

```
National Volunteer & Distributed Organizing Manager for
@WorkingFamilies . #WFP4theMany @ http://WFP4theMany.org & http://WFP2020.org RT ≠ endorsement. TEXT WFP TO 738674

```

The User Guide doc page here does not specify if Notes must be only plain text characters.

# Answer
> 3 votes
There is a patch to support the character encoding necessary: https://lab.civicrm.org/dev/core/issues/339.

The issue is whether to support older character sets for folks who can't/won't switch over. One position is that it's not a big ask for users to upgrade, but difficult for the developers to support both; the other position is that it forces an update that some folks can't make, or that their database is too big to convert without going offline for several hours.

The "support the new encoding only" patch has been written; this will move forward either when a) someone writes a patch that supports both encodings, or b) folks decide it's OK to force folks to switch.

# Answer
> 1 votes
The short answer is No, Notes (apparently) may not contain emoji graphics.

When I removed the 'megaphone' emoji from the above text, the rest of the Note text saved successfully.

---
Tags: contacts
---


# Question
Title: What is the 'Associated Entity' in a CiviVolunteer Project?
I'm using CiviCM version 5.18.3 with Drupal 7.67 . I've installed CiviVolunteer.

At `~/civicrm/vol/#/volunteer/manage` I see a test Project I have created in a list. In that row, next to Volunteer Project is a column named `Associated Entity`. The `Associated Entity` has a value of `--`.

I have related the Project to a Campaign, and the Project has an Owner, a Manager, and a Beneficiary.

So what value should be listed under `Associated Entity`?

# Answer
> 1 votes
So apparently `Associated Entity` means `Associated Event`, if and when a volunteer Project is created as part of an Event. I've created an Issue to change `Associated Entity` to just `Event`.

---
Tags: civivolunteer
---


# Question
Title: Trouble with Mattermost verification email
I know there were several questions about this already, but I couldn't find any steps to resolve it myself. I'm trying to create a Mattermost account via chat.civicrm.org for the first time, and it's not sending the verification emails even though it says it has. Any help is appreciated!

# Answer
There were problems with the email notifications and the issue should now be resolved. If the problem persists, you can email me at: mathieu at civicrm.org.
> 2 votes

---
Tags: mattermost
---


title: Contact Image in Message Template

text:
# Question
Title: Contact Image in Message Template
I want to insert a contact image into a message template. This will be used to print PDF "info sheets" about contacts to include their photo.

Simply inserting the token `{contact.image_URL}` of course only displays the image URL in the PDF.

If I use something like `<img src="{contact.image_URL}" width="100" height="100">` I get a missing image icon. I have tested with contacts that do have contact images.

How can I go about this?

# Answer
> 2 votes
Also, depends on your setup, but if the message is going external, then the img src url would need to refer to an externally web hosted image file.

Apologies if I'm stating the obvious.

---
Tags: contacts, pdf, images, contact-image
---


title: What is best practice for updates?

text:
# Question
Title: What is best practice for updates?
Core updates are frequent, so are some extension updates.

How frequently do people update? All of them or only sometimes?

Do you always up date to the latest version or pick one that is a little older?

How do you know the update is not loaded with dodgy code or ransomware?

Working with highly sensitive data and I am concerned about the vetting process for updates.

Thanks in advance

# Answer
There is no clear policy for this. But it is good to put CiviCRM behind a firewall/VPN. That way you can only access civicrm if your ip address is allowed. For connecting external websites/application you can then use CiviProxy.

This way CiviCRM and your data are secure, no matter whether your CiviCRM installation has securty issues.

My personal advice is that when it aint broken don't fix it. So that also means for updates, if your system still works and you don't need any new features keep it as it is. We are brainwashed by Android and Windows which install updates automatically and so we all think it is good to install updates regularly however I cannot think of a rationale for that.

Also I do think that installing updates is not much work from a technical perspective. But with every update you have test your whole setup and see if nothing ain't broken. And this test work is usually quite a lot of work.

My experience is also that the organization using CiviCRM is also changing over time. And that those business changes might also require some (minor) changes in your CiviCRM setup/configuration. And usually when doing those kind of things it might be worth to also update to the latest version.
> 3 votes

# Answer
Regarding tampering of the release files to insert malware, there are md5 and sha checksums listed at sourceforge that you can compare to the downloaded file, e.g. https://sourceforge.net/projects/civicrm/files/civicrm-stable/5.19.1/
> 0 votes

---
Tags: best-practice
---


# Question
Title: API Explorer 4 under Joomla and Windows/IIS gives fields like {{ ts('CiviCRM API v4') }}
I am running a development system under Joomla and IIS with CiviCRM 5.19.1 (5.19.0 had the same issue). When using API Explorer 4 I get windows like this.

Under LAMP, the window makes sense.  Any suggestions?

# Answer
> 1 votes
The problem was caused by IIS Request Filtering Hidden Segments. By default IIS has a hidden segment called bin. API Explorer 4 attempts to get JavaScript from

.../administrator/components/com\_civicrm/civicrm/bower\_components/google-code-prettify/bin/

Notice the bin folder name. Removing the bin Hidden Segment cured the problem. Security isn't an issue - the web site is only accessible in the local environment.

---
Tags: api, developer, windows
---


# Question
Title: Are virtual community tools (groups, mailinglists, profiles, "friends", ...) playing nice with CiviCRM?
We are looking into integrating online community tools (like buddypress, peepso):

* members can open closed and public groups
* groups have mailinglist functionality, ideally posts to the group can be created by email and send out by email (such that the users don't have to learn a new platform, if they do not want to)
* members can set up events
* members can see / are informed over events in their proximity
* members can set up profiles, have virtual friends and exchange messages

Ideally, the system would play together with CiviCRM. Has anyone thought about such a thing? I found only some non-integrated approaches to sync CiviCRM groups to mailman.

# Answer
> 3 votes
This isn't strictly a CiviCRM question in my opinion, but here goes anyway...

> members can open closed and public groups

This is built in to BuddyPress - check the box labelled "Enable group creation for all users" in BuddyPress settings.

> groups have mailinglist functionality, ideally posts to the group can be created by email and send out by email (such that the users don't have to learn a new platform, if they do not want to)

I'm not sure about *creating* posts by email, but this plugin will do *replies* by email:

https://github.com/r-a-y/bp-reply-by-email

It is pretty technical but there's good documentation.

BP Groups CiviCRM Sync will keep BuddyPress group members synced with CiviCRM groups such that there are CiviCRM Mailing Groups per BuddyPress group - see the plugin page for details.

FWIW, I also use a combination of CiviCRM WordPress Profile Sync and BP xProfile WordPress User Sync to keep users' BuddyPress, WordPress and CiviCRM profiles in sync.

> members can set up events

The CUNY fork of my BuddyPress Event Organiser plugin (which has been developed way beyond where I left it) enables BuddyPress group events and group calendars. You could also install CiviCRM Event Organiser to sync those events to CiviCRM.

> members can see / are informed over events in their proximity

I don't know of anything that does this out-of-the-box, so it sounds to me like a custom plugin which uses (say) Event Organiser (which has a premium proximity add-on) and BuddyPress Group Email Subscription or CiviCRM to notify users.

> members can set up profiles, have virtual friends and exchange messages

Again, this is all default BuddyPress functionality.

# Answer
> 0 votes
AFAIK this does not exist out of the box nor do I know of an extension that does this. At the same time I would imagine it would be possible to develop an extension that performs what you mention as the CiviCRM API caters for most of the stuff (not sure how the virtual friends would work but at a glance a relationship sounds right).

My recommendation would be to prototype the desired functionality with the API explorer, to see if you can cater for the situations that are likely to occur. That would mean that you would need to work out what CiviCRM entities to use in advance. Sounds like Contact, Group, GroupContact, Events, Participant, Relationship and potentially Mailing (or use the Email API extension).

---
Tags: civievent, extension, groups, community, buddypress
---


title: Automated New Individual Merge

text:
# Question
Title: Automated New Individual Merge
I am entering "CContacts \> Find and Merge Duplicate Contacts \> Add Rule for Individuals". I'm adding rules to prevent creating new individual records for both phone and email. However, no matter how much I try, the new individual records still open, and the system does not give any warning. I only had a question about it, but the instructions there didn't help me solve this problem. This is probably related to the number system we use in our country. However, the problem was not solved as a result.

---

We do not use CiviCRM in a different project. We use a very simple system written by one person. If there is an individual record and the system is trying to create a new record with the same information, it automatically outputs the old record. This prevents double registration. Is there a way to do this.

We do not use an area code initially when adding the phone number to the profile. It does not start with 0 and writes it all together. A total of 10 characters have been written. Like 5321234567.

---

Let me give you some details for this.

For example; name: conqueror Surname: ates Phone number: 5321234567

I created a new individual with knowledge. After me, a new individual is created with exactly the same information as above. I want to stop this. In this way, the recording should not be prevented or the old ID should be written on the screen or the information on that ID should be shown automatically even if the registration has been made. Otherwise, I have to combine more than 500 pairs of individual records per week.

---

And now I get the following error.

backTrace

0 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Error.php(381): CRM\_Core\_Error::backtrace() 1 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller.php(833): CRM\_Core\_Error::fatal("İstenen web sayfası yüklenemedi. Web sitesi web tarayıcısı ayarlarından çerez...") 2 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller.php(828): CRM\_Core\_Controller-\>invalidKeyCommon() 3 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller.php(312): CRM\_Core\_Controller-\>invalidKey() 4 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller.php(206): CRM\_Core\_Controller-\>key("CRM\_Contact\_Form\_Contact", TRUE, FALSE) 5 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Controller/Simple.php(66): CRM\_Core\_Controller-\>\__construct("Kişi Ekle", TRUE, NULL, "CRM\_Contact\_Form\_Contact", TRUE, FALSE) 6 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Utils/Wrapper.php(78): CRM\_Core\_Controller\_Simple-\>\__construct("CRM\_Contact\_Form\_Contact", "Kişi Ekle", NULL, FALSE, TRUE, FALSE, FALSE) 7 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(263): CRM\_Utils\_Wrapper-\>run("CRM\_Contact\_Form\_Contact", "Kişi Ekle", (Array:1)) 8 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM\_Core\_Invoke::runItem((Array:13)) 9 /public\_html/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM\_Core\_Invoke::\_invoke((Array:3)) 10 /public\_html/administrator/components/com\_civicrm/civicrm.php(121): CRM\_Core\_Invoke::invoke((Array:3)) 11 /public\_html/administrator/components/com\_civicrm/civicrm.php(40): civicrm\_invoke() 12 /public\_html/libraries/src/Component/ComponentHelper.php(402): require\_once("/public\_html/administrator/components/com\_civicrm/civicrm.php") 13 /public\_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("/public\_html/administrator/components/com\_civicrm/civicrm.php") 14 /public\_html/libraries/src/Application/AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com\_civicrm") 15 /public\_html/libraries/src/Application/AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication-\>dispatch() 16 /public\_html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication-\>doExecute() 17 /public\_html/administrator/index.php(51): Joomla\CMS\Application\CMSApplication-\>execute() 18 {main}

---

I'm not the only one with this problem. There are a lot of people who are experiencing the same problem as me and reporting the problem. Why is there no improvement in this matter?

Why is my Unsupervised Individual Deduplication rule failing to stop duplicate creation?

# Answer
Thanks for asking a question like this.

Merging of duplicate of contacts is a difficult process for a system like CiviCRM. Becasue CiviCRM is used in different countries and in different organizations. Each one has it is own rules who is a duplicate.

1. The first difficulty is to identify who is a duplicate.
2. The second difficulty is to merge those contacts.

Regarding 1, say if you record households and household members and you identify duplicaties with the same e-mailaddresses. What to do about people in a household who share an e-mail address?

Regarding 2, say for example you two records, one is called joe smith, the other Joe D. Smith. The difference is the capital and the middle name. Which one do you want to keep and which one could be overiden.

What I am trying to say it that the answers to those question differ from organization to organization using CiviCRM.

That said some automation is possible but that also depends on how contacts are entered into your system. Do they come from a CSV file, manually entered by a back office user, from a webform, from a contribution form or from the API. If you use a webform or a contribution form you can set up deduplication rules and use those rules in your webform or contribution form. If entered manually the user will receive a popup indicating possible duplicate contacts.

My experience, as a CiviCRM consultant, is that many organizations have some kind of manual process to once in a while manually merge duplicate contacts.
> 1 votes

---
Tags: contacts, joomla, duplicate-contacts, individual
---


# Question
Title: Different profile based on membership selection
When our members join or renew online, I want to use a different profile to capture different information depending on the membership type. For example, if someone selects an "Educator" membership, I'd like to use custom fields to capture the programs they offer and the audiences they reach - but those fields aren't relevant to the other membership types, so I don't want to use the same profile for all types.

Is there a way to select a certain profile based on the membership type selected, or do I need to create separate contribution pages for the different membership types?

I am using CiviCRM 5.18.2 with WordPress.

# Answer
> 1 votes
I recommend taking a look at the Caldera Forms CiviCRM plugin. This will allow you to use conditions within a caldera form to show and hide fields (and make them required) based on the type of membership selected. The plugin contains multiple processors to allow you to add contacts, memberships, etc. in CiviCRM.

The plugin is available in the WordPress repository. Here is a link to the plugin info: https://github.com/mecachisenros/cf-civicrm

# Answer
> 0 votes
I am not really familiar with CiviCRM and Wordpress. But one direction of looking for a solution is that use Contribution Pages for membership signup and renewals and then use a different contribution page for different membership types.

---
Tags: wordpress, civimember, profile, contribution-page
---


# Question
Title: Default values for Preferred language, email format, email greeting, postal greeting and addressee
we are in the process of setting up CiviCRM and we are importing a lot of records from a previous CRM. when we do the import, the preferred language defaults to english. how do we get this to be a null value unless we import a value?

Same question for email format, email greeting, postal greeting and addressee. All are showing a default value. Null would be more accurate.

# Answer
How do you import? Via csv upload?

If your import scenario is complex by any means I would strongly recommend to make use of the api. This approach helps you to get control over all aspects of field mapping.

Yours // nielo
> 1 votes

# Answer
Since the default language is set in the db (but i am having trouble finding that in the UI) you could set it so there is no default.

in the db look for civicrm\_option\_value

filter for option\_group\_id = 75, find the one set to is\_default = 1 and set it to 0
> 0 votes

# Answer
I know it is a very old remark but you better could first look up the good option\_group\_id bij selecting it in option\_group with name = 'languages'.

I don't believe this is working this way. With no inherit CMS-language (and single lingual) I get the default language is English - VS with on the screen 'Languages, Currency, Locations' the Default Language : Nederlands.
> 0 votes

---
Tags: import, default-settings
---


# Question
Title: Display different profile (in Drupal) based on CiviGroup (or tag)
Thanks in advance Drupal 7 / CiviCRM 5.13

I am looking for a way to display different profiles, in Drupal, based on different groups that the contact belongs to in Civi (or based on different tags if that works).

Specifically, I have people to be appointed as members (they already have accounts both in Drupa and Civi), to be given a yes/no field (I accept the appointment) plus some extra bio stuff they need to fill in. I do not want users that are not members to see that under their profile, in Drupal.

I hoped to have to Civi profiles, one for "appointment to be" and one for everyone else and trigger which one is displayed, based on Civigroups (or tags).

Any ideas?

Best A.

# Answer
> 2 votes
Mostly when working with complex form requirements in Drupal, folk are opting to use webform\_civicrm as the flexibility it provides opens up many new options.

For example in your case you could use Webform Conditionals to determine which fields show based on the choice of Membership Type (or type an existing user has if they are logged in or using a checksum). HTH

---
Tags: contacts, profile, drupal-views, smartgroups
---


# Question
Title: Multiple Memberships on one contact ID, different orgs?
A member has a life membership and now wants to add a second membership (a magazine subscription). I believe previously you needed to create a dummy organisation to house ("own") the second subscription. Is this still the case ?

Thanks.

# Answer
> 1 votes
Yes I believe that is still the standard workaround.

---
Tags: civimember
---


# Question
Title: Membership tokens missing after upgrade to civi v5
I would like to use the membership.fee token in a mail. However, it isn't displayed in the list of tokens the mailer view offers and it's not working when I use it manually. I saw a suggestion to use a membership context, but I'm not sure what that means exactly. I've tried "Find members", saving the list of contacts to a dynamic group and selecting them as recipients, but this won't work either.

I'm running civicrm 5.18.0

# Answer
> 1 votes
You may find this provides the missing feature you need

https://civicrm.org/extensions/nzcofuzioncivitoken

# Answer
> 0 votes
I think this is a "context" thing meaning that when you are emailing, even from "Find Memberships", you are emailing to CONTACTS and so are in the contact context, whereas for example if you do a "Find Memberships" and then from the actions menu choose "Print/Merge Document", you are in MEMBERSHIP context and can choose tokens like Membership Fee.

---
Tags: civimail, civimember, tokens
---


# Question
Title: Get "Unable to extract symbolic link" error message when trying to install civicrm 5.19.1 module in Drupal
I installed Drupal 7 and when I try to add the civicrm (version 5.19.1) module into it, I get next error message on the web interface of Drupal:

> Unable to extract symbolic link {temporary://update-extraction-0a20b282/civicrm/vendor/pear/log/README.rst}

and the module is not installed. I would like to know how to solve this.

# Answer
UPDATE: This is now fixed in 5.31.

---

I see what you're saying. Thanks for reporting. I've never used that alternative before. I believe it's coming from this line where it excludes the docs folder so the symlink is no longer valid.

https://github.com/civicrm/civicrm-core/blob/5.19.1/distmaker/dists/common.sh#L166

I've made a ticket at https://lab.civicrm.org/dev/core/issues/1393
> 3 votes

---
Tags: drupal
---


# Question
Title: "You cannot transfer or cancel as you are not currently registered for this event."
CiviCRM 5.16.3 Logged on as Administrator Can not click 'Transfer or Cancel' on event tab or detail of event registration without receiving error: "You cannot transfer or cancel as you are not currently registered for this event"

Ideas?

edit - we installed this (https://github.com/lcdservices/biz.lcdservices.moveparticipant) in a pinch and it worked.

Also noticed that this is a pending/pay-later event registration, could that be why?

# Answer
> 3 votes
> Also noticed that this is a pending/pay-later event registration, could that be why?

Yes, according to the latest code till 5.19.1, I see transfer or cancel is only possible for participant with status = `Registered`

---
Tags: civievent
---


# Question
Title: CiviCRM selectively generating receipts/invoices for contribution pages
This could be an email deliverability issue - but I thought I would check to see if there is more I can do to troubleshoot. Many people are saying they are not receiving receipts and invoices when they make a contribution via our Drupal webform - but it seems to work when I do it.

I am on 5.18.2 - Is there any way to see a copy of the receipt that was generated?

Or tips on troubleshooting?

# Answer
> 3 votes
You could consider using the Transaction Mail extension as this creates an Activity for all such outgoing mail

or

since receipts are presumably going out because you have selected a civi Contribution page that has Receipting turned on why not BCC yourself on that

---
Tags: civicontribute, email, receipts
---


title: GDPR , opt in webforms

text:
# Question
Title: GDPR , opt in webforms
I want to send out an email to all customers currently sitting in our ‘newsletter ‘ group asking them to opt in / subscribe to being in new 'Event & training group / Updates & information group...etc. We are getting ready for GDPR / 25th May.

What would be the easiest way to do this? Has anyone got any examples of how they have done this were customers have just clicked on a links and they have then automatically ended up in a group?

Thanks Anna

# Answer
Mmm... Unless I'm mistaking your intention, this should be very easy to do with a webform, if you are using Drupal with Civicrm and the Civicrm webform integration module.

As far as I know, if your email asks them to go to your webform by clicking a link that contains the 'contact hash' token, then when they get to the webform it will be prefilled with their details.

In the Civicrm section of the webform config screens you can choose which Civicrm info to include, and also whether to add the user to a Civicrm group when the form is submitted. (You'd need to make your group in Civi before configuring this part of the webform.)

Then the user simply clicks 'submit' and they will be added to your group.

Hope I've got the right end of the stick here and that this is helpful.
> 2 votes

# Answer
I would do this with a webform and configuration to select the group automatically on a trigger. To do this with a separate link would require a little amount of coding.
> 1 votes

# Answer
I wrote an extension that ALMOST does this - and I started work to support "add to group with a single click from email" in my Fast Action Links extension. I never added that feature because it was an unfunded side project. It would probably take 2-3 hours to complete.

If you're a coder, you can download the extension and see the commented-out "token" section. It would need to be finished, plus a call to `hook_civicrm_apiWrapper` for security purposes.
> 1 votes

# Answer
I think you can do this using CiviCRM Profiles. Ish.

1. Create a profile (Administer » Customise Data and Screens » Profiles)
2. Open the profile's Advanced Settings and look for "Add new contacts to a group" and select the new mailing group you want to invite people into.
3. Save the profile then add any fields you want the user to be able to see/edit.
4. Now you have a form that users can use to add themselves into your database and onto your new list, you just need to provide people with a special link in your email. Read on.
5. In the profiles page, identify the ID of the new profile, which will be a number. I'm going to pretend mine is 123 for this example.
6. Draft a mailing. Add a link with whatever text you want and craft a URL like this (Drupal example, enjoy adjusting for WP/joomla at your leisure):

```
https://yourdomain.com/civicrm/profile/edit?reset=1&gid=123&id={contact.contact_id}&gid=123&{contact.checksum}

```
7. Send yourself a test mailing and open the link in a not-logged in browser ( e.g. use a "Private Browsing" or "Incogneto" tab. You should see a form and if you submit that form you should be added to your new group.

## Yes but I want a one-click solution!

Yes I didn't miss that, which is why I said this was an "ish" solution. You could achieve this, if really necessary, by including custom javascript on the profile form that automatically submitted the form as soon as the page loads.

This sounds quirky but has other advantages too, well, one, which is that it saves your link from being "clicked" by spam/virus checkers that may scan the email before it lands in the recipients inbox. If it was a 'open this link and something gets changed' then these automated systems would mess it up for you quite a lot. But these automated systems won't execute javascript, so that way you get the functionality without the side effects. I believe this is how (and why) Mailchimp do this on their unsubscribe links.

Q. How to include javascript on a particular profile form? Try `hook_civicrm_buildProfile`

(EDIT: corrected the magic link above - it was previously taking you to just a view, not an edit form.)
> 1 votes

# Answer
I think this what you are looking for, but some tweak is required to work properly with CiviCRM 5.x

https://github.com/veda-consulting/webform\_gdpr

Use it along with the GDPR extension.
> 0 votes

---
Tags: email, gdpr
---


title: Adding Social Network Buttons to Events

text:
# Question
Title: Adding Social Network Buttons to Events
How do you add a new social network button such as Instagram to a Event as part of its publication? Currently what is available is Twitter, FB and LinkedIn. Thanks.

# Answer
> 1 votes
What CMS are you using? Because it is not possible to add new social buttons. The reason for asking for the CMS is that you can create views in Drupal and so your own Event Page and then it is easy to add additional social buttions

---
Tags: social-media
---


# Question
Title: Prettifying forms - what is the best we can use as a theming for pure civi forms?
There's Shoreditch ext - bit seems it is only limited to backend admin UI?

Are there any other alternatives for contribution and event registration pages?

# Answer
Alternative could be the Haystack theme (although I have not tried what it does to event or contribution pages): https://github.com/mattwire/civicrm-haystacktheme
> 1 votes

---
Tags: contribution-page, theme
---


# Question
Title: Can I status override an auto renewing membership?
A client wants to status override a recurring membership but cannot do so.

Here are a couple of membership edit screens:

The first is for a membership that ***is*** auto renew and has an associated recurring contribution:

The second is for a membership that ***is not*** auto renew and does not have an associated recurring contribution:

It seems that for some reason, we don't allow people to status override recurring memberships.

Can anyone shed any light on why this is not possible?

Is there a business case for it being set up in this way.

I did have a look at the code but nothing obvious jumped out at me. I'm guessing someone out there knows the thinking behhind this.

# Answer
This appears to have been implemented as a deliberate 'feature' to prevent users from making changes to memberships linked to recurring payments. See this related question for details:

How can you edit the end date for an auto-renew membership?

A fix has been merged into CiviCRM core (PR #15540) that fixes this issue for the end date field. This fix should be included in CiviCRM 5.20.
> 2 votes

---
Tags: civimember
---


# Question
Title: How can I export a zip code with the suffix in the same field?
I send my addresses to a mailing house for a bulk magazine mailing. They require my zip+4 in one field. I can fix this in LibreOffice or Excel, but I have to be careful that my spreadsheet app doesn't eat the zip codes' leading zeroes. Is there a better solution?

# Answer
I wrote this little snippet of code in a larger extension, which will automatically append the postal code suffix to postal codes when exporting postal codes:

```
/**
 * On export, append the postal_code_suffix to the postal_code.
 */
function tweaks_civicrm_export(&$exportTempTable, &$headerRows, &$sqlColumns, &$exportMode, &$componentTable, &$ids) {
  // Primary postal code will have a sqlColumns['postal_code'] = 'postal_code'.
  // Non-primary will have the location type appended - e.g. work_postal_code.
  foreach ($sqlColumns as $key => $column) {
    if (substr($key, -11) == 'postal_code') {
      // Primary postal_code.
      if ($key == 'postal_code') {
        // Update the primary postal code.
        $sql = "UPDATE $exportTempTable " .
        "LEFT JOIN civicrm_address ca ON $exportTempTable.civicrm_primary_id = ca.contact_id AND ca.is_primary = 1 " .
        "SET $exportTempTable.postal_code = IF(ca.postal_code_suffix, CONCAT(ca.postal_code,'-',ca.postal_code_suffix), ca.postal_code)";
        CRM_Core_DAO::singleValueQuery($sql);
      }
      // Non-primary postal code
      else {
        $locationType = str_replace('_', ' ', substr($key, 0, -12));
        $sql = "UPDATE $exportTempTable " .
        "LEFT JOIN civicrm_address ca ON $exportTempTable.civicrm_primary_id = ca.contact_id " .
        "JOIN civicrm_location_type clt ON ca.location_type_id = clt.id AND clt.name = '$locationType' " .
        "SET $exportTempTable.$key = IF(ca.postal_code_suffix, CONCAT(ca.postal_code,'-',ca.postal_code_suffix), ca.postal_code)";
        CRM_Core_DAO::singleValueQuery($sql);
      }
    }
  }
}

```
> 2 votes

---
Tags: export, mailing
---


# Question
Title: Is there a function or extension that shows one view in a case containing the content of the Summary and Details fields of all activities
We are seeking to show, preferably in the management of a case not as a separate report, a list of the Summary and Details fields of all activities in a case. The goal is to promote the use of cases. Currently, our user resistance focuses on the lack of a view where all of the text written by self or others on the case is tucked away inside each activity and not visible as one cohesive narrative. Ideally, the texts could be edited from this new view. The rows in the view would probably be in chronological order.

# Answer
> 1 votes
The print report link on manage case might satisfy the need to see a comprehensive list in a view. It's not editable though.

---
Tags: civicase, user-experience
---


# Question
Title: How to approach fuzzy dates (e.g. contact deceased in month/year)?
I was posed this question recently and wonder how others would approach this issue:

> We often are told someone died in (for example) December 2018, but no day. The system won't let me enter it without a day. I don't like to just put 31st or whatever, because we do get queries from people looking up ancestry info. Is there any way to set it so it will take just a month/year combo without the date?

*Thinking out loud*: I could set up a custom date field that only shows month and year (but then what about the case where they are only told the year, not the month...). I suppose I could do separate fields, a dropdown for month and a text field for year. And then maybe if I use the new contact layout editor extension, I can even move these fields into more logical places than usual?

# Answer
> 1 votes
In this case the organizational needs were indeed for a simple custom text field attached to Individuals.

---
Tags: dates
---


# Question
Title: Users with 'view own cases' permission can't access resolved cases
I have noticed that users with the 'view own cases' Drupal permission are getting an access denied error when they try to access their own resolved cases. They can access open cases no problem.

Users with 'view all cases' can access resolved cases as normal.

Is this intentional? I've tried to replicate on the demo site, but wasn't able to create a user with that set of permissions. Unfortunately, while I've tried to make sense of the code referenced in the backtrace, it's beyond me.

Running CiviCRM 5.19.1 and latest Drupal.

```
Nov 16 00:39:28  [error] $Fatal Error Details = Array
(
    [message] => You are not authorized to access this page.
    [code] =>
)

Nov 16 00:39:28  [debug] $backTrace = #0 .../public/sites/all/modules/civicrm/CRM/Core/Error.php(385): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 .../public/sites/all/modules/civicrm/CRM/Case/Page/Tab.php(72): CRM_Core_Error::fatal("You are not authorized to access this page.")
#2 .../public/sites/all/modules/civicrm/CRM/Case/Page/Tab.php(188): CRM_Case_Page_Tab->preProcess()
#3 .../public/sites/all/modules/civicrm/CRM/Core/Invoke.php(290): CRM_Case_Page_Tab->run((Array:4), NULL)
#4 .../public/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#5 .../public/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#6 .../public/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:4))
#7 .../public/includes/menu.inc(527): civicrm_invoke("contact", "view", "case")
#8 .../public/index.php(21): menu_execute_active_handler()
#9 {main}

```

# Answer
> 2 votes
UPDATE: Will be fixed in 5.36.0

---

https://lab.civicrm.org/dev/core/issues/1400

You can work around it by changing this line: https://github.com/civicrm/civicrm-core/blob/5.19.1/CRM/Case/BAO/Case.php#L541

from

`if (empty($params['status_id']) && ($type == 'upcoming' || $type == 'any')) {`

to

`if (empty($params['status_id']) && ($type == 'upcoming')) {`

but that might cause closed cases to start appearing or being counted differently than now.

---
Tags: civicase
---


title: Installing Civicrm on Drupal 7 site

text:
# Question
Title: Installing Civicrm on Drupal 7 site
I have uploaded Civicrm 5.12.0 on a Drupal 7.65 site via FTP. After upload was completed, I attempted the installation script, but nothing happened. Is there a step that I forgot to do or wasn't aware of?

# Answer
> 0 votes
Look at the error log file of the webserver (probably apache2). If you see an entry like `PHP Warning: POST Content-Length of 21426352 bytes exceeds the limit of 8388608 bytes in Unknown on line 0` you will have to adapt the /etc/php/7.2/apache2/php.ini file in order to rise the value of two parameters to v.gr. 32M:

```
upload_max_filesize = 32M
post_max_size = 32M

```

Don't forget to restart apache after updating php.ini at the command line interface by issuing:

```
sudo service apache2 restart

```

# Answer
> 0 votes
Installing CiviCRM on Drupal 7 guide is on the following link https://docs.civicrm.org/sysadmin/en/latest/install/drupal7/ . From your question is quite difficult to tell what you have done or what the issue can be (did you check Drupal db settings, system requirements etc)? What are the error messages if any? Did you test locally before attempting in production?

---
Tags: drupal, installation
---


title: Civicrm menu lost for admin

text:
# Question
Title: Civicrm menu lost for admin
When I'm logged in as Admin, I can't access anymore to CiviCRM menu from Drupal 7

I still access through navigation to https://domain.net/civicrm/admin/ but no main menu anymore. Our users that have another profile can see it.

I've tried with different administration themes but the issue remains the same.

I'm using Drupal extension "Administration menu" but until now it worked fine.

Any idea to help me work again :-( ?

# Answer
Found. It came from the overlay module in Drupal :-( I needed to deactivate it.
> 3 votes

---
Tags: drupal, menu
---


title: report on price list options?

text:
# Question
Title: report on price list options?
I'd like to create a report that summarizes the number of registrations for each price set selection. I'd like to quickly show how many people registered at each price level. I know I can create a report of all the people who chose a price option and then get the number at the bottom. However, I have many options and would like a nice summary similar to this:

* A1: 27
* A2: 12
* B1: 17
* B2: 2
* ...

This seems like a reasonable thing to do, but I don't see any way to do it. Possible? Can someone point me in the right direction?

# Answer
I would give our Extended Report extension a go since it offers Price Set Line Item reporting options

https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport
> 2 votes

---
Tags: civievent, participants
---


# Question
Title: How to use Word upload in Print/Merge function?
Can anybody kindly help me to understand how to use the Word upload function in the Print/Merge window?

I have tried to insert the CiviCRM tokens into the Word file before uploading the file and doing the Print/merge -\> does not associate all tokens to the values from the database.

I have tried create a Message Template with a Word uploaded file, then to go to the Print/Merge function -\> does not associate all tokens to the values from the database either.

Therefore my questions: how should the tokens be inserted into the Word file before doing the upload? Is there any special code that needs to be used? If anybody can provide User-feedback after using this function, I will be very grateful.

Thanks for your help.

(Drupal 7.67 & Civi 5.7.0)

*(this is a more precise question, following the question and the answers from last week in Stackexchange : How do use upload function for mail merge with Word)*

# Answer
> 1 votes
Which of the various Print/Merge windows are you using - ie what steps do you take to get to that window? (Similar-looking print/merge windows use different code so the functionality is not consistent.)

It sounds like you are doing the right thing - ie create a Word doc with the tokens and upload it.

Do you mean that some of the tokens work, or none at all? If so, which ones do and don't work? It depends on the context as to which tokens are available so I'd start by creating a simple test using the on-screen composer to check that the tokens are being evaluated correctly in that context. If they don't work there, they won't work in a document.

Be aware that the functionality with documents can produce poor results if there is complex formatting since the document is converted to html and so depends on the capability of the conversion library. You might find that converting to ODT produces better - or worse - results compared to DOCX.

In a recent project, we concluded the best option was to do the conversion to html outside of Civi and paste it into the on-screen composer window using the 'Source' button.

# Answer
> 0 votes
Here's what I did that worked for me:

1. Created an MS Word doc that just had this in it: `Hello, {contact.display_name}`
2. Did a Find Contacts search.
3. Selected a couple contacts.
4. Chose Print/Merge Document from the Actions dropdown.
5. Beside "Use Template" I clicked the browse button and uploaded my Word doc.
6. Entered an Activity Subject.
7. Chose "MS Word" as the output document type near the bottom.
8. Clicked "Download Document".

The resulting document had the display names of the selected contacts one per page.

If that doesn't work for you then perhaps you can give more info about what you have in your MS Word document that you are uploading or if the steps you're doing are any different.

---
Tags: upload, printmerge
---


# Question
Title: What low-cost third-party mailing platforms work well with CiviMail?
Mandrill users are being notified that the service is being integrated into Mailchimp, and you must have a paid account by the end of April.

What alternatives are out there that work well with CiviCRM? Some that look interesting might be Sendgrid, Mailjet or Mailgun.

Any experiences with these?

# Answer
SparkPost is great, but the UI is a little lacking, but as far as sending is concerned, it works great. My company also just developed and extension for processing bounces from SparkPosts in Civi.

https://github.com/proexchange/com.pesc.sparkpost
> 8 votes

# Answer
I was asked to post a roundup of a variety of alternatives--the writeup is here: https://civicrm.org/blog/andrewhunt/alternatives-to-mandrill

Tommy also suggested I build a calculator to compare costs.

\[edit follows\] We also have some clients using SendGrid, which has worked fairly nicely. An extension by IMBA is available on GitHub (mentioned in the blog post), but at the moment (May 2016) it only works for Drupal. I made some changes to it in order to work for some WordPress clients, and I offered it as a pull request for them. If you are using WordPress or Joomla, you should look at \[my fork\] instead. I'll try to remember to update this when things change.
> 7 votes

# Answer
We are using mailjet and it works fine, but they are VERY cautious (eg. they threatened to block us because our spam rate came around 0.08% in three separate mailings, where we are normally \< 0.01%) . The main reason we use mailjet is that it's based in the EU, so for privacy reason and with the problems around the safe harbour agreement, we preferred them.

One other organisation doing lots of mailing is using sendgrid, but not sure what's the status of integration with civi
> 3 votes

# Answer
# Mailgun

## MailGunny extension

@netzih points out another MailGun extension (by @artfulrobot) which looks more up to date, uses current webhooks and other non-legacy settings. I will do some testing with it, too:

> https://github.com/artfulrobot/mailgunny

## Team Singer extension

I have set up a Mailgun account and done some testing, and the SMTP functionality seems to work fine.

I've recently installed this extension on a site that is using MailGun and preliminary results look good:

> https://github.com/blackbricksoftware/uk.teamsinger.civicrm.mailgun

(This is a fork of https://github.com/teamsinger/uk.teamsinger.civicrm.mailgun which hasn't been updated recently, but may be in the future according to the author).

The setup is a little more complex than (for example) the Sparkpost or Mandrill usage where you just input the API information, but perhaps that will be improved upon in future versions. This version requires you to set up a "Mail Account" for Bounce Processing using the "MailgunDB" protocol, and then have the "Fetch Bounced Messages" scheduled job active. "Legacy Webhooks" need to be defined in MailGun. Sending is done using basic SMTP credentials.
> 2 votes

# Answer
We use sendgrid, simple to setup for the entire server. It is free if you have less than 12,000 emails a month. We are moving to 4.7 the sendgrid extension does not support it yet.
> 1 votes

# Answer
A good alternative is SendinBlue, because they offer a free plan allowing you to send up to 9k emails/month forever. And the same account can be used to send both transactional emails and newsletters. Plus they have some interesting plugins (WP, PrestaShop,..)
> 1 votes

# Answer
SparkPost has pretty amazing pricing and is apparently the only alternative Mandrill refer to. Anyone have experience with them?
> 0 votes

# Answer
I've been very happy with the services of CiviSMTP https://www.civismtp.com/drupal/pricing
> 0 votes

---
Tags: civimail, mandrill, mailserver, mailchimp
---


# Question
Title: On CiviContribute forms within WP, the behavior of predefined amounts and an "Other Amount" input box is broken
For CiviContribute forms in WordPress that have predefined fixed amounts ($25, $50, $100, ...) and that also allow an "Other" amount, it seems that the javascript that is supposed to clear the fixed amount radio buttons when an "other" amount is filled in is broken. I'm using Civi v.5.4.0 in WordPress v.4.9.9.

The malfunctioning behavior is also reported here, but the CMS is not indicated. A couple javascript solutions are posted— but this should work out of the box with Civi, right?

Looking under the covers, I see there are javascript functions `clearAmountOther()` and `useAmountOther()` that are wired to the `onclick` events for the radio buttons. However, the DOM structure the code refers to is invalid. There is no `document.Main.amount_other`.

```
function clearAmountOther() {
  var priceset = 0
  if( priceset ){
    cj(priceset).val('');
    cj(priceset).blur();
  }
  if (document.Main.amount_other == null) return; // other_amt field not present; do nothing
  document.Main.amount_other.value = "";
}

```

As a result, if you select a fixed amount like $25 and then enter $40 into the "Other Amount" box, the contribution is the sum $65. This is likely to surprise donors!

Is this a known issue? A bug that needs to be fixed?

# Answer
I have experienced this behavior in two different situations. In one situation, the Contribution was using a manually created price set that mimicked the behavior of the contribution page with "Allow other amounts" checked. The javascript code is not added for these price sets since CiviCRM can't really tell how they are supposed to work. Switching the contribution page to use the amount options provided by the page itself instead of a price set should solve that problem.

However, in another case, the onclick event was not added because the price set value field's name was "Contribution\_Amount" instead of "other\_amount". I don't know why the price set value field's name was not created properly.

The code in question is in CRM/Price/BAO/PriceField.php:

```
if (!empty($qf->_quickConfig) && !empty($qf->_contributionAmount) && strtolower($fieldOptions[$optionKey]['name']) == 'other_amount') {
  $label .= '  ' . $currencySymbol;
  $qf->assign('priceset', $elementName);
  $extra = ['onclick' => 'useAmountOther();'];
}

```

I figured out which price field value record was the one being used and manually updated it with:

```
UPDATE civicrm_price_field_value SET name = 'other_amount' WHERE id = 934;

```

This isn't a great answer to your question - more of a work-around. Figuring out why the price field value record was added with the name set to "Contribution\_Amount" would be better.
> 2 votes

---
Tags: wordpress, civicontribute, contribution-page
---


title: Customise Receipts How to?

text:
# Question
Title: Customise Receipts How to?
In Find contributions\> actions: receipts print or email\> how would I customise that wording / graphics for that choice

# Answer
Try under **Administer \> Communications \> Message Templates**. From there you can look in "System Workflow Messages" for the receipt templates.

More about templates is in the docs.
> 5 votes

---
Tags: receipts, printing
---


# Question
Title: Scheduled job process_mailing does not complete
Running process\_mailing scheduled job via 'execute now' starts but does not complete.

The first 200ish mails were sent then sending stopped. Running 'Execute now' a few more times has now sent 330 of around 2000 recipients.

Some other mailing that were scheduled later have completed.

There are no errors reported in the Civi log.

One possibility is that it is running out of memory, but it is now not processing any further mails from this mailing which suggests there is something else going on. Any hints or clues for debugging this?

CiviCRM 5.19.1 Mosaico 2.3.1572289217 Flexmailer 1.1.0 Sparkpost 1.3

(There are a few related questions on SE, but with significant differences, or no answers.)

# Answer
I have had similar issues recently, after I have manually ran some random scheduled jobs forcefully.

Later I have changed the time of the scheduled job, specially for the ones that runs daily, to the default (12:00).

Since then my issue resolved. I would suggest try that.
> 1 votes

---
Tags: mosaico, sparkpost, flexmailer
---


# Question
Title: How do I change what appears in the "quick actions" menu on the contact record summary page?
I know this is possible because I have done it many times before but now I can't find it! I have looked in the admin interface, the documentation, and on this here stack exchange. I am hoping someone can remind me.

I want to change the items that appear in the quick actions menu from the contact summary:

Where do I go to do this?

THANKS EVERYONE!

# Answer
> 4 votes
Just noting here that if you have access to your database and set the civicrm\_option\_value.filter\_value = 1 for the activity type it doesn't show.

That wont be the same for all the actions, but at least for the activity types.

Would probably be nice to expose this field in the UI sometime.

# Answer
> 3 votes
I am not sure if you can control this options through UI but you can use hook\_civicrm\_summaryActions() to remove the options from the list.

Cheers

Pradeep

# Answer
> 1 votes
CSS based display:none; can be used to hide the ones you do not want, in combination with the other answers (note; this is not a complete/secure solution)

For instance, if I want to hide the "Print Summary" action:

```
li.crm-contact-crm-contact-print {
display:none;
}

```

# Answer
> 1 votes
You could install the Activity Type ACL extension and adjust what user roles can edit/view/delete a given activity type in the user permissions. However, this would not apply to administrator level users so you would need to use a different method as already mentioned by others for that.

# Answer
> 0 votes
I think the Fast Action links extension from Jon Goldberg will do what you want - see the repo here and the documentation page here

---
Tags: actions
---


# Question
Title: How to build a profile using Activity data
I need a logged in user to be able to add an activity but Civi keeps telling me "Profile search, view and edit are not supported for Profiles which include fields for more than one record type." Here's what I did: 1. Created a new activity type called "CEU"(Continuing Education Unit) 2. Created a new Custom Data set called "CEU data" used for "Activities" and Type "CEU" 3. Created a new Profile with Activity Date and the 6 CEU custom fields and it is used for "Standalone Form"

Civi does not give me the "Use Profile-Create Mode" like normal. I also tried to add First Name, Last Name, and Email to the Profile but still got the same results.

# Answer
> 2 votes
Not out of the box, you could use CiviCRM hooks (hook\_civicrm\_postProcess) to create an activity on form submission.

You could also check CiviVIP they developed a WordPress plugin which does that (you will also need Gravity Forms), for the moment the plugin its only able to create contacts and activities, but they have plans for Event registration and Contributions.

# Answer
> 1 votes
This is a bit of a workaround, but for simple forms where I wanted to avoid CMS-specific form plugins (or where I was embedding a form into another site), I used the following combination:

The activityprofile extension only works in combination with remoteform (it's a way to circumvent a CiviCRM limitation). If often use remoteform to embed forms within the same website, or a separate site.

Known limitation: for now, activityprofile will always create a new contact, i.e. potentially create duplicate contacts.

# Answer
> 1 votes
i think this can be done with Caldera and CiviCRM now

---
Tags: wordpress, profile, activities
---


# Question
Title: CiviCRM_API3_Exception: "DB Error: constraint violation"
Under How to Transfer Big Data to a Different Domain, I asked a question about transferring data to a different domain, but I couldn't find a solution. Before writing a comment, please read the information I have provided here. So I tried to implement my own solution. However, according to my mistake, my own solution steps did not work.

---

Namely;

I installed a joomla and CiviCRM from scratch. I didn't make any customization and updates in my installation.

Then I threw the following tables and all log tables into new SQL. I have not encountered any errors in this transfer. (I transferred by typing \_bacup next to the existing table names to avoid conflicts.)

1. civicrm\_activity
2. civicrm\_activity
3. civicrm\_activity\_contact
4. civicrm\_contact
5. civicrm\_custom\_field
6. civicrm\_custom\_group
7. civicrm\_email
8. civicrm\_log
9. civicrm\_option\_group
10. civicrm\_option\_value
11. civicrm\_phone
12. civicrm\_setting
13. civicrm\_uf\_match
14. joomla\_usergroups
15. joomla\_users
16. joomla\_user\_usergroup\_map

Now when I try to log in to CiviCRM I get an error like the following. Do you know about the solution to this error?

**CiviCRM\_API3\_Exception: "DB Error: constraint violation"**

# Answer
> 1 votes
I share my solution for the problem. First of all, I did this because of a partially loaded database problem. I was getting this error when I did any CiviCRM version upgrade.

When I checked the database, the information in the "civicrm\_domain" table was displayed as "5.14.alpha1.upgrade". However, because the site was an FTP update CiviCRM version 5.19.1 was.

First of all, I set up a backup of a time before 5.14 with a different subdomain. Then I upgraded the Joomla and CiviCRM version of this backup to the version I had problems, ie 5.14.1.

Then I deleted everything in the database, including Joomla tables. I have thrown the SQL files with the actual site data into the SQL files of the new subdomain. In the "civicrm\_domain" table, I manually changed the version information to "5.14.1".

After that I started the update with the URL of CiviCRM 5.15.0 in Joomla Plugin Update and this time I didn't get "partially loaded database" error and the whole update was successful.

The only problem is that any update, installation and uninstallation of the CiviCRM plug-ins is displayed. I have raised a question for this error. You can also follow it if you want. Of course, that problem will be corrected.

---
Tags: joomla
---


# Question
Title: CiviCRM_API3_Exception: "API error: DB Error: already exists"
CiviCRM\_API3\_Exception: "DB Error: constraint violation" I have fixed these problem by updating one by one from 5.14.1 to 5.19.1 but now I have got new problem :) In the new version I cant install/uninstall and update any extention. I got the following error on screen:

But I realised when I click back than is the update or install/uninstall is done. But everytime when I try I get the same error. Anybody who knows the reason of the error showing ?

# Answer
> 2 votes
Following on from the comments:

Sorry I don't speak Turkish but I put your comment into Bing translate and the short answer is "yes". The error happens when you have **changed a relationship type** (which happens automatically if you change the language) and you're using CiviCase in non-english. So the temporary options are:

* Disable civicase or only use english. (Not the best option.)
* Put the relationship type back to the english version. (Also not good.)
* If you don't have many relationships entered yet you can delete all the relationships, delete the relationship type and recreate a new one, then update your case types, then add your relationships again.
* Wait until 5.20.

---
Tags: extension, joomla, error, install
---


# Question
Title: What are the Drupal modules most used with CiviCRM?
I can see which CiviCRM Extensions are most used at this link.

I've just installed the Masquerade Drupal module, and want to see what else I might want to be using.

Is there an equivalent listing and ranking of the Drupal modules that are most used with CiviCRM?

# Answer
> 1 votes
I am quite curious about why you are asking this question. My advice would be to install only modules when you have functional need and those modules solve them for you.

It might be even that a module which is used often is completely useless in your context. Or that it breaks other needed functionality.

Having said that the masquerade module is very handy one. Same as views and webforms.

# Answer
> 0 votes
The CiviCRM stats collector doesn't collect that stat but besides webform\_civicrm, it might not be too different from the list you'll see at https://www.drupal.org/project/project\_module, which is sorted by most installed by default.

Rules and Organic Groups might be additional ones not high on that list because Civi bundles drupal modules that depend on those.

---
Tags: drupal, extension
---


# Question
Title: Is there a reason why custom field sets cannot be multiple value?
I've added a custom field set to the Participant entity, but I need to it allow for multiple values. I've noticed that the Contact entity has no problem with this, but is there a reason why it doesn't give you this option for other entities?

I've found the cause in this function in the `templates/CRM/Custom/Form/Group.tpl` file:

```
  /**
   * Check if this is a contact-related set and show/hide other options accordingly
   */
  function showHideStyle() {
    var
      extend = $(this).val(),
      contactTypes = {/literal}{$contactTypes}{literal},
      showStyle = "{/literal}{$showStyle}{literal}",
      showMultiple = "{/literal}{$showMultiple}{literal}",
      showMaxMultiple = "{/literal}{$showMaxMultiple}{literal}",
      isContact = ($.inArray(extend, contactTypes) >= 0);

    if (isContact) {
      $("tr#style_row, tr#is_multiple_row").show();
      if ($('#is_multiple :checked').length) {
        $("tr#multiple_row").show();
      }
    }
    else {
      $("tr#style_row, tr#is_multiple_row, tr#multiple_row").hide();
    }

    if (showStyle) {
      $("tr#style_row").show();
    }

    if (showMultiple) {
      $("tr#style_row, tr#is_multiple_row").show();
    }

    if (!showMaxMultiple) {
      $("tr#multiple_row").hide();
    }
    else if ($('#is_multiple').prop('checked')) {
      $("tr#multiple_row").show();
    }
  }

```

# Answer
> 2 votes
The documentation says they are only possible for contact records. See https://docs.civicrm.org/user/en/latest/organising-your-data/creating-custom-fields/#multiple-record-fieldsets. I expect the reason for this is that it would have been a lot more effort to add it for all for other entities. There are some built in ones for contacts so I guess it was easier to extend for contacts. It wasn't there from the start

# Answer
> 2 votes
I found a way to get the Participant entity to accept multiple values.

To recap, I needed a custom field set that contained single value text, note and file fields, but needed to be able to add multiple instances of the set itself to a Participant.

I added the following code to the top of the`CRM_Event_Form_Participant::postProcess` method, underneath the line `$params = $this->controller->exportValues($this->_name);`.

```
// Get CiviCRM's configuration
$config = CRM_Core_Config::singleton();
$uploadDirectory = $config->uploadDir;

// Filter keys that are in the form of custom_[number]_-[number over 1]
$custom_field_keys = preg_grep('/custom_[0-9]+_-[2-9]+/', array_keys($this->_submitValues));
foreach ($custom_field_keys as $key) {

  // Save these additional values in the $params array
  $params[$key] = $this->_submitValues[$key];
}

// Filter out keys that are in the form of custom_[number]_-[number over 1]
$custom_file_keys = preg_grep('/custom_[0-9]+_-[2-9]+/', array_keys($this->_submitFiles));

foreach ($custom_file_keys as $key) {

  // rename the uploaded file with a unique number at the end
  $file = $this->_submitFiles[$key];

  $element = new HTML_QuickForm_file($key);
  $element->_value = $file;

  $newName = CRM_Utils_File::makeFileName($file['name']);
  $status = $element->moveUploadedFile($uploadDirectory, $newName);
  if (!$status) {
    CRM_Core_Error::statusBounce(ts('We could not move the uploaded file %1 to the upload directory %2. Please verify that the \'Temporary Files\' setting points to a valid path which is writable by your web server.', [
      1 => $value['name'],
      2 => $uploadDirectory,
    ]));
  }
  if (!empty($data['values'][$pageName][$uploadName]['name'])) {
    @unlink($uploadDirectory . $data['values'][$pageName][$uploadName]);
  }

  $value = [
    'name' => $uploadDirectory . $newName,
    'type' => $element->_value['type'],
  ];
  //CRM-19460 handle brackets if present in $uploadName, similar things we do it for all other inputs.
  $value = $element->_prepareValue($value, TRUE);
  $params = HTML_QuickForm::arrayMerge($params, $value);
}

```

It begins by first getting the upload directory path from configuration and then finding all keys in the `_submitValues` property that are the second value onwards. Adding these values directly to the `$params` array appears to work with no additional work.

For files, the same beginning is needed where we find file field keys that are the second onwards, then we must create a new file field instance with `HTML_QuickForm_file` for each one, so we may utilise the `HTML_QuickForm_file::moveUploadedFile()` method. If the file is moved successfully, we prepare the new file values and merge them into the `$params` array.

---
Tags: forms, civicrm-entity
---


# Question
Title: How to I add new records to a batch after it has been created?
How do I add new records to a batch after it has been created in batch data entry.

# Answer
> 1 votes
From Contributions \> Batch Data Entry. Select Edit next to the batch you have created, from here you can edit the number of items which will give you new records to add to the batch you've already created.

---
Tags: batches
---


title: Smarty with CiviRules

text:
# Question
Title: Smarty with CiviRules
I have a template with Smarty strings.

If I send the email from inside CiviCRM, Smarty works fine (it shows "Cher Guillaume"):

If I send the same template using a CiviRule, it doesn't work:

although it attaches a .pdf file with Smarty Strings inside that also work fine.

Is there a reason related to CiviRule?

Any idea?

best Regards

Guillaume

# Answer
> 1 votes
There used to be a diffence in the way tokens behave in the Email or PDF API, as far as I know this has been fixed in the latest versions of the extensions Email API and PDF API. Can you check if you have these latest versions installed?

---
Tags: civirules, smarty
---


# Question
Title: Upgrade from 5.14.1 to 5.15.0 throws error
Running on Drupal 7.67

Running the DB upgrade from 5.14.1 to 5.15.0 stalls on 'Update smart groups where jcalendar fields have been converted to datepicker', and afterwards retrying or reloading Civi shows same as error as the ConfigAndLog shows at the bottom:

Nov 17 12:58:43 \[info\] Running task: Cleanup old files

Nov 17 12:58:44 \[info\] Running task: Checking extensions

Nov 17 12:58:44 \[info\] Running task: Begin Upgrade to 5.15.alpha1

Nov 17 12:58:45 \[info\] Running task: Upgrade DB to 5.15.alpha1

Nov 17 12:58:46 \[info\] Running task: Upgrade DB to 5.15.alpha1: SQL

Nov 17 12:58:47 \[info\] Running task: Fix errant deferred revenue settings

Nov 17 12:58:47 \[info\] Running task: Fix cache key column name in prev next cache

Nov 17 12:58:48 \[info\] Running task: Update smart groups where jcalendar fields have been converted to datepicker

Nov 17 12:58:48 \[info\] Running task: Finish Upgrade DB to 5.15.alpha1

Nov 17 12:59:04 \[info\] $CRM\_Queue\_ErrorPolicy\_reportError = Array ( \[is\_error\] =\> 1 \[is\_continue\] =\> 0 \[exception\] =\> Error 64: Cannot make non static method CRM\_Core\_DAO::copyCustomFields() static in class CRM\_Event\_BAO\_Event in /home/tamera/www/dev/sites/all/modules/civicrm/local/code/CRM/Event/BAO/Event.php, line 2387 \[last\_task\_title\] =\> Finish Upgrade DB to 5.15.alpha1 )

Any ideas?

# Answer
As per comments this was caused by a customized Event.php file in the custom php folder set at administer - system settings - directories.
> 1 votes

---
Tags: upgrade
---


# Question
Title: Only one registration per contact per event
Civicrm 5.\*, any platform

I will keep looking in documentation, but if someone can give me an answer as to why a unique contact cannot register \> 1 time per event, I would appreciate it - I can imagine it may be due to DB Schema issues. I am not talking about registering multiple participants using 1 email address but allowing a contact to register two or more times. I do know it would mess up some of my reports! thanks

# Answer
> 1 votes
You can also set up a Price Set option so one person can buy multiple tickets while only entering their own details once.

# Answer
> 0 votes
This is configurable through t Event Mgmt, Online Registration page.

# Answer
> 0 votes
I added this to CRM/Event/Form/Participant.php line 861 $eventId = CRM\_Utils\_Array::value('event\_id', $values);

> > $sql = 'select allow\_same\_participant\_emails from civicrm\_event where id = '.$eventId; $dao = CRM\_Core\_DAO::executeQuery($sql ); $dao-\>query($sql); $same\_emails = NULL; while ($dao-\>fetch()) { $same\_emails = $dao-\>allow\_same\_participant\_emails; }

And then at line 878, check the value of $same\_emails: if ( !empty($dupeCheck-\>id) && (empty($same\_emails) or ($same\_emails \< 1)) ) { $errorMsg\['event\_id'\] = ts("This contact has already been assigned to this event."); }

---
Tags: civievent
---


# Question
Title: Column Sorting Removed Filters in Find Contribution
We just upgraded to 5.19.1, but not sure when this started. When we go to Find Contributions, put some criteria in, get results, and then click on one of the column headers to sort the results, it completely removes any of the Search Criteria.

I see it happens on the 5.19.0 demo site as well. Is this a known bug?

# Answer
> 3 votes
It looks like one of the amazing maintenance team have already provided a patch for this so it should be in the next release

https://github.com/civicrm/civicrm-core/pull/15896

Don't you just love the CiviCRM Community - this is all being done by volunteers - you can support the community in a number of ways via https://civicrm.org/support-us (not suggesting you aren't currently supporting it)

---
Tags: civicontribute
---


title: Retrieve Contacts with Tags in API4

text:
# Question
Title: Retrieve Contacts with Tags in API4
I am creating some custom directory screens to display a table of contacts with associated email addresses and any tags (just a simplified directory for non-admin staff to view/sort basic CRM data). I am using the API version 4 and can't figure out the correct way to grab both the contact AND related tag data.

When using the API4 query builder, only the "tags" table (Join to Tag) is present, and adding "tags.name" to the query does not retrieve anything:

```
$contacts = \Civi\Api4\Contact::get()
  ->setSelect([
    'id',
    'first_name',
    'last_name',
    'job_title',
    'display_name',
    'tags.name',
  ])
  ->addWhere('id', '=', 865)
  ->setLimit(25)
  ->execute();

```

yields (though this user definitely has a tag):

```
[
  {
    "id": "865",
    "first_name": "Sean",
    "last_name": "Kirkpatrick",
    "job_title": null,
    "display_name": "Sean Kirkpatrick",
    "tags": []
  }
]

```

This seems to be pulling info just from the table civicrm\_tag instead of both civicrm\_tag and civicrm\_entity\_tag. In SQL, I can get the data I want with this query:

```
SELECT b.id, b.display_name, c.name
FROM civicrm_entity_tag a
  join civicrm_contact b on a.entity_id = b.id
  join civicrm_tag c on a.tag_id = c.id

```

In API3, getting this data is fairly simple:

```
$result = civicrm_api3('Contact', 'get', [
  'sequential' => 1,
  'return' => ["id", "first_name", "last_name", "tag"],
]);

```

yields:

```
{
    "is_error": 0,
    "version": 3,
    "count": 25,
    "values": [
        {
            "contact_id": "1",
            "first_name": "",
            "last_name": "",
            "contact_is_deleted": "0",
            "tags": "",
            "id": "1"
        },
        {
            "contact_id": "2",
            "first_name": "Sean",
            "last_name": "Kirkpatrick",
            "contact_is_deleted": "0",
            "tags": "Individual Artist",
            "id": "2"
        },
        {
            "contact_id": "3",
            "first_name": "Test",
            "last_name": "Subject",
            "contact_is_deleted": "0",
            "tags": "Volunteer,Individual Artist,Newsletter",
            "id": "3"
        },...

```

Any ideas on what I'm doing wrong with API4? I'd rather not have a random v3 call among all of the other v4 calls, but maybe that doesn't matter.

# Answer
It might not be implemented completely yet. This bug report is slightly different (join from tag to contact) but suggests it's maybe not complete: https://github.com/civicrm/org.civicrm.api4/issues/128
> 2 votes

---
Tags: api, tags
---


title: Adding a user to configure templates

text:
# Question
Title: Adding a user to configure templates
Looking to give access to a technician to help with message templates configuration eg offline receipts. What is teh best way to add a user and give access to this area only Thanks in advance

# Answer
It is not possible to give a user access to only this area. On what CMS did you install CiviCRM? You could have a look in your cms to the available permissions.
> 1 votes

---
Tags: user-account
---


# Question
Title: Using CIVICRM API can I get both mobile and phone number?
I am trying to work out how to call both a phone number and a mobile number using the API. I am in civicrm/api and can get one or the other but not both. Can anyone suggest a solution!?

Thanks Caroline

# Answer
> 2 votes
you can get both Phone and Mobile in a single API call as below

```
    $result = civicrm_api3('Phone', 'get', [
  'sequential' => 1,
  'contact_id' => 203,
  'phone_type_id' => ['IN' => ["Phone", "Mobile"]],
]);

```

I have created the test example against https://dmaster.demo.civicrm.org

I guess this helps !!!

Thanks

---
Tags: contacts, api
---


# Question
Title: Change logo for specific contribution pages
I have several contribution pages on CiviCRM and I would like to set a different logo for specific contribution pages only. Is this possible at all? Thank you.

# Answer
> 1 votes
in the smarty templates you should be able to build a smarty 'if' statement with the contribution page

eg

{if $contributionPageID == 3}

or if more than one page

{if $contributionPageID == 3 OR $contributionPageID == 8}

---
Tags: contributions, logo
---


# Question
Title: Handling null values in tokens in civimail (and elsewhere)
Has anyone developed an extension to handle null values in tokens?

For example:

Sending an email to a contact with no first name:

Dear {first.name}, will end up as -\> Dear ,

It appears that previously in 3.3 it was possible to use {first.name | default text}

Additionally a long while ago there was some discussion about reviving this behaviour.

Following this there was this post about how to change the behaviour site wide, however to enable more personalised emails (both in terms of the sender and recipient) would be great to allow for this to be done on a per email basis as well.

Following that I can only spot this SE question referencing the issue last year.

# Answer
We used the Dave's Blog https://civicrm.org/blog/dave-greenberg/civimail-how-to-add-default-values-for-empty-tokens

The blog provides a sample code and the hook which need to be used. We added the same `tokenValues()` hook to the extension and it works great in replacing all the empty token values with the one specified in the hook.
> 3 votes

# Answer
If you enable the Smarty template engine for mails with `define('CIVICRM_MAIL_SMARTY', 1);` you can use it to to handle defaults on a per mailing basis: `{capture assign=first_name}{contact.first_name}{/capture}
Dear {$first_name|default:Friend},`

see also: https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#smarty)
> 2 votes

# Answer
One workaround is to define your own token that handles nulls and defaults as you want. But I agree it would be useful to have a non-code way to implement defaults.
> 1 votes

# Answer
Since people are looking at this question, it's worth noting that you don't need to enable Smarty system-wide to do this for greetings. CiviCRM 4.5+ automatically handles Smarty in the greetings fields, see this blog post: https://civicrm.org/blog/antrik/getting-started-with-new-name-and-greetings-features-in-45
> 1 votes

---
Tags: civimail, tokens
---


# Question
Title: Empty token default values -- core or extension support?
I want to provide a default value for tokens when the value is empty, on a per-use basis -- e.g., something like `{contact.first_name?Friend}` would print the contact's First Name if it's not empty, otherwise print "Friend".

**Rationale update:** This would allow non-programmers to easily specify a default value without needing to clutter up the tokens UI.

Existing workarounds for this functionality are more cumbersome than that:

* Dave's blog from version 2.2 uses hooks in an extension to hard-code defaults for specific tokens in all cases.
* This SE answer points out that this can be achieved by enabling Smarty processing and then inserting a few lines -- per token -- of Smarty code into the content.

To avoid double-work and/or undertaking the impossible, I ask:

Has any attempt been made to put such per-use-default-value functionality into CiviCRM core or an extension?

**Technical challenges update:** Tokens are limited to `\w` characters, so any plan to use a non-word delimiter like `?` will have to involve changes in core, as far as I can see.

# Answer
First - no need to enable Smarty system-wide to do this. Greetings are always parsed by Smarty - see https://civicrm.org/blog/antrik/getting-started-with-new-name-and-greetings-features-in-45.

Besides that, I think you're one of the leading experts on complex token extensions, since you're the primary author of reltoken. But I don't see why you couldn't do this. `hook_civicrm_tokenValues` gives you access to the token name for parsing, and there's no requirement that the token be listed with `hook_civicrm_tokens`. So I'd say go for it.

Note that this is similar but not identical to the free-form relative date work Eileen did: https://github.com/civicrm/civicrm-core/pull/12682.
> 3 votes

---
Tags: tokens
---


# Question
Title: Is there a way to change the Pending (Pay Later) payment method?
Its quite confusing. The default payment method is check. When someone says they are paying later - it can be a multitude of payment options. When we record the payment - it still shows the main payment method as check \- even though its something else - how can we change that. (besides heading into the back end.)

This mostly impacts how we report payment methods and search for payments.

# Answer
I also found that workaround! This is an ongoing pain point, see https://lab.civicrm.org/dev/financial/issues/37 for a related issue.

In short - until a few years ago, a Contribution record was just that - a contribution. Now it's more of an "obligation to pay", and Payment records are where the actual money is recorded.

So "payment method" (and "check number") don't belong on contributions - they belong on payments. Until this is fixed, your workaround is as good as it gets. Fortunately, there's general agreement on this direction, and the financial subsystems are currently being rewritten to make future changes easier and more testable.
> 2 votes

# Answer
Looks like you can do this without touching the database directly. I dont think this was an option before.

1. create a profile with payment method as a field
2. Run a search for those contributions you want to update.
3. select the contributions - under actions - select update multiple contributions
4. Select the profile you created and update the contributions with the correct payment method.

This still does not resolve the general issue but is a workaround. Another thing we did was change the default payment method to the most popular pay later option, that helps.
> 1 votes

---
Tags: reports, payment, pending
---


title: Webform and Membership

text:
# Question
Title: Webform and Membership
I recently switched from a normal Civicrm contribution page to a Webform one. Since then, the relationship between contribution and membership is not so clear.

The new Members do appear in the membership list but individually the membership is considered to be null like on this image:

If I look inside each new members' profile, I can see they paid a contribution for a membership ('cotisation' in French)

but in the membership tab, I see no membership and the status is still on "Waiting for a payment"

It only changes if I enter manually a payment. The strange thing is that if I look at the Membership dashboard, these members do appear on the dashboard page:

but if I look deeply in the number of "real members" then they don't show up:

This is how looks the membership part in the webform-civicrm tab. 'Adhésion annuelle' is the Membership type and 'cotisation' means membership.

and the contribution one. The contribution page is the one that was previously used and that worked fine. (I only have one). There is a contribution amount but it's new and the situation was the same already before.

Has anyone already encountered this situation?

I'm running an up-to-date Drupal 7 / Civicrm with webform-civicrm.

EDIT 1 :: I've created a new webform to test with live payment and I'm getting to the same situation.

EDIT 2 :: if I have a look at Drupal logs and focus on webform-civicrm, I can see at least twice this error at the time I have the new memberships.

```
The CiviCRM "contribution sendconfirmation" API returned the error: "field description unset or not existing" when called by function "postSave" on line 248 of wf_crm_webform_postprocess.inc with parameters: "Array ( [id] => 195 [title] => Adhésion et renouvellement d'adhésion au SNPMNS [intro_text] =>

    Dans le cadre d'une primo adhésion ou d'un renouvellement via ce formulaire en ligne, nous vous demandons de le remplir de la manière la plus exhaustive possible afin de simplifier et d'améliorer l'établissement de votre assurance RC professionnelle.

    IMPORTANT : Si vous changez d'adresse en cours d'année, envoyez-nous vos nouvelles coordonnées rapidement
    Tous les champs avec un * sont obligatoires
    [financial_type_id] => 2 [is_credit_card_only] => 0 [is_monetary] => 1 [is_recur] => 0 [is_confirm_enabled] => 1 [is_recur_interval] => 0 [is_recur_installments] => 0 [adjust_recur_start_date] => 0 [is_pay_later] => 1 [pay_later_text] => Je paierai par chèque ou par virement électronique [pay_later_receipt] =>

    Merci de nous adresser sous 3 jours votre chèque ou votre virement pour le paiement de la cotisation au SNPMNS.

    Vous recevrez ensuite votre kit adhérent comprenant l'attestation d'assurance RC prestataire de services.

    Notre compte en banque pour le virement :

    IBAN : FR76 1820 6001 6316 3910 0900 159

    Notre adresse pour nous adresser le chèque :

    80, boulevard du Général LECLERC
    BP 3 - 92113 Clichy la Garenne CEDEX
    [is_partial_payment] => 0 [is_allow_other_amount] => 0 [thankyou_title] => Bienvenue au SNPMNS [thankyou_text] =>

    Nous vous remercions pour votre adhésion au SNPMNS et notre équipe se rapprochera de vous dans les plus brefs délais.

    [thankyou_footer] =>

    Merci de ne pas répondre à ce message automatique.
    [is_email_receipt] => 1 [receipt_from_name] => SNPMNS service adhésion [receipt_from_email] => adhesion@snpmns.org [cc_receipt] => adhesion@snpmns.org [bcc_receipt] => contact@all-in-appli.com [receipt_text] => Nous vous remercions pour votre adhésion au SNPMNS et notre équipe se rapprochera de vous dans les plus brefs délais. La période de validité de l'adhésion inscrite dans ce courriel de confirmation est donnée à titre indicatif seulement et votre adhésion ne sera réellement effective qu'après le contrôle par l'équipe en charge des adhésions et la transmission des éventuels documents administratifs indispensables à l'établissement de l'attestation d'assurance RC-pro. Dans l'attente de vous rencontrer lors de nos actions. L'équipe du SNPMNS [is_active] => 1 [amount_block_is_active] => 0 [start_date] => 2019-04-24 13:56:00 [created_date] => 2019-04-24 13:58:12 [currency] => EUR [is_share] => 0 [is_billing_required] => 1 [contribution_type_id] => 2 [payment_processor_id] => 1 [check_permissions] => [version] => 3 ) "

```

EDIT 3 :: I need to manually override status in the individual contact tab to make the membership active

EDIT 4 :: I don't need anymore to apply EDIT 3 because of the patches in CiviCRM 5.19 that correct the translation of "Pending". Still I need to "save" a payment to make it be recorded. Is this related to MembershipsStatus?

# Answer
I solved this issue by setting everything back like it is out of the box when you install CiviCRM.

**RULE #1: don't play with Membershipstatus rules**

This is what I learnt after struggling for months.

If you have access to PhpmyAdmin, this is how it should be set:
> 0 votes

---
Tags: webform-civicrm
---


# Question
Title: Defining Membershipstatus Rules and update issue
I've read the documentation about membershipstatus rules and something stays unclear. Even with a contribution, the Pending status stays and is not being updating (see my related post: webform and membership)

**Should I set the beginning of "New" at "Member since" or "Start date"?**

The journey I defined is:

Any ideas to help?

best regards, Guillaume

# Answer
> 0 votes
This is solved with this answer: **NEVER MODIFY MEMBERSHIPSTATUS RULES!** except if your really know what you're doing.

---
Tags: civimember
---


# Question
Title: Contribution form errors after latest security release
We have three different clients reporting erratic errors on public-facing and administrative credit card donation forms.

The error is that CiviCRM reports that a credit card + expiry is invalid, and the error shows up before talking to the payment processor, i.e. it's form error, not a payment processor error. We've confirmed that the cc credentials are in fact valid.

These started happening after the latest (Nov 20 2019) security update (some on the 5.13.7, some on 5.19.2, not all using the same payment processor).

See attached picture for a clue: note the title of the cc images.

# Answer
> 5 votes
So the error occurs when CiviCRM is doing it's implementation of the Luhn algorithm https://en.wikipedia.org/wiki/Luhn\_algorithm

The picture suggests it's javascript related, but note that there are no console errors showing.

Fix: I cleared both the site cache and the browser cache and now it works.

The weird \[object Object\] title that you can see in the console seems to be a red herring.

In our case, the issue is likely due to css/js/img resources having long caches and not getting cleared by CiviCRM with the upgrade, so restarting Varnish in front of the site is likely the right answer.

---
Tags: civicontribute
---


title: Cannot uninstall civivolunteeer

text:
# Question
Title: Cannot uninstall civivolunteeer
I decided to remove Civivolunteer. Administer \> System Settings \> Extensions. I disabled Civivolunteer and then Uninstall. Error message: "DB Error: constraint violation" The Civivolunteer extension cannot be enabled or uninstalled. What can I do?

Here is a paste of **PART** of the log where the error occurs

Aug 28 15:29:07 \[info\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> handle )

```
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]
[type] => DB_Error
[user_info] => DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM `civicrm_uf_group` WHERE `name` = 'volunteer_sign_up' [nativecode=1451 ** Cannot delete or update a parent row: a foreign key constraint fails (`willycg_civicrm`.`civicrm_uf_join`, CONSTRAINT `FK_civicrm_uf_join_uf_group_id` FOREIGN KEY (`uf_group_id`) REFERENCES `civicrm_uf_group` (`id`))]"]

```

)

# Answer
I had an identical experience, here's how I fixed it.

Following @Demerit's clue:

1. Using sql:

update civicrm\_uf\_group set is\_reserved = 0 where name = 'volunteer\_sign\_up'
2. Now remove the profile (previously, you couldn't via the web interface).

Re-do the uninstall, it now succeeds.

As per the note in the uninstall.sql file, the uninstall process is trying to use a foreign key to remove the profile indirectly, but it's failing. I suspect that profiles got more complicated and this strategy no longer works? Alternatively, perhaps when an early version of the extension gets installed it's subtly different?

Also note that this is actually the last line of the uninstall, so it mostly does uninstall.
> 3 votes

---
Tags: civivolunteer
---


title: CiviVolunteer Commitment box control

text:
# Question
Title: CiviVolunteer Commitment box control
On the search for volunteer opportunities page the commitment box with the signup button floats on the screen. I'd like to prevent this as it obscures the list of opportunities. Does anyone have a recommendation on the best way to achieve this?

# Answer
I was able to solve via css. I commented out lines 112 & 116 in this file: /org.civicrm.volunteer/ang/volunteer.css. The cart still floats is just stays in position as opposed to being in a fixed point while scrolling. Below is the edited css excerpt.

```
 .crm-vol-half-responsive.crm-vol-opp-cart.floating_cart {
 /* position: fixed;*/
  top: 50px;
  right: 0;
  min-width: 200px;
 /* width: 20%; */

```
> 1 votes

# Answer
It is quite annoying isn't it? I am not sure if this was the only change I did but I edited the core file https://github.com/civicrm/org.civicrm.volunteer/blob/22eb7ca6dbf99cddb6c43405a88f2cdf83ae7609/ang/volunteer/VolOppsCtrl.js#L224

and changed from 'scroll' to 'click'. Might not be the best way but it worked.
> 1 votes

---
Tags: civivolunteer
---


# Question
Title: Missing participant is_test field in drupal views
We would like to use the participant is\_test field in drupal views but cannot seem to do so. 1. Would anyone be able to tell us how we can do so? or 2. Can anyone show us with an example that will help us create a pr to add this field.

Thanks, Richard

# Answer
> 2 votes
Thanks Jaap, I now added it by this PR: https://lab.civicrm.org/dev/drupal/issues/95 From CiviCRM 5.21 i guess this will be included.

# Answer
> 0 votes
You can add the field to this file: https://github.com/civicrm/civicrm-drupal/blob/7.x-master/modules/views/components/civicrm.event.inc

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


# Question
Title: CiviMail error: "Sorry an error occurred and your information was not saved"
CiviCRM 5.6.1, WordPress 4.9.8, PHP 7.1.22, MySQL 5.7.23, WordFence 7.1.16

I just started getting this error when trying to create a mailing. It happens with Mosaico and traditional mailings. I previously saw this issue when first using the WordFence security plugin and found a discussion here suggesting to disable WordFence's XSS check, which I did with success until now. That was months ago. The option is still disabled and I even tried disabling WordFence entirely, but no luck. I haven't made any significant changes recently that I can think of. I had no problems with my last weekly mailing.

I also checked with my hosting provider to see if they had made any mod\_security rules changes. They hadn't. I don't see anything interesting in the logs. Any ideas?

# Answer
I have seen this error occur on WordPress due to a false positive generated in WordFence security plugin.

If that might be your issue, put WordFence Firewall back into "Learning Mode", try saving/testing a Mosaico template email again in Civi and - if that is the problem - then WordFence should Whitelist the action, and the error should disappear.
> 5 votes

# Answer
I've run into this error for three reasons:

1: I copied and pasted in text and there was a special character in there that CiviCRM did not like. I figured out which one it was by pasting in only pieces of the text and watching to see when it quit saving and instead gave me the error.

2: I'd upgraded CiviCRM and the permissions weren't correct on some files (I'm logged in as root and therefore have to change owner/group when I upload).

3: A modsecurity issue. My host was able to look at the logs and whitelist the URI that was causing the issue. Last time it was: /civicrm/ajax/rest
> 4 votes

# Answer
I had this issue too and the solution was a twist on Jenni Simonis's answer so I'll elaborate in case anyone else runs into it.

The specific thing that fixed it for me was granting user & group execute permissions on the wordpress file wp-admin/admin.php.

I was getting a 403 forbidden error in the JS console on this file any time CiviCRM tried to take some kind of ajax action because it was trying to post to /civicrm/ajax/rest through admin.php but didn't have the right permissions.
> 2 votes

---
Tags: wordpress, civimail, mosaico
---


# Question
Title: How do mixed AND and OR in CiviRules Conditions work?
When adding a Condition to a CiviRule one can specify whether it is Adned or ORed with the previous one. If you enter a mixed sequence of AND and OR, what is the algorithm for combining them, since there is no bracketing available. Are they applied one at a time to the previously calculated answer, or what?

Thank you, Tony

# Answer
Someone else I asked replied "I've not tried that, but the relevant code seems to be here: https://lab.civicrm.org/extensions/civirules/blob/master/CRM/Civirules/Engine.php#L235

That evaluates the conditions in order and at each step updates isValid based on its value so far and the next condition, so the result is: (((condition1 and/or condition2) and/or condition3) and/or condition4) etc"

I tried a couple of cases and that is indeed how it worked.

The result of mixing AND and OR may not be specified, or any particular behaviour supported, but there seems nothing to prevent one actually building a rule like that.

Tony
> 3 votes

# Answer
They do not. You can only use a combination of AND or a combination of OR, you can not mix them.

If you want a complicated condition you might contemplate building you own condition, documentation on how to can be found here: https://docs.civicrm.org/civirules/en/latest/create-your-own-condition/
> 2 votes

---
Tags: civirules, condition
---


# Question
Title: Update Donation Amounts for Monthly Recurring option
We are in the process of building out a contribution form (not webform) with the One-Time and Monthly option buttons at the top of the donation form.

We are trying to figure out the best option to update the Monthly amounts when someone toggles from One-Time to Monthly.

Has anyone done this? If so, what do you recommend?

# Answer
> 4 votes
The extension is available on CiviCRM's Gitlab.

It adds a new option that is visible in the administration of the priceset, so that admins can decide when to display a specific priceset field value:

---
Tags: civicontribute
---


# Question
Title: New Extension Tab Zip Support Required Message
After upgrading to PHP 7.2, now receiving this message when trying to add a new Extension

```
ZIP Support Required
You will not be able to install extensions at this time because your installation of PHP does not support ZIP archives.

```

# Answer
> 2 votes
Solved - as of 7.2 we had to separately install the zip module (which provides the ZipArchive class within php). On Amazon Linux 2 this was the php-pecl-zip and libzip-devel packages, installed via "pecl install zip".

And restart the php-fpm service as well as httpd restart

---
Tags: extension, php
---


# Question
Title: How to change where the confirmation email is sent
Currently when a member signs up, the email goes through to our generic head office email and is copied in to a member of staff. How do I change the member of staffs email?

# Answer
Take a look at Contributions -\> Manage Contribution Pages, choose the relevant page, and then click on Configure, all the way over on the right. Then take a look at Receipt for that page, might be at `https://[your_website]/civicrm/admin/contribute/amount?action=update&reset=1&id=1` and the e-mail addresses that a receipt is cc'd and bcc'd to.
> 1 votes

# Answer
Another place these 'send email to x' may be hiding is in the Adv Settigs of the Profile that is used on the Contribution page (if 'sign up' is indeed a contribution page
> 1 votes

---
Tags: email
---