title: Mailings -> New Mailing page freeze

text:
# Question
Title: Mailings -> New Mailing page freeze
I'm running civicrm 5.27.2 on wordpress.

When I click into the new mailing in the mailings menu, the page freezes. The console yields this error:

```
angular-modules.fb2f4d770923a3db9400b2a235e84801.js:1095 Uncaught TypeError: Cannot set property 'contextMenu' of undefined
at angular-modules.fb2f4d770923a3db9400b2a235e84801.js:1095
at angular-modules.fb2f4d770923a3db9400b2a235e84801.js:1097

angular.js:38 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.11/$injector/modulerr?p0=crmApp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.5.11%2F%24injector%2Fnomod%3Fp0%3DcrmApp%0A%20%20%20%20at%20https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A6%3A426%0A%20%20%20%20at%20https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A25%3A235%0A%20%20%20%20at%20b%20(https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A24%3A282)%0A%20%20%20%20at%20https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A25%3A20%0A%20%20%20%20at%20https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A40%3A17%0A%20%20%20%20at%20q%20(https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A7%3A371)%0A%20%20%20%20at%20g%20(https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A39%3A382)%0A%20%20%20%20at%20fb%20(https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A43%3A381)%0A%20%20%20%20at%20c%20(https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A21%3A19)%0A%20%20%20%20at%20Gc%20(https%3A%2F%2Fmysite.com%2Fwp-content%2Fplugins%2Fcivicrm%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fr%3DRHCn5%3A21%3A332)
at angular.js:38
at angular.js:4692
at q (angular.js:325)
at g (angular.js:4653)
at fb (angular.js:4575)
at c (angular.js:1809)
at Gc (angular.js:1830)
at se (angular.js:1715)
at HTMLDocument.<anonymous> (angular.js:32616)
at i (jquery.min.js:2)

```

Any ideas on how to troubleshoot?

# Answer
I remember just that I had to make some edit for the debugging symbols, but can not find my notes about this. It was related to the angular modules
> 0 votes

---
Tags: wordpress, mailing
---


# Question
Title: How to set specific social meta tags for specific contribution pages
It would be very useful to be able to set specific social meta tags for specific contribution pages, but I can't seem to find any way to do this (definitely not in CiviCRM, there doesn't seem to be a module to do this in Drupal 7).

The idea would be to set og:image and twitter:image for specific contribution pages, which is fairly important for donation pages. Right now, it doesn't appear that these tags are set at at all; Facebook and Twitter just use the top image on the page.

Two challenges here that I see: 1) I can't add content to a specific contribution page, only to /civicrm/contribute/transact, which adds to all contribution pages. 2) I can't add content in the head of the page.

Is there a clever way to make this work?

# Answer
> 1 votes
If you're willing to write your own drupal module you should be able to do it with drupal\_add\_html\_head in hook\_init. I haven't tested that. If not hook\_init then maybe in hook\_preprocess\_html. You would need to parse the url to get the `id=` parameter and that would tell you which contribution page.

# Answer
> 1 votes
Block Conditional Visibility by URI Query Parameters deals with the specific contribution page selection issue, but I'm still struggling to insert the meta tags into the head of the page as required.

I've tried just adding it in a block, but Facebook doesn't pick up the tags outside the head, it seems. I've tried javascript like this but that doesn't seem to work.

# Answer
> 1 votes
I wrote an extension ogp that detects some patterns in event/contribution/profile pages, and uses that information to build meta tags.

The README has a bit more details about how the extension works. The idea is to make it "just work", without too much fiddling (i.e. it's fairly limited), but I'm very open to suggestions on how we could improve this.

---
Tags: contribution-page, social-media
---


# Question
Title: Scheduled Reminder Ignoring the Year of Membership End Dates
Our site is configured to send a scheduled reminder 1 day after the membership expiration date. Memberships are renewed through a contribution page. The reminder is only sent to non-auto renew members. When a member renews their membership it updates the expiration date to the following year but the reminders are still being sent.

For example, A member's membership end date was October 14th, 2019. She renewed her membership on September 24th, 2019 which changed her membership end date to October 14th, 2020 but she still received a scheduled reminder on October 15, 2019.

Has anyone else experienced this issue? From my understanding, the scheduled reminder and contribution page is configured correctly.

# Answer
> 0 votes
This sounds like it could relate to when the Job for Update Membership Status runs compared to when the Job for Send Scheduled Reminders run.

Eg if the above are both set for daily then it is possible that the Update Memb Status runs after the Send Scheduled Reminders, and then the Reminder is created/sent before the Memb Status has been updated.

---
Tags: civicontribute, civimember, contribution-page, scheduled-reminders
---


# Question
Title: How do i add parent information to a teenage volunteer profile?
How do i add parent information to a teenage volunteer profile so that when a new volunteer fills out their profile, it creates a parent relationship and contact as well. I am using Profile-Create Mode to allow the data input on our website.

# Answer
You would need to created an extension using civicrm hook 'hook\_civicrm\_postProcess' which gets invoked when a civicrm form is submitted as you want the actions to be taken upon profile submission so this should work for you. In the hook you can create the relationships through the API call.

Detailed documentation on hook.

Hope this helps.
> 0 votes

# Answer
You would have to find out all the steps the profile goes through and potentially use the post or apiWrapper hook to create the parent. Difficult to say without knowing all the details.

But you could also use the Form Processor extension rather than creating a profile to get there? Documentation on the Form Processor extension can be found here: https://docs.civicrm.org/formprocessor/en/latest/
> 0 votes

---
Tags: profile, relationships
---


# Question
Title: I get an error "One of parameters (value: sort_name) is not of the type MysqlColumnNameOrAlias" when trying to access most of my data
Okay, I'm new at this - honestly, probably not skilled enough to be doing this, but my organization has no money, so, well, I'm it.

I installed on WordPress last year, and everything generally went well. We use the system, it does what we need. Realistically, it might be overkill (we have only about 300 contacts), but I like it.

Then, this year, I noticed that I hadn't kept up with updates.

So - back up, then update. Complete failure. Did not work at all.

Fine. Restore from backup.

So, now, I can get into the system, and using the standard searchbox from "CiviCRM Home", I can find various contacts. Myself, for example - I type in "Ashle...", and there I am. Click on my name/email, and bingo - into my profile.

BUT.

From within my profile screen, click on "Contributions" and get "Sorry but we are not able to provide this at the moment.". Click on "Memberships", and it momentarily seems fine, but then there's a floating box in the right-hand top corner saying "One of the parameters (value: total\_amount) is not of the type MysqlColumnNameOrAlias". Moments later, I get a true popup (have to click "OK" to clear) saying "DataTables warning: table id=DataTables\_Table\_0 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1". Click "Groups", and I get a listing of my groups (four, in my case) - but click on one of them, and I get "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. One of parameters (value: sort\_name) is not of the type MysqlColumnNameOrAlias"

That last message is the one I get whenever I try nearly anything from the top-bar drop-down menus.

Can anyone suggest a way forward? As it is, I can access names, addresses and some basic data of any of my contacts where I *already* know their names so that I can go directly to their profile. But I can't really do anything else.

Should I try a new install? ...or do I need to try to monkey with the databases? ...or am I asking the wrong questions? I'm sorry if I'm asking a question that I should have been able to find an answer for elsewhere here on StasckExchange - I did certainly look, but I couldn't find an answer.

Thanks for any help,

Ashley

# Answer
> 1 votes
Hi managed to get the same issue

> One of parameters (value: total\_amount) is not of the type MysqlColumnNameOrAlias

I had Drupal 7 and CiviCRM 5.4

I did recently changed my PHP version to 7.4 - which is the reason for the above error message - I guess I need to upgrade my CiviCRM to latest that should fix the issue(will try and update the result)

For now I have just changed my PHP version back to 7.2 which worked alright

Hope this helps!!!

---
Tags: wordpress, civimember, contacts, database, mysql
---


title: error404 on 2nd booking event page

text:
# Question
Title: error404 on 2nd booking event page
using WP 5.4.2 - PHP 7.2 - CiviCRM 5.27.3. I have issue with Permalink (I dont know if it is the root cause) but I can create a article using the CiviCRM button to add the CiviCRM event form. On the website, the 1st page form is available and can be filled until the user press the "next" button that display error404 screen on the next page -

# Answer
I expect this is due to changes made to accommodate WP URL changes. If the URL has `civiwp` in it (and it should) Then I would:

* make sure that the base page is set - go to https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fuf&reset=1
* Review the Base Page setting and value, it cannot be blank
* Make sure there is a published page that matches the one in that page
* If there is no value there, add one, `civicrm` is the default and then create a WP page with that slug
* Make sure the page is public and visiuble to all
* Once you've done that (or confirmed the base page exists) Visit this page https://example.org/wp-admin/options-permalink.php
* Confirm that your permalinkls are set to anything EXCEPT `Plain`
* If it is set to Plain change to one of the other options and save
* If it is not set to plain, you can exit the page

Then retry the form.
> 3 votes

# Answer
Thank you for answering,

=\> I cannot use the Permalink but if I create a Post I succesd to pass the 3 step to book the event as public-user

Fab ! Thank you for ths help.

*nota : up to now I use http I shall later activate SSL certificate*
> 1 votes

---
Tags: wordpress, civievent
---


# Question
Title: Email from case - subject line change to Case ID
I'm looking to swap out the hashed ID for the case ID in Case emails (now that email processing works for this and you can search by case id.)

I've looked through the two related posts here on stack and the issue on JIRA but can't find specifics.

I can adjust the **Cases - Send Copy of an Activity** template but that only affects copies of any activity sent, NOT emails that are sent. (In case it's helpful to anyone finding this post - the token is {$caseID}.)

In this post answer Demerit says "we removed the hash and just use the actual case id by editing the civimail template" but I've not had any luck yet with the one case template there is.

(Civi 5.5.3)

# Answer
> 2 votes
For Emails sent from Manage Case to case roles, there is hook\_civicrm\_alterMailParams that can be used to alter the subject. Here's some (maybe-not-the-greatest) code I have from an earlier customization. Note that the logic here will remove the hash whether it actually finds the case or not, which was desirable at the time but in those weird scenarios you might prefer it to leave the hash, in which case just move that part down inside the `if ($case_id)` block.

```
function myextension_civicrm_alterMailParams( &$params )
{
    if (preg_match('/\[case #([0-9a-h]{7})\]/', $params['subject'], $matches)) {
        $key = CRM_Core_DAO::escapeString(CIVICRM_SITE_KEY);
        $hash = $matches[1];
        $sqlParams = array(1 => array($hash, 'String'));
        $case_id = null;
        $dao = CRM_Core_DAO::executeQuery("SELECT id FROM civicrm_case WHERE SUBSTR(SHA1(CONCAT('$key', id)), 1, 7) = %1", $sqlParams);
        if ($dao->fetch()) {
            $case_id = $dao->id;
        }
        $dao->free();

        // remove the case # part - can't do it through message templates since hardcoded in Contact/Form/Task/EmailCommon.php. Note also Activity/BAO/Activity.php removes it before saving on the case but that's after it sends it.
        $pos = strpos( $params['subject'] , '] ' );
        if ( $pos !== FALSE ) {
            $params['subject'] = substr( $params['subject'], $pos + 2 );
        }

        // Now add the real case id if found
        if ($case_id) {
            $params['subject'] .= " [case #{$case_id}]";
        }
    }
}

```

# Answer
> 2 votes
There's now an extension for this, with a couple additional features: https://lab.civicrm.org/extensions/caseidinsubject

---
Tags: civicase
---


# Question
Title: Paypal Standard Payments are being accepted but marked as incomplete transaction (pending) DashboardCiviCRM 5.#.# on Drupal 7
The contribution dashboard on CiviCRM 5.#.# on Drupal 7 is showing that PayPal standard payments are pending but the payment is going through. All PayPal payments are showing as pending including recurring payments. The problem is that when the payment is marked as pending CiviCRM does not send an email to the boss about payment confirmation and contributor details.

When I checked the ConfigAndLog I got:

```
Jul 28 14:57:02  [warning] CiviCRM thinks site is not SSL, redirecting to {url}
Array
(
    [url] => https://www.***********.org/civicrm/contribute/transact
)

Jul 28 14:57:03  [info] $Fatal Error Details = Array
(
    [message] => We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.
    [code] =>
)

Jul 28 14:57:03  [info] $backTrace = #0 /public_html/sites/all/modules/civicrm/CRM/Core/Error.php(385): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(833): CRM_Core_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...")

#2 /public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(853): CRM_Core_Controller->invalidKeyCommon()

#3 /public_html/sites/all/modules/civicrm/CRM/Contribute/Form/ContributionBase.php(235): CRM_Core_Controller->invalidKeyRedirect()

#4 /public_html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php(64): CRM_Contribute_Form_ContributionBase->preProcess()

#5 /public_html/sites/all/modules/civicrm/CRM/Core/Form.php(585): CRM_Contribute_Form_Contribution_Main->preProcess()

#6 /public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()

#7 /public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_Contribution_Main), "display")

#8 /public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Main), "display")

#9 /public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")

#10 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(311): CRM_Core_Controller->run((Array:3), NULL)

#11 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))

#12 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))

#13 /public_html/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:3))

#14 /public_html/includes/menu.inc(527): civicrm_invoke("contribute", "transact")

#15 /public_html/index.php(26): menu_execute_active_handler()

#16 {main}

Jul 29 08:40:09  [debug] PayPalIPN: Could not find an entry for module

Jul 29 08:40:09  [error] ipn_payment_callback_exception
Array
(
    [context] => Array
        (
            [backtrace] => #0 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(277): CRM_Core_Payment::handleIPN()

#1 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:14))

#2 /public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))

#3 /public_html/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:4))

#4 /public_html/includes/menu.inc(527): civicrm_invoke("payment", "ipn", "5")

#5 /public_html/index.php(26): menu_execute_active_handler()

#6 {main}

        )

)

```

I then checked the to see on paypal if the IPN url was correct, it was but when I wenbt to it I received the message: Failure: Missing Parameter module.

Then I went and checked the civicrm\_system\_log and it doesnt show that it is receiving anything from PayPal.

This started about a month ago, we didnt update anything and no dev has touched it,

# Answer
You don't say what CiviCRM version you have but this was fixed in 5.27.0 https://lab.civicrm.org/dev/core/-/issues/1608 & sounds similar

This patch - https://github.com/civicrm/civicrm-core/pull/18062 should improve the quality of your error logging
> 2 votes

---
Tags: drupal, paypal, ipn, ssl
---


# Question
Title: What's the right crontab entry for running cv?
I'm trying to get cron to run cv.

Putting this in crontab:

\*/5 * * * * /usr/local/bin/cv api job.execute --user=harrumph

produces...

Failed to locate civicrm.settings.php. By default, this tool searches the parent directories for a standard CMS (Drupal, WordPress, etal) and standard civicrm.settings.php. Symlinks and multisite configurations may interfere. To customize, set variable CIVICRM\_SETTINGS to point to the preferred civicrm.settings.php.

The correct path to civicrm.settings.php is

/var/www/html/wp-content/uploads/civicrm/civicrm.settings.php

SO...

How am I supposed to use EXPORT in crontab so as to point cv to where it should be looking?

# Answer
You can use the `--cwd` option for `cv` to set a current working directory:

`*/5 * * * * /usr/local/bin/cv --cwd=/var/www/html/ api job.execute --user=harrumph`
> 2 votes

# Answer
Only path, not php-file nor webroot:

\*/5 * * * * cv api job.execute --user=harrumph --cwd=/var/www/html/wordpress/wp-content/uploads/civicrm
> 0 votes

---
Tags: cron
---


# Question
Title: Error upgrading database in WP: "Queue runner must be configured before execution
Just upgraded to 5.27.3. Tried to upgrade database, got "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. Queue runner must be configured before execution."

Any ideas what a "queue runner" is and how I fix it?

Thanks

# Answer
I saw a solution for this problem on a Drupal platform and decided to try it: you need to delete all the entries in the **civicrm\_cache** table in your Wordpress database using phpmyadmin **before** you try and upgrade the database. This resolved the issue for me. Civi version 5.27.4
> 1 votes

---
Tags: wordpress, upgrade
---


# Question
Title: Mass mailing Click-Through tracking doesn't include domain in 5.27.3
We sent a mass mailing under 5.27.0 (Wordpress) and the email Click Through links were invalid as noted earlier. They did however include our domain.

We upgraded to 5.27.3 and the links are still invalid. They appear to be missing our domain, e.g.

http://?civiwp=CiviCRM&q=civicrm/mailing/url&u=674&qid=63201

# Answer
> 1 votes
I've not seen this myself (domain missing) but the base page is missing as well from your link.

I'd review the following:

After all that is complete, visit a contribution or event page and be sure it displays. I'd then try a test email.

---
Tags: wordpress, civimail, click-through
---


title: Can CiviRules assign an activity?

text:
# Question
Title: Can CiviRules assign an activity?
I am successfully triggering on "Activity is added; Trigger for Activity Source" and updating the status of the activity. Now I need to assign the activity to the Source contact in the activity so they get the email notification with the activity details. Can't find an action to do that. I can send an email, but that lacks all the activity's details.

# Answer
I do not think there is an action yet to do what you want it to do. It is not a complicated action though, so it should be relatively easy to add. Do you have any PHP skills? If so, it would be great if you could do a PR and add the action? There is documentation on how to create an action here: https://docs.civicrm.org/civirules/en/latest/create-your-own-action/
> 2 votes

---
Tags: activities, civirules
---


# Question
Title: Best platform for a new website with CiviCRM: WordPress or Drupal?
Which platform - at the present day (but also with an eye for the future) - is recommended to use for a new organization that is setting up a completely new website and want to use CiviCRM?

I'm volunteering for this org. and am helping them decide what platform to use

My thinking so far:

* For Drupal, i understand that at the present day integrates better with CiviCRM, with fewer bugs and with slightly more extensions.
* Drupal has better security (and the org. will be accepting donations and memberships)
* Also the fact that CiviCRM uses Drupals "permissions" and "roles" could be a plus maybe?
* For WordPress, i'm thinking that the growth and size is a long-term advantage, for example if the organization needs to find more developers.
* Also, future development of CiviCRM could maybe be geared towards prioritizing WordPress because of it's popularity?

Grateful for any help on how to think about all of this!

Respectfully and with kind regards, Tord

Reference: How is CiviCRM different in Drupal, Joomla, and WordPress?

# Answer
I'd originally started my Civi 'journey' by bolting it onto our existing Wordpress site, and that was fine for holding contact details and sending out bulk emails/SMS.

As we started to use Civi more though, it became quickly apparent that we couldn't do many of the things in Wordpress that we'd like to. The lack of an equivalent to the Drupal webform module was by far the biggest stumbling block for us (with the views module coming close behind). The ability to receive webform input directly into CiviCRM was key for us - we wanted volunteers and our clients to be able to input data in a way that Civi's profiles just wouldn't allow if we had stuck with Wordpress.

It was a fair bit of work (and a steep learning curve for me!) for us to transition across to Drupal, but the ecosystem around it and the sheer number of available modules has made it more than worth it. If I was in your position, as a new organisation setting up a new site, I'd go with Drupal in a heartbeat.
> 13 votes

# Answer
CMS wars are never-ending! I have two answers:

**Drupal**

I've worked with plenty sites using each CMS. @termdark is correct; Drupal/CiviCRM is definitely the more powerful of the two platforms. And CMS community size is unimportant if you need CiviCRM developers - most CiviCRM developers can use both, and most CMS developers don't know CiviCRM. CiviCRM development has lots of strong WordPress folks, but most CiviCRM development is done by shops that prefer Drupal.

**Either one!**

There are factors that could tip it either way.

* Is the staff already experienced with one or the other?
* Are there non-CiviCRM capabilities you need that only exist on one platform?
* Do you have a volunteer or favored vendor who can help with the CMS side of things?
* Are vendors able to offer what you need more cheaply on one platform vs. another?
> 6 votes

# Answer
Having seen the OP's reference to Drupal 8, I wanted to quickly throw in my hat. **Leave Drupal 8 to the hobbyists for now.** That may change, and it may change soon, but if you want to use Drupal, then use Drupal 7 for the moment.
> 6 votes

# Answer
**Use both WordPress *and* Drupal?**

Another option is to use both.

When I arrived at my current job, about four years ago, we already had a long-established WordPress site as our main website. We also had a CiviCRM instance running on Drupal :) . We have the same setup to this day. We use both.

So, for example, we create Event registration pages in Civi with Drupal and link to them from our main WordPress site. We have the same theme for pages in both WP and Drupal.

Even starting a new org website, you might consider this option - the relative learning curve for WP compared to Drupal is much less steep.
> 5 votes

# Answer
Civi was originally written for Drupal, and it certainly shows in terms of webform/views. That said, it's not as if WP is problematic. I'm able to do everything I want, and that's with profiles, memberships, cases, donations, and events.

Everyone will have different opinions about CMSs, and I don't want to wade much into that! The only thing I'll say is that I personally find WP more user-friendly for non-techie users specifically.
> 3 votes

# Answer
The platform while important is just one aspect of the implementation. If you do decide on Drupal (which is what I would recommend given any NPO/NGO with 5 to 10+ FTE) please don't bid the project out to the lowest bidder and then get a WordPress consultant doing a Drupal implementation with CiviCRM (and vice versa, though that's rare). This type of mismatch can cost your organization lots of time and valuable resources in having to re-implement large chunks of the implementation (we've had several rescue projects like these and they are not fun!)

We've also had good experiences for using both simultaneously (i.e. WordPress for the CMS front-end and Drupal+CiviCRM for the CRM back-end), but the overhead is higher in terms of managing themes or changes to the look and feel since now you have to update both the WordPress theme AND the Drupal Theme. Another downside is that the systems are defacto decoupled so it's harder to create more complex workflows.
> 2 votes

# Answer
And what about starting up with Backdrop? You would use Drupal 7 capabilities (webform is a must) and stability and keep peace of mind in the long term as Drupal 7 comes to end of life in November 2022
> 2 votes

# Answer
Depending on your needs you can get a lot of the features offered by Webforms in the Gravity Forms integration for CiviCRM over at civivip.com.
> 0 votes

---
Tags: wordpress, drupal
---


# Question
Title: How do I permanently disable the "Similar Contacts Found" pop up?
Whatever name I enter into the first name field I get a pop up of dozens of "similar contacts found" that takes up half the screen, so I have to hit x to close it so I can continue entering into the fields. Can I disable this feature?

# Answer
> 4 votes
You can turn it off totally if you need although you probably want to tweak the rules as Pete has highlighted. If you did want to turn it off you can get to display settings and turn off the display (by setting to never) of possible matching contacts.

---
Tags: contacts
---


# Question
Title: What is the (Long term) strategy for CiviCRM's intergation on CMS?
Thinking about this topic, I'm wondering about the strategy of CiviCRM in terms of supported CMS?

CiviCRM can now be embedded on 5 CMS (DRUPAL 7, DRUPAL 8, Joomla, WordPress and Backdrop) and this asks a lot of work from the community to maintain functioning versions on all of them, but not only because it also involves specific documentation for each CMS or functional differences between CMS because Webform is not Caldera or Gravity form and I don't know about Joomla. I can think of this heterogeneous environment to be more of a drawback in 5 years.

Even if it's very user-friendly, is this strategy sustainable in the long-term? We already use 2 CMS (DRUPAL 7 and WordPress) and with the end-of-life of Drupal 7 we'll probably switch our Drupal instances - some or all of them - to Backdrop in 2021. Which means a 3rd CMS to learn (same-same but always different) and manage.

Is there a decision taken from the board to stop maintaining in the future Drupal 7 or to make CiviCRM a stand alone web application like vTiger for example, to focus on Drupal 8/9 or to go to another direction?

Who knows about this?

# Answer
It's a good question and it has been asked several times over the years. There are pros and cons for both. Up until around v3.0 civi did have a standalone version, and at the time it was felt that supporting that required too much resources, but as you note there's now 5 CMS's and it seems like just as much work.

This post is old but not much has changed except I don't think CiviDesk still offers their version.

For drupal 7 specifically, when drupal 7 itself becomes unsupported civi will probably drop official support for drupal 7, but the community might still unofficially support it for a little longer the same as drupal 6.
> 1 votes

---
Tags: cms-integration
---


# Question
Title: Is webform_civicrm 7.x-5.1 compatible with Drupal 7.67 and CiviCRM 5.19?
In the module update page in Drupal, it is shown as not compatible.

If so, what is the minimal configuration for webform\_civicrm 7.x-5.1? (I will update Drupal soon, but in the meantime, I prefer to update the module, if possible)

# Answer
> 2 votes
I dont see any thing on module page that it says not compatible with 7.67 and Civi 5.19. The minimum requirement for 5x is CiviCRM 5.12+ and you are on 5.19. So i dont see any reason why it wont support.

---
Tags: webform-civicrm
---


# Question
Title: Pie Chart in contribution report showing the total in last bar
The pie chart on contribution report summary shows the amount of contributions of each months but adds the grand total of all contributions on the last month. Strange. Is there a mean to avoid this ? Thank you

# Answer
> 1 votes
This is fixed in 5.28.0 which was just released a couple hours ago. You're in luck!

https://lab.civicrm.org/dev/report/-/issues/40

---
Tags: contributions, reports, chart
---


# Question
Title: Importing localized content to Civicrm database
I have tried to use the import process in civicrm for importing my urdu data fields into civicrm. After I map the fields in my csv to fields available in civicrm db i get error file. I am attaching the image from my error file.

Please note that the data is in urdu. I want civicrm to display the data in its fields like first name will contain the name of my contact in urdu.

My import verification came like this

I appreciate any help from the community.

# Answer
> 1 votes
You need to have (first name and last name) or (email) columns not empty data. Also make sure your csv has character set to Unicode UTF-8 and is separated with correct delimeters

# Answer
> 0 votes
As others have said, CiviCRM either wants a first and last name or an email address. You appear to have just a single name field and no emails.

I'm not familiar with naming in Urdu. Can you split the name into two parts and create a 'first name' and 'last name' field? Does that make any sense for Urdu names?

If not, you will need a workaround either by creating a fake last name or email for everyone.

Longer term, it would be worth raising the question as to whether the current requirements are appropriate for global usage. I don't see any intrinsic reason why those requirements could not be relaxed.

---
Tags: data-import
---


# Question
Title: Does ModSecurity and CiviCRM play well together?
I am thinking to add ModSecurity to the server (Wordpress 5.x/Apache2/Ubuntu 18) that is running CiviCRM to further augment the security. Thought I thought I check on this forum on the experience of doing so and whether it is a good idea. Thanks for your insights!

# Answer
> 1 votes
I've often run into trouble with shared hosts' use of ModSecurity, but those that are willing to tweak the rules have always managed to make it work. Expect to do some testing!

---
Tags: security
---


title: A Couple of Questions from a Newbie

text:
# Question
Title: A Couple of Questions from a Newbie
I apologize ahead of time, I was brought on to fix a company's website, but they asked me to do their CiviCRM. Instead, I've never done this, nor have I ever heard of it before this.

They have a few concerns, and I was hoping you guys could help me. No, I'm not getting paid, I'm volunteering to help them.

-Mail Settings: they had some email addresses bounce that are good email addresses. For example, when they send out emails, their emails bounce back. How can I fix this?

-Update CiviMail settings and website, so Unsubscribe and Opt-Out links are valid. Folks were able to use it in the first email they sent out, but now it doesn't work.

* MailChimp Extension: is there a MailChimp available to install with CiviCRM.

I did some searches on the forums to see if I can avoid asking you guys for help, but I couldn't find anything this specific. Again, I apologize, I know I'm in over my head, but I would like to learn this for my future.

Thanks!

EDIT: WordPress + Version 5.24.4

EDIT 2: This is the website: http://crm.allparksallianceforchange.org/wordpress

# Answer
For your last question, a quick google of "civicrm mailchimp extension" gets
> 2 votes

# Answer
For the bounce issue. See if you can find out if SPF and DKIM have been set up. See if you can send an email direct to your own contact. Does it arrive? Check the headers for SPF and DKIM results.

Look in Mail Account settings (under Admin \> CiviMail), and check the account for the Bounces. It should show you the login so you should be able to login to the account and see what is happening, or if the password is wrong then that could be the problem.

Check the Scheduled Job (under Admin \> Settings) is running. View the log. If you can add extensions, then add Job Log Viewer as it helps with generally seeing what else might be failing - https://civicrm.org/extensions/civicrm-log-viewer
> 1 votes

---
Tags: settings, mailchimp, opt-out
---


# Question
Title: Is there a way to track the date the pending payment record was created once payment has been completed?
I create a pending contribution for a membership with the received date of 1st July.

I then go in and complete the contribution on the 7th of August.

I cannot find where in Civi the original pending payment invoice date of 1st July is stored.

What I see happening is all received dates (including in the invoice) change to 7 of August.

Is there anywhere where the original date is stored once the payment is completed?

# Answer
> 2 votes
There isn't a field on contribution that stores when the Contribution was created v/s payment added to the contribution. But you can get such information from financial transactions table.

When a pending contribution is created a account receivable(IR) entry is created in financial transaction table and later a new entry is created with income account when a payment is received. But AR transactions are not displayed on UI when you click on contribution amount(which loads list of payments).

The only place you can see them is while creating accounting batches.

# Answer
> 2 votes
This will change in a CiviCRM release coming to you in the near future!

This was merged 8 days ago: https://github.com/civicrm/civicrm-core/pull/17777

---
Tags: contributions, payment
---


# Question
Title: How to determine Payment Processor for "pending" transactions (via SQL or otherwise)?
Is there a way to determine the Payment Processor for "pending" transactions? Our site has both Authorize.Net and PayPal Standard configured as payment methods, and I'm seeing and trying to debug lots of "pending" transactions (running on WordPress v.5.4.2, Civi v.5.25.0 -- just upgraded to 5.28.0, but the pending transactions have been happening since before then).

Or: should all of the "pending" transactions always only be from PayPal, since Auth.Net should complete immediately without IPN callback? And even for Auth.Net recurring transactions? (Since in principle one can configure and use multiple PayPal Payment Processors, it would still be helpful to be able to disambiguate pending transactions for those.)

I've explored the database, and I see that once a transaction has completed, I can get the Payment Processor via the `civicrm_financial_trxn` table (SQL below). But for 'pending', I haven't been able to track anything down.

```
select y.name `Payment Processor`
    , p.title
    , c.receive_date
    , c.id `contrib_id`
    , c.contribution_recur_id
    , c.invoice_id
    , c.trxn_id
    , case when c.contribution_status_id = 1 then 'Completed'
        when c.contribution_status_id = 2 then 'Pending'
        when c.contribution_status_id = 4 then 'Failed'
        else c.contribution_status_id end `Contrib Status`
    , t.payment_processor_id
    , y.url_site `Processor URL`
    , c.contact_id
    , c.total_amount
    , c.fee_amount
    , c.net_amount
    from civicrm_contribution c
    inner join civicrm_contribution_page p on p.id = c.contribution_page_id
    left join civicrm_financial_trxn t on t.trxn_id = c.trxn_id
    left join civicrm_payment_processor y on t.payment_processor_id = y.id
    where c.receive_date >= '2020-06-01'
    and c.is_test = 0 and c.is_pay_later = 0
    and t.from_financial_account_id is null
    order by c.contribution_status_id, c.receive_date, y.name, c.id desc;

```

(The `t.from_financial_account_id is null` clause prevents multiple matches with `civicrm_financial_trxn` table, since has multiple records for a single transaction when there are transaction fees.)

# Answer
> 0 votes
Below query should give you all pending contributions from payment processor

```
SELECT cc.id, cc.contact_id, cc.total_amount, cpp.title,
  cc.receive_date, cft.trxn_date, cc.invoice_id, cc.invoice_number, cc.trxn_id
FROM civicrm_contribution cc
  INNER JOIN civicrm_entity_financial_trxn ceft
    ON ceft.entity_id = cc.id AND ceft.entity_table = 'civicrm_contribution'
  INNER JOIN civicrm_financial_trxn cft
    ON cft.id = ceft.financial_trxn_id
  INNER JOIN civicrm_payment_processor cpp
    ON cpp.id = cft.payment_processor_id
WHERE cc.contribution_status_id = 2 AND cc.is_pay_later = 0;

```

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


# Question
Title: In WordPress, how do I get CiviCRM to show up on the internal WP account toolbar for Users to access it
I have set up and configured WP permissions, and I have set up ACLs in CRM. I have done both before in other databases, but I have no idea why Users I set up can't see the CiviCRM logo on their internal WP tool bar to access CiviCRM.

# Answer
> 1 votes
You need to give them civicrm permissions starting with access\_civicrm. See https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/

ACL's are to limit what data they see.

# Answer
> 0 votes
This has been resolved. Accessto CiviCRM backend and API must be checked in permissions even though it is advised to only give to trusted users. Check box does not actually give backend and api access.

---
Tags: wordpress, user-account, menu
---


# Question
Title: How do I get pictures entered into fields in contact records to be viewable in the contact record?
And not just present as file names, or require that the file be opened to view the picture?

# Answer
> 0 votes
Welcome! That's a CiviCRM Core Contact Field -\> so simply hit Edit on the Contact Record and look for the field: Browse/Upload Image

---
Tags: contacts, contact-view, contact-types, contact-image, contact-reference
---


# Question
Title: Adding a dynamic “cover processing fees” checkbox to CiviCRM contribution form
I've seen other systems that allow the donor to check a box to cover processing costs, similar to this:

In researching whether something like this was possible with CiviCRM, this thread is the closest I've found. The solution there is to simply put a flat rate additional amount.

I'd love some guidance on how this could be implemented more dynamically (so the amount of the fee changes based on the size of the donation) as either a default contribution page, or a Webform-CiviCRM implementation. Anyone have an idea?

# Answer
It's pretty late to be answering this, but the *Percentage Price Field* extension supports something very much like this.

> This extension allows you to add an "Additional Percentage" field to any price set, which will automatically calculate and add an additional amount to a transaction, as a configurable percentage of other selected price set options.
>
> Want to ask donors to give an extra 3% to cover credit card processing fees? Or to give an additional 10% of their membership fee to support a special project? Then you're in the right place.
>
> Because it's a price set field, this option will appear as a line item in contribution records and receipts, allow configuration of financial type, label, help text, and other standard price field options, and work equally well for contributions, memberships, events -- anywhere you can use a price set.

https://civicrm.org/extensions/percentage-price-field

\[Disclosure: I'm the author of this extension.\]
> 8 votes

# Answer
Price set options that change are doable, but in order to make the totaling work, you've got to rewrite that bit of code, because it adds and subtracts the single item amount you check or uncheck.

Let's say the fee price option is pegged at 3%. You select $50, the fee option goes up to $1.50 and the total goes to $50. Now, you check the cover-my-fee box, bringing the total to $51.50. You decide to be more generous and select $100. The fee option goes up to $3, but it won't appear to take effect because the totaling only counts the change from $50 to $100. Your total will say $101.50. Now, you decide that if you're donating all that money, the least the organization can do is cover the fee. Uncheck the fee option, and the total goes to $98.50. It subtracts the option amount regardless of whether that's in the total.

The solution to this is to rewrite that javascript to total the entire thing each time something changes.

Hook\_civicrm\_buildAmount will take care of the amounts on the confirmation page since by that point, you'll know what options are selected.
> 6 votes

# Answer
The best way to achieve this would be to use price-sets and add the priceset item with the amount of the processing fees. When you have multiple donation amount options, it could be issue, but I think can be achieved via hook alter.
> 1 votes

# Answer
Another extension to consider with a slightly different approach from *Percentage Price Field* is Fuzion's *Extra Fee* extension.

> This extension allows for a credit card fee and optional processing fee for the CC payment to be added to the total to be paid via any payment processor that uses Credit Cards or other payment gateways. It does not get applied for Pay Later transactions.
> 0 votes

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


# Question
Title: CiviCRM DB Error: syntax error during upgrade in Wordpress
I have tried upgrading to several different versions (5.14.1 up to 5.28) and every time I run the database upgrade, I get a DB Error: syntax error message and can't figure out why.

Here is an extract from my log file.

Any help would be most appreciated.

Aug 08 09:06:01 \[error\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> handle )

```
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => DROP TRIGGER IF EXISTS civicrm_group_contact_05Feb20-2049_before_insert [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2049_before_insert' at line 1]
[type] => DB_Error
[user_info] => DROP TRIGGER IF EXISTS civicrm_group_contact_05Feb20-2049_before_insert [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2049_before_insert' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="DROP TRIGGER IF EXISTS civicrm_group_contact_05Feb20-2049_before_insert [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2049_before_insert' at line 1]"]

```

)

# Answer
> 3 votes
My theory is you have a table called 'civicrm\_group\_contact\_05Feb20-2049' in the database, maybe a backup whilst you were investigating an issue or something? If you drop this table prior to commencing the upgrade you'll probably have better luck.

Note that the reason its an issue is that CiviCRM will add audit log triggers to any table prefixed with 'civicrm'. So its trying to add/drop a trigger from that table and falling over. I'm not 100% sure on the reason, looks like trigger names dont support hyphens perhaps. In this case dropping or renaming the table (prefixing it with bkp\_ or something) will stop the trigger drop/create failing.

---
Tags: wordpress, upgrade
---


title: Importing contacts into Civicrm

text:
# Question
Title: Importing contacts into Civicrm
I am importing 350 contacts into Civi. This post says that you should always include an import identifier. I don't have admin access so I cannot create a custom field set. I was going to identify the contacts by tagging them all. Alternatively, Civi includes a contact source field. Could I include a value for contact source in the CSV file? I will also tag the imports.

# Answer
These are all valid options! I never use a custom field for this; I use tags or the contact source field. The "external identifier" field is often useful for this - I'll tag contacts from a certain location with their ID from that source prefaced by an acronym for that source.

As someone who works daily with data migrations, I rarely *need* to do any of these things if I'm the one who might have to deal with mistakes. Using advanced logging is good enough; if it's only 350 contacts, it's probably enough to just go by creation date.

That said, I highly recommend that people who don't do this regularly tag their contacts or use the Source field :)
> 1 votes

---
Tags: import, fields, custom
---


# Question
Title: How do you run a membership/event report?
To be considered a 'voting' member in our organization, you have to be an active member, and also have attended a certain number of events in the past year. I see how to run a membership report, and I see how to run an event report, but how can I search for 'active member' AND 'attended 3 events in the last 12 months'?

# Answer
There are several answers to this; I'll give you three! Use whichever works best for you.

Note that I originally thought that either Summary Fields or Event Count custom search extensions would be part of this solution, but neither can count only events in the last 12 months without modification.

### Easy, best for now

Search for active members. Add them to a group. Run the event report, filtering by the Active Member group. If you need to run this report regularly, the Active Member group should be a smart group.

### Coming soon

There's an alpha version of the Search overhaul that ships (disabled and hidden) in CiviCRM 5.28 (which released three days ago). This will allow doing searches like you describe in a single search pretty easily.
> 1 votes

---
Tags: civievent, civimember, reports
---


# Question
Title: APIv3 Rest URL ... Could not load the settings file
I have a test instance started a day ago of CiviCRM running on Amazon EC2 using the bitnami version (https://bitnami.com/stack/civicrm/cloud) which uses Drupal 7.72 and runs CiviCRM 5.27.4

I added an api\_key through MySQL for the correct user id and read the CIVICRM\_SITE\_KEY from civicrm.settings.php which I found at /bitnami/drupal/sites/default/civicrm.settings.php

Running APIv3 through the CiviCRM console (http://mysite/civicrm/api3#explorer) works and generates an example query url to use for REST. However, when I substitute in the keys and put the query in my browser address bar I get: "Could not load the settings file at: /bitnami/drupal/modules/contrib/civicrm/../..//default/civicrm.settings.php"

What can I change to make sure that the civicrm.settings.php file is found?

# Answer
> 2 votes
Ok, so this is a temporary fix. Would be interested to know a final solution: In the path /bitnami/drupal/modules/contrib/civicrm/../..//default/civicrm.settings.php the '//' is interpreted as '/' so the file being looked for is: /bitnami/drupal/modules/default/civicrm.settings.ph

Well, there is no default directory in /bitnami/drupal/modules so I created it and inside I put a symlink to the correct location of civicrm.settings.php
cd /bitnami/drupal/modules/default
ln -s /bitnami/drupal/sites/default/civicrm.settings.php civicrm.settings.php

With that the example REST query works fine.

---
Tags: api, rest
---


title: Civicrm - Joomla Backend forms width

text:
# Question
Title: Civicrm - Joomla Backend forms width
we have just started to use Civi for our organisation, but now we are expieriencing some strange layout problem in the backend.

All the forms seem to have a fixed width, and i have no idea where to change/fix this. I know, this is a noob question, but without CSS-experience, it is hard to figure out where to fix this.

Any hints, please?

Joomla Version: 3.9.8 Civi-Version:5.28 (Problem ist still persisting since, i cannot remember 5.19??)

Thanks a lot!

Gerald

# Answer
> 2 votes
I found the issue... somebody unchecked the box

Disable CiviCRM css in "ressource urls"... Thanks anyway...

---
Tags: joomla, forms, css, contact-layout-editor
---


# Question
Title: How to create a view to display all the files in an extension?
I want to create a view to show all the created templates and provide the user option to edit and delete the already uploaded file..For example a view like Mailings\>\>Message Templates.

I have seen to implement this i want to create a tpl file and tpl.php file for it. I don't get how should i implement this in my extension.mean i don't get how to generate a tpl.php file and create route for it.

Hope you understand the question. Thanks in advance

# Answer
Take a look at the documentation for civix. To create a page like the mailing templates you could use `civix generate:form`, as described at https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-form

If you prefer to create an angular page, you can also use civix to generate the basic code: https://docs.civicrm.org/dev/en/latest/framework/angular/quickstart/#create-an-angular-module
> 3 votes

---
Tags: extension
---


title: Menu bar is missing

text:
# Question
Title: Menu bar is missing
I am missing the CiviCRM menu bar. I looked into the resource url (should that end in wp-content/plugins/civicrm/civicrm or .org.au/ ?, and should it be https or http if i have ssl certification?).

I've installed the CiviCRM Admin Utilities plugin and this kind of overcomes the issue. But i would like to get the menu to work. It seems more intuitive. I for example can't find a way to add a new organisation with the CiviCRM Admin Utilities alternative.

I'm running 5.5.2 wordpress and 5.15.1 civicrm

thank you for your help, JD

# Answer
> 2 votes
Did you Cleanup Caches and Update Paths? It worked for me. Get to it from here: wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2FupdateConfigBackend&reset=1

# Answer
> 2 votes
Make sure that the CIVICRM\_UF\_BASEURL is set correctly in /var/www/yoursite/sites/default/civicrm.settings.php (or whatever the path is to yout site) I have cloned sites to use for dev and forgotten to change this. It can cause all sorts of issues including a loss of the CiviCRM navigation header.

if (!defined('CIVICRM\_UF\_BASEURL')) { define( 'CIVICRM\_UF\_BASEURL' , 'http://yourCiviSite.org/'); }

# Answer
> 0 votes
I don't really have an answer but somehow the same problem, although I think my problem is connected to Drupal as host.

If you do have the same issue, then your menu bar should be on the right place, if you enable **Asset Caching** at Administer \> System Settings \> Debugging and Error Handling.

With enabled Asset Caching your image upload url must be configured properly, to make this work. But I am sorry I don't know the right configuration for this in Wordpress.

# Answer
> 0 votes
Have you tried installing uk.squiffle.kam Plugin?

https://github.com/aydun/uk.squiffle.kam you can reach from.

---
Tags: menu
---


# Question
Title: Allow region reps to have RO to global mship info - but only to their own regional records. Db field or tag for "region"?
As the title says, I need to appoint reps for each region who can access their "own" regions records to send mailings. We are using Wordpress and everything is the latest versions. Is "region" best as a DB field and/or a tag in this case? Regional reps should have no access to membership records outside their own area. Please be patient with me, I have just inherited an existing CivCRM system that seems as if it was set up in a hurry. I am just getting to grips with CivCRM - Please feel free to explain things very s l o w l y.

EDIT: Is this something I must bite the bullet on and accept that I can only get this functionality in Drupal? I have a very little Drupal experience, but I am much more comfortable with WordPress.

# Answer
> 2 votes
I would recommend using Relationships and adding this extension which then means you can use the Relationships as the way of controlling who sees which records

https://civicrm.org/extensions/relationship-permissions-acls

# Answer
> 0 votes
Just my opinion but I would look to setup regions as organisation sub types and then have relationships for all the contacts who belong to it. At the same time you'd have a relationship for the main contact i.e. the contact that is the regional rep. You would then build your views or alternatively give them access to CiviCRM using ACLs?

---
Tags: wordpress, acl, tags
---


# Question
Title: How to setup bounced processing on CiviCRM for a Gsuite account?
I am trying to setup Gsuite as bounce processing for CiviCRM using this guide https://civicrm.org/blog/dahndy/leveraging-civicrm-email-to-activity-processing-in-gmail

But keep getting the following message when schedule job is ran. Any idea how to fix it please?

One thing in the log, it says "**webadmin@imap.gmail.com**" but it should have said "**webadmin@our.domain**" as per my sessings below, is that right?

```
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Fetch Bounces with result: Failure, Error message: Could not connect to MailStore for webadmin@imap.gmail.com
Error message:

An error occured while sending or receiving mail. Failed to connect to the server: imap.gmail.com:993.

```

# Answer
> 5 votes
So I just ran into a similar issue. Our bounce handling stopped a few months ago and nobody noticed. We also use GSuite, and our email address appears in a similar fashion in the log. I thought it looked strange at first too, but since we changed nothing and it went from working to not working, I knew that wasn't the issue. I also tried changing the email account password to see if that would fix the problem.

It turned out that Google turned off access for less secure apps automatically, effectively blocking access to the return email account from CiviCRM. As soon as I toggled that switch, bounce handling started working again. This is the link that worked to turn it back on: https://myaccount.google.com/u/5/lesssecureapps?hl=en

---
Tags: bounce, mailserver, g-suite
---


# Question
Title: Smart group url parameter to search contributes
I'm using CiviCRM 5.27 on Wordpress and I'd like to save Civicrm page URL of contributes with smart group filter.

I tried this:

```
http://mysite.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Fsearch&reset=1&force=1&group[]=47&contribution_status_id[]=1

```

but I didn't get any filters.

# Answer
The syntax doesn't use `[]` for multivalued fields. You put commas if you want more more than one. See https://docs.civicrm.org/user/en/latest/the-user-interface/searching-url-support/

So the parameters here would just be `reset=1&force=1&group=47&contribution_status_id=1`
> 0 votes

---
Tags: search, search-results, urls
---


title: Dedupe based on custom fields?

text:
# Question
Title: Dedupe based on custom fields?
My organization contacts can sometimes share the same email address but I have one custom field that is unique to each organization (registration number) and I want to add this custom field to enhance the unsupervised rule. The thing is that I don't see this option. I can use any standard field (city, zip code...) but none of my custom fields appear.

Is this possible and how? Do I need and extension to do so or to set a parameter somewhere?

EDIT 1 : I use CiviCRM 5.25 on Drupal 7.72

# Answer
> 2 votes
When creating a custom fieldset, you need to ascribe to "ANY" when your contact type has sub-types. Instead, if ascribed to a particular sub-type (Organization - enterprise, for example), the custom field doesn't show up in dedupe rules :-(

So I found my solution but I would like to have the ability to use custom fields related to a sub-type and not all of them.

---
Tags: duplicate-contacts
---


# Question
Title: Queue runner must be configured before execution. When trying to upgrade in wordpress
What is the logic behind that? I can't upgrade, I am just not familiar enough with this codebase... Why is there no queueuRunner in the session

```
public static function instance($qrid) {
    if (!empty($_SESSION['queueRunners'][$qrid])) {
      return unserialize($_SESSION['queueRunners'][$qrid]);
    }
    else {
      return NULL;
    }
  }

```

Does not find queueRunners in the session, returns null... thus the error message in title... When are those queueRunners created?

Thanks

# Answer
> 1 votes
There's some docs about queues at https://docs.civicrm.org/dev/en/latest/framework/queues/ but I don't think that helps you here.

You might try upgrading via command line instead: `cv upgrade:db`. See https://github.com/civicrm/cv if you don't have `cv` installed.

---
Tags: wordpress, upgrade
---


# Question
Title: WordPress 5.27 membership renewals failing
I'm on latest WordPress, with Civi 5.27.4

Membership renewals fail both with a URL created with smarty sent in an email (which has previously worked), and attempting to renew a logged-in admin. The failure is at the same point: the final confirmation screen. Instead of loading the confirmation screen users get an error pag with a broken link: `https://example.com/?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact`

**Things I have tried**

1. upgraded to latest 5.27.x
2. flushed caches and rebuilt urls
3. implemented CLEANURLS (I think)
4. Turned off Stripe Extension
5. Checked for any corrupt database tables

None of this has solved the problem. Any advice gratefully received, as you can imagine this is a pretty significant problem.

# Answer
Looks like this is actually a bug in the OpenStreetMap geocoding extension. A fix is coming.
> 2 votes

# Answer
Looking at this url `https://example.com/?civiwp=CiviCRM&q=civicrm%2Fcontribute%2Ftransact` It appears the base page is missing.

Can you look at :

After all that is complete, try a test membership renewal.
> 2 votes

---
Tags: wordpress, civimember, error
---


# Question
Title: civiCase missing relationships to reports and new system category
I am getting errors about a missing case relationship to reports:

\[error\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> exceptionHandler )

```
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT a.id as `id`, a.name_a_b as `name_a_b`, a.label_a_b as `label_a_b`, a.name_b_a as `name_b_a`, a.label_b_a as `label_b_a`, a.description as `description`, a.contact_type_a as `contact_type_a`, a.contact_type_b as `contact_type_b`, a.contact_sub_type_a as `contact_sub_type_a`, a.contact_sub_type_b as `contact_sub_type_b`, a.is_reserved as `is_reserved`, a.is_active as `is_active`, a_to_civicrm_value_relationship__37.display_block_on_contact_summary as `custom_157`

```

FROM civicrm\_relationship\_type a LEFT JOIN `civicrm_value_relationship__37` `a_to_civicrm_value_relationship__37` ON `a_to_civicrm_value_relationship__37`.entity\_id = `a`.id \[nativecode=1054 \** Unknown column 'a\_to\_civicrm\_value\_relationship\__37.display\_block\_on\_contact\_summary' in 'field list'\] \[type\] =\> DB\_Error \[user\_info\] =\> SELECT a.id as `id`, a.name\_a\_b as `name_a_b`, a.label\_a\_b as `label_a_b`, a.name\_b\_a as `name_b_a`, a.label\_b\_a as `label_b_a`, a.description as `description`, a.contact\_type\_a as `contact_type_a`, a.contact\_type\_b as `contact_type_b`, a.contact\_sub\_type\_a as `contact_sub_type_a`, a.contact\_sub\_type\_b as `contact_sub_type_b`, a.is\_reserved as `is_reserved`, a.is\_active as `is_active`, a\_to\_civicrm\_value\_relationship\__37.display\_block\_on\_contact\_summary as `custom_157` FROM civicrm\_relationship\_type a LEFT JOIN `civicrm_value_relationship__37` `a_to_civicrm_value_relationship__37` ON `a_to_civicrm_value_relationship__37`.entity\_id = `a`.id \[nativecode=1054 \** Unknown column 'a\_to\_civicrm\_value\_relationship\__37.display\_block\_on\_contact\_summary' in 'field list'\] \[to\_string\] =\> \[db\_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM\_Core\_Error::exceptionHandler prefix="" info="SELECT a.id as `id`, a.name\_a\_b as `name_a_b`, a.label\_a\_b as `label_a_b`, a.name\_b\_a as `name_b_a`, a.label\_b\_a as `label_b_a`, a.description as `description`, a.contact\_type\_a as `contact_type_a`, a.contact\_type\_b as `contact_type_b`, a.contact\_sub\_type\_a as `contact_sub_type_a`, a.contact\_sub\_type\_b as `contact_sub_type_b`, a.is\_reserved as `is_reserved`, a.is\_active as `is_active`, a\_to\_civicrm\_value\_relationship\__37.display\_block\_on\_contact\_summary as `custom_157` FROM civicrm\_relationship\_type a LEFT JOIN `civicrm_value_relationship__37` `a_to_civicrm_value_relationship__37` ON `a_to_civicrm_value_relationship__37`.entity\_id = `a`.id \[nativecode=1054 \** Unknown column 'a\_to\_civicrm\_value\_relationship\__37.display\_block\_on\_contact\_summary' in 'field list'\]"\] )

# Answer
By "report" I assume you mean a CiviReport? It sounds like you used to have a custom field when the report was created and then the custom field was deleted. You can try recreating/resaving the report.
> 0 votes

---
Tags: civicase
---


# Question
Title: Is there a way to add a Null option to webform radio buttons?
When using a Drupal Webform with CiviCRM it is possible to add a Null or 'Empty' option to a Select input box, if using a dropdown list. Is there a way to do the same thing if using radio buttons?

# Answer
No Required Radios example:

Alternatively in CiviCRM -\> Custom Fields -\> If you wanted to specifically record the 'none' option simply add it as an Option (Add Option) and it will automatically appear on your webform as an option as well!
> 1 votes

---
Tags: webform-civicrm
---


# Question
Title: How to split contribution page into tabs
I would like to divide my contribution page into tabs: intro + priceset, payment information, submit section. How can I do that?

# Answer
> 2 votes
With the standard CiviCRM contribution page I don't know if this is possible. You can do this easily with Webform (on Drupal). Haven't tried yet but maybe Caldera forms (on WordPress) does the job.

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


# Question
Title: Specific mailing always fails with 42% success rate
I have a mailing group, which isn't a smart group, that always fails at 42%. I then add the successful ones to a group and resend the mailing and exclude that group. This then sends 32%. I repeat the above and the mailing is successful. This is the only mailing group on this site that is causing the problem and they send a lot of emails.

I check the logs and get this error:

```
"$Fatal Error Details = Array (
  [callback] => Array (
     [0] => CRM_Core_Error
     [1] => exceptionHandler )
  [code] => -2
  [message] => DB Error: syntax error
  [mode] => 16
  [debug_info] => SELECT a.id as `id`, a.name as `name` FROM civicrm_mailing a
    WHERE (a.name LIKE "%success%")
    ORDER BY a.is_archived, a.scheduled_date DESC
    LIMIT 11
    OFFSET -10
  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-10' at line 6]
  [type] => DB_Error
  [user_info] => SELECT a.id as `id`, a.name as `name`
    FROM civicrm_mailing a
    WHERE (a.name LIKE "%success%")
    ORDER BY a.is_archived, a.scheduled_date DESC
    LIMIT 11
    OFFSET -10
  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-10' at line 6]
  [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT a.id as `id`, a.name as `name` FROM civicrm_mailing a WHERE (a.name LIKE "%success%") ORDER BY a.is_archived, a.scheduled_date DESC LIMIT 11 OFFSET -10 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-10' at line 6]"]
)"

```

I then get a lot of errors around blank email body so skipping emails.

```
CiviMail will not send an empty mail body, Skipping:

```

I have created a new group, added people to it and retested it with the same results.

Nothing obvious that I can see is causing the problem so I am at a loss to resolve it.

Cheers Bari

Backtrace:

```
  `$backTrace =
  #0 /home/Site/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(915): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /home/Site/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
  #2 /home/Site/public_html/sites/all/modules/civicrm/packages/DB.php(998): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...")
  #3 /home/Site/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...")
  #4 /home/Site/public_html/sites/all/modules/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), "SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...", "DB_Error", TRUE)
  #5 /home/Site/public_html/sites/all/modules/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
  #6 /home/Site/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(935): DB_common->raiseError(-2, NULL, NULL, "SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...", "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
  #7 /home/Sitepublic_html/sites/all/modules/civicrm/packages/DB/mysqli.php(405): DB_mysqli->mysqliRaiseError()
  #8 /home/Site/public_html/sites/all/modules/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...")
  #9 /home/Site/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2696): DB_common->query("SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...")
  #10 /home/Site/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...")
  #11 /home/Site/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(421): DB_DataObject->query("SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...")
  #12 /home/Site/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1408): CRM_Core_DAO->query("SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...", TRUE)
  #13 /home/Site/public_html/sites/all/modules/civicrm/Civi/API/SelectQuery.php(127): CRM_Core_DAO::executeQuery("SELECT a.id as `id`, a.name as `name`\nFROM civicrm_mailing a\nWHERE (a.name ...")
  #14 /home/Site/public_html/sites/all/modules/civicrm/api/v3/utils.php(1260): Civi\API\SelectQuery->run()
  #15 /home/Site/public_html/sites/all/modules/civicrm/api/v3/Mailing.php(238): _civicrm_api3_basic_get("CRM_Mailing_BAO_Mailing", (Array:8), TRUE, "Mailing")
  #16 /home/Site/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_mailing_get((Array:8))
  #17 /home/Site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(150): Civi\API\Provider\MagicFunctionProvider->invoke((Array:8))
  #18 /home/Site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
  #19 /home/Site/public_html/sites/all/modules/civicrm/api/api.php(131): Civi\API\Kernel->runSafe("mailing", "get", (Array:8))
  #20 /home/Site/public_html/sites/all/modules/civicrm/api/v3/Generic/Getlist.php(39): civicrm_api3("mailing", "get", (Array:8))
  #21 /home/Site/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(85): civicrm_api3_generic_getList((Array:8))
  #22 /home/Site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(150): Civi\API\Provider\MagicFunctionProvider->invoke((Array:8))
  #23 /home/Site/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
  #24 /home/Site/public_html/sites/all/modules/civicrm/api/api.php(22): Civi\API\Kernel->runSafe("Mailing", "getlist", (Array:6))
  #25 /home/Site/public_html/sites/all/modules/civicrm/CRM/Utils/REST.php(300): civicrm_api("Mailing", "getlist", (Array:6))
  #26 /home/Site/public_html/sites/all/modules/civicrm/CRM/Utils/REST.php(550): CRM_Utils_REST::process((Array:3), (Array:6))
  #27 /home/Site/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(277): CRM_Utils_REST::ajax()
  #28 /home/Site/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
  #29 /home/Site/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
  #30 /home/Site/public_html/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:3))
  #31 /home/Site/public_html/includes/menu.inc(527): civicrm_invoke("ajax", "rest")
  #32 /home/Site/public_html/index.php(21): menu_execute_active_handler()
  #33 {main}"`

```

# Answer
> 3 votes
Resolved this by creating a new email template, it seems as if something in the template was causing the problem.

No idea what, but this was the way we fixed the issue.

---
Tags: civimail
---


# Question
Title: What do civicrm extension "current usage" statistics indicate?
For example, Mosaico CiviCRM Integration shows "Current Usage: 3749". What does this number represent?

I imagine this is the number of live sites reporting that this extension has been in a certain state within a certain number of recent days, but what state (ever been installed / currently enabled / currently installed but disabled), and how many days (365 / 7 / 1)? Or is this number based on something more / less / else ?

# Answer
What a site sends back to civicrm.org is just this: https://github.com/civicrm/civicrm-core/blob/506fffd478a7d322fbea786c35787c95a6dbe290/CRM/Utils/VersionCheck.php#L238-L240

name, enabled, version

One thing to note at https://github.com/civicrm/civicrm-core/blob/506fffd478a7d322fbea786c35787c95a6dbe290/CRM/Utils/VersionCheck.php#L139 is that it's only sent back for beta and stable installs. Alpha dev sites do not send those stats back, but release candidate testing sites do.

Also note that it does this when its cache expires (3 days, or when cleared). It also up to a point depends on site cron.

Whether civicrm.org further scours the internet for more data to match it up to your birthdate, friends, and latest purchases I don't know - if you can find where the code for stable.php is at https://latest.civicrm.org/stable.php it will say what it does with it. It probably just stores it.

When it's displayed on an extension node, I believe it comes from the `update()` function at https://lab.civicrm.org/marketing/civicrm-website/-/blob/1f421835b1bc0ad2ce45a919215a6794955aa208/civiext/org.civicrm.civicrmorgstats/CRM/Civicrmorgstats/Utils/Extensions.php#L31-41, which in turn gets it from https://stats.civicrm.org/json/ext/{extension name}.

I believe that is somewhere at https://lab.civicrm.org/infra/stats-collection, but I would think just pulls it from whereever stable.php stored it.

So without seeing what is actually installed on civicrm.org, or knowing how often that `update()` function runs, half of this is guessing, but it's clear what a site sends back.
> 1 votes

---
Tags: extension, civicrm.org
---


# Question
Title: Cannot upgrade past version 5.26.2, why does constant CIVICRM_PLUGIN_URL appear in URLs and paths?
first up, many thanks to all who help out in the Civi community.

I tried upgrading from Civi 4.6.38 to 5.28.0 which failed on the queue runner screen (JS errors).

In the screenshot you can see that the path to assets includes the constant CIVICRM\_PLUGIN\_URL. This explains the 404 but why hasn't the value of the constant been used? This matches whats in the Apache error log:

\[Thu Aug 13 15:44:56.862133 2020\] \[php7:warn\] \[pid 19200\] \[client 109.148.55.130:36242\] PHP Warning: Use of undefined constant CIVICRM\_PLUGIN\_URL - assumed 'CIVICRM\_PLUGIN\_URL' (this will throw an Error in a future version of PHP) in /home/user\_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 69, referer: https://example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fupgrade&reset=1 \[Thu Aug 13 15:44:56.862169 2020\] \[php7:warn\] \[pid 19200\] \[client 109.148.55.130:36242\] PHP Warning: file\_get\_contents(CIVICRM\_PLUGIN\_DIRcivicrm/extension-compatibility.json): failed to open stream: No such file or directory in /home/user\_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 290, referer: https://example.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fupgrade&reset=1

You can see that file\_get\_contents() is also using the constant. I tailed the civi log file in ConfigAndLog/ but nothing was appended to the log file.

I've restored and tried a few upgrades to work out where the problem begins; its version 5.27.0. Version 5.26.2 is as late as I can go, I've also tried 5.27.4 hoping to pick up a fix to no avail.

I have read version-specific notes and the release notes for 5.2.7:

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

https://civicrm.org/blog/dev-team/civicrm-527-release

I have also tried a CLI db upgrade:

wp civicrm upgrade-db

```
    PHP Warning:  Use of undefined constant CIVICRM_PLUGIN_DIR - assumed 'CIVICRM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 68
Warning: Use of undefined constant CIVICRM_PLUGIN_DIR - assumed 'CIVICRM_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 68
PHP Warning:  Use of undefined constant CIVICRM_PLUGIN_URL - assumed 'CIVICRM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 69
Warning: Use of undefined constant CIVICRM_PLUGIN_URL - assumed 'CIVICRM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 69
PHP Warning:  file_get_contents(CIVICRM_PLUGIN_DIRcivicrm/extension-compatibility.json): failed to open stream: No such file or directory in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 290
Warning: file_get_contents(CIVICRM_PLUGIN_DIRcivicrm/extension-compatibility.json): failed to open stream: No such file or directory in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 290
PHP Warning:  file_get_contents(CIVICRM_PLUGIN_DIRcivicrm/extension-compatibility.json): failed to open stream: No such file or directory in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 290
Warning: file_get_contents(CIVICRM_PLUGIN_DIRcivicrm/extension-compatibility.json): failed to open stream: No such file or directory in /home/user_dev/example.com/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 290

```

My environment is: Wordpress 5.4.2 Debian Stretch PHP 7.3

In case its helpful files are still in plugins/files/ not the newer location of uploads/

It appears as if the code in civicrm.php which sets up the defines runs too late but that seems very strange. Thanks for reading, I hope this is a well formed question, please let me know if i can improve it.

# Answer
Try adding below lines into 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/';

```
> 2 votes

# Answer
The answer from Pradeep is correct. The documentation is here: https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-5.29

Version 4.6 used a path and URL convention that is no longer in use. I would have expected you to be able to go up to version 5.28 (as I have been) but it's possible you have values stored in the settings table.

I'd add the lines that are detailed above and look to move to the new structure.

You should also flush all caches, CiviCRM, WP, and flush permalinks. This will clear out any problems due to pre-compiled templates where CiviCRM references old cached values.
> 0 votes

---
Tags: wordpress, upgrade
---


title: Setting up Stripe payment gateway

text:
# Question
Title: Setting up Stripe payment gateway
Which url do you use: `api.stripe.com` or `api.stripe.com/v3`?

I'm wondering why - even though it works fine - I have this url because I can't find any reference to /v3 in the Stripe documentation.

# Answer
> 3 votes
Its just an example used to set the url to avoid validation error. The stripe extensions uses correct api version and url while handshaking or communicating with Stripe gateway.

---
Tags: stripe
---


title: Mosaico not displaying images in editor

text:
# Question
Title: Mosaico not displaying images in editor
When using Mosaico to build an email, I'm never seeing images in the editor - they display when sending tests or real emails, and when previewing the email, but in the editor they appear as a small blue square with a question mark. Has anyone encountered similar, and found a solution?

We're running CiviCRM 5.27.2 in Wordpress.

Update: some more info was requested in the comments. We're running Mosaico 2.4.1592820024 and this is all a recent install. When I check the "network" tab in developers there are indeed two 403 errors which come up when I launch the Mosaico editor, one I think for the image I'm trying to include, and one to wss://public-api.wordpress.com - I can't obviously identify any problems with the Resource URL settings, but guessing that's where the problem/solution lies! Any help is much appreciated :)

Thanks.

# Answer
If you're getting a 403 error on the image, that's not a Resource URL error but a file permission error.

* Right-click the line with the image that isn't loading and select "Open in New Tab". Reloading this new tab will make it quicker to test changes.
* Check the following (report back here if necessary):
* The user that your web server runs under;
* The user PHP runs as (if it's different);
* The owner of the file that's not loading;
* The file permissions of the file that's not loading.
* Also check for any .htaccess files in the image folder or any parent folders, and your web server logs.

Between these, you should find your problem. Be mindful that there's both the immediate problem to fix, and also the root cause that led to this situation.

The file owner is going to be your PHP user, but the web server user is the one accessing it. So either a) they're different users (which is OK, but makes the other variables above relevant) or b) there's a .htaccess file in place.
> 2 votes

---
Tags: mosaico
---


# Question
Title: Why am I getting problems with username & password for WP cron?
I'm trying to set up cron in Wordpress (& I'm only familiar with Drupal). I have the following set up in cron which doesn't work, and when I paste the url into a browser I get 'ERROR: invalid username and/or password'. Yet the user (Cronjob) is in WP and I can logon to WP using the password, and has the required permissions set for CiviCRM.
usr/bin/wget -O - -q -t 1 'http://example.org.uk/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=Cronjob&pass=xxxxxxxx&key=2c3b60639d70ba87f61e819cb2cd0e67'

# Answer
> 2 votes
The problem was the single quotes around the path to cron.php, once I removed them it worked. Also usr/bin/wget was incorrect, just needs wget. Here's the working crontab entry with output redirected for debugging.
wget -O - -q -t 1 http://example.org.uk/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=Cronjob\\&pass=xxxxx\\&key=2c3b60639d70ba87f61e819cb2cd0e67 \> /home/example/www/wp-content/uploads/civicrm/ConfigAndLog/cronerrors.txt 2\>&1

---
Tags: wordpress, cron
---


title: How to change Greetings in CiviCRM?

text:
# Question
Title: How to change Greetings in CiviCRM?
This was already a topic and I was able to fix it using Smarty and the help of the community but Smarty doesn't work with Mosaico and Greetings are showing pretty poorly in CiviCRM (dear e.g cher doesn't fit the feminine).

Is there a way to set the Greetings because it's not just a French situation as German also has grammatical gender. Is this a PR?

# Answer
> 3 votes
In the post you linked you said you would use a code like this:

> {capture assign=gender}{contact.gender}{/capture} {if $gender eq 'Homme'} Cher {contact.first\_name}, {elseif $gender eq 'Femme'} Chère {contact.first\_name}, {/if}

Instead of putting it directly in the template you could also add this smarty logic to the email greeting (/civicrm/admin/options/email\_greeting?reset=1). CiviCRM would then generate the correct greeting for each contact and it also works with Mosaico etc.. For many of our German customers we use this logic to cover some more exceptions:

> {if "{contact.communication\_style}"=="familiär"}{if "{contact.individual\_prefix}"=="Frau"}Liebe{ }{contact.first\_name}{elseif "{contact.individual\_prefix}"=="Herr"}Lieber{ }{contact.first\_name}{else}Liebe(r) Unterstützer(in){/if}{else}{if "{contact.individual\_prefix}"=="Frau"}Sehr geehrte Frau {contact.formal\_title}{ }{contact.last\_name}{elseif "{contact.individual\_prefix}"=="Herr"}Sehr geehrter Herr{ }{contact.formal\_title}{ }{contact.last\_name}{else}Sehr geehrte Damen und Herren{/if}{/if}

There are two issues with this approach:

If you change the greeting logic it will not automatically update all contacts. You could use the scheduled job that does that: (/civicrm/admin/job?action=update&id=7&reset=1)

Also the maximum length for the smarty logic is limited so can't go too crazy. If you need more complex logic and/or more different greetings, please have a look a the extension "More Greetings" which we developed a while ago.

---
Tags: contacts
---


# Question
Title: For civiEvents in a Drupal View, how to display only one of a repeating event?
\[apologies for cross posting. This question is also on Drupal answers, but since the options for filtering would be based on civiEvent fields, I am posting here as well)

We have a view that displays upcoming events. We use civiCRM for events. Some of our events are ongoing: they have the same title, but different dates. What logic could I use to display the next upcoming event, without displaying all upcoming events?

For instance, at the moment the events displayed are based on date. Any event that is not yet passed will display in the view. But for a class which repeats 10 times, I do not want 10 of the same title, just the next class and its date/time.

# Answer
I do not think there is an easy way to do this via the Drupal Views interface.

However you can do it using jQuery or maybe CSS to hide all but the first instance of your repeating event.

Start off by creating a custom event option field to identify each **type** of event. You could even use the event type ID if you wanted and just add more options to it.

So it could be

* Jane's classes would have an ID of 1
* Joe's classes would have an ID of 2

So whatever you choose, each event will have an ID that identifies the type of event.

You can get these ID values into the View. Make sure you have Civicrm Entities module installed.

So now you have a view that shows say

* Start date
* Title
* Event type ID or your custom field ID

Now you create a Row template for the View

Now you wrap the row in a div and you add in a class to the div dynamically, from the event\_type\_id.

So something like

```
<?php $id = $fields['event_type_id']->raw;?>
<div class="event_type_<?php print $id;?>">
-----rest of the fields
</div>

```

If you inspect the output on the page, then each row for Jane's classes will be wrapped in this div

```
<div class="event_type_1">

```

for example.

**jQuery solution**

Now what you do is make yourself a Drupal module that adds a bit of jQuery for when the page has loaded.

It should have a function with a selector like this

```
$('event_type_1').slice(1).remove();

```

That would remove all but the first row of Jane's classes.

Or this selector could do it

```
$('event_type_1:not(first-child)').remove();

```

**CSS solution**

Add a class for the view using the Class option in Advanced section of Views admin for the view display.

Then try

```
.view-class-added > event_type_1:not(:first-child) {
display: none;
}

```
> 1 votes

# Answer
If you think that you can do it by using php code, i.e to filter only one event among the recurring events, then you can use the 'Views\_php' module to obtain the component you want as field. You just need to call the function \<?php civicrm\_initialize(); first and then start pulling the data you need with your code. You have many examples in online on 'how to use the views\_php module?'.
> 0 votes

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


# Question
Title: How to increase the size of a Note field type?
Does the 'Note' custom field type have a limitation of 12000 characters? If so how can I increase its limit to three fold or four fold?

# Answer
you can update the field type from text to longtext

```
ALTER TABLE `civicrm_value_table_name` MODIFY `field_name` LONGTEXT DEFAULT NULL;

```
> 2 votes

---
Tags: custom-fields, textarea
---


# Question
Title: Error on CiviCRM Activation. Can't Install CiviCRM
I’m trying to install a new copy of CiviCRM for Wordpress on Plesk Onyx. I get the following error when I try to activate CiviCRM after uploading the files to my server:

Warning: require\_once(CRM/Core/ClassLoader.php): failed to open stream: No such file or directory in /var/www/vhosts/ruinsideca.org/infoportal.ruinsideca.org/wp-content/plugins/civicrm/civicrm.php on line 877

Fatal error: require\_once(): Failed opening required 'CRM/Core/ClassLoader.php' (include\_path='.:/opt/plesk/php/7.2/share/pear') in /var/www/vhosts/ruinsideca.org/infoportal.ruinsideca.org/wp-content/plugins/civicrm/civicrm.php on line 877

I don’t know why this error is happening or how to fix it. I’ve never come across something like this before. As a result, I can't even install CiviCRM on my server.

I'm running PHP 7.2.22, Wordpress 5.2.3, and CiviCRM 5.17.3.

Thanks for your help

# Answer
> 2 votes
Same happened to me. On installing new test CiviCRM under WordPress. The "CiviCRM Contribution Page Widget" plugin caused same error. Civi 5.27.1, WP 5.4.2, php 7.2.24 on ubuntu 20.04 LTS

# Answer
> 0 votes
I encountered similar error messages attempting to activate CiviCRM 5.28.0 (but not on Plesk).

The error in that situation was caused by a previous, failed installation attempt on the site this one had been cloned from. Removing all CiviCRM files and tables then enabled the plugin to be activated correctly.

---
Tags: wordpress, error, installation, civicrm.settings.php, plugin
---


# Question
Title: Multilingual text not copied when using an event template to create an event
I am running a new multilingual (en & fr) civi site an making extensive use of templates for multiple event types. The templates are created with text in the appropriate language blocks on each field. However, when I create an event using such a template, only one of the languages gets copied across into the new event. If I create an event while my civicrm language is set to english then the english text is copied into BOTH language blocks. Likewise if civicrm language is set to french then the french text goes into both. I have replicated this on a fresh civi install. Can anyone indicate if this is a restriction, a bug or a misconfiguration on my part. Thanks in advance.

Civi=5.27.1 / Drupal=7.72 / PHP = 7.3.21 / mySQL=5.5.60

# Answer
> 0 votes
Sounds like a bug. If you have an event template with English and French and you create a new event using that template, I'd expect the new event to have English and French content identical to the template.

I'd suggest opening an issue at https://lab.civicrm.org/groups/dev/-/issues

---
Tags: civievent, templates, multilingual
---


title: Installing CivicRM

text:
# Question
Title: Installing CivicRM
I have installed CivicRM in Wordpress but there is no menu or dashboard. All I see is the attached. What have I done wrong? Thanks Paula

# Answer
> 1 votes
Try adding below lines into 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/';

```

---
Tags: installation, dashboard, menu
---


title: Can Legal Name be used as a token?

text:
# Question
Title: Can Legal Name be used as a token?
I need to use an organization's legal name for invoicing. I have already customized the invoice template for many other fields, but cannot see how to insert Legal Name as a token.

I note this 10 year old forum posting saying that the Legal Name field was not exposed to the token system: https://forum.civicrm.org/index.php?topic=832.0 Is this still the latest answer?

I know I could add this to my custom field set for organization financial info, but I would rather not duplicate existing field names.

Likewise I can put the Legal Name in the Organization name field, but that renders the Legal Name field redundant (and gives me long, unwieldy org names)

We're running 4.6.24

# Answer
> 5 votes
In order to use legal\_name against your message template the best way would be enabling CIVICRM\_MAIL\_SMARTY to 1 in civicrm\_setting.php

By doing this you can access {contact.legal\_name} in your message template

I did made a test against Version 4.7.15 which worked. so please give a try

Reference: https://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+in+mail+templates

I guess this helps!!!

# Answer
> 0 votes
At least you can use this one: {contact.organization\_name}

---
Tags: tokens, invoice
---


# Question
Title: What is the purpose of the Disable Expired Relationships scheduled job?
This forum link where it was born seems to suggest that it's needed as a replacement for hooks or to be able to filter them in drupal views. But it seems you can make a view that filters based on end dates in the past, and there are hooks for relationships (maybe there weren't at the time of the original post).

An alternate way of asking this question is "what does is\_active mean for relationships"? Is it just a stand-in instead of using effective-dating queries such as are common in PeopleSoft or HR systems (which have broader use, e.g. list all the people who were active employees in 2019)? Is it just a redundant data field that means "end date in the past"?

Besides trying to understand whether it's redundant and maybe a bit fragile, one reason I'm asking is that anyone who's using this scheduled job would be dependent on the fact that civi ends relationships when it does, and so a change to that would affect this. So another way of asking this question is "Is anybody using this scheduled job and can describe your use case a little bit?"

# Answer
> 1 votes
End date alone does not determine if the relationship is 'active' or not. It will remain active until the scheduled job kicks in and makes it inactive. Examples include inherited memberships (membership by relationship). If you look in the advanced search you can see a radio option for active/inactive relationships. Its important to note anything in Civi that is using relationships to work out if it should carry out the action will most likely look for active relationships.

# Answer
> 0 votes
(apologies if i am missing some deeper levels to this question)

if a Relationships passes its End Date then the job sets it to be not is\_active

is\_active is a setting you can use to disable a Relationship that may not have an End Date

---
Tags: relationships
---


# Question
Title: CiviEvent Live and Test Registration pages yield error when accessed
I'm currently using Wordpress 5.5; and CiviCRM version 5.25.0

I'm getting the following error log when trying to access registration pages for any of our events:

Aug 18 14:46:20 \[debug\] $backTrace = #0 /home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(419): CRM\_Core\_Error::backtrace("backTrace", TRUE)

#1 /home/example/public\_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM\_Core\_Error::handleUnhandledException(Object(CRM\_Contribute\_Exception\_InactiveContributionPageException))

#2 /home/example/public\_html/wp-content/plugins/civicrm/civicrm.php(1479): CRM\_Core\_Invoke::invoke((Array:3))

#3 /home/example/public\_html/wp-content/plugins/civicrm/includes/civicrm.shortcodes.php(295): CiviCRM\_For\_WordPress-\>invoke()

#4 /home/example/public\_html/wp-includes/shortcodes.php(343): CiviCRM\_For\_WordPress\_Shortcodes-\>render\_single("", "", "civicrm")

#5 internal function: do\_shortcode\_tag((Array:7))

#6 /home/example/public\_html/wp-includes/shortcodes.php(218): preg\_replace\_callback("/\[(\[?)(civicrm)(?!\[\w-\])(\[^\]/\]*(?:/(?!\])\[^\]/\]*)\*?)(?:(/)\]|\](?:(\[^...", "do\_shortcode\_tag", "\[civicrm\]")

#7 /home/example/public\_html/wp-content/plugins/civicrm/includes/civicrm.shortcodes.php(203): do\_shortcode("\[civicrm\]")

#8 /home/example/public\_html/wp-includes/class-wp-hook.php(287): CiviCRM\_For\_WordPress\_Shortcodes-\>prerender(Object(WP))

#9 /home/example/public\_html/wp-includes/class-wp-hook.php(311): WP\_Hook-\>apply\_filters(NULL, (Array:1))

#10 /home/example/public\_html/wp-includes/plugin.php(544): WP\_Hook-\>do\_action((Array:1))

#11 /home/example/public\_html/wp-includes/class-wp.php(758): do\_action\_ref\_array("wp", (Array:1))

#12 /home/example/public\_html/wp-includes/functions.php(1285): WP-\>main("")

#13 /home/example/public\_html/wp-blog-header.php(16): wp()

#14 /home/example/public\_html/index.php(17): require("/home/example/public\_html/wp-blog-header.php")

#15 {main}

the resulting page provides the following generic fatal error message:

"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. The page you requested is currently unavailable."

As far as I am aware, there have not been any recent changes to our setup that would have prompted the error, as it was working fairly recently. Any tips or direction would be greatly appreciated!

# Answer
If you are on wordpress 5.5 than your CiviCRM version should be more than 5.25.x. Also can you check the shortcode that you have added in wp post/page has contribution id.
> 1 votes

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