# Question
Title: Installation error for CiviCRM in Wordpress
I have searched for answers and none apply to this particular instance. I get one particular error preventing me from installing CiviCRM in WordPress. I have the latest version of CiviCRM and WordPress. I get the following error under file permissions no matter what I do:

**Is the /home/tackletheagenda/public\_html/Civicrm/wp-content/plugins/files folder writeable?**

**The user account used by your web-server - tackletheagenda - needs to be granted write access to the following directory in order to configure the CiviCRM settings file: //home/tackletheagenda/public\_html/Civicrm/wp-content/plugins/files**

I have already verified that the folders were writable. A bug? Other people had this problem on other platforms, but no answers for this problem in WordPress.

# Answer
The link that is supposed to provide a solution for this is broken...on this page:

https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/

If you are on a Windows machine and get the message "The user account used by your web-server needs to be granted write access to the following directory in order to configure the CiviCRM settings file: C:/wp-content/plugins/civicrm/" even after changing directory permission in Explorer, see:

http://forum.civicrm.org/index.php/topic,5056.msg23720.html#msg23720
> 0 votes

# Answer
Did you verify the directories were writable by testing using php - or checking the permissions? To definitively confirm this is a civicrm bug perhaps put something similar to the below in a file in your web root then visit it in your browser. (Don't forget to remove the file afterwards) Check if the file was created. If it was then this is a civicrm issue - however if not it is a permissions issue.

```
<?php
file_put_contents("/home/tackletheagenda/public_html/Civicrm/wp-content/plugins/files/test.txt", 'Test');
?>

```

If it is a permissions issue double check the permission of the parent directories to make sure the web user has execute access to all parent directories

```
namei -l  /home/tackletheagenda/public_html/Civicrm/wp-content/plugins/files

```

Will show you all parent directories up to / along with their permissions.
> 0 votes

---
Tags: wordpress
---


title: Missing CKEditor & config button

text:
# Question
Title: Missing CKEditor & config button
I've looked at several previous posts, but it's not clear to me if they relate to the issue I'm experiencing. Just updated to CiviCRM 5.8.1 on Joomla 3.9.1. Currently the HTML editor is missing on mailings and events, it's just a box with the straight HTML. The error console is giving the error `id.split is not a function` from the angular.js file.

Also missing is the Configure CKEditor button. When I check the demo, I see it there, but it never shows up on our site when CKEditor is selected. I also tried installing and selecting the TinyMCE plugin as the editor, but again that makes no difference in the edit window. I'm getting this error in the Display Preferences page: `Empty string passed to getElementById()`.

I've cleaned the caches and checked that the Resource URLs are correct. Unsure what to troubleshoot next.

# Answer
There appears to be a recent bug, possibly introduced in 5.8 though I'm not certain, that affects the CKEditor, namely missing Configure CKEditor button and CKEditor itself won't appear. See this issue: https://lab.civicrm.org/dev/core/issues/594#note\_11806

If you are comfortable working in the database directly you can work around this by deleting the existing setting for WYSIWYG editor and then avoid saving Display Preferences until this is resolved. `DELETE FROM civicrm_setting WHERE name = 'editor_id';`

This bug is now resolved in CiviCRM 5.9. After installing the 5.9 update save the Display Preferences & CKEditor settings as per the post-install notice.
> 4 votes

---
Tags: wordpress, joomla, ckeditor
---


# Question
Title: Can you use multiple payment processor on one form
I want my users to be able to choose from two different payment processors. I have two payment processors set up in Civi. When I am logged in as admin and go to my donate form I see a fieldset called "Payment options" where the user has an option to choose which payment processor they want to use. (one is for credit card and one is for electronic check). Everything works as expected until I am not logged in as admin. When I am not logged in as Admin I only see the default payment processor which is the credit card. How do I get that "Payment Options" fieldset to show for non-admin users?

I see the fieldset when I debug the page. It is called "crm-group payment-options-group" and it is set to display="None" Is there a way I can get this to display on my public forms?

I am using Wordpress, Civi 5.7.2 and I am using a Civi contribution form.

# Answer
> 1 votes
I figured out the issue. It was the Autoptimize plugin that was causing the total amount not to show. I checked the setting: "Force JavaScript in ? Load JavaScript early, this can potentially fix some JS-errors, but makes the JS render blocking."

Now that I have this checked the total box shows and I get the payment options section to show. Yay!

---
Tags: civicontribute, payment-processor
---


# Question
Title: Upgrading a server that's hosting CiviCRM to get to PHP 7
I did the deed and upgraded from Debian 8 to 9 and from PHP 5.6 to PHP 7.0. I wanted 7.1 but the host recommended I stick with the native packages since the 7.1 broke the SOAP function. I've been having all kinds of issues since the upgrade, such as users getting a DB error when trying to subscribe or use the contribution form, and numerous issues or errors in the log. Without going into that detail, I am wondering if there was any provisioning I need to do? I tested it all on a different PHP 7.1 server without issue.

* How can I check the database integrity, etc. of the CiviCRM and is there a checklist to make sure the upgrade didn't break something
* Is there a pre and post-upgrade CRM and server provisioning checklist?
* What is the recommended MySQL version?

It seems like some simple setting got overwritten somewhere on the server.

Drupal 7, CiviCRM 5.7.2

An example of the problems we've run into since upgrading the server, no settings in CiviCRM or Drupal were changed and to my knowledge, no file permissions were changed:

* Postfix status is excited
* CiviSMTP keeps sending a notification that our password and username is wrong but testing the settings in CiviCRM and CiviSMTP reports that they are correct
* The soap user also had an issue and our first mailing had a 100% failure rate. My host downgraded to PHP7.0 to stick with native Debian 9 packages. Mailings seem to work now
* CiviMail drafts take forever to save or give an error that they can't be saved because content is out of date (posted separately)
* CiviCRM sometimes runs very slowly
* Users get an unknown db\_error when trying to submit a contribution form (a lot of the time but not every time, posting separately)
* Unknown DB Error for query `UPDATE civicrm_mailing`. Error includes the full HTML of the email. (Submitting separately).
* Several/constant MySQL deadlocks
* Several in log: "We can't load the requested web page. This requires cookies to be enabled...". (Submitting separately).

I want to post in server fault also but when they see "CiviCRM" they might assume it goes here.

# Answer
> 2 votes
This looks like a collection of issues, not just a single one, even if they all originated from the OS upgrade.

1. The CiviCRM status page (assuming it loads) does a pretty good job of checking the usual suspects. I don't think your db would be corrupted.
2. The CiviSTMP error sounds like the crypto issue. I'd guess that your mailouts are being triggered by a cron running a different php (different version, or different packages).
3. CiviMail drafts issue + civi running slowly, but only sometimes, both sound like mysql issues. My guess is that your upgrade involved some other changes in the network or mysql settings. For erratic issues, I would definitely finger your provider, not CiviCRM.
4. Unknown db error - you'll need to look at the detailed error log (sure, install my log viewer!).

---
Tags: drupal, php, webserver
---


# Question
Title: Upgrading WP to 5.0.1 deletes civicrm uploads folder
When upgrading a WP multisite to 5.0.1, it completely removed contents within the civicrm uploads directory. I then restored the folder from the backup and all worked.

But this is weird, does anyone know why this happens? Has it happened to anyone else? Not feeling secure to upgrade on production yet when I see things like this.

It makes you run a db upgrade for all sites on the network but that shouldn't have anything to do with the uploads folder.

# Answer
Not seeing this on my only 5.01 site, which uses the old WP CiviCRM file structure. That is, the files are in `<webroot>/wp-content/plugins/files/civicrm` and not `<webroot>/wp-content/uploads/civicrm`.
> 1 votes

---
Tags: wordpress, upgrade, multisite
---


# Question
Title: Label Format does not fit in database - PHP 7.1 json_encode() and serialize_precision
I am encountering this error when attempting to define a new label format, "Sorry an error occurred", "Label Format does not fit in database.".

This is on CiviCRM 5.8.1 on Joomla 3.9.1. I can't reproduce it on dmaster.

* Administer \> Communications \> Label Formats
* Click Add Label Format button
* I used the format settings below:

But if I entered at least some of the measurements as integer numbers only, I am able to save the new label format.

Looking at the civicrm\_option\_value table in the database, value looks like: `{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":9,"font-style":"","NX":3,"NY":11,"metric":"in","lMargin":0.25,"tMargin":0.5500000000000000444089209850062616169452667236328125,"SpaceX":0.1000000000000000055511151231257827021181583404541015625,"SpaceY":0,"width":2.520000000000000017763568394002504646778106689453125,"height":0.95999999999999996447286321199499070644378662109375,"lPadding":1,"tPadding":1}` The very long floating-point numbers look like the cause of the problem. The db column is a varchar(512).

To work around this I had to finish entering the last two values directly in the database table after editing the long numbers back to 1 or 2 decimal places.

Has anybody encountered this before?

---

**UPDATE:** This has arisen since PHP 7.1. See this StackExchange question: *"According to documentation, PHP 7.1.x started to use serialize\_precision instead of precision when encoding double values."*

In `CRM_Core_BAO_LabelFormat::saveLabelFormat()` this line uses `json_encode`: `$this->value = json_encode($v);`

`$v` is OK, it will contain something like:

`array(16) {
 ["paper-size"]=>
 string(2) "a4"
 ["orientation"]=>
 string(8) "portrait"
 ["font-name"]=>
 string(9) "helvetica"
 ["font-size"]=>
 int(10)
 ["font-style"]=>
 string(0) ""
 ["NX"]=>
 int(3)
 ["NY"]=>
 int(11)
 ["metric"]=>
 string(2) "in"
 ["lMargin"]=>
 float(0.25)
 ["tMargin"]=>
 float(0.55)
 ["SpaceX"]=>
 float(0.1)
 ["SpaceY"]=>
 float(0)
 ["width"]=>
 float(2.52)
 ["height"]=>
 float(0.96)
 ["lPadding"]=>
 float(0.12)
 ["tPadding"]=>
 float(0.1)
}` It is only after the json\_encode() that the extra-long floats are present: `string(546) "{"paper-size":"a4","orientation":"portrait","font-name":"helvetica","font-size":10,"font-style":"","NX":3,"NY":11,"metric":"in","lMargin":0.25,"tMargin":0.5500000000000000444089209850062616169452667236328125,"SpaceX":0.1000000000000000055511151231257827021181583404541015625,"SpaceY":0,"width":2.520000000000000017763568394002504646778106689453125,"height":0.95999999999999996447286321199499070644378662109375,"lPadding":0.11999999999999999555910790149937383830547332763671875,"tPadding":0.1000000000000000055511151231257827021181583404541015625}"`

Inserting `ini_set('serialize_precision', -1 );` into `CRM_Core_BAO_LabelFormat::saveLabelFormat()` before the `json_encode()` makes it work for me, as does adding it to php.ini but I'm not sure what the proper solution is.

Does this affect CiviCRM elsewhere? Would this be considered a CiviCRM issue? Or something that should at least be documented (the need to set it in php.ini)?

# Answer
> 2 votes
I confirm that this is a bug in civicrm. I was able to replicate on my local running PHP 7.1.

I've created a Gitlab issue at https://lab.civicrm.org/dev/core/issues/612

---
Tags: address-labels, php7
---


title: CMS Database Integration

text:
# Question
Title: CMS Database Integration
I am a beginner of civi crm, and for views integration I have refered this link https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/

```
Configuration
If you have your Drupal and CiviCRM in separate databases adding CiviCRM support to Views takes a small bit of configuration. Views must be told where to look for CiviCRM data. Administer > System Settings > CMS Database Integration shows some code that must be copied and pasted into the Drupal settings.php

```

This section is not visible in my cicvicrm CMS Database Integration

It shows no query .. something need to enable this to work?Please help me to resolve this

# Answer
> 1 votes
Check that you have the Drupal Views module enabled. If it is not enabled then the settings are not shown on the CMS Database Integration page.

---
Tags: drupal-views
---


# Question
Title: How can I keep track of a "role" in an organisation (eg. secretary) over time (1980-1995)
Under individual contacts, I want to keep track of roles over time within my organisation's executive committee. So, every couple of years the Secretary, Treasurer, Chair, London Rep, Wales Rep etc etc. are newly elected.

I want to be able to record on a contact that they were the secretary from 1999-2001 for example, and then they were the chair from 2001-2004. I expect a full date will be used, but for simplicity we would usually just include the year, as most elections will take place at the AGM and therefore the same month every year. There are of course exceptions, where people resign mid-term.

I would also like to be able to record that they were the "X" role from 2016-present, and be able to display/view all the "Current" roles, based on them being "X" month/year to "present".

# Answer
Welcome to CiviCRM StackExchange Daniel!

The CiviCRM relationships functionality will work perfectly for your use case scenario -

https://docs.civicrm.org/user/en/latest/organising-your-data/relationships

You can have different relationship types (roles) and they can be linked between individuals and organisations. A contact can also have multiple relationships.

And of course relationships include both a start and end date.
> 6 votes

---
Tags: relationships, tags, roles
---


# Question
Title: CiviCRM access for Wordpress custom group users
I am using CiviCRM 5.8.1 (update to 5.8.2 will be done shortly) on Wordpress 5.0.1 with German localization. For extended permission management on WP, I use Advanced Access Manager.

I created a group for the office users and granted them access in CiviCRM - Administration - User and Roles - Access control and granted them all necessary permissions including CiviCRM access.

Wordpress and CiviCRM user are properly matching (the WP user ID is listed the respective contact of the CiviCRM user).

Nevertheless, except for users with the WP Administrator role, all menu items of the CiviCRM backend except for search, contacts and CiviSEPA Dashboard keep invisible.

I tried it with different groups and also ensured that on the WP side, all capabilities in AAA with relation to CiviCRM are enabled.

To exclude side effects I removed all previously existing CiviCRM specific permission configurations (except for the administrator), including CiviCRM groups, allocations between WP and CiviCRM groups and ACL.

Anybody an idea where else to look? I tried to find hints by searching but presently I am stuck. Thanks!

# Answer
Obviously, the CiviSEPA extension messes with the menu for users without administrative permissions. Disabling this extension in the ACL for the non-admin groups solves the problem
> 1 votes

---
Tags: wordpress, groups, permissions, acl
---


# Question
Title: Why do click and open reports show times in UTC rather than the site's timezone?
The mailing and click tracking reports are showing times in UTC. There is no PHP MySQL timezone mismatch - and `mysql -e 'select now()'` and `date` return the right times - as per timezone.

# Answer
> 7 votes
Mailing clicks and opens are registered via scripts in extern (which are quite old) - and don't appear to use the cms environment - as such if the timezone isn't set for php and has defaulted to UTC - this won't show in the warnings - despite it being the issue. To detect this compare the result of php To confirm this is the problem run

```
php -r 'echo date_default_timezone_get() . PHP_EOL;'

```

if the result is UTC - then you can fix by setting the date.timezone value correctly in your php.ini or similar file.

This won't resolve historical data but will mean clicks and opens in the future are recorded in the correct timezone.

---
Tags: civimail, civireport, php, timezone
---


# Question
Title: Shoreditch theme is not working when resource URL is "localhost"
I installed CiviCRM V5.7 with shoreditch theme on localhost computer and looks good. I am accessing a site from another computer but not looking good (UI).As per the shoreditch extension, I put 'seven' as default theme.

# Answer
Your screenshot shows the URL for CSS files at "http://localhost". This suggests that either your `CIVICRM_UF_BASEURL` in `civicrm.settings.php` is incorrectly set to `localhost`, or that the same problem exists in one of the directories or Resource URLs (in **Administer menu » System Settings » Directories** or **Resource URLs**).
> 2 votes

---
Tags: shoreditch
---


# Question
Title: How can I get Double Opt in to work when using a Profile for to create a user/contact
Wordpress 4.9.8, CiviCRM 5.6.0

I'm in Wordpress trying to use CiviCRM profile forms to capture information from users for registration. At the same time, this will create their Wordpress user.

However, CiviCRM lets you create any user you want, with any available email, using a profile page without getting any confirmation via an email address...

Surely this puts us in violation of some of the newer GDPR laws?

The only double opt in that happens is if you use the option to add someone to a group and it sends them an opt in mail. This is pretty useless since it's just let you create a user with any email address you want.

This seems to let the system be open for abuse.

Am I missing a setting somewhere?

Thanks, Norman

# Answer
> 3 votes
I would like to comment on Jon G's answer, unfortunately this seems not to be possible directly after sign-up to stackexchange:

Basically, I have the same problem by accepting memberships with pay later option (payments via invoice). Anyone can sign up and have someone sent a membership invoice via e-mail.

I just tried the "Email verification on signup" plugin, but with no success: It messes with the groups plugin, which I am using to sync CiviCRM memberships with wordpress accounts. This plugin assigns all newly registered users to the "registered" group. However, unfortunately not the ones which get processed via the new verification plugin.

Anyways, this would only be half of the solution, since the confirmation needs to be propagated back to the CiviCRM database BEFORE sending out e-mails with invoices.

So, basically I am also searching for the right answer on how to prevent bogus sign-ups to trigger unsolicited E-Mails, which could indeed be regarded as non GDPR-compliant.

Currently, this answer might be a customization with an additional membership state like "pending\_unverified" which would be transformed into "pending" after successful verification of the provided e-mail. However, this sounds like a lot of work.

---

Update: @petednz - thanks a lot!

I just tried something different (again, rather a comment than a solution):

Given that adding a member to a group will trigger the double opt-in, I defined a new group, to which all new members are automatically added while creating their wordpress profile. My hope was, to receive a confirmation request for the e-mail address and have at least the confirmation on record, even if member access to wp pages would be possible w/o confirmation.

Unfortunately, no confirmation link was sent out by CiviCRM. Instead, no username/password could be set for the wordpress account. Instead, the new member is logged into wordpress and receives also an e-mail with the request to set a new password. While this, in theory, can be seen as kind of a confirmation of the e-mail address, there is nothing on record within the CiviCRM system. I am now a bit confused, how not even addition to a group will trigger the confirmation precedure. I will have to dig deeper into this during the next weeks.

Just to sum up, what I originally tried to achieve:

* new member registers online and will pay later
* he provides his e-mail address during the registration
* he receives an e-mail with a confirmation link to confirm his e-mail address (this is logged for GDPR purposes within the system)
* once this is done, an e-mail with an invoice is sent to him
* upon receipt of payment, membership status goes from pending to new as usual

# Answer
> 1 votes
I think the easiest solution would be for WordPress to send an email to confirm the user registration. Perhaps an extension like Email verification on signup or Pie Register would meet your needs here.

---
Tags: wordpress, profile
---


title: CiviCRM Views Showing Wrong Custom Data

text:
# Question
Title: CiviCRM Views Showing Wrong Custom Data
I have a strange Views problem. I'm on Drupal 7 and CiviCRM 5.4.0. I produced a View of case activities by showing several custom fields, one custom field called "placement". The placement field has options: None, A, B, C.

On the most recent case activities called Update, the placement field is B. However, when I look at Views, the placement field is C. The Views has current revision set to TRUE, deleted case FALSE, deleted activities FALSE, and deleted contacts FALSE.

If I go to cases and change the custom placement field to A, then Views show B. Basically, the case and Views are not matching. In fact, the Views page shows the option after what is selected in cases. Is this a recent bug?

# Answer
Upgrading resolved the issues!
> 2 votes

---
Tags: civicase, activities, drupal-views
---


# Question
Title: Retrieve Drupal user id from CiviCRM Contact id
Is it possible to retrieve Drupal uid from CiviCRM Contact id? Can any one please guide me?

OR

Is it possible to get the Drupal user detail associated to a payment contribution?

# Answer
As others have noted it's not clear what you're asking but based on your wording I'm going to assume you mean via code. You can use the api explorer at https://mysite.org/civicrm/api (replace "mysite" with your actual site) to explore what's available and give you some sample code. Here's how to get the drupal uid given the civi contact id.
> 1 votes

# Answer
Yes,

On the contact summary page there is a Contact ID/User ID field - the second number is the drupal uid - and links through to the user record.
> 0 votes

---
Tags: civicrm-entity
---


# Question
Title: CiviCRM + Webform + Paid Events - no price displayed in table
I'm using Webforms for events because I have a parent/carer booking up to three children onto a holiday club.

I am struggling with the price. I have a contribution page set up (I've tried with and without a price set), and I have the Participant fee exposed with the values defined (user select: 1 day, 2 days or 3 days).

When I click 'Next' to display the contribution page/table, it always says 0.00 with no row in the table to display the price of the event registration. I can't see anything similar online and I'm not sure what I'm missing?

Possibly a separate issue: I'm using PayPal Standard as the payment processor but when I 'Submit', it' doesn't go to PayPal's website to take the payment. Is it compatible yet?

If I add a 'Contribution Amount' field, it adds that to the table - in the meantime, I'm using conditionals to populate this field. I wasn't expecting to need that field.

# Answer
Some thoughts:

ad $0 -\>

* do you have the Event (in CiviCRM) configured as an is-paid event?
* are you already registered perhaps? It is clever enough to know you
do not need to pay again. So you'll be deleting your Participant records lots when you're testing a Webform CiviCRM that has an Event enabled;

ad on building your Participant Fee -\>

* create regular drupal select and/or checkboxes to gather the data you need to build the Participant Fee Then use Conditionals to say:
* if select = full day (example) and category = student -\> then Participant Fee is set to: $50; if select = half day (example) and category = student -\> then Participant Fee is set to: $30; if select = half day (example) and category = regular -\> then Participant Fee is set to: $90;

Key is you need to build your own Participant Fee - of course this is also what gives you huge flexibility as to what you can create.

I have some code in testing/review that will check the priceset that is configured on a contribution form in order to create lineItems with the correct price\_field\_value\_id - that's critical financial types (and thus sales taxes to be applied properly), under some conditions. You'll know what I mean when you do encounter it yourself. It's the first bit we actually do with priceset configs in Webform CiviCRM.

What you can (recently) do is add more lineItems to a contribution \[purchase calendar + make a donation scenario\] - and it will create a contribution with two lineItems - priceset like. But for Event fee you can build the conditionals - and even add in discount codes - as I've illustrated here: How can I emulate a CiviDiscount when using Webform CiviCRM?

I hope that helps you along. If you have any further questions don't hesitate to ask.
> 2 votes

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


# Question
Title: Search for Transaction ID of CiviEvent Sub-Contribution
Sometimes we'll have someone pay X amount via credit card (Paypal Pro) and register online for an event. Then, they'll call us, and we'll add additional options to the event (via Change Selections), and then run a credit card transaction against the main balance. This works fine.

However, we are having issue searching for the second transactions ID via standard civi searches. Any suggestions? Our accountant uses this for reconciliation.

Similar: Finding payments in contributions

Bug (no updates in awhile): https://issues.civicrm.org/jira/browse/CRM-17808

CiviCRM 5.5 Drupal 7.x

Possible Solution:

https://civicrm.org/extensions/extended-reports

The Extended BookKeeping Report allows for searching by Transaction # civicrm/report/contribution/bookkeeping\_extended

# Answer
> 2 votes
We created an extension that adds Search Payments functionality, as well as a Payments section to Advanced Search: https://github.com/JMAConsulting/biz.jmaconsulting.findpayments

HTH.

---
Tags: civievent, civicontribute
---


# Question
Title: custom fields not adding to Drupal views
I'm trying to build a drupal view and pull in rm custom data For both contact (client) and case (view for case contact, relationships include case contact id-case id, and case contact id- contact id)

From add fields- all the data sets I need are visible

After selecting fields and clicking add, I'm taken back to the views edit screen without the option to edit the field label etc. And the field does not appear in the field list.

This is not consistent... for example from data set "x" fields, a, b c, d and e are all available to choose. Fields b and d, can be added to the view. Fields a,c and e fail to materialise.

Anyone seen anything like this? Anything else I should be looking at?

(Drupal 7.60, civi 5.3.1)

settings.php file has been updated

The views cache, drupal cache and civicrm cache have been cleared several times

One of the custom field sets in question

Selecting fields to include in view

Only 2 fields out of 7 end up in views table (end columns) Other Details and Project

# Answer
> 1 votes
Updated Civi to latest version.

Updated views related modules in Drupal to latest versions.

Rebuilt view.

Original view was based on case contact id, and pulled in case details and case contact details.

Rebuilt as a case view, and then added single relationship to Case Contact.

So either 1) upgrading modules or 2) not building complicated queries in views in the first place

Worked.

Massive thanks to Pete from Fuzion for help and support.

And to everyone else who chipped in

# Answer
> 1 votes
It sounds like it is missing from your Drupal settings.php file. Here's where you get the information to add to it:

https://www.yourdomain.com/civicrm/admin/setting/uf?reset=1

That will give you all the information that needs to be added. Each time you add custom fields/profiles to CiviCRM, it is a good idea to update that listing in your settings.php file.

---
Tags: custom-fields, drupal-views
---


title: Setting Select2 widths

text:
# Question
Title: Setting Select2 widths
We have a number of forms that have items on them using the built in Select2 support. They aren't quite wide enough; annoyingly so. For the default selection, you can see the membership type and the $ and first digit of the price, but not the whole thing. Members have to click on the list to see the amount they are being charged, even if they aren't going to change membership plans.

I've identified the divs that wraps around the Select2's, and can control them in other ways; such as hiding them with with either css or js. But not width. I have tried things like:

$(".Membership\_Type-content").width(300);

or

div.Membership\_Type-content { width: 300px; }

to no effect.

Has anyone done this?

# Answer
The width for Select2 fields is set as an inline style to the element itself. So, to override the inline width, you'd have to use **!important** in your CSS.

For reference: https://stackoverflow.com/q/16813220
> 3 votes

# Answer
I recently figured out that you can add a `style` parameter when generating the Select2. For instance, I was able to force a 600px width here:

```
  $form->addEntityRef("financial_account[$i]", ts('Source Fund'), [
    'entity' => 'financial_account',
    'style' => 'width: 600px;',
    'api' => [
      'params' => [
        'financial_account_type_id' => 'Expenses',
      ]
    ],
  ]);

```

So this opens the possibility of a) setting widths however you like when you're creating the forms; b) of modifying existing forms with the `buildForm` hook.
> 1 votes

---
Tags: css, select2
---


# Question
Title: CiviMail *only some* Tracked Click Throughs not Redirecting properly
We have a problem with tracked click trough links ending up in a 404 Page not Found but ***only*** when the target URL ends in a hyphen.

e.g. we link to something like and end up nowhere: https://mysite.eu/this-will-not-work-

while this works as intended: https://mysite.eu/this-will-work-all-right

Is anyone able to reproduce?

We are on Wordpress 4.9.x, PHP 7.0 and Civi 5.3 (and planning to upgrade real soon).

# Answer
> 2 votes
This was reproduced back in 2010: https://issues.civicrm.org/jira/browse/CRM-7192

In short, this is a bug in CiviCRM that someone could fix, but it's very rarely triggered, and those who are affected haven't decided it was worth investing in the fix.

---
Tags: civimail, tracked-links
---


# Question
Title: Change Payment Method without creating additional transactions
A version of this has been asked before \- but the answer was quite complex - so I am hoping for an ELI5.

Essentially - when manually adding contributions - sometimes people make mistakes. when editing a contribution - from check to cash for example - a debit and a credit is processed. See example below of a contribution that was entered as Check but was actually cash and was changed. While that's typically fine - when trying to find a specific contribution - these old records clutter the results. Is there a way to make sure they do not appear in searches and reports - or is there a way to simply delete the old payment detail records - as really there was only supposed to be one in the first place.

# Answer
> 4 votes
So the answer is that it is not possible to change a payment method in core without creating additional financial transactions.

**Background:** a decision was made by some with decision powers that every edit should produce such transactions so this is working exactly as designed and the argument given is that this is in order to be compliant with accounting standards. The odd thing is that of all the projects we render IT services for every single CA considers such transactions noise and not helpful at all. I hope at some point we are able to revisit this and be allowed to simply delete payments \[possibly with a permission level so a superadmin would need to authorize it\] - it's completely reasonable to be able to delete transactions that never happened but were entered accidentally b/c of a default payment method e.g.

**Your current options:** a) via the GUI the only way to 'fix' this is for staff/admin to delete the entire contribution and re-enter it. b) via the Database: if you have access to mysql like you do - you can remove the extraneous transactions across a number of tables. I did one for a client this morning. Before you do this track a couple of contributions/'refunds' all the way through through all financial\_ tables to familiarize yourself with the structure.

**Another way to look at this is:** admin/staff are allowed to delete all financial transactions - 3 in your case (by deleting the contribution) but are not allowed to delete a subset of the 3 - i.e. 2 in your case; whereas if you have permissions to delete all contacts, you can delete a subset;

PS - in credit card payments when mistakes are made a payment can be voided after it has been authorized but before it has settled. Such payments do not show up on a credit card statement. Perhaps we can adopt that concept and allow payment mistakes to be corrected for a limited time, as most mistakes will be caught (almost) immediately.

---
Tags: civicontribute, contributions, payment
---


# Question
Title: CiviPledge extension enabled but can't access
We have recently updated CiviCRM to version 5.8.2 and we have enabled the extension "CiviPledge".

Documentation shows that this should be visible under the "contributions" option in the dropdown list, but we cannot see it or access it at all. See pictures below showing that it is enabled and not able to be accessed in the contributions dropdown.   We had hoped that updating to version 5.8.2 would solve this problem and let us access Pledge, but unfortunately we still have no idea why we can't access it.

Additionally we have tried modifying the navigation bar to see if it's an issue with Pledge not showing up in the navigation bar, see the image below. Pledge shows up in there but any changes saved aren't actually applied. All of these are ticked as "enabled".

Any help will be greatly appreciated. Thank you.

# Answer
> 2 votes
It looks like you haven't granted the CiviPledge permissions to a role your user(s) have.

Go to your Drupal permissions (https://yoursite.org/admin/people/permissions) and search for the CiviPledge permissions and grant them according to your needs.

---
Tags: civipledge
---


# Question
Title: Warning after installation: Invalid argument supplied for foreach() in CRM_Utils_Check_Component_Env
anyone an idea what this warning is about? I get this warning straight after fresh installation.

Warning: Invalid argument supplied for foreach() in CRM\_Utils\_Check\_Component\_Env-\>checkVersion() (Zeile 522 von /www/myorg/sites/all/modules/civicrm/CRM/Utils/Check/Component/Env.php).

My Environment:

* OS: OpenSUSE Leap 42.3
* PHP Version: 5.5.14
* CiviCRM Version: 5.7.0

Would be great if someone can support!

Regards, Said

# Answer
The code in question is checking whether CiviCRM has updates available that you haven't installed yet. If you've reached line 522, that means that CiviCRM has that info - possibly from checking https://latest.civicrm.org/ but more likely because it saved the results in `version-msgs-cache.json`. However, the error is suggesting the info isn't present.

This could be a weird file permission issue, or perhaps a malformed `version-msgs-cache.json`. If you know you're running the latest version of CiviCRM, I'd ignore this and see if it clears up when the cache expires (72 hours). If you're not running the latest version, please edit your question with a) the CiviCRM version you're running, b) the contents of `version-msgs-cache.json`, which should be in your CiviCRM uploads folder.
> 1 votes

---
Tags: installation
---


# Question
Title: Foreign key violation on creating new Financial Type
I've got a 5.8.2 install on Drupal 7.61. When I try to add a new Financial Type, from `/civicrm/admin/financial/financialType?reset=1`, and click `Add Financial Type` button, after I enter the info and hit `Save`, what I see in the GUI is that the spinner spins forever, never returning control to the user. The debug log shows (I've put some hard newlines in for readability):

```
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::exceptionHandler prefix=""
info="INSERT INTO civicrm_financial_account (name , contact_id , financial_account_type_id , account_type_code , description ,
is_header_account , is_deductible , is_tax , is_active , is_default )
VALUES ('New Fin Type' ,  1 ,  3 , 'INC' , 'New Fin Type descript' ,  0 ,  0 ,  0 ,  1 ,  0 )
[nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`drupals_uherocrm2`.`civicrm_financial_account`,
CONSTRAINT `FK_civicrm_financial_account_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE SET NULL)]"]

```

What this seems to show is that it is trying to create a new Financial Account (which I don't really understand because I thought I was only creating a Fin Type), but the Account needs to be linked to an existing Contact, and it's using contact\_id=1 as a generic default? But I don't have a Contact with this id=1 in my system.

Any clues what's going on here? The GUI for creating a Fin Type is simple and doesn't given any clues about being linked to a Fin Account, at least not at creation time. Thanks.

Edit: Here is a pastebin of part of my error log, including two examples (which should be equivalent and redundant) of the constraint violation, along with a whole bunch of other junk besides the backtrace, whose value I wasn't sure of, so it was safer to include it. I've edited the file a little to remove my real domain name, just for a little more anonymity. Hope this helps to clarify: https://paste.pound-python.org/raw/15EPAPfiKEuG7T3in945/

# Answer
> 1 votes
Looks like the Default organization contact is missing in your database. Try to resave the contact by navigating to CiviCRM \>\> Administrator \>\> Communications \>\> Organization Address and Contact Info

---
Tags: financial-types, financial-accounts
---


# Question
Title: "CiviCase: access all cases and activities" Issues
I realize that this has been spoken about and that there was a solution on posted (and it did work for me on 5.4 - Now on Civi 5.6.1 any user that does not have "CiviCase: access all cases and activities" checked i get a "ERR\_TOO\_MANY\_REDIRECTS" error when trying to access the Civicase Dashboard or Manage Cases.

I checked if the fixes were applied from the pull - And Yes they are, but I cannot have users seeing other peoples Cases - It works for the Administrator - I can access all the Cases and don't get the redirect error.

# Answer
> 2 votes
Can you try this patch https://github.com/civicrm/org.civicrm.civicase/pull/123

Hope that helps!

---
Tags: error, civicase
---


title: Problem with CiviCase

text:
# Question
Title: Problem with CiviCase
I have tried to enable the access to the Access my cases and activities as per The docs here - https://docs.civicrm.org/user/en/latest/case-management/set-up/

Access my cases and activities: allows a user to create new cases, add activities to the cases they've created and edit those activities. Users with this permission can NOT see cases or activities created by others.

However, whenever a user with that permission tries to access their own case they get an access denied. I think it has to do with the edit activities that are in cases. Has anyone else had this issue. It makes the "Access my cases and activities" permission unusable.

Using CiviCRM Version 5.3.2 and Drupal 7.59

# Answer
> 3 votes
This looks like a bug. It's coming from CRM\_Case\_Page\_Tab::preProcess(), which calls CRM\_Case\_BAO\_Case::getCases(), which then returns a list that's keyed sequentially, but then preProcess checks for a key that matches the case id, so there is no match.

```
$userCases = CRM_Case_BAO_Case::getCases(FALSE, array('type' => 'any'));
if (!array_key_exists($this->_id, $userCases)) {
  CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
}

```

This appears to have inadvertently been changed as part of CRM-21461. I'll file a bug report.

# Answer
> 3 votes
This was a regression which is now being fixed. See https://github.com/civicrm/civicrm-core/pull/12613

# Answer
> 2 votes
Can you try this patch https://github.com/civicrm/org.civicrm.civicase/pull/123

Hope that helps!

---
Tags: civicase, permissions
---


# Question
Title: CiviEvent : display future and past events
I have two issues on a Joomla website, I want to display future and past events from the CiviEvent component on the front-end but it doesn't work.

Future events: the website only displays the next event and I can't find an option to have more than 1 on the page. Where would I change this ?

Past events : I didn't find anything to display past events on the front-end, there's no menu item available to do this. How can I display them ?

Thank you for your help.

# Answer
The CiviCRM HTML listing URL may help.

By default this displays all current and upcoming events that are active and have been set to public –

/civicrm/event/ical?reset=1&list=1&html=1

You can add parameters to this URL to filter by dates and event types –

This example will display events that start from 1st Jan 2019 -

/civicrm/event/ical?reset=1&list=1&html=1&start=20190101

This example will display events of type conference (type=1 is the ID of event type Conference)-

/civicrm/event/ical?reset=1&list=1&html=1type=1

This example will display events of type conference AND with a start date \>= 1st Jan 2019 –

/civicrm/event/ical?reset=1&list=1&html=1&start=20190101&type=1

You can use the end date parameter to display past events, for example, this link will display all events that were held in 2018 -

/civicrm/event/ical?reset=1&list=1&html=1&start=20180101&end=20181231

Downsides without any development –

The title of all the pages will display as Current and Upcoming events even if you are displaying past events.

You can’t remove/add/reorder the columns.
> 2 votes

# Answer
Could you clarify your question?

When you mean display past / Future events in the front end do you mean just showing a link?

It would be helpful if you provide a screenshot.
> 0 votes

---
Tags: civievent, joomla
---


# Question
Title: Implementing Duplicate Membership With Different Membership Form Information
i have a scenario in which Organizations through their staff apply for permit to build Cell Sites. Now i treat the application as a membership because there is annual renewal fee. Now the challenge is this:

Organizations can apply for fresh permit to build another cell site leading to a scenario where you have one Organization multiple membership/Permits for cell sites. I want a situation where each application/permit can be added to the organization without causing any conflict.

What is the best way to implement this scenario of multiple membership to same organzation.

Also, because each application/permit has different information captured inn the form fields, is there a way to add automatic numbering to each membership form so that specific permit/membership form can be called up and viewed individually?

Currently using Wordpress with Latest Civicrm.

# Answer
> 1 votes
I thought there was an extension out there which permitted this but didn't find it in my quick trawl. The answer will partly depend on what the maximum number of such towers might be.

The original workaround for this was to create multiple membership each 'owned' by a different Organisation (ie when you create the Membership Type, you set up the first type to belong to Org-A, next one to belong to Org-B etc)

You can see a discussion about that here: https://forum.civicrm.org/index.php%3Ftopic=31251.0.html

But as I said i thought there was a way to specify in civi that each 'new' membership be treated as a separate membership and not a renewal (ie avoiding the 'upsell' concept') but the only thread i found about this was https://civicrm.org/blog/eileen/price-sets-memberships-multiple-memberships

---
Tags: wordpress, civimember
---


title: Create report of group count

text:
# Question
Title: Create report of group count
I would like to create a report which simply has the total number of people in a particular group. The reason for a report rather than just going to manage groups and looking is that I want to email this number to the client weekly preferably automatically. Under reports I couldn't see that I could select groups. Can I do this using reports? Or is there another way (I did look at automatign an sql query but the group is a smart group and I can't see how to count that)

I'm open to any solutions!

Thanks

# Answer
> 2 votes
In the reports you can use the Filters tab to select on only the members who are in the group you are interested in. You can create a new report that has the filter so you can use this for the automatic mailing. This will send the whole list if group members (you can cut down the fields. It will have the number of group members at the bottom of the pdf, but will also list all the members (which you may not want).

---
Tags: reports
---


# Question
Title: How to Set Up a Particularly Wonky Membership Type?
The foundation where I volunteer has been around for 52 years and is finally adopting a CRM and I am responsible for making it work :/ I didn't even know Civicrm existed until three days ago. I'm struggling mightily on multiple fronts. I haven't slept in two days, but to stay on topic;

It has a membership type called a "Lifetime Membership". In many ways its like a layaway program. Supporters can pay as little as they like, as long as they like, on whatever regular or irregular schedule they want. On the magic day that their contributions total the membership cost, they become Lifetime Members. In theory, I guess all I need to do is keep their membership status set to "pending" until they reach the goal, which could take years. But I'm kinda fumbling between the docs, youtube videos, this forum and the crm trying to set this up. If anyone would be so kind as to give me a bullet pointed list of action items to accomplish this, I would ... I think I would cry... Thanks

# Answer
A slightly off beat thought on this:

* just set up a Contribution Page without any membership types, but with a special Financial Type
* use the Summary Fields extension to sum up the amount someone has paid of this type
* use CiviRules to then give the person the 'lifetime' membership.
> 1 votes

---
Tags: civimember
---


# Question
Title: How can I add/rearrange custom fields in the default contact view template?
We would like to rearrange the output of custom fields on the basic contact view page (in Drupal, /civicrm/contact/view?cid=NNNN&reset=1) in CiviCRM 4.5 on Drupal 7. Specifically, since this is a university student organization, we have a custom field called "Class Year" (simple text, field id 31, in custom data group 1 "Enrollment information") that we would like to display in the main title, after the display name. Thus, the page headline would say *Joan Smith 2017* instead of the default *Joan Smith*.

The template to override we found easily enough in `/sites/all/modules/civicrm/templates/CRM/Contact/Page/Inline/ContactName.tpl`. The question is then **what is the template variable for this custom field**?

We could not locate this in the documentation, and all the forum threads that come up seem to be about customizing event or contribution pages, not the contact page itself.

With debugging on, adding the `&smartydebug=1` parameter to the query string on the record returns this value for {$viewCustomData}:

`Array (3)
1 => Array (1)
 1421 => Array (7)
 title => "Enrollment information"
 name => "enrollment_information"
 help_pre => ""
 help_post => ""
 collapse_display => "0"
 collapse_adv_display => null
 fields => Array (11)
 31 => Array (5)
 field_title => "Class Year"
 field_type => "Text"
 field_data_type => "Int"
 field_value => "2017"
 options_per_line => null
 2 => Array (5)` \[snipped\]

Based on this and examples of template overrides elsewhere, we have made a number guesses, among them

> `{$custom_value_31}`
> `{$profileFields_1.custom_31}`
> `{$viewCustomData.1.fields.31}` `{$viewCustomData.1.1421.fields.31}`

but they have all been fruitless.

Google finds very few forum threads at all that even mention {$viewCustomData}, so any enlightenment is greatly appreciated.

# Answer
As with *Howto hide/disable fields not needed*, the best answer as of CiviCRM 5.7 is to use the **Contact Summary Layout Editor** extension, which enables an admin to create and rearrange arbitrary blocks of fields on the main view contact screen and to remove unwanted fields. In addition to handling core and custom fields, it includes a mechanism for managing blocks supplied by other extensions.
> 2 votes

# Answer
The template `templates/CRM/Contact/Page/Inline/ContactName.tpl` does not contain any custom fields. Instead of adding `smartyDebug=1` in the url, which dumps variables in the main template, try adding the smarty tag `{debug}` in this specific template to see the available local variables.

At minimum you will probably find the contact id, and from there you could use the api to fetch necessary data (note the api explorer can generate this syntax for you):

```
{crmAPI var='result' entity='Contact' action='getvalue' return="custom_1" id=123}

```
> 4 votes

# Answer
Since you are trying to modify the way the contact's display name appears on the summary screen, there is actually a hook for that: hook\_civicrm\_contact\_get\_displayname.

From within your hook you can use the api to fetch the value of the custom field, and append it to the display name.
> 2 votes

# Answer
If this is a Drupal site, you can create a block that loads the user and the civi contact to acquire the class year field value and then use jQuery ($cj in CiviCRM) to append the field but the more I think about this, the more I think this requires a custom extension where the extension would acquire the field and use hook\_civicrm\_contact\_get\_displayname (as suggested by coleman) to modify the display name.

You could flesh it out to make it more flexible and as you've noted so that you could choose to display whatever fields you like. The caveat is that you'll need to learn the civix tool and various parts of the API so depending on your skill level, there will be some tinkering and exploration required to make it happen.
> 2 votes

# Answer
We have a custom field called "Grade/Class" for the kids in our org. This field is part of the "Child" custom field set.

The id for the custom field set is 4. The id for the custom field itself is 7. We needed the child's Grade/Class field in the Demographic section of the summary screen. So we added a row with the following code to CRM\Contact\Page\Inline\Demographics.tpl. We use:

```
  <!-- adding Grade/Class -->
  <div class="crm-summary-row">
    <div class="crm-label">{ts}Grade/Class{/ts}</div>
    <div class="crm-content crm-custom_data">
       {crmAPI var='result' entity='Contact' action='get' sequential=1 contact_id=$contactId return='custom_7'}
         {foreach from=$result.values item=Contact}
           {assign var='n' value=$Contact.civicrm_value_child_4_id}
           {$viewCustomData.4.$n.fields.7.field_value}
         {/foreach}
    </div>
  </div>
  <!-- end of Grade/Class -->

```

In the API call (like Coleman said), you return the custom field itself, so for you, it'd be 'custom\_31". Then in the *assign* line, the value would be $Contact.(whatever the name of your custom table is in your database plus \_id to grab the info from the ID column; so perhaps: $Contact.civicrm\_value\_enrollment\_information\_1\_id). The next line would be: {$viewCustomData.1.$n.fields.31.field\_value} .
> 2 votes

# Answer
Assuming that:

* "7" is the custom field's id
* "civicrm\_value\_constituent\_information\_1" is the associated table name

the following code permit the data entry in the form

```
  {crmAPI var='result' entity='Contact' action='get' sequential=1 contact_id=$contactId return='custom_7'}
  {foreach from=$result.values item=Contact}
    {if $Contact.civicrm_value_constituent_information_1_id}
      {assign var="field_name" value="custom_7_`$Contact.civicrm_value_constituent_information_1_id`"}
    {else}
      {assign var="field_name" value="custom_7_-1"}
    {/if}
  {/foreach}
  {$form.$field_name.label}
  {$form.$field_name.html}

```
> 1 votes

# Answer
This worked for me

```
  {$form.<field_name>.label}
  {$form.<field_name>.html}

```

but i took the "field\_name" from the page source before deleteing the CustomData.tpl reference
> 0 votes

---
Tags: custom-fields, custom-templates, contact-view, smarty
---


# Question
Title: New Mailing Cannot "Review and Schedule"
CiviCRM 4.7.23, Drupal 7.39 I can fill the first page of a new mailing ("Define Mailing") but the "Next" button and the "Review and Schedule" tab are unresponsive. The mailing is listed under Draft and Unscheduled Mailings.

I've had the trouble before and was able to change a setting the civicrm\_mailing table, but have forgotten what I did and cannot make the edits necessary to trigger the "Next" button.

I have searched similar questions, but could not find the same issue. I apologize if this is a duplicate request for help.

# Answer
> 1 votes
After trial and error got it to work by modifying record in table: civicrm\_mailing
1) Set Is\_Completed to 1 and
2) Approval\_Status\_ID to 1

---
Tags: mailing
---


title: Bootstrap for Native Civicrm Mobile Use

text:
# Question
Title: Bootstrap for Native Civicrm Mobile Use
Is there a project to enable Bootstrap in Civicrm to convert Civicrm natively into Mobile View?

Thank you!

# Answer
> 2 votes
There is a civi mobile app for Android and iOS. See https://civimobile.agiliway.com/ and https://civicrm.org/blog/skornien/civimobile-a-native-mobile-application-for-civicrm

# Answer
> 2 votes
Yes, there is the Shoreditch extension which replaces the user interface with a more modern theme based on Bootstrap.

---
Tags: mobile, bootstrap
---


# Question
Title: How do I setup an online contribution page linked to Mogiv?
We are using Mogiv for our online giving portal. How can I link my online giving transactions from Mogiv to my contacts in CiviCRM?

# Answer
> 2 votes
You can export from Mogiv and import them in to civicrm using an External Identifier to match the contacts, or match on eg First + Last + Email by choosing the right 'matching rule' when you do the import.

---
Tags: contributions, recurring-contributions
---


# Question
Title: Navigation & Extension issues Civi5.8.2 & Drupal8
Having installed a site with **the latest versions of Drupal8 and CiviCRM**, I connected it to a **shared CiviCRM database**.

1. I followed the "full manual process" of David Snopek to successfully install Drupal 8.6.4 & CiviCRM 5.8.2 !
2. Then I used the advices of Jon G. on how to separate the Drupal 8 database from my CiviCRM database.

These were great positive steps but very fast, I run into issues concerning the Navigation and several Extensions.

Concerning the **Navigation issue** the menu items are shown in a wrong alignement and they are not clicable.

The **Shoreditch extension** is ON but it could not not seen in the CiviCRM settings for the Resource URLs (civicrm/admin/setting/url?reset=1). I manually did set the path.

On one page there is a missing image with this warning : **"civicrm Forbidden You don't have permission to access /vendor/civicrm/civicrm-core/i/Inform.gif on this server."** Can this be a clue ?

Concerning the **Extensions**, most of them works fine, like on the Drupal7 sites sharing the same CiviCRM 5.8.2 database. The most troublesome extension is the API v4(org.civicrm.api4) that handle the Contact Layout Editor (org.civicrm.contactlayout). This extension break the CiviCRM site : **The website encountered an unexpected error. Please try again later.** The Drupal8 is still OK and gave this error message :

> Symfony\Component\DependencyInjection\Exception\InvalidArgumentException: Unable to parse file "PATH/sites/default/files/civicrm/ext/org.civicrm.api4/services.xml". in Symfony\Component\DependencyInjection\Loader\XmlFileLoader-\>parseFileToDOM() (line 386 of PATH/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php).

Another point is there no Views integration settings in the **Settings - Drupal Integration**

Thanks for any help ;-)

---

EDIT (pasted from comment)

Thank you very much Jon,

This clarify the question about the position of the vendor file. **Your point of view make great sense.** It seems to be a more clean organisation and for the security reasons that you mentioned also, I do agree.

So I will then withdraw from this direction where vendor was webroot-accessible to go forward with symlinking the vendor directory into the webroot. But when I follow the process, and at the very beginning of your Drupal 8/CiviCRM notes, with the Civi 5.8.2 there is an Error : our requirements could not be resolved to an installable set of packages. I do not recall this error when I use the (a) method (vendor in the webroot).

But when I follow the process, and at the very beginning of your Drupal 8/CiviCRM notes, with the Civi 5.8.2 there is an Error : our requirements could not be resolved to an installable set of packages. I do not recall this error when I use the (a) method (vendor in the webroot).

> But when I follow the process, and at the very beginning of your Drupal 8/CiviCRM notes, with the Civi 5.8.2 there is an Error : our requirements could not be resolved to an installable set of packages. I do not recall this error when I use the (a) method (vendor in the webroot).
>
> ```
>    Problem 1
>     - civicrm/civicrm-core 5.8.2 requires civicrm/civicrm-cxn-rpc ~0.17.07.01
> -> satisfiable by civicrm/civicrm-cxn-rpc[v0.17.07.01].
>     - Installation request for civicrm/civicrm-core 5.8.2
> -> satisfiable by civicrm/civicrm-core[5.8.2].
>     - Conclusion: remove psr/log 1.1.0
>     - Conclusion: don't install psr/log 1.1.0
>     - civicrm/civicrm-cxn-rpc v0.17.07.01 requires psr/log ~1.0.0
> -> satisfiable by psr/log[1.0.0, 1.0.1, 1.0.2].
>     - Can only install one of: psr/log[1.0.0, 1.1.0].
>     - Can only install one of: psr/log[1.0.1, 1.1.0].
>     - Can only install one of: psr/log[1.0.2, 1.1.0].
>     - Installation request for psr/log (locked at 1.1.0)
> -> satisfiable by psr/log[1.1.0].
>     Installation failed, reverting ./composer.json to its original content.
>
> ```

Is this a setting only that I can change in the json file of the Composer ? Can I change the composer repository to access to the Civi 9-beta ? *In case, of course, that the Civi 9.0 handle civicrm/civicrm-cxn-rpc ~0.17.07.01.* is handled now.

---

==\> EDIT #2

After the several advices of Jon (Thanks a lot ;-) I could complete the install of **CiviCRM 5.8.2 which is now OK with Drupal 8.6.4** !

1. Install Drupal

> composer create-project drupal-composer/drupal-project:8.x-dev --no-dev

2. Follow Jon G. CiviCRM for Drupal 8 installation notes
3. If the Installation failed (at the initial stage following the David Snopek instructions) with the version psr/log 1.1.0 being too new for CiviCRM, then force with Composer to an earlier version =\>

> composer require psr/log 1.0.0

4. After that restart and complete the Installation
5. After adding the recommended lines to civicrm.settings.php, **CiviCRM works with the right menu ;-)**
6. Now the difficult part : connect to the external CiviCRM database. After disabling a few extensions I could make all the system work ! After the few extensions discussed with Jon ( **Shoreditch**, **APIv4** & Contact Layout Editor because it depends on this one) I noticed another trouble with the **General Data Protection Regulation** extension by (uk.co.vedaconsulting.gdpr). The contact page was white. After disabling the GDPR extension, **CiviCRM is now connected to the external database ;-)**

Thank you so much David Snopek for your work and Jon G. for your great help !

# Answer
There are multiple conflicting methods of installing CiviCRM with Drupal 8. It sounds like you're either a) placing the `vendor` directory into your webroot, or b) symlinking the `vendor` directory into your webroot.

The lack of definitive instructions for D8/Civi is frustrating. However (for security reasons) I believe the community won't accept a solution where `vendor` is webroot-accessible, which the "dsnopek full manual process" does. Note that David Snopek does NOT use that approach himself anymore!

Here are my Drupal 8/CiviCRM notes. Instead of installing `vendor` in webroot, I copy the JS/CSS/etc. resources only into a web-accessible directory. Pay particular attention to the last bullet point; manually setting paths in `civicrm.settings.php` is almost certainly the solution here for Shoreditch.

Also note Shoreditch has another problem in D8 that breaks QuickSearch, but it's fixed in Civi 5.9+. You can backport the fix to 5.8 or upgrade to 5.9 next week (January 2nd 2019).

As for APIv4, there's a breaking incompatibility between the Symfony version it wants and Drupal 8. Contact Layout Editor is off the table until that's fixed. This requires that CiviCRM be upgraded to Symfony 3+.
> 2 votes

# Answer
With regard to the issue posted in your update: There's a dependency conflict between CiviCRM and some other component you have installed over which version of `psr/log` should be installed.

Both `civicrm-core` and `civicrm-cxn-rpc` specify `psr/log ~1.0.0` which means "any version starting with 1.0". You have another package that's specifying `psr/log 1.1.0`. I couldn't tell you which one, though you could probably figure it out by searching your `composer.lock` file.

`psr/log 1.1.0` is pretty new - about 5 weeks old. I just opened an issue for CiviCRM to support it. My guess is that it works just fine, it just needs the `composer.json` updated.

There's probably a way to tell composer to accept the newer `psr/log` but I don't know it. Hopefully someone else will chime in with the quick workaround!
> 1 votes

---
Tags: drupal, multisite, shoreditch, symfony, contact-layout-editor
---


# Question
Title: How do I send automatic Thank You emails for different donation amounts and donation types?
For example, I want send an automatic thank you templated email to someone using 1 email template for there "generous donation" for donations over $1,000. -- included would be some extra emotion graphics.

Whereas I would like to send automatic thank email using a 2nd email template that thanks someone is a less intense way for donations of $100 dollars or less.

Likewise, I would like to send different templates for donations of different types -- wire transfer, check, even service donations (e.g. want to provide free marketing services)

# Answer
I've not tried this, but the Smarty mail template allows for conditional statements. So you maybe could create one email with different outputs,

Some older tutorials:

Another option could be to use CiviRules, which triggers actions at different points, e.g. send mail y when contribution of z amount is made:
> 6 votes

---
Tags: email
---


# Question
Title: What is the difference between civicrm-drupal/tree/8.x-master and civicrm-drupal-8?
In Does CiviCRM work with Drupal 8 and how can I help? it mentions https://github.com/civicrm/civicrm-drupal/tree/8.x-master, but from all the other instructions and as best as I can tell https://github.com/civicrm/civicrm-drupal-8 is the correct one to use. What is the difference?

# Answer
The history of the branches started to diverge around Apr, 2018, and there's a comment on May 1 about creating a separate repo (https://github.com/civicrm/civicrm-drupal/pull/523#issuecomment-385612657):

> To facilitate distribution via composer, the Civi-D8 code is being migrated to a new repository with a slightly different branch naming convention (ie civicrm-drupal@8.x-master becomes civicrm-drupal-8@master).

So at the moment for drupal 8 the more current code to use for the drupal module part is at https://github.com/civicrm/civicrm-drupal-8.
> 2 votes

---
Tags: drupal-8
---


# Question
Title: How to automatically select a radio button?
For a civi event registration form, is there a way to select a radio button if one of 2 other fields has data? We want to require a security deposit if the person selects one of 2 other options on the form, but only if one of those 2 fields is selected/has data entered. Once it is selected, the user should not be able to deselect it, but the form should deselect the radio button if the user removes the options that caused the radio button to be selected.

# Answer
> 2 votes
The Profile Conditionals extension is intended to meet this need. However, it doesn't have a user interface, so it requires some tech-savvy to deploy.

# Answer
> 0 votes
Conditional filtering is not possible in CiviCRM but available on Drupal webform\_civicrm. But not for complex scenario's like yours. However you can achieve what you want by writing a small extension and adding JS page on the form to perform selections and also you can use validateform civicrm hook to provide validation at server side.

---
Tags: civievent
---


title: Import Contact Issue

text:
# Question
Title: Import Contact Issue
I am importing CSV files, about 7000 contacts per import, about 20 fields per contact, about 800kb sile size. DB size is about 55k, issue arose at about 20k. Since then, it times out after 2000ish records. The importation ultimately executes with fields and data appearing to correctly function thus far through testing.

Issue is the importation process freezes. It seems to run about 4 to 5 minutes, then apparently times out. Server demonstrates mysql processes, usually about 6-10, in sleep state when "time out" occurs. Checking table in phpmyadmin, I can quickly see where to edit csv file to continue.

I am not deduping, though I am validating address data. I suspect the address validation is causing the issue. Does the USPS address validator have a "counter" on it that is now limiting my "per day/then/per session" usage?

I verified the processor, free memory, file size, etc are all way under utilized.

Rememdy is kill all user/application processes, repair database and continue forward.

But, if I can adjust a setting to enable better processing, without sacrificing security, pls share.

Thx

# Answer
You have several options, which I detail below - but I think the most important thing to do is check your CiviCRM log. It's likely to tell you what your problem is.

Past that:

One option is to adjust your php.ini settings to change the max\_execution\_time to zero. You can also do this in `civicrm.settings.php` if you prefer.

Another is to import your data on the command line using the API CSV import tool \- but this requires breaking up your data into separate entities (e.g. Contact, Address, Email, etc.). This is very efficient on large imports but not worth it unless you can script it (e.g. with Pentaho Data Integration).

I agree that it's very likely that either geocoding or USPS address validation is likely a culprit - but the easiest way to test that is to disable, do a test import and check the result.

If you're a programmer and don't like using Pentaho, you could also try writing an importer that uses the advimport extension.
> 2 votes

---
Tags: import
---


# Question
Title: Activity changes individuals busy/available status
I'm looking to use CiviCRM to - in part - manage our team of around 50 volunteer translators. Once a volunteer has agreed to take on a translation, staff will set an activity, so that we can keep a record of how many translations people have done. I've set that up, with a number of custom fields for the volunteer contact, and for the activity (a URL of the original text, the date we should receive the translation, etc).

What I would like to be able to do but can't work out out the functionality of, is - once an activity has been assigned - for something in the volunteers contact sheet to display that they are currently translating (I can do this manually, but busy people probably won't necessarily always do two steps, so we could end up with activities being assigned but the translator still appearing "available"). This way when a staff person comes to search for a translator (by language to/from, and their availability) they only get shown volunteers who aren't currently completing activities.

Thanks!

# Answer
I think the best way to do this is with smart groups instead of custom fields. Create a smart group of folks who have a translation activity that's unfinished; create another smart group of everyone not in the first smart group.
> 1 votes

# Answer
I don't know if it's possible to do this without at least a little custom code. I think in any case the completion status of a translation should be tied to its activity status field, i.e. if the activity status is Completed, then the translation is completed. Also the "available?" field on the contact would be a "view only" custom field not a manually updated field. After that, there's a couple choices:

1. See if the CiviRules extension can do this. I haven't tried but the idea would be to create a trigger when the activity status is changed that updates the view-only custom field.
2. Write an extension that does the same thing as #1. When an activity of type translation is saved:

(a) If the activity status is Completed, set the view-only field to "yes" (i.e. person is available).

(b) If not, set the view-only field to "no".
3. Don't have a contact custom field, but write an extension that uses the hook\_civicrm\_summary that adds some output to the contact summary page:

(a) If all activities of type translation have status Completed, display "Available".

(b) Otherwise, display "Not Available".

In all options the staff member would only need to do one thing and that's update the activity status field to Completed when the translation is done.

As a more general extension that would include this functionality, I think an extension that could display something on the contact summary based on the combined state of the contact's various activities' fields would be quite useful. For example, instead of a contact custom field "Best PacMan score", you could have separate activities that record their scores for each game they played, and the extension would take the best one and display it on the contact summary. Just thinking out loud.
> 0 votes

---
Tags: activity
---


title: Editing Pledge Amount Deletes Payments

text:
# Question
Title: Editing Pledge Amount Deletes Payments
Since upgrading to 5.3, we've noticed that Pledge amounts can be edited, which then deletes any payments made toward the pledge.

In earlier versions, the Pledge amount could not be edited. (this is true with 4.6; I'm not sure about other versions)

The only discussion I can find is a patch from a few years ago created for 4.7: https://issues.civicrm.org/jira/browse/CRM-17762

# Answer
> 2 votes
Yes thats true, if you update certain parameters of existing pledge than it deletes all pledge payment and recreates it. Below are the parameters when changed deletes all pledge payments.

* amount
* frequency\_unit
* frequency\_interval
* installments
* start\_date

# Answer
> 1 votes
Can you check this PR

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

There seems to be a bug that allows you to change the payment schedule and wiping out the contributions in the process. The above patch will fix the same.

---
Tags: pledges
---


title: $formValues field names

text:
# Question
Title: $formValues field names
Editing the work flow messages, I'm looking for the field names preceded by $formValues.
More specific I would like to include a line displaying the origin of the contribution in the work flow message *"Contributions - Receipt (off-line)"*.
Where to find all the field names that can be used?

# Answer
> 0 votes
Without knowing on what form you are exactly, there is bound to be something like contributionId or contributionID in your form.

You can find the name in the $form object (try debugging the object for the specific name) and then use `$contributionId = $form->getVar('_contributionID')` to get the field and use it in your hook (assuming you are using a hook).

---
Tags: contributions, system-workflow-messages
---


title: CiviCRM expert in India

text:
# Question
Title: CiviCRM expert in India
I'm representing an NGO based organisation in India. We have decided to move from paper based process to paperless process or at lease "less-paper". We need an expert to implement CiviCRM in our organization. I couldn't find any Indian contacts in civicrm website , Can someone suggest an alternative solution to find an expert?

# Answer
> 1 votes
I do think that the find expert page is the preferable way to find experts. If they are not on that page the question will arise how good they are in terms of involvement with the civicrm community.

If you want to find experts in India, you could best google it. There are some people in the community who are based in India. I do know that Harshal is based in India.

# Answer
> 1 votes
There are many ways to find experts of CiviCRM.

1. Find expert search from CiviCRM site.
2. Post a job on freelancer sites
3. May be find an expert on https://chat.civicrm.org/

HTH

Pradeep

---
Tags: civicrm-home
---


# Question
Title: Webform CiviCRM Paypal Button not Working
Using CiviCRM 4.4.4, Webform 7.x-4.11, Webform CiviCRM Integration 7.x-4.12, Paypal Website Payments Pro, Drupal 7.39

When I set up a payment through CiviCRM, credit card payment and Paypal payment work as expected. However, when I set up Payment through Webform CiviCRM integration, the credit card payment works as expected, but clicking on the Paypal button produces an error about email as shown in the attached screenshot. This happens with all my webform civicrm integrations. In other words when I use Webform CiviCRM integration, I have to give up paying with Paypal and since the Paypal button is automatically put on the screen the result is very unprofessional. The email that it shows which is supposed to be an error is my user name in Processor Details for Live Payments dialog.

Any help would be much appreciated, since I find the Webform CiviCRM integration module a great tool.

Paypal support hasn't been much help.

\[Edit\] It turns out that when I am using CiviCRM Webform integration and select the Paypal button the word "express" briefly appears in the credit card number field on the form. I think this is causing the problem because I don't see it when choosing Paypal from a standard CiviCRM payment page. I have tried different payment buttons from this page but the behavior stays the same.

Bill Dika

# Answer
You may have found a bug in the webform\_civicrm module. I don't have a great way of testing paypal right now, but I've just made a few tweaks which I think will help - can you try it out?

Download the patched version here: https://github.com/colemanw/webform\_civicrm/archive/ipn.zip
> 3 votes

# Answer
Ok - not ideal \[sorry it's not a fix\] - but an easy workaround that ensures people use the credit card fields (as opposed to hitting the PayPal button and getting the error message) - would be to hide the PayPal button on the webform\_civicrm payment page:

> $('#billing-payment-block .description').hide();

Put this into an editmywebform.js file and then inject this js file using drupal\_add\_js in your theme's preprocess\_page function: e.g.:

```
function myorg_zen_preprocess_page(&$variables, $hook) {
    if (strpos(request_path(), 'mywebform_url') === 0) {
      drupal_add_js(drupal_get_path('theme', 'myorg_zen') . '/js/editmywebform.js');
    }
}

```
> 2 votes

# Answer
I had trouble getting Karin's solution to work because the PayPal Express button is loaded after the page is ready. However, it inspired a solution using CSS:

```
/**
 * Suppress the PayPal Express button.
 */
function myorg_preprocess_page(&$variables, $hook) {
  if (strpos(request_path(), 'my-webform-page') === 0) {
    drupal_add_css(drupal_get_path('module', 'myorg') . '/css/hidepaypal.css');
  }
}

```

The CSS in `hidepaypal.css` is:

```
#billing-payment-block .description {
  display: none;
}

```
> 1 votes

# Answer
For anyone looking to code a fix to this, the proposed solution can be found here.
> 0 votes

---
Tags: webform-civicrm, paypal
---


# Question
Title: What is the public flag for on custom Field sets?
What is the public flag for on custom Field sets? It seems that even if a field is marked as public, it will not show up for anonymous users on a profile unless I give anonymous users the "access all custom data" permission. What is the public flag for?

# Answer
> 1 votes
From https://docs.civicrm.org/user/en/latest/organising-your-data/creating-custom-fields/#is-this-custom-field-set-public

> Is this Custom Field Set public? If a custom field set is marked as public, its fields will be shown on public-facing pages.
>
> For example, custom fields that should be shown on an event information page should belong to a field set marked as public. Custom fields that relate to administrative information about an event should be part of a field set that is not be marked as public.
>
> Note that the setting is at the Custom Field Set level and applies to all Custom Fields in the Set. Individual fields cannot be marked as public or not.

# Answer
> 1 votes
The way to expose a custom field on a public profile form is by using ACL permissions.

Administer\>Users and Permissions\> Permissions Select "Manage ACLs" Add ACL Role=Everyone Operation=Edit Type of Data=A set of custom data fields Save

The public flag is doesn't do anything when it comes to displaying the custom fields on a public profile form.

---
Tags: custom-fields
---


# Question
Title: Webform civicrm Conditionals not working
Seasons greetings I am using conditionals to hide content on a civicrm webform using Drupal 7 with Civicrm 5.8.2. It has been working fine, but the form now presents with all the conditional fields displayed. This does work correctly, if the user is logged in. That is not acceptable as all users are anonymous. My test system using the same versions is working correctly. I have ensured that all versions are the same across the two systems. Any clues on where to look now would be much appreciated. Regards Graham

# Answer
> 2 votes
webform conditionals is native to D7 webform module - and independent of webform civicrm module.

If conditionals for D7 webform module are not working as expected you may have some javascript issues on your site. Look in the browser's console to check for errors.

If your test system is using a different front end theme and if admins with permissions are able to use admin theme - then it's very likely that your javascript issues are inadvertently caused by your front end theme. Perhaps it requires jquery update module e.g.?

# Answer
> 1 votes
Matthew Wire has solved this for me. It was a jquery error. It seems to happen if the new CiviCRM menu (kam extension) is enabled - so must be some interaction going on with loading CiviCRM resources. Disabling that seems to resolve the javascript issues and hence webform starts working again.

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


title: membership statuses not being updated

text:
# Question
Title: membership statuses not being updated
Our memberships aren't being updated from "pending" to "current". I've done the following without success.

The membership status rules are as follows:

* Pending--\> start event is member since; end event is member since; ;
* Current--\> start event is start date; end event is end date; start event adjustment is 1 day; end event adjustment is 1 year.

I've run the job "update membership statuses" multiple times. There's a message under that job:

***WARNING: Membership renewal reminders have been migrated to the Schedule Reminders functionality, which supports multiple renewal reminders. API Entity: Job API Action: process\_membership***

Summary of job is

> finished execution of update membership statuses with result: Success (processed 291 records. Updated 0 records.)

I've also run the job "scheduled reminders", just in case

# Answer
> 1 votes
Marilyn - I didn't see your CiviCRM version but from what I see (CiviCRM 4.4) status of members w/end date in the past is not changed from the initial status ('New') and the job logs 'success' every time after examining x 'memberships', updated 0 records. I suspect the job is only logging status- I'll try debugging, and send a patch. BTW, I tried this on the 'Demo' system (WP) and it seems to work.

So - have you checked the 'Membership Status Rules' (Administer\>CiviMember\>Membership Status Rules)? You have to set those rules up to make your memberships transition from one status to the next, there are optional grace periods etc. Also, what is the weight of your pending status rule? The 'weight' governs the order your memberships transition, another post had an issue w/that: https://forum.civicrm.org/index.php?topic=13921.0

Finally, there is this: http://wiki.civicrm.org:8090/confluence/display/CRMDOC22/Update+Pending+Memberships (mind you this doc is from 2009) HTH

# Answer
> 1 votes
I was having this problem or one like it. Some memberships were Expired that should have been in Grace, and running the CRON job "Update Membership Statuses" (in Scheduled Jobs /civicrm/admin/job) had no effect, even after I fixed a problem with the status rules. I found a recommendation to set membership status to NULL, because once status is Expired it can't go back to Grace, but PHPMyAdmin/MySQL wouldn't allow that because of some relationship (I'm not an expert). Solution was in a PHPMyAdmin Query to reset all memberships to New status, and then run the CRON job. I used:

```
UPDATE `civicrm_membership`
SET    status_id = 1

```

Then I ran the CRON job manually from the Scheduled Jobs page (repeatedly until it stopped crashing from PHP timeout on shared hosting) until all 2300 memberships had processed—it worked!

# Answer
> 1 votes
Please be aware that updating the membership with a new status should give implications when the status is manually overridden. So if you are going to update this via the database, it would be a bit safer to use the following and then run the Update Membership Statuses job:

```
UPDATE `civicrm_membership`
SET    status_id = 1
WHERE  is_override is NULL

```

---
Tags: civimember, scheduled-reminders
---


# Question
Title: Contribution receipt not being sent after paying with Paypal
Using Joomla and CiviCRM 4.6.10, a receipt is not being sent when using the Paypal option on our Contribution page but is being sent when using the Pay later option. The Paypal payment is being accepted and processed and the contribution is being recorded but a receipt is not being sent. I have enabled the Instant Payment Notification and Auto Return in Paypal. I am assuming this problem is related to the IPN but I do not know enough to figure out where the problem is.

# Answer
Check the logs at /media/civicrm/ConfigAndLog shortly after a payment has been made but no confirmation sent.

You should see the payment Mar 15 19:13:18 \[info\] Contribution record updated successfully

Then you should see the contribution receipt. There may be an issue here e.g.

Mar 15 19:13:18 \[info\] $Fatal Error Details = Array ( \[message\] =\> The requested Profile (gid=XXXXX) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance. \[code\] =\> )

If you see something like the above, the issue is that Civi cannot access the information that was entered in the profile.
> 0 votes

# Answer
This feels like an issue we mucked around with quite a bit in 4.7 & eventually solved - I am pretty sure it is fixed in the latest version
> 0 votes

# Answer
Upgrade CiviCrm Civicrm introduced new improved IPN url in 4.7.12 The new IPN - http://www.example.com/civicrm/payment/ipn/2where '2' is the Paypal Std. processor ID in CiviCRM.

Had tons of these issues until we upgraded to this new ipn.
> 0 votes

---
Tags: joomla, paypal, 4.6, receipts
---


title: Where does Mosaico store my templates?

text:
# Question
Title: Where does Mosaico store my templates?
Setting up Mosaico. I have created a new template from one of the existing base templates. I save my new template, which now appears as a 'configured template'. I'd like to tweak the code for this new template, but I can't find the template on my server. Mosaico Settings suggests that it might be in \[civicrm.files\]/mosaico\_tpl, but no such directory exists on my server.

# Answer
> 1 votes
The templates are stored in your CiviCRM database in the table civicrm\_mosaico\_msg\_template. They are not saved as actual files. BTW Im assuming you are using the Mosaico extension? If you go to CiviCRM-\>Mailings-\>Mosiaco Templates you get full options for tweaking existing templates, copying them and so on. See attached image.

---
Tags: templates, mosaico
---


# Question
Title: anyone getting "IPN warning" emails from PayPal?
About two months ago, we started getting the following notifications 2x/day via email from PayPal. It appears Civi returns response 200 (error) for non-recurring transactions rather than 500 response (success). The email from PPL says they may disable our account if the issue continues so I'm really worried. We had a pro look at the code, saying there should not be an IPN call for non-recurring transactions, and that Civi throws the error because it doesn't expect it. He's also saying the Civi code handling this hasn't been touch for a long time, and that it's possibly on the PayPal side. We certainly haven't changed any PPL settings ... so wondering if anyone else is seeing these warning emails from PPL:

> Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing: https:///civicrm/extern/ipn.php If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account. Thank you for your prompt attention to this issue. Thanks, PayPal

Anyone, anyone?

# Answer
> 2 votes
Thank you for the confirmation others are seeing this issue. In the end, this solved it for us - add lines 4-6 from the following code (lines 1-3 and 7-9 included for reference) to file /CRM/Core/Payment/PayPalProIPN.php

```
CRM_Core_Error::debug_var('GET', $_GET, TRUE, TRUE);
CRM_Core_Error::debug_var('POST', $_POST, TRUE, TRUE);
if ($this->_isPaymentExpress) {
  if (empty($this->_inputParameters['rp_invoice_id'])) {
    return;
  }
  $this->handlePaymentExpress();
  return FALSE;
}

```

# Answer
> 1 votes
I've been seeing this in various versions of CiviCRM starting in roughly Sep of this year. Note in the original post that actually 500=error vs. 200=success, but other than that, the description of the symptom I'm seeing is accurate. I think that (just guessing) something has changed in the way that Paypal is using the IPN URL - and sending it things it didn't used to. What happens, after 100 failures, is that Paypal will stop sending IPN completely, and you must re-enable IPN via the Paypal.com 'profile' console.

# Answer
> 0 votes
Just upgraded from 4.7.27 --\> 5.8.1 and have now started seeing the issue with all non-recurring payments returning an error to PayPal. Then PayPal disabled IPNs for all payments, including recurring.

I had to copy `civicrm/CRM/Core/Payment/PayPalProIPN.php` from the old version to "solve" the problem.

I also saw this in the logs:

`PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php on line 214
PHP Stack trace:
PHP 1. {main}() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/extern/ipn.php:0
PHP 2. CRM_Core_Payment_PayPalProIPN->main() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/extern/ipn.php:59
PHP 3. CRM_Core_Payment_PayPalProIPN->handlePaymentExpress() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php:428
PHP 4. CRM_Core_Payment_PayPalProIPN->recur() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php:602
PHP 5. array_flip() /sites/example.com/production/current/wp-content/plugins/civicrm/civicrm/CRM/Core/Payment/PayPalProIPN.php:214`

---
Tags: payment-processor, paypal, ipn
---


# Question
Title: Civicrm Unrecognized option in recordGeneratedLetters
I was trying to print Thank-you letters. But I am getting the below error. Civicrm version is 5.8.1. Any help to fix the issue is appreciated.

> "Civicrm Unrecognized option in recordGeneratedLetters."

# Answer
I fixed it myself. Navigated to Administer-\>System Settings-\>Misc & set "Record generated letters" to "Do not record" from the drop-down.
> 1 votes

---
Tags: pdf, printing
---


title: Issues with cron job - Wordpress

text:
# Question
Title: Issues with cron job - Wordpress
I'm on a shared hosting solution that I just moved over to. After the move, I did an upgrade to the newest CiviCRM version but left WordPress intact (no upgrade). Scheduled cron jobs were working fine on the previous host server, but not anymore.

Current configuration: PHP: 7.2.13 CiviCRM: 5.8.2 WordPress 4.9.9

I updated the wget command I was using to capture the results in logs. In CPanel, the job looks like this: wget -O /home/xxx/public\_html/cron\_output.log -t 1 -a /home/xxx/public\_html/cron.log 'https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&pass=xxx&key=xxx'

I know the syntax of the command is right because I can run the https: command from a web browser and everything works.

The cron.log shows that it's run with the 200 OK response. The cron\_output.log is empty (should it be?).

--2019-01-02 12:50:01-- https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&pass=xxx&key=xxx Resolving xxx (xxx)... x.x.x.x Connecting to xxx (xxx)|x.x.x.x|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 0 \[text/html\] Saving to: ‘/home/xxx/public\_html/cron\_output.log’

The server logs that my hosting provider sent me show that the jobs run.

I've also scheduled the same job in easycron and it shows that's it's run successfully.

So I know that cron is running and the syntax is right. But the scheduled jobs in Civicrm don't run. There's nothing in any error\_log anywhere that indicates there's a php problem. I've looked at the questions here, and checked that PHP and the MySQL database are on the same timezone, and they are.

I cannot figure out why Civicrm is not running the scheduled jobs. I've tested with a scheduled mailing that sits there and never gets delivered (until you run the https:// command line manually, then it completes). Also the Administer -\> System Settings -\> Scheduled Jobs show that they are not being completed unless the cron job is manually triggered. And Civicrm has the orange System Status: Warning: Cron Not Running

I'm stumped, and my provider says the issue is not with the server, and I tend to agree.

Any thoughts as to next steps?

# Answer
> 0 votes
Are you sure that the path to cron.php is right on the new server? I recently had to set it up again on the new host (SiteGround), and the path was slightly different. What was surprising was that, by all indications, the cron job was executing successfully, but it silently didn't run the CiviCRM jobs. I still don't have a good answer on that.

In cPanel, you can go into File Manager and check the path.

---
Tags: wordpress, cron, cron-job
---


# Question
Title: Does CiviCRM Spark come with a Drupal or Joomla website?
I am considering purchasing CiviCRM Spark to trial it for my organization. I know CiviCRM can be loaded into Drupal, Joomla or Wordpress. I was just wondering whether "spark" is a stand-alone product or if it comes with either website (CMS) platform.

Thanks! Chris

# Answer
Sorry, Spark cannot handle the public-facing website part. We have locked out those Drupal features. Only the CiviCRM features are available.

However, you can use another service to create your website, then point to your CiviCRM forms hosted on Spark (donation form, newsletter signup, event registration, etc).

CiviCRM Spark aims to help people evaluate and get started with CiviCRM. It is also suitable for smaller organisations (larger ones will hit the contact/email limits and will want to customize it more). For those who outgrow Spark or who have more customization requirements, we recommend contacting a CiviCRM hosting partner.
> 3 votes

# Answer
CiviCRM always needs a CMS at front end. So unless I update this Answer, you will be given the choice once you sign up. Have asked for clarification to be added to https://civicrm.org/spark via https://chat.civicrm.org/civicrm/pl/q4nqexud7tyw7q3hxh5s9eykoc
> 1 votes

# Answer
Spark is just a hosted version of CiviCRM intended for folks who don't have the capacity to install CiviCRM on their own site. So by definition I don't think it's what you want. However, there's nothing that Spark has that self-hosted CiviCRM doesn't; in fact, the opposite is true.
> 1 votes

---
Tags: civicrm-spark
---


title: Contact ID Token for Sort Name

text:
# Question
Title: Contact ID Token for Sort Name
I have a client who wants to use the the contact id as an identifier in the Individual Sort Name Format. Basically they want to see "Smith, John (6548)" in search results because they want to use the ID to link to some paper files they are required to keep and they have a lot of contacts with identical names.

At the bottom of Administer --\> Customize Data and Screens --\> Display Preferences, you can set the Individual Sort Name Format using tokens. However, when I insert

{contact.last\_name}{, }{contact.first\_name}{ }{contact.contact\_id}

it doesn't work. This is the Contact ID token that CiviMail uses, and any other token I stick in there works (like contact.birth\_date, which is what they are currently using). But the Contact ID token won't work. Any ideas?

# Answer
> 3 votes
There's a place in the CiviCRM code where all the possible contact tokens are defined - and they say which fields they correspond to.

The line in question is: `'contact.contact_id' => CRM_Utils_Array::value('id', $fields),` which means, "populate the contact\_id token from the `id` field passed to this function".

That's no doubt correct in some instances - but in this instance, the data is stored in `contact_id`. I was able to get the contact\_id to work in `display_name` and `sort_name` by changing this line to:

`'contact.contact_id' => CRM_Utils_Array::value('id', $fields, CRM_Utils_Array::value('contact_id', $fields)),`.

This translates to, "populate the contact\_id token from `id` if it exists, but `contact_id` if not".

Whether you want to shepherd this change into upstream CiviCRM or not is up to you!

---
Tags: tokens
---


# Question
Title: Error after installing Civi Entity module
> Blockquote Warning: array\_combine(): Both parameters should have an equal number of elements in CRM\_Contact\_BAO\_Relationship::buildRelationshipTypeOptions() (line 2250 of /home/i571020/membership.irishjudoassociation.ie/sites/all/modules/civicrm/CRM/Contact/BAO/Relationship.php).

I've started getting this error after enabling the module. I can see all the options in views, rules etc. but the warning is visible in the back-end. Is this something in my relationships that's not right or else?

# Answer
> 3 votes
Part of the process that CiviCRM Entity uses to integrate is to read metadata on the civicrm API entities, and also for fields with options lists, it fetches those with an API call... This API call :

```
$result = civicrm_api3('Relationship', 'getoptions', [
  'field' => "relationship_type_id",
]);

```

Is what is producing the warning...

I'm calling this a CiviCRM Core bug/issue..

there is an issue here, I'll update it: https://lab.civicrm.org/dev/core/issues/268

---
Tags: civicrm-entity
---


# Question
Title: Mailings Scheduler fails after upgrade to 4.7.1
After upgrading to 4.7.1 (Joomla) I get the following error in the Mailing Scheduler log when activated by cron:

> Finished execution of Mailings scheduler with result: Failure, Error message: API permission check failed for Group/get call; insufficient permission: require access CiviCRM

My cron job calls php to execute cli.php. I have checked the user & group permissions & have tried granting the cron job's Joomla user superuser status, manually adding 'Access CiviCRM'. No joy.

Any clues please?

# Answer
> 2 votes
This is a known bug in CiviCRM 4.7.1.

EDIT: Based on new information on this bug report, this problem does NOT exist when using wget. Also, someone in the community has stepped up to pay for this bug to be fixed, so expect a solution soon!

# Answer
> 0 votes
For cross-reference, it appears this was not resolved on Joomla and is still an open bug. See dev/joomla#6

---
Tags: civimail, joomla, permissions, 4.7, cron
---