# Question
Title: Cannot create Drupal user, email: invalid!! (double exclamation is the error message, not my urgency)
Drupal 7.72 Civi 5.24.5 Webform Civi Integration 7.5.1

I just set it up so that Drupal users are created when a webform is submitted. Using petednz's guide.

But I get the following error message Cannot create user, email: invalid!!

What would cause Cannot create user, email: invalid!! on an civicrm integrated webform? This has the same problem. I tried both suggestions there and it did not fix it for me.

I get the following 2 messages in my Drupal logs:

1. rules 08/16/2020 - 20:39 Unable to get variable civicrm\_user, it is not defined
2. civicrm\_entity 08/16/2020 - 20:39 Cannot create user, email invalid.

I use CiviRules to add a tag to the contact when a new contact is added from "these" Sources. Should the tag be added in a different manner? The guide was not clear on how to add the tag to the contact. I'm wondering if the Rules is firing before CiviRules gets the tag added.

# Answer
> 1 votes
An alternative approach now is https://civicrm.org/extensions/silent-user-registration so you only use CiviRules and don't use Drupal Rules.

---
Tags: webform-civicrm, tags
---


# Question
Title: Contribution pages fail after WP upgrade to 5.5
Our previously smooth running membership sign-up process failed leaving me scratching my head after a WP upgrade to 5.5. I had made some changes to the form at the same time and was blaming myself for a silly misconfiguration rather than blaming the upgrade. Reverting to a back up that still had wp at 5.4 has solved the issue for now. Anybody seen similar, got a solution?

Got this on the WP site health dashboard

> **An active PHP session was detected.**
>
> A PHP session was created by a session\_start() function call. This interferes with REST API and loopback requests. The session should be closed by session\_write\_close() before making any HTTP requests.

# Answer
WordPress made changes in v 5.5 that will cause any version of CiviCRM before 5.26 to break. Details are in this post. https://civicrm.org/blog/kcristiano/civicrm-526-and-wordpress-important-notice

You will need to upgrade CiviCRM before WP.
> 2 votes

---
Tags: wordpress, dashboard, upgrade
---


# Question
Title: How to display remaining available spots for an event on the public page
We need to display how many spots are left for registration on the public event registration page. Is there a way to do this?

# Answer
If you haven't done this already - I recommend customising the template. I have experience of doing this. You'll want to create a templates override file, and then embed some PHP that accesses the remaining places. It's fairly straightforward. If you want me to go into more details then please message me!
> 1 votes

# Answer
There was an old recipe at https://civicrm.org/blog/chrischinchilla/displaying-remaining-participant-slots-on-events saying

```
{crmAPI var="ParticipantS" entity="Participant" action="get" sequential="1" event_id=$event.id }
// Gets the current particiapnst registered for the event

{* $x=$event.max_participants, $y=$ParticipantS.count *}
// Assigns our variables for the calculation below

Remaining - {math equation="x - y" x=$event.max_participants y=$ParticipantS.count}
// Subtract the current particpants from the maximum.

```
> 1 votes

---
Tags: civievent
---


# Question
Title: How to link two Organizations with a pair relationship?
I have this situation I'm working on since way too long involving a sub type of Organization.

I work for a professional Union and 2 sub-organisations can belong to the same person. Which means that one contact owns 2 organizations or said differently two organizations share the same organization contact.

My first approach was to create an individual contact and an organization with a relationship of type owns/is owned by. Using the same individual contact, you could register dozens of organizations with this vertical link. The thing is that for my processes, all memberships acquired by the organization level were transferred to the individual and I couldn't have receipts for each particular organization with the specific contribution and the name of the owner (even with extended tokens)

So now, I changed my mind and focus on the relationship between organization. I've created a pair relationship and I'm wondering about how to link organizations between them. I thought about a CiviRule that would compare the custom fields created for the contact within the organization and add the relationship type (but haven't succeeded yet). I also thought about prepopulating custom fields from the URL sent after the first registration.

How would you deal with that?

(I'm working on Drupal 7.72 and CiviCRM 5.25 using a webform for the registration)

# Answer
> 2 votes
Finally it works back to the first approach. The tipping point was to set the organization as first contact in the CiviCRM tab of the webform and then the individual contact and also change the relationship order with Organization being A and Individual being B.

Which means that I can now link two organizations or more through the same individual contact but keep everything related to the membership/contribution at the organization level and find every single needed token with related token extension.

it's a great relief.

---
Tags: relationships
---


title: Compare fields in CiviRule?

text:
# Question
Title: Compare fields in CiviRule?
Is there a way to compare Fields in CiviRule? I need a rule that adds a relationship based on the identity of a field. Something like "compare if new contact has an external ID that already exists and then link them together as partner organizations".

Is this possible?

(I found this old post back to '17)

# Answer
> 1 votes
Yes you can do some comparison in CiviRules using the Field Value Comparison condition. Assuming that your external ID is a custom field (in CiviCRM an external identifier has to be unique....) you might be able to work your way through. It might mean you have to develop a specific condition though.

And please note that the "link them together as a partner organization" is an action, not a condition :-) And it will definitely be bespoke development, but possible.

---
Tags: civirules
---


# Question
Title: how do you process mdg.php files during an extension upgrade?
What's the best way to trigger managed entity processing as part of an extension upgrade? I have an extension that is already installed on a site. I'm rolling out an upgrade that implements a new custom report, including the .mgd.php file. I'd like that report template to be installed as part of the extension version upgrade. But I'm not sure the best way to "refresh" the system to process that .mgd.php file (which is generally only processed during installation).

# Answer
I think invoking below method in your extensions Upgrader.php incrementalupgrade function will re-build all your managed entities from all extension.

```
CRM_Core_Invoke::rebuildMenuAndCaches();

```
> 2 votes

---
Tags: extension
---


# Question
Title: Moving all contacts from CiviCRM to Kepla
my organisation is currently switching from CiviCRM to Kepla. I'm wondering about the best way to export all contacts information out of Civi and import it into Kepla. I have been able to export individual lists of people into an excel document, clean it up, and import them individually, however there are so many contacts left and I'm worried about people falling through the cracks. If there's a way to export all contacts from the database at once, including the notes attached to them, that would be ideal. Thanks!

# Answer
One way would be to use the quick search or any other search and simply enter "%" as a search criteria. This would bring up all contacts in the database and you could export them afterwards.

If you want to include deleted contacts use the advanced search with the same criteria but tick the box "Search in Trash (deleted contacts)".

In the export dialogue, make sure to select all columns you want, including notes.
> 1 votes

---
Tags: database, export, civicrm-home, migration
---


title: CiviCRM eMails not being delivered

text:
# Question
Title: CiviCRM eMails not being delivered
How can we verify that CiviCRM emails are actually being received. The report shows that all were successfully delivered. However, recipient members are complaining that they aren't receiving the eMails. They also checked their SPAM folders. Not there.

# Answer
This depends a bit on how you're sending emails. Are you using a mailing service, or do you run your own mail server?

Some mail processors accept mail but then don't allow it through to the user if they don't like the look of it. We had this problem with Outlook/Hotmail at one point. In the end we had to contact them directly to resolve the issue.

There are a couple of things to try if you haven't tried them already:

1. Check the spamminess of your emails using mail-tester.com. Aim for 10.
2. Set up Dmarc. This will give you direct feedback from the mail processors (sometimes including instructions/contacts for resolving problems), and it should generally help your mailing reputation.
> 2 votes

# Answer
I would recommend using a mailing service (plenty on the market) as SMTP gateway because they usually provide an admin interface to log the mailing activity that is very accurate. Sometimes CiviCRM activity log says that the email was sent but then you'll discover it was bounced after "getting out" of CiviCRM and CiviCRM doesn't trace this. They will also provide DKIM/SPF entries for your DNS that will dramatically improve the deliverability of your emails (both email and mailing campaigns).
> 1 votes

---
Tags: email
---


# Question
Title: WordPress 5.5 'breaks' CiviCRM frontend pages without upgrade to 5.26+
The links in our renewal notifications stopped working following the automatic site upgrade to Wordpress 5.5 on Aug 11th. What happened is that the links just arrived at the 'Wordpress Base Page', in our case /civicrm, with a meaningless “Do not delete this page. Page content is generated by CiviCRM.”

Spent some time investigating before finding the notification of a mandatory update to CiviCRM 5.26, and this did indeed sort the problem. Important Notice blog post

Posting here in case others also searching.

# Answer
> 1 votes
Front end links working again after upgrade to 5.28.2.

Note that there was also an update needed to our Mailchimp webhook for linked groups. Simply done by saving the group settings.

Fingers crossed the Paypal payment IPN link is still good to go.

---
Tags: wordpress, upgrade, paypal, mailchimp, webhook
---


# Question
Title: Create an event without country and state
Can I create an event without a country and state? I always get this error: State / Province does not match selected country.

# Answer
Its a core bug. You need to first empty the selection for state/province save the form and than empty country selection and save the form.

HTH

Pradeep
> 3 votes

---
Tags: civievent
---


title: Lopsided Number of Extensions

text:
# Question
Title: Lopsided Number of Extensions
This is just a general question: As a newbie, I'm wondering yhy are there so many more Drupal extensions than WordPress extensions? Just curious, since WP has a larger market share than any other CMS. Thanks.

# Answer
Just historical. Civi started with drupal and mambo/joomla. But most extensions are designed to work with all CMSs and where possible it's encouraged to make them "CMS agnostic" that way.
> 2 votes

---
Tags: wordpress, drupal, extension
---


title: CiviCRM Dasboard Disappeared

text:
# Question
Title: CiviCRM Dasboard Disappeared
Since updating to WordPress 5.5, my CiviCRM dashboard is gone and the "Configure Dashboard" link does nothing. Also, all of my menu bars are gone. My data still seems to be there, but the top bar menus to access and manipulate them are gone.  Is this a common issue, or has something gotten screwed up in translation?

# Answer
> 1 votes
Try adding below lines into end of civicrm.settings.php file

```
global $civicrm_paths;
$civicrm_paths['civicrm.root']['path'] = '/path-to-wordpress/wp-content/plugins/civicrm/civicrm/';
$civicrm_paths['civicrm.root']['url'] = 'http://sitename.org/wp-content/plugins/civicrm/civicrm/';

```

# Answer
> 1 votes
Turns out it was because I added an SSL certificate to my site, and had to go in and change every "http://" to "https://" in the civicrm.settings.php file. Problem solved. Thank you for your help!

---
Tags: wordpress, dashboard, menu
---


# Question
Title: CiviCRM 5.28.2 triggering "critical issue" in WordPress 5.5 Site Health
This is related to WordPress Site Health contains critical errors unless CiviCRM is disabled but I'm raising it because

1. WordPress 5.5 adds the "active PHP session was detected" issue
2. There was no response to RiverRunner's request for the basis for saying the test are inaccurate

I'm currently running WordPress 5.5 and CiviCRM 5.28.2.

The Site Health function in WordPress 5.5 reports 3 three "critical issues" related to the WP REST API.

1. An active PHP session was detected - A PHP session was created by a session\_start() function call. This interferes with REST API and loopback requests. The session should be closed by session\_write\_close() before making any HTTP requests.
2. The REST API encountered an error - The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages. The REST API request failed due to an error. Error: cURL error 28: Operation timed out after 10005 milliseconds with 0 bytes received (http\_request\_failed)
3. Your site could not complete a loopback request - Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability. The loopback request to your site failed, this means features relying on them are not currently working as expected. Error: cURL error 28: Operation timed out after 10004 milliseconds with 0 bytes received (http\_request\_failed)

This discussion suggests that the problem is with plugins and themes that need to be updated. By elimination, I found that CiviCRM 5.28.2 was triggering the error.

Can these "critical issues" safely be ignored and, if so, why or under what conditions?

# Answer
SiteHealth does not account for sessions and CiviCRM depnds on them. See the discussion at https://lab.civicrm.org/dev/wordpress/-/issues/32

Possible fix: https://civicrm.stackexchange.com/a/35234/155
> 5 votes

---
Tags: wordpress, error
---


title: CiviCase Issue when viewing case file

text:
# Question
Title: CiviCase Issue when viewing case file
I'm having a major issue with Civicase,

Anytime I try to view or search for a case file, I'm getting an error. I have no problem creating new case files, I have no problem creating new case types, but the minute I try to review a case file I get an error

This is the backTrace

```
#0 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
#1 /home2/blahblah/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /home2/blahblah/public_html/sites/all/modules/civicrm/packages/DB.php(997): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#3 /home2/blahblah/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#4 /home2/blahblah/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...", "DB_Error", TRUE)
#5 /home2/blahblah/public_html/sites/all/modules/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
#6 /home2/blahblah/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(936): DB_common->raiseError(-1, NULL, NULL, " SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...", "1045 ** Access denied for user 'bvitrave_advisor'@'localhost' (using password...")
#7 /home2/blahblah/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
#8 /home2/blahblah/public_html/sites/all/modules/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#9 /home2/blahblah/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2696): DB_common->query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#10 /home2/blahblah/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#11 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#12 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1599): CRM_Core_DAO->query(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...", TRUE)
#13 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Case/BAO/Case.php(537): CRM_Core_DAO::singleValueQuery(" SELECT COUNT(*) FROM (SELECT civicrm_case.id as case_id, civicrm_case.subjec...")
#14 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Case/Page/DashBoard.php(71): CRM_Case_BAO_Case::getCases(NULL, (Array:0), "dashboard", TRUE)
#15 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Case/Page/DashBoard.php(100): CRM_Case_Page_DashBoard->preProcess()
#16 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Case_Page_DashBoard->run((Array:2), NULL)
#17 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:15))
#18 /home2/blahblah/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
#19 /home2/blahblah/public_html/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:2))
#20 /home2/blahblah/public_html/includes/menu.inc(527): civicrm_invoke("case")
#21 /home2/blahblah/public_html/index.php(21): menu_execute_active_handler()
#22 {main}

```

Based on the traceroute, it saying that my SQL username/password access is denied. But I can't understand why that is occuring only when I attempt to view a case file...Please help me

# Answer
> 0 votes
I'm pretty sure it's because the owner of the database views is a different database user (maybe you moved or imported from somewhere?). CiviCase uses mysql views.

You can disable civicase and then reenable to recreate the views.

Or alter the "DEFINER" directly in the database for the views civicrm\_view\_case\_activity\_upcoming and civicrm\_view\_case\_activity\_recent.

---
Tags: civicase
---


title: Upgrade MySQL to v5.7+

text:
# Question
Title: Upgrade MySQL to v5.7+
I have a message in my installation as follows: "To prepare for CiviCRM v5.34+, please upgrade MySQL. The recommended version will be MySQL v5.7+ or MariaDB v10.1+."

My site is hosted on Siteground. They said I can't upgrade to MySql 5.7+ at the moment, but will be able to do so soon. I currently have this version of MySql: Server version: 5.6.40-84.0-log - Percona Server (GPL), Release 84.0, Revision 47234b3

What will happen if Civi upgrades to 5.34+ before I can upgrade to MySQL 5.7+.

Thank you.

# Answer
> 1 votes
5.34 is 6 months from now. So it depends what siteground means by "soon" :)

---
Tags: upgrade, mysql, mysql-5.7
---


# Question
Title: CiviRules - What does 'Compare with original value (before the change)' do?
There is a checkbox for the field value comparison that is *Compare with original value (before the change)?*

What functionality does this do? I looked at the docs (https://docs.civicrm.org/civirules/en/latest/basic-example-field-value-comparison-condition/) but didn't see an explanation.

My use case is I have a custom field that is a set of checkboxes. I am adding an activity based on a a specific custom field value being selected but I don't want it to do trigger my action (in this case an activity) each time the fieldset is saved if the value is already selected. I thought that this option may be checking if the field value changed but it still added the action.

FWIW, I created a regular group that the CiviRule adds them to. My condition checks *Not in Selected Group* \[the group\] to get it to work.

# Answer
This comparison is pre-change. For example if I changed my surname from Smith to Jones and setup a condition to check surname = 'Smith' then setting this checkbox (Compare Original) would match to 'Smith' as that was my surname prior to the change I made. Hope that makes sense!

In terms of your use case - I think you've solved it the right way i.e. having a marker to indicate you've processed the contact already.
> 2 votes

---
Tags: civirules
---


title: modules, drupal, civicrm updates

text:
# Question
Title: modules, drupal, civicrm updates
I have multiple updates to perform modules, civicrm and drupal. In what order should I do these updates? Views (for Drupal 7) (Security update) 7.x-3.20 to 7.x-3.24 CKEditor - WYSIWYG HTML editor (Security update) to 7.x-1.18 7.x-1.19 Drupal core (Security update) 7.63 7.72 CiviCRM 5.9.1 to 5.28.2

# Answer
I would first upgrade all drupal core and modules, have the site working and than upgrade Civi.

I would prioritise security ones first.
> 2 votes

---
Tags: drupal, drupal-views, ckeditor, upgrade
---


# Question
Title: How do I change the layout and style of a contribution page displayed on a wordpress website?
I've got premium options included which display as toggle framed text and not with tick boxes (which I want) and it's using Times as the default font (which I don't want). Also, I need the Profile section (name, address etc) to be at the top of the page, not the bottom. Any pointers?

# Answer
> 1 votes
Probably the easiest option for you would be to use Caldera forms plugin with the CiviCRM connectors. That way you could style your caldera forms to your needs and still have the submission into CiviCRM

---
Tags: contribution-page, css
---


# Question
Title: Cannot merge certain contact pairs - 503 error
I have a few pairs of contacts for which merging fails with an immediate 503 page. For these contacts, merging always fails, while for almost all contacts, it works as expected.

A couple errors are being logged, can post the other ("We can't load the requested web page. This page requires cookies to be enabled in your browser settings...") if needed, but this seems like the most relevant. 5.28.2 on Drupal.

There is nothing special about these contacts, as far as I can tell. Anyone have any ideas what's happening?

```
    [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 34632 [nativecode=1062 ** Duplicate entry '23836-32644' for key 'UI_contact_id1_contact_id2']
    [type] => DB_Error
    [user_info] => UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 34632 [nativecode=1062 ** Duplicate entry '23836-32644' for key 'UI_contact_id1_contact_id2']
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 34632 [nativecode=1062 ** Duplicate entry '23836-32644' for key 'UI_contact_id1_contact_id2']"]
)

 [debug] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(205): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /var/www/html/sites/all/modules/civicrm/packages/DB.php(997): PEAR_Error->__construct("DB Error: already exists", -5, 16, (Array:2), "UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...")
#3 /var/www/html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-5, 16, (Array:2), "UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...")
#4 /var/www/html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -5, 16, (Array:2), "UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...", "DB_Error", TRUE)
#5 /var/www/html/sites/all/modules/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
#6 /var/www/html/sites/all/modules/civicrm/packages/DB/mysqli.php(936): DB_common->raiseError(-5, NULL, NULL, "UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...", "1062 ** Duplicate entry '23836-32644' for key 'UI_contact_id1_contact_id2'")
#7 /var/www/html/sites/all/modules/civicrm/packages/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
#8 /var/www/html/sites/all/modules/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...")
#9 /var/www/html/sites/all/modules/civicrm/packages/DB/DataObject.php(2696): DB_common->query("UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...")
#10 /var/www/html/sites/all/modules/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...")
#11 /var/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query("UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...")
#12 /var/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php(1528): CRM_Core_DAO->query("UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...", TRUE)
#13 /var/www/html/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(588): CRM_Core_DAO::executeQuery("UPDATE civicrm_dedupe_exception SET contact_id2 = 32644 WHERE contact_id2 = 3...", (Array:0), TRUE, NULL, TRUE)
#14 /var/www/html/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(1344): CRM_Dedupe_Merger::moveContactBelongings(Object(CRM_Dedupe_MergeHandler), (Array:6), (Array:0))
#15 /var/www/html/sites/all/modules/civicrm/CRM/Contact/Form/Merge.php(308): CRM_Dedupe_Merger::moveAllBelongings(32644, 34632, (Array:27))
#16 /var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php(504): CRM_Contact_Form_Merge->postProcess()
#17 /var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Submit.php(58): CRM_Core_Form->mainProcess()
#18 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Submit->perform(Object(CRM_Contact_Form_Merge), "submit")
#19 /var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "submit")
#20 /var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("submit")
#21 /var/www/html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#22 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(285): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact", (Array:0))
#23 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
#24 /var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#25 /var/www/html/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:3))
#26 /var/www/html/includes/menu.inc(527): civicrm_invoke("contact", "merge")
#27 /var/www/html/index.php(21): menu_execute_active_handler()
#28 {main}

```

# Answer
This was a core bug reported at https://lab.civicrm.org/dev/core/-/issues/1964 and the fix is available at https://github.com/civicrm/civicrm-core/pull/18223/files
> 1 votes

# Answer
I believe what is happening here is that there are two contacts (B is being merged into A), both of which have a dedupe exception set for another contact (C). So the dedupe exceptions table contain records for A-C and B-C.

When the merge is processed, CiviCRM is attempting to update the B-C exception to A-C (because B is being merged into A, the former B-C exception is being replaced with an A-C exception). The A-C exception already exists, hence the error and the merge failure.

Removing the A-C and B-C dedupe exceptions allows the merge of B into A to proceed.
> 0 votes

---
Tags: duplicate-contacts
---


# Question
Title: Is there a way to search for organizations that have no active relationships?
We're working on cleaning up database records, and while it's easy to pull individual records with no activity, I'm not sure how to find organizational records that are not tied to any current individuals. Is there a way to do this through Advanced Search?

# Answer
> 2 votes
Search for organisation contact using advance search who have relationship. Add those contact into a smart group.

Now find contact using Include/Exclude custom search or search builder, with contacts not in above created smart group.

---
Tags: relationships, advanced-search, organization
---


# Question
Title: Modify unsupervised dedupe rule to ignore whitespace?
I have noticed in many occasions, duplicate contact is created just because there’s an extra space in names or a missing one.

Just wondering is it possible to setup the unsupervised dedupe rule in a way so that it can ignore the whitespace of first or last name? Thanks

# Answer
I assume Civi trims whitespace on both sides of first name and last name before saving into the database. Are you saying if there is a space before and after names dedupe rule doesn't work? If so than its a core bug. Have just created a PR for the fix.

If you saying the first name entered is 'Pradeep k' with a space between two words than i don't think its handled in Civi at the moment. You may need to ask someone to have this feature available in Civi or contribute code if you are developer. Or you can create an extension and handle the above scenario by implementing hook\_civicrm\_findDuplicates or hook\_civicrm\_dupeQuery hooks.

Thanks

Pradeep
> 1 votes

---
Tags: contacts, duplicate-contacts, dedupe-rules, civicontact
---


# Question
Title: Unsubscribe link shows all groups in Civicrm
When an email recipients clicks on the unsubscribe link in a Mosaico email, every group in Civi is revealed. EG *Are you sure you want to be removed from the mailing list(s) shown below: 100 plus groups appear* This happens whether the person is subscribed to all of the groups or not. Is there a way to ensure that they just see the group that they are subscribed to? Some of the information revealed is potentially sensitive.

# Answer
> 2 votes
I would suggest using the GDPR extension to manage group subscriptions. The extension will provide finer grained control of which groups are displayed and how they are shown to subscribers etc.

---
Tags: groups, mosaico, unsubscribe
---


# Question
Title: Upgraded to 5.28.3 in WP - how to fix crash?
Upgraded a WP site from 5.25 to 5.28.3 and now get this WP crash. I'm not familiar with WP so would appreciate any clues. The upgrade hadn't updated the file civicrm.php which is in plugins/civicrm folder so I replaced that with the 5.28.3 version.
Warning: include\_once(/home/fovps1e/public\_html/wp-content/plugins/civicrm/includes/civicrm.compat.php): failed to open stream: No such file or directory in /home/fovps1e/public\_html/wp-content/plugins/civicrm/civicrm.php on line 581
Warning: include\_once(): Failed opening '/home/fovps1e/public\_html/wp-content/plugins/civicrm/includes/civicrm.compat.php' for inclusion (include\_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home/fovps1e/public\_html/wp-content/plugins/civicrm/civicrm.php on line 581
Fatal error: Uncaught Error: Class 'CiviCRM\_For\_WordPress\_Compat' not found in /home/fovps1e/public\_html/wp-content/plugins/civicrm/civicrm.php:582 Stack trace: #0 /home/fovps1e/public\_html/wp-content/plugins/civicrm/civicrm.php(379): CiviCRM\_For\_WordPress-\>include\_files() #1 /home/fovps1e/public\_html/wp-includes/class-wp-hook.php(287): CiviCRM\_For\_WordPress-\>setup\_instance('') #2 /home/fovps1e/public\_html/wp-includes/class-wp-hook.php(311): WP\_Hook-\>apply\_filters(NULL, Array) #3 /home/fovps1e/public\_html/wp-includes/plugin.php(478): WP\_Hook-\>do\_action(Array) #4 /home/fovps1e/public\_html/wp-settings.php(409): do\_action('plugins\_loaded') #5 /home/fovps1e/public\_html/wp-config.php(89): require\_once('/home/fovps1e/p...') #6 /home/fovps1e/public\_html/wp-load.php(37): require\_once('/home/fovps1e/p...') #7 /home/fovps1e/public\_html/wp-admin/admin.php(34): require\_once('/home/fovps1e/p...') #8 /home/fovps1e/public\_html/wp-admin/index.php(10): require\_once('/home/fovps1e/p...') #9 {main} thrown in /home/fovps1e/public\_html/wp-content/plugins/civicrm/civicrm.php on line 582

# Answer
> 3 votes
This isn't really a WP error, it's a file that's either missing or has the wrong owner/permissions.

Look for `/home/fovps1e/public_html/wp-content/plugins/civicrm/includes/civicrm.compat.php`. Is it present? If not, you may need to unzip another copy of WordPress. More likely, it's present, but its file ownership/permissions make it unreadable by whichever user is your PHP user.

---
Tags: wordpress
---


# Question
Title: Contribute Page with a Profile in Edit Mode - Not Create Mode?
using wordpress/CiviCRM 4.7.

I have a contribution page with a profile attached (under the profiles tab for the contribution admin page). The profile contains custom fields that can have multiple entries. When a user goes to this page, it is populating the contents with existing data from that user - I want to present an empty form for this. Any ideas how to do this?

# Answer
You can do this by adding `&cid=0` to the end of the donation page URL. E.g. if your page URL is:

```
http://example.com/civicrm/contribute/transact?reset=1&id=1

```

Instead use:

```
http://example.com/civicrm/contribute/transact?reset=1&id=1&cid=0

```
> 1 votes

# Answer
Is the user logged in? If so then it will auto populate with their details. I think you could override this but lets confirm how users are accessing the form first.
> 0 votes

# Answer
I can't explain how to do this in WP. In Drupal you could use Webform. But the approach I would suggest, would be that you record the Dog as a Contact, and get some coding done to create the Relationship to the Owner. Then I would have the payment function as a Gift Membership or Soft Credit (waves hands around as not clear what you need) so that the payment is recorded on both Dog and Person.
> 0 votes

---
Tags: profile, contribution-page, multi-record
---


# Question
Title: Creation of a form from the front-office?
I'm using the joomla system and I'm looking for a form that can be created from the user interface. that is to say that there will be 3 level. the administrator who will manage all the system, the manager who can create a form from the user interface and collect the information from this form. and finally the user who will enter in the form. is it possible to do this kind of form with the CiviCRM component

# Answer
There are "profiles" that work with joomla - see https://docs.civicrm.org/sysadmin/en/latest/integration/joomla/forms/
> 2 votes

---
Tags: joomla, forms
---


# Question
Title: Have CiviCRM follow CMS language with Joomla
I currently have CiviCRM 5.25.0 and Joomla 3.9.19.

Joomla is bilingual Fr / En and users can switch from one language to the other no problem.

CiviCRM is set up bilingual with Fr as the default language, but all fields are defined in both languages (Fr\_CA & En\_US).

I have set the "Inherit CMS language” option to YES.

I set up in Joomla two URL Menus (one in Fr and one in EN) to list a contact group.

In the French site, I see the profiles fields in French, as it should. But when I switch to the English in the frontend, the menus are in English, as expected, but the profile remains in French.

If I switch the CiviCRM default language to En, then the English side is OK (the users see the profile fields in English) but French users also see the profile in En even though the Menus are nos in Fr.

It thus seems that the profile follows the default CiviCRM language and not the CMS language.

I have tried to force the language by adding “&lcMessages=en\_US” at the end of the English Menu URL - as I found in some forums - to no avail. Just in case, I have also tried en\_UK.

Any idea on how to force the profile to follow the user’s language preference?

Just in case it is needed, here is the English page: https://www.voile.qc.ca/en/?option=com\_civicrm&task=civicrm/profile&Itemid=609&force=1&gid=14&lcMessages=en\_US Thanks in advance for your help!

# Answer
> 0 votes
To my knowledge, CiviCRM doesn't support automatic inheritance of the language in Joomla, yet.

But your idea to add lcMessages in the url was good. I was able to make it work using lcMessages=en\_CA. It seems that you have set up your site in en\_CA locale, not the default en\_US.

The full url should be : https://www.voile.qc.ca/en/?option=com\_civicrm&task=civicrm/profile&Itemid=609&force=1&gid=14&lcMessages=en\_CA

---
Tags: profile, joomla, language
---


# Question
Title: Consistent failure to upgrade from 5.25.0 to 5.28.x
I try to follow https://docs.civicrm.org/sysadmin/en/latest/upgrade/wordpress/ to upgrade from 5.25 to 5.28.n as 5.25 is broken in WP5.5

After the step Point your web browser to the following URL

http://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

I consistently get this error despite following the instructions to the letter. I have no extra extensions, on the face of it, this would seem a fairly straightforward process.

<pre><code>#0 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(337): CRM_Core_Error::backtrace()
#1 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php(82): CRM_Core_Error::fatal("Your database has already been upgraded to CiviCRM 5.25.0")
#2 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php(57): CRM_Upgrade_Page_Upgrade->runIntro()
#3 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(311): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#4 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
#5 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
#6 /home/customer/www/staging21.example.org/public_html/wp-content/plugins/civicrm/civicrm.php(1601): CRM_Core_Invoke::invoke((Array:2))
#7 /home/customer/www/staging21.example.org/public_html/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress->invoke("")
#8 /home/customer/www/staging21.example.org/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters("", (Array:1))
#9 /home/customer/www/staging21.example.org/public_html/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
#10 /home/customer/www/staging21.example.org/public_html/wp-admin/admin.php(254): do_action("toplevel_page_CiviCRM")
#11 {main}

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php:478) in /home/customer/www/staging21.example.org/public_html/wp-admin/admin-header.php on line 9

WordPress 5.5 is available! Please update now.
 Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Your database has already been upgraded to CiviCRM 5.25.0 ```

 Any hints welcome...  I get this with 5.28.0 and 5.28.3 over past couple of days.
</code></pre>

# Answer
> 1 votes
```
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.

```

Your database has already been upgraded to CiviCRM 5.25.0

This message indicates that the CiviCRM version installed is 5.25, not 5.28.3 Can you double check that you have replaced all the files in the `plugins/civicrm` folder? You should make a backup, remove the folder and then extract the new zip file. That way there are no leftover files from prior versions hanging around.

# Answer
> 0 votes
Make sure the civicrm your civicrm plugin is 5.28.x version and you have only single civicrm folder in plugins (no backups, no renamed folders etc)

---
Tags: wordpress, upgrade, 5.25
---


title: CiviRules - triggers, but no mails sent

text:
# Question
Title: CiviRules - triggers, but no mails sent
Similar to CiviRules triggers, but fails to send email, but I've not seen a resolution there. For the past ~year, have had CiviRules sending my DRIP email campaign, along with a couple of tag setting functions.

(techie enough to be dangerous... I can get in to things, but...)

Recently, (not sure exactly when) I noticed that it wasn't sending the emails, though, it was processing other things in the actions. Emails do send no problem - manually.

I didn't know about CiviRules logging, so just loaded it, but don't know where the logs might show up. I added another user, it triggered, but no emails, and no errors - at least not seen in Administer\> Administration Console\> View Log.

From above post, I saw about civicrm\_queue\_item table. There are a number of items there from the past ~2 months, but I don't know how to interpret.

Cron is running, including process civirules and process delayed civirule actions (both always, with no errors).

I just saw another question with problem with delays, so I changed the delay on my first email from 1minute - to no delay. Created user, with the trigger tag. It sent the email! Now, will it send the rest? (2, 4, 6... day delays on them.

Running: WordPress 5.5 CiviCRM 5.27.3 CiviRules 2.16 Email API 1.19

Thanks for any ideas/suggestions/hints... ..clark

# Answer
> 1 votes
I don't know the root cause of the failure, but, installing the 5.28.2 seems to have fixed the issue.

---
Tags: civirules
---


title: making Registration End date relative

text:
# Question
Title: making Registration End date relative
I frequently have a problem when using CiviEvent that registration is not live because of problems with the end (or start and end) dates. Often this is caused by:

1. An event I copy and edit.
2. Repeating events In both of these cases, if the end of registration could be RELATIVE to the event start time, this problem would not exist. These fixed (only) times cause me problems repeatedly! Can this be fixed at my end? Can the code for this be change in future versions?

# Answer
I feel this is very difficult to have it as part of Civi tar ball because there are many things we need to consider and come up with generalised solution. eg Algorithm to set start/end date when copying an event. How many org want this to change.

Instead i would just create an extension that would provide an option(pop-up) to set start date and end date (setting default value either today for start date and relative date to end date based on previous event dates or previous event start/end date) those field before a event is copied.
> 2 votes

---
Tags: civievent, dates, online-registration
---


# Question
Title: Undefined index: value in _webform_conditional_get_all_components()
I'm getting an error on the webform

Here is the error:

Notice: Undefined index: value in \_webform\_conditional\_get\_all\_components() (line 662 of /home3/site/public\_html/sites/all/modules/webform\_conditional/webform\_conditional.module).

I'm using Drupal 7 and the latest version of Webform.

I also have the error notification off.

# Answer
It sounds like perhaps you have webform\_conditional module installed even though conditionals are part of webform module?

☝This is the answer. If webform\_conditional module is uninstalled properly it simply is impossible for that module to still be throwing error messages.
> 1 votes

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


# Question
Title: Upgrade error: Rebuild Multilingal Schema
I'm trying to upgrade CiviCRM on my Wordpress website from 5.25.0 to 5.28.0. I've already completed upgrade in the past, so I know how to do it.

When I try to update the database, upgrade stay stuck on "\[Executed: Rebuild Multilingal Schema\]", and then become after few minutes "\[Executed: undefined\]".

* I try to update to 5.26.0 and it's ok.
* Then to 5.27.0 and ok too.
* But with 5.28.0 it's not ok...

I tried to enable debug mod, but it don't give me more details, excepte when I try to update the database again:

I don't know where else to look, can you help me?

Thanks!

Update 2020-08-19:

I tried to disable all extension, downgrade Wordpress to 5.4.2, and tried to install again 5.28.0 update, but same issue... Here is a video of the progress of the update: https://streamable.com/5fubww

# Answer
> 1 votes
Here is the solution, it solved my issue!

https://lab.civicrm.org/dev/wordpress/-/issues/71

# Answer
> 1 votes
I noticed the 5.28.2 update that was just released includes release notes that specify the 5.28.2 update includes a fix for issues that may occur during the upgrade process:

https://github.com/civicrm/civicrm-core/blob/5.28.2/release-notes/5.28.2.md#bugs

Per the release notes, this patch was originally published in `5.27.1`. However, it was not initially ported to the concurrent `5.28.beta1`.

The 5.28.2 release is now available for download, so it may fix the upgrade issue:

https://civicrm.org/download

Please Note: If CiviCRM was originally installed on your website with version \<=4.6, PRIOR TO THE UPGRADE PROCESS for CiviCRM 5.29.0 (next release) you may need to change/update the civicrm.settings.php, Directories, and Resource URLs configuration settings:

https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-5.29

---
Tags: wordpress
---


# Question
Title: Email Send Now (to 50 or Less) - More than 50?
Is it possible to use email send now to more than 50 people?

# Answer
Its a hidden setting and can be set in below ways

1. Add below line in civicrm.settings.php

$civicrm\_setting\['Mailing Preferences'\]\['simple\_mail\_limit'\] = '100';
2. Via drush or cv

cv api Setting.create simple\_mail\_limit=100

drush cvapi Setting.create simple\_mail\_limit=60
3. Mysql statement

UPDATE civicrm\_setting SET value = '100' WHERE name = 'simple\_mail\_limit';
4. Via api explorer
> 6 votes

---
Tags: civievent, civimail
---


title: Broken Batch Validation

text:
# Question
Title: Broken Batch Validation
CiviCRM 4.7.29 on Wordpress 4.9.8 on Ubuntu

Hello all,

We had the above instance running well and doing batch validation under CiviContribution well but had recently choked on validation with the following error:

\** text version of the error at the end of this post

The changes that seem to have taken place before this is the installation of 2 extensions:

Edit Line Item Extension v2.0 (biz.jmaconsulting.lineitemedit)

ExtendedReport v3.0 (nz.co.fuzion.extendedreport)

Would anyone be able to advise how we can regain the batch validation function. We have uninstalled the above 2 extensions but the problem still persists.

Thanks in advance!

Clement

==== I later observed Price Set Errors that seems to be related to the same issue:

I also noticed other errors related to Line Item Report which could be related to the same issue:

Invalid Price Fields Hide the following Price Set Fields use disabled or invalid financial types and need to be fixed if they are to still be used.

Price Set Price Set Field Action Link Contribution Amount Contribution Amount View Price Set Fields Contribution Amount Additional Line Item 1 View Price Set Fields Contribution Amount Additional Line Item 2 View Price Set Fields Contribution Amount Additional Line Item 3 View Price Set Fields Contribution Amount Additional Line Item 4 View Price Set Fields Contribution Amount Additional Line Item 5 View Price Set Fields Contribution Amount Additional Line Item 6 View Price Set Fields Contribution Amount Additional Line Item 7 View Price Set Fields Contribution Amount Additional Line Item 8 View Price Set Fields Contribution Amount Additional Line Item 9 View Price Set Fields Contribution Amount Additional Line Item 10 View Price Set Fields Membership Amount Membership Amount View Price Set Fields

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

Text of error message

```
CRM_Core_Exception: expected only one price field to be in price set but multiple are present in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php on line 453
Exception trace
#   Function    Location
0   CRM_Price_BAO_PriceSet::getOnlyPriceFieldID(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php:453
1   CRM_Batch_Form_Entry->processContribution(Array)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Batch/Form/Entry.php:418
2   CRM_Batch_Form_Entry->postProcess() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:447
3   CRM_Core_Form->mainProcess()    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:169
4   CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:136
5   CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
6   HTML_QuickForm_Controller->handle(Object(CRM_Batch_Form_Entry), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
7   HTML_QuickForm_Page->handle('upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:351
8   CRM_Core_Controller->run()  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:113
9   CRM_Utils_Wrapper->run('CRM_Batch_Form_E…', null, Array)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:282
10  CRM_Core_Invoke::runItem(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:84
11  CRM_Core_Invoke::_invoke(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:52
12  CRM_Core_Invoke::invoke(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm.php:1218
13  CiviCRM_For_WordPress->invoke('')   /var/www/html/wp-includes/class-wp-hook.php:286
14  WP_Hook->apply_filters('', Array)   /var/www/html/wp-includes/class-wp-hook.php:310
15  WP_Hook->do_action(Array)   /var/www/html/wp-includes/plugin.php:453
16  do_action('toplevel_page_Ci…')  /var/www/html/wp-admin/admin.php:224
17  {main}

 Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
expected only one price field to be in price set but multiple are present

```

# Answer
Just to close the loop on this question, this was answered in another post

https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/issues/25
> 1 votes

---
Tags: civicontribute, batches, validation
---


title: Civicrm on mariadb with data encryption

text:
# Question
Title: Civicrm on mariadb with data encryption
is there any insights on installing civicrm on mariadb with data encryption turned on? Is it workable? Thanks.

# Answer
> 1 votes
Just to close the loop on this, i ended up using LUKS to encrypt harddisk where mysql lived. CIVICRM didn't seem to mind it so far and performance doesn't seem impacted.

# Answer
> 1 votes
Logging tables until recently wouldn't be supported. If your install is older and you have logging turned on you might need to update the engine for the logging tables to InnoDB.

Otherwise I think it would just be regular system administration stuff not specific to CiviCRM.

But for me the issue with at-rest encryption has always been that storing the keys on the same server defeats the purpose, unless you're willing to password protect them and also not store the password on the server, i.e. manually start mysql any time the server needs rebooting and manually provide the password, and that may not even be doable depending on the hosting setup.

I see there is an eperi gateway plugin for mariadb which I was unaware of. That seems interesting.

---
Tags: mariadb
---


# Question
Title: CiviMobile: Minimal Permission for CiviMobile
i am testing out CiviMobile deployment with my CIVICRM (Wordpress 5.0 CIVICRM 5.13) and wanted to see how the app works with a log-in account that has restricted access to selected records in the CIVICRM server.

I have set this account to the CONTRIBUTOR account in WP to differentiate it from the ADMIN account. And to CONTRIBUTOR role i added the following CIVICRM permissions on top of the default:

1. CiviCRM: view my contact
2. CiviCRM: access CiviCRM backend and API

TESTUSER is the test account used and added to the CONTRIBUTOR role.

I did the access control by only adding TESTUSER to a access control GROUP that is allowed to access a group of records. TESTUSER was able to access only the intended GROUP of records when loggin into the Wordpress site with just the PERMISSION 2 listed above.

I tried with by logging into CIVIMOBILE, it complained of not sufficent permission so I added PERMISSION 1 and was able to login.

When logged in, i was able to view profile and calendar of the logged in account OK but not able to do so for the accessible records. Their names will appear under CONTACTS but when clicked will complain "PERMISSION REQUIRED"

However, with the same permission set, the SUMMARY page of details for the record is accessible when using the TESTUSER account to log into Wordpress to view the record.

It seems that there might be further permission required to be given to the ACCOUNT that is using CiviMobile to access a restricted set of records. What would those permissions be? Thanks.

# Answer
This question is answered here:

https://lab.civicrm.org/extensions/civimobileapi/-/issues/41
> 1 votes

---
Tags: permissions, civimobile
---


# Question
Title: Multilingual Setup, but no language switcher
I've followed the instructions for setting up multilingual access (english & spanish) but no language switcher is appearing.

Drupal 8 install.

I'm able to select both languages in the language settings. Everything seems to go fine, but no switcher.

Where is the switcher supposed to appear? Only at login? I seem to recall reading that it would show up on various pages but may be mis-remembering.

# Answer
Usually what you want to do is use the Drupal language switcher and choose the option in (civicrm/admin/setting/localization?reset=1) that tells CiviCRM to follow the language that Drupal is using ("inherit CMS language").

To work properly, that option requires you to fill out a couple of lines in the civicrm.settings.php that are commented out by default, but which tells civicrm how to map the Drupal language settings (which are just two letter language codes) over to CiviCRM language codes (which are two letter followed by a region code).

Here's an example from a Canadian bilingual site of mine:

```
# grep LANG civicrm.settings.php
define('CIVICRM_LANGUAGE_MAPPING_FR', 'fr_CA');
define('CIVICRM_LANGUAGE_MAPPING_EN', 'en_CA');
// define('CIVICRM_LANGUAGE_MAPPING_ES', 'es_MX');
// define('CIVICRM_LANGUAGE_MAPPING_PT', 'pt_BR');
// define('CIVICRM_LANGUAGE_MAPPING_ZH', 'zh_TW');

```
> 2 votes

---
Tags: language
---


# Question
Title: Cannot Record Payment to a Contribution in Pending Pay Later Status (WordPress 5.0.10, CIVICRM 5.21.2)
I was testing the Record Payment function in the following manner:

1. Click Contribution under Contact A
2. Click "Record Contrirbution"
3. Create Contribution, set Status to "Pending (Pay Later)"
4. Click "more" for the Contribution record, Select "Record Payment"
5. Select Payment Method (I chose Cash)
6. Click Record Payment

This will result in spinning of the logo and nothing happens. This requires a refresh of the page to get out. No payment was recorded to the contribution.

I have checked that this didn't happen to earlier versions (5.12). Any insights? Thanks.

# Answer
> 2 votes
thanks for your guidance, here is the PHP error and it led me to the solution:

```
Fatal error: Uncaught Error: Call to undefined function bccomp() in
/var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/Payment.php:374
..

```

this prompted me to install bcmath:

```
sudo apt-get update -y
sudo apt-get install -y php7.2-bcmath

```

restarted apache and the problem went away.

---
Tags: contributions, paylater
---


title: Recaptcha: Update Language

text:
# Question
Title: Recaptcha: Update Language
How do you update language for recaptcha.

I've tried with this options (like in the example) : lang : 'fr'

But it's not working.

Thanks.

# Answer
> 1 votes
The library in use in civicrm is not language aware. Here's a patch that is working for me on 5.27:

```
diff --git a/packages/recaptcha/recaptchalib.php b/packages/recaptcha/recaptchalib.php
index 78d2b14..c869a09 100644
--- a/packages/recaptcha/recaptchalib.php
+++ b/packages/recaptcha/recaptchalib.php
@@ -114,7 +114,8 @@ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
         } else {
                 $server = RECAPTCHA_API_SERVER;
         }
-
+        $locale = CRM_Core_I18n::getLocale();
+        $server = $server .'?hl='.$locale;
         $errorpart = "";
         if ($error) {
            $errorpart = "&error=" . $error;

```

---
Tags: recaptcha
---


title: returning from mollie payment

text:
# Question
Title: returning from mollie payment
my organisation has a site on which payed events are offered. Visitors can pay via an IDEAL mollie payment with use of a custom build module. We want to replace that module by making use of the civicrm mollie interpay module.

Up to now, we have been unsuccessful in testing this module. The test payments don't work at all, while production payments do work, but not yet in a way that we can use it in our site.

I hope you can guide me in making the production payments work.

The site is a wordpress based site. We use civicrm 5.18.3. For payment we use the interpay (mollie) method.

When a payment is done with mollie, the payment is registered and visible in the event dashboard. So the most important part works. But the user who has finished the payment (and clicks the 'back to webshop' button) gets a blank screen. The URL of that blank screen ends with `wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fpayment%2Fipn%2F86%2F8`

We find it not acceptable to incorporate this on our site in this form. Can you help me by advising me what to do to present the user a confirmation screen?

thanks for helping, Ruud

# Answer
The issue was resolved after upgrading to civicrm 5.28 and omnimpay multiprocessor 3.13
> 2 votes

# Answer
You must check cancel url and return/thankyou url before redirecting to payment processor site.

normally url pattern should be like https://domain.com/civicrm?page=CiviCRM&q=civicrm/event/register&\_qf\_ThankYou\_display=true&qfKey=dedf990ab5ff17ebff9f7cc370fbee49\_6616

while "wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fpayment%2Fipn%2F86%2F8" is used as callback/webhook url to process the payment at civicrm side.
> 1 votes

---
Tags: civievent, mollie
---


# Question
Title: no thankyou screen after payment for event
When I register for one of the events on my site, no thank you screen is displayed. Instead I get an all white blank screen. The page source is empty, so not even a html tag. The URL of that screen is `https://mysite.org/civicrm/\?civiwp\=CiviCRM\&q\=civicrm%2Fpayment%2Fipn%2F187%2F9`

This happens:

* I add an event with a thank you text,
    + I find in the tab 'online registration' a section 'Thank-you Screen'.
    + I fill out the three fields I find there, being 'Title', 'Introductory Text' and 'Footer text'.
    + I save and leave the page.
* I register for the event, nearly everything works as expected:
    + I can do a (ideal) payment, which results in a registration record in the database,
    + I get an email and there is a bank account transaction.
* But on completing the payment, I get a white screen with a strange looking URL (see above). To the user it looks like something went wrong (although this is not the case), so I do not dare to use this on my production site.

In the error log `php_errorlog`, I find some warnings, but they are generated during the handling of the forms. From the moment of starting the payment up until the white screen, no further messages appear in the error log.

I do not know if the white screen behavior is in the payment processor code, or in the code of civicrm itself.

What should I expect to happen when a payment is done? Should I see a rendered page with a ipn-url like I have?

Thanks in advance!

* civicrm version: 5.26.2
* wordpress installation
* php 7.3

EDIT:

In order to get a feeling of what is happening, I added some debug-prints to the omnipay code, to method `processPaymentNotification`. That was maybe not the smartest thing to do, since it provides lots of information without me understanding if it is relevant.

It turns out that when I do a payment, this method is called a number of times, that it most of the times follows the same execution path, but in other cases exceptions are caught.

I could use some advice on them: can the exceptions be ignored, because they *should* occur? the (edited) log output is below (I truncated the file paths to make it more readable). You can clearly see the method is invoked more than once and that there are 'normal' runs and runs with messages.

```
Jun 27 15:17:41  [warning] Civi\Payment\PropertyBag related deprecation warnings:
We have merged input params into the property bag for now but please rewrite code to not use this.
Unknown property 'qfKey'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'entryURL'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'first_name' to 'firstName' for you, but please update your code to use the propper setters and getters.
We have translated 'last_name' to 'lastName' for you, but please update your code to use the propper setters and getters.
Unknown property 'email-Primary'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'hidden_processor'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'priceSetId'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'price_10'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'payment_processor_id'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'MAX_FILE_SIZE'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'is_primary'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'is_pay_later'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'contact_id' to 'contactID' for you, but please update your code to use the propper setters and getters.
Unknown property 'defaultRole'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participant_role_id'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'currencyID' to 'currency' for you, but please update your code to use the propper setters and getters.
Unknown property 'amount_level'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'amount'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'tax_amount'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'button'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participant_status'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participant_status_id'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'receive_date'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'contributionTypeID'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'eventID'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'item_name'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
We have translated 'fee_amount' to 'feeAmount' for you, but please update your code to use the propper setters and getters.
Unknown property 'participantID'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'participants_info'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'eventCustomFields'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'ip_address'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Unknown property 'component'. We have merged this in for now as a custom property. Please rewrite your code to use PropertyBag->setCustomProperty if it is a genuinely custom property, or a standardised setter like PropertyBag->setContactID for standard properties
Array
(
    [civi.tag] => deprecated
)
Jun 27 15:17:48  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:17:48  [debug] LOC702
Jun 27 15:17:48  [debug] LOC7021
Jun 27 15:17:48  [debug] LOC7021c
Jun 27 15:17:48  [debug] LOC7022
Jun 27 15:17:48  [debug] LOC7022b
Jun 27 15:17:48  [debug] LOC704
Jun 27 15:17:48  [debug] LOC7051
Jun 27 15:17:48  [debug] LOC7052
Jun 27 15:18:03  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:18:03  [debug] LOC702
Jun 27 15:18:03  [debug] LOC7021
Jun 27 15:18:03  [debug] LOC7021c
Jun 27 15:18:03  [debug] LOC7022
Jun 27 15:18:03  [debug] LOC7022b
Jun 27 15:18:03  [debug] LOC704
Jun 27 15:18:03  [debug] LOC7051
Jun 27 15:18:03  [debug] LOC7052
Jun 27 15:18:03  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:18:03  [debug] LOC702
Jun 27 15:18:03  [debug] LOC7021
Jun 27 15:18:03  [debug] LOC7021c
Jun 27 15:18:03  [debug] catch InvalidRequestException
Jun 27 15:18:03  [debug]    msg: The transactionReference parameter is required
Jun 27 15:18:03  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(766): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:4))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}
Jun 27 15:18:03  [debug] LOC7032
Jun 27 15:18:33  [info] Contribution record updated successfully
Jun 27 15:18:33  [info] Outbound mail has been disabled. Click <a href='https://civicrm-nw.rigpa.nl/civicrm/?civiwp=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fsmtp&reset=1'>Administer >> System Setting >> Outbound Email</a> to set the OutBound Email.
Jun 27 15:18:48  [debug] catch API3_Exception
Jun 27 15:18:48  [debug] Contribution already completed
Jun 27 15:18:48  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(766): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:7))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}
Jun 27 15:18:48  [debug] LOC7054a
Jun 27 15:18:48  [debug] LOC7054c
Jun 27 15:18:48  [debug] LOC7055
Jun 27 15:19:18  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:19:18  [debug] LOC702
Jun 27 15:19:18  [debug] LOC7021
Jun 27 15:19:18  [debug] LOC7021c
Jun 27 15:19:18  [debug] LOC7022
Jun 27 15:19:18  [debug] LOC7022b
Jun 27 15:19:18  [debug] LOC704
Jun 27 15:19:18  [debug] LOC7051
Jun 27 15:19:18  [debug] LOC7052
Jun 27 15:20:03  [debug] LOC7053
Jun 27 15:20:03  [debug] LOC7055
Jun 27 15:21:33  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:21:33  [debug] LOC702
Jun 27 15:21:33  [debug] LOC7021
Jun 27 15:21:33  [debug] LOC7021c
Jun 27 15:21:33  [debug] LOC7022
Jun 27 15:21:33  [debug] LOC7022b
Jun 27 15:21:33  [debug] LOC704
Jun 27 15:21:33  [debug] LOC7051
Jun 27 15:21:33  [debug] LOC7052
Jun 27 15:22:18  [debug] LOC7053
Jun 27 15:22:18  [debug] LOC7055
Jun 27 15:25:48  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:25:48  [debug] LOC702
Jun 27 15:25:48  [debug] LOC7021
Jun 27 15:25:48  [debug] LOC7021c
Jun 27 15:25:48  [debug] LOC7022
Jun 27 15:25:48  [debug] LOC7022b
Jun 27 15:25:48  [debug] LOC704
Jun 27 15:25:48  [debug] LOC7051
Jun 27 15:25:48  [debug] LOC7052
Jun 27 15:26:33  [debug] LOC7053
Jun 27 15:26:33  [debug] LOC7055
Jun 27 15:32:50  [debug] LOC701civicrm/payment/ipn/185/9
Jun 27 15:32:50  [debug] LOC702
Jun 27 15:32:50  [debug] LOC7021
Jun 27 15:32:50  [debug] LOC7021c
Jun 27 15:32:50  [debug] LOC7022
Jun 27 15:32:50  [debug] LOC7022b
Jun 27 15:32:50  [debug] LOC704
Jun 27 15:32:50  [debug] LOC7051
Jun 27 15:32:50  [debug] catch API3_Exception
Jun 27 15:32:50  [debug] Expected one Contribution but found 0
Jun 27 15:32:50  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(766): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:7))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}
Jun 27 15:32:50  [debug] LOC7054a
Jun 27 15:32:50  [debug] LOC7054b1
Jun 27 15:32:50  [error] ipn_completion failed
Array
(
    [0] => 185Expected one Contribution but found 0
)
Jun 27 15:34:03  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:34:03  [debug] LOC702
Jun 27 15:34:03  [debug] LOC7021
Jun 27 15:34:03  [debug] LOC7021c
Jun 27 15:34:03  [debug] LOC7022
Jun 27 15:34:03  [debug] LOC7022b
Jun 27 15:34:03  [debug] LOC704
Jun 27 15:34:03  [debug] LOC7051
Jun 27 15:34:03  [debug] LOC7052
Jun 27 15:34:48  [debug] LOC7053
Jun 27 15:34:48  [debug] LOC7055
Jun 27 15:50:18  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:50:18  [debug] LOC702
Jun 27 15:50:18  [debug] LOC7021
Jun 27 15:50:18  [debug] LOC7021c
Jun 27 15:50:19  [debug] LOC7022
Jun 27 15:50:19  [debug] LOC7022b
Jun 27 15:50:19  [debug] LOC704
Jun 27 15:50:19  [debug] LOC7051
Jun 27 15:50:19  [debug] LOC7052
Jun 27 15:51:04  [debug] LOC7053
Jun 27 15:51:04  [debug] LOC7055
Jun 27 15:53:07  [debug] LOC701civicrm/payment/ipn/186/9
Jun 27 15:53:07  [debug] LOC702
Jun 27 15:53:07  [debug] LOC7021
Jun 27 15:53:07  [debug] LOC7021c
Jun 27 15:53:07  [debug] catch InvalidRequestException
Jun 27 15:53:07  [debug]    msg: The transactionReference parameter is required
Jun 27 15:53:07  [debug] #0 PLUGINS/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/CRM/Core/Payment/OmnipayMultiProcessor.php(765): CRM_Core_Payment_OmnipayMultiProcessor->processPaymentNotification((Array:4))
#1 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1578): CRM_Core_Payment_OmnipayMultiProcessor->handlePaymentNotification()
#2 PLUGINS/civicrm/civicrm/CRM/Core/Payment.php(1472): CRM_Core_Payment::handlePaymentMethod("handlePaymentNotification", (Array:3))
#3 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(278): CRM_Core_Payment::handleIPN()
#4 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
#5 PLUGINS/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:5))
#6 PLUGINS/civicrm/civicrm.php(1535): CRM_Core_Invoke::invoke((Array:5))
#7 PLUGINS/civicrm/includes/civicrm.basepage.php(352): CiviCRM_For_WordPress->invoke()
#8 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#9 /home/USER/public_html/civicrm-nw/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters("", (Array:1))
#10 /home/USER/public_html/civicrm-nw/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#11 /home/USER/public_html/civicrm-nw/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#12 /home/USER/public_html/civicrm-nw/wp-includes/functions.php(1255): WP->main("")
#13 /home/USER/public_html/civicrm-nw/wp-blog-header.php(16): wp()
#14 /home/USER/public_html/civicrm-nw/index.php(17): require("/home/USER/public_html/civicrm-nw/wp-blog-header.php")
#15 {main}

```

The debug statements are inserted into the code as follows:

```
public function processPaymentNotification($params) {
    try {
    $this->createGateway($params['processor_id']);
    $originalRequest = $_REQUEST;
    $_REQUEST = $params;
    $response = NULL;
    Civi::log()->debug('LOC701'. $params['q']);
    //$rdump = print_r($params, true);
    //Civi::log()->debug($rdump);
    try {
    Civi::log()->debug('LOC702');
            Civi::log()->debug('LOC7021');
      if ($this->gateway->supportsAcceptNotification()) {
            Civi::log()->debug('LOC7021b');
        $response = $this->gateway->acceptNotification($params)->send();
      }
      else {
        Civi::log()->debug('LOC7021c');
        $response = $this->gateway->completePurchase($params)->send();
      }
        Civi::log()->debug('LOC7022');
      if ($response->getTransactionId()) {
        Civi::log()->debug('LOC7022b');
        $this->setContributionReference($response->getTransactionId(), 'strip');
      }
    }
    catch (\Omnipay\Common\Exception\InvalidRequestException $e) {
        Civi::log()->debug('catch InvalidRequestException');
         Civi::log()->debug('   msg: ' . $e->getMessage());
        require_once 'CRM/Core/Error.php';
        Civi::log()->debug (CRM_Core_Error::formatBacktrace(debug_backtrace()));

      $q = explode('/', CRM_Utils_Array::value(CRM_Core_Config::singleton()->userFrameworkURLVar, $_GET, ''));
      array_pop($q);
      $this->setContributionReference(array_pop($q));
      if (!civicrm_api3('Contribution', 'getcount', [
        'id' => $this->transaction_id,
        'contribution_status_id' => ['IN' => ['Completed', 'Pending']],
      ])) {
            Civi::log()->debug('LOC7031');
        $this->redirectOrExit('fail', $response);
      }
            Civi::log()->debug('LOC7032');
      $this->redirectOrExit('success', $response);
    }
    // Unset gateway once we are done with it per https://github.com/eileenmcnaughton/nz.co.fuzion.omnipaymultiprocessor/issues/55
    $this->gateway = NULL;

    Civi::log()->debug('LOC704');
    if ($response->isSuccessful()) {
      try {
    Civi::log()->debug('LOC7051');
        //cope with CRM14950 not being implemented
        $contribution = civicrm_api3('contribution', 'getsingle', [
          'id' => $this->transaction_id,
          //'return' => 'contribution_status_id, contribution_recur_id, contact_id, contribution_contact_id',
        ]);
    Civi::log()->debug('LOC7052');

        if ($this->getLock() && CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contribution['contribution_status_id']) !== 'Completed') {
          civicrm_api3('contribution', 'completetransaction', [
            'id' => $this->transaction_id,
            'trxn_id' => $response->getTransactionReference(),
            'payment_processor_id' => $params['processor_id'],
          ]);
        }
            Civi::log()->debug('LOC7053');
        if (!empty($contribution['contribution_recur_id']) && ($tokenReference = $response->getCardReference()) != FALSE) {
          $this->storePaymentToken($params, $contribution, $tokenReference);
        }
      }
      catch (CiviCRM_API3_Exception $e) {
         Civi::log()->debug('catch API3_Exception');
         Civi::log()->debug($e->getMessage());
         require_once 'CRM/Core/Error.php';
         Civi::log()->debug (CRM_Core_Error::formatBacktrace(debug_backtrace()));
            Civi::log()->debug('LOC7054a');
        if (stripos($e->getMessage(), 'Contribution already completed') === FALSE) {
          Civi::log()->debug('LOC7054b1');
          $this->handleError('error', 'ipn_completion failed', $this->transaction_id . $e->getMessage(), 9000, 'An error may have occurred. Please check your receipt is correct');
            Civi::log()->debug('LOC7054b2');
        }
        Civi::log()->debug('LOC7054c');
      }
      $_REQUEST = $originalRequest;
      Civi::log()->debug('LOC7055');
    }
    elseif ($this->transaction_id) {
      // Mark the contribution as failed (only allowed if status=Pending).
      // We get multiple requests from some processors (eg. Sagepay) where the contribution has already been marked as "Cancelled".
      try {
        Civi::log()->debug('LOC7056');
        $contribution = civicrm_api3('contribution', 'getsingle', [
          'id' => $this->transaction_id,
          'return' => 'contribution_status_id',
        ]);

        $contributionStatusName = CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contribution['contribution_status_id']);
        if ($contributionStatusName === 'Pending') {
          civicrm_api3('contribution', 'create', ['id' => $this->transaction_id, 'contribution_status_id' => 'Failed']);
        }
      }
      catch (Exception $e) {
        Civi::log()->debug('LOC7057');
        Civi::log()->error('CRM_Core_Payment_OmnipayMultiProcessor::processPaymentNotification: ' . $e->getMessage());
      }
    }

```

Digging further, I think I hit the reason for the blank screen. The white screen is the result of the InvalidRequestException

```
Jun 28 14:51:25  [debug] catch InvalidRequestException
Jun 28 14:51:25  [debug]    msg: The transactionReference parameter is required

```

Because of this exception, the code calls (LOC7032):

```
$this->redirectOrExit('success', $response);

```

Which does a `$redirectUrl = $this->getStoredUrl('success');`, giving an empty value for that url. For that reason, nothing is output. If add an else to the code that echos a html string, this html is showed instead of the blank screen!

I'd be happy to get help in further debugging this (I am no php programmer). My next effort would be finding the reason for the transactionReference parameter is required-message, but I don't know if this is a waste of time. ANY advice helps!

From the debuglogging, I can see that processPaymentNotification() is called multiple times in a row. The third call raises an exception and displays a white screen. The difference between the first two calls and the third are the parameters: the first two have

```
(
    [civiwp] => CiviCRM
    [q] => civicrm/payment/ipn/202/9
    [id] => tr_sqMmu4sK6R
    [noheader] => 1
    [processor_id] => 9
    [IDS_request_uri] => /civicrm/?civiwp=CiviCRM&q=civicrm%2Fpayment%2Fipn%2F202%2F9
    [IDS_user_agent] => Mollie HTTP client/1.0
)

```

while the third has

```
(
    [civiwp] => CiviCRM
    [q] => civicrm/payment/ipn/202/9
    [noheader] => 1
    [processor_id] => 9
)

```

you see? The id has gone. and exactly this id is used as transactionReference, what the exception was about. Believe me, I can't go further than this on my own, this is way beyond my understanding of the application. Who can help me understand what is going on?

# Answer
this issue is resolved since upgrading from civicrm 5.26 to civicrm 5.28 AND upgrading the omnipay multiprocessor plugin to 3.13. Without upgrading the plugin, the white screen still showed up. Now it is all perfect again.
> 1 votes

# Answer
The reason for the problem is in the session: the white page is probably caused by the returnURL being an empty string. This is because the session parameters are not retrieved as they should. I posted this question as follow up: session problem causes white screen
> 2 votes

---
Tags: civievent, payment, mollie
---


title: session problem causes white screen

text:
# Question
Title: session problem causes white screen
I have a website with paid events. Earlier, I mentioned that doing a payment for an event results in a white screen.

The cause of the white screen is the session variables: they do not survive the payment. The payment processor sets some session parameters just before the payment is done (like the return urls). As soon as the payment is done, the session parameters are not accessible anymore.

Uptil now, this session problem only occurs during/after the payment of event.

I find it difficult to find the cause of this session hickups, they are clearly related to the 'cannot modify header information' in the php\_errorlog (see below). But I use not the right strategy to find the cause of that message. I surely can use advice on tracking that down.

thanks!

* wordpress install 5.26.2
* php 7.3
* omnipay extension 3.9

the `php_errorlog` file adds an extra warning:

```
[05-Jul-2020 19:25:16 Europe/Amsterdam] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/civicrm-nw/wp-content/plugins/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/vendor/symfony/http-foundation/Response.php:1290) in /home/mysite/public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 949
[05-Jul-2020 17:25:38 UTC] PHP Warning:  Class __PHP_Incomplete_Class has no unserializer in /home/mysite/public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm.php on line 369
[05-Jul-2020 17:25:38 UTC] PHP Warning:  session_start(): Failed to decode session object. Session has been destroyed in /home/mysite/public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm.php on line 369

```

From the time stamps I can see that first these warnings are written to php\_errorlog and after that, all session variable print statements show empty values in the civicrm log file.

*current status*: I have put debugging statements in the code to find the point where the 'Cannot modify header information' message is caused. When that message appears in php\_errorlog, from that moment on all session parameters are lost. I found out that it occurs right after the user presses 'continue' on the event confirmation screen and before actions are taken in the next payment screen.

The code runs fine up til doPayment() in OmnipayMultiProcessor.php, where it does a redirect to url `https://civicrm-nw.mysite.nl/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_ThankYou_display=true&qfKey=58...`. I followed the code and after the setHttpHeader() in System.php, the session variables are still there and the warning is not printed yet. That happens soon thereafter.

But here I lose the code flow. I need to know which code is executed after this redirect and before the mollie payscreen is rendered in order to pick up further debugging . Any ideas what class/ routine would be a good starting point?

# Answer
this issue is resolved since upgrading from civicrm 5.26 to civicrm 5.28 AND upgrading the omnipay multiprocessor plugin to 3.13. Without upgrading the plugin, the white screen still showed up. Now it is all perfect again.
> 1 votes

---
Tags: wordpress, payment-processor, session
---


title: Can't upgrade from 5.26.* to 5.28.*

text:
# Question
Title: Can't upgrade from 5.26.* to 5.28.*
We got 2 demo websites that we are using publicly to show translations. When I tried to update them, they returned from drush command the following:

```
Drush bootstrap phase : bootstrap_drupal_database() [0.19 sec, 7.5 MB]                                                                                [bootstrap]
Successfully connected to the Drupal database. [0.19 sec, 7.93 MB]                                                                                [bootstrap]
Find command files for phase 4 (max=5) [0.19 sec, 7.93 MB]                                                                                [debug]
Drush bootstrap phase : bootstrap_drupal_full() [0.19 sec, 7.93 MB]                                                                                [bootstrap]
Cache HIT cid: 8.1.16-install_profile-66ecfeb9791a023150773849f1550c5d [0.39 sec, 24.5 MB]                                                                       [debug]
Find command files for phase 5 (max=5) [0.39 sec, 24.5 MB]                                                                                [debug]
Cache HIT cid: 8.1.16-install_profile-66ecfeb9791a023150773849f1550c5d [0.39 sec, 24.5 MB]                                                                       [debug]
Cache HIT cid: 8.1.16-commandfiles-5-98c00c316acff50d31c7b21c6455733c [0.39 sec, 24.52 MB]                                                                       [debug]
Cache HIT cid: 8.1.16-annotationfiles-5-fc9c7995bc64309247ba8dcb0f2a811a [0.4 sec, 25.24 MB]                                                                     [debug]
Bootstrap to phase 6. [0.43 sec, 26.98 MB]                                                                                [bootstrap]
Drush bootstrap phase : bootstrap_drupal_login() [0.43 sec, 26.98 MB]                                                                                [bootstrap]
Find command files for phase 6 (max=6) [0.44 sec, 25.69 MB]                                                                                [debug]
Found command: civicrm-upgrade-db (commandfile=civicrm) [0.44 sec, 25.69 MB]                                                                                [bootstrap]
Cache MISS cid: 8.1.16-alias-path--cae21634989c45f52c3c725c39d2002e [0.46 sec, 27.45 MB]                                                                         [debug]
Calling hook drush_civicrm_upgrade_db_validate [0.76 sec, 29.52 MB]                                                                                [debug]
Drush command terminated abnormally due to an unrecoverable error. [1.01 sec, 37.66 MB]                                                                      [error]

```

CV command returns as if its not working. Tested on few websites it is working. Latest version is installed. Output is bellow:

```
 cv upgrade:db

  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Call to undefined method Symfony\Component\DependencyInjection\Definition::setFactoryClass()

upgrade:db [--out OUT] [--dry-run] [--retry] [--skip] [--level LEVEL] [-t|--test] [-U|--user USER]

```

On another website that has CRM 5.20 version, CV runs smoothly. I've been trying to install to newest one, 5.28.3 but sadly it didn't work. So I did backtracking, managed to install up to 5.26.3 version. After trying to install 5.27.0 it returned same kind of errors as for 5.28.3 , website is not responsive, cant access database or Drupal front end. Drush isn't working, CV as well.

CiviCRM log is empty, PHP showed something... and got to resolution of my issues. Mikey told me to keep it as proof for others if they encounter issues so there is that. Answer for my trick question in comments!

# Answer
Issue causing this: Extensions.

In PHP logs I found out Symphony was mentioned along with Flexmailer. We had alpha outdated version of Flexmailer causing issues. Disabling it/ updating it seems to work as solution.

After that I could update CiviCRM smoothly and works!

Hopefully someone will need this in the future!
> 5 votes

---
Tags: drupal, extension, upgrade, drush, cv
---


title: Broken Search Builder

text:
# Question
Title: Broken Search Builder
just upgraded to 5.28.3.

Thing is, my search builder is looking like this now - can't select a field anywhere :/

Any Ideas?

Thx & Regards

# Answer
> 2 votes
Well, looks like i f\*cked it up myself: Some days ago we created a new contact subtype and renamed it afterwards. Since renaming didn't work out as planned and some DB-Entries stayed behind, i changed em manually. Guess what, i had a typo somewhere. Changed it and the search builder is back to normal.

Sorry for bothering you and Thanks for your help.

---
Tags: search
---


# Question
Title: Where can I find CiviCRM 5.26 for WordPress?
I'm stuck in a conundrum, trying to update CiviCRM 5.22.1 to 5.28.3, but the database upgrade fails, possibly related to wordpress 5.5 already being installed, but also possibly due to requiring the PHP Internationalization extension (PHP-Intl), which is required after 5.27.

I want to try updating to 5.26 (or any 5.26.x) to see if I can at least get our donations pages to work again while sorting out the PHP-Intl extension, but I can't seem to find where I can dl it.

# Answer
> 5 votes
Sourceforge has the files: https://sourceforge.net/projects/civicrm/files/civicrm-stable/

You can also just change the url manually for the "official" download, i.e. the current is https://download.civicrm.org/civicrm-5.28.3-wordpress.zip but you can manually type https://download.civicrm.org/civicrm-5.26.2-wordpress.zip

---
Tags: wordpress, upgrade
---


# Question
Title: Database upgrade fails updating to CiviCRM 5.22.1 to 5.28.3
We were still running CiviCRM 5.22.1 when Wordpress updated to version 5.5, which broke our donation pages because of changes how wordpress redirects. I updated to CiviCRM 5.28.3, but the database upgrade fails - all I see is blank dashboard page an empty pair of brackets and a 'retry' link that does nothing.

Does anyone know how to fix this other than perhaps installing a previous version of Wordpress and CiviCRM 5.22.1 on a development server, importing the current CiviCRM database tables, upgrading to CiviCRM 5.28.3, then importing upgraded CiviCRM database tables to the live server?

# Answer
> 3 votes
The problem with updating to version 5.28 was apparently due to some of my civicrm sites having been originally installed with version 4.7. I edited the settings file by comparing to a version 5 setting file. A critical line (~82) was commented out.

Un-commenting that line (and updating other sections of the setting file) allowed me to update all my sites, both live and on the dev server.

Also note that line 82 may be commented out on sites that were originally installed in the early days of CiviCRM 5.x.

---
Tags: wordpress, upgrade
---