Adding CSS to extra tpl file I've added CSS to a Summary.extra.tpl file to change reports. But the CSS does not apply.

Adding the CSS by itself crashes the report (character encoding issue) so adding the {literal} tag is what I have.

{literal}
#s2id_groups {display:none;}
{/literal}

I am trying to remove the add contacts to group dropdown.

You might be able to do it with css but I might use jquery instead:

{literal}
<script type="text/javascript">
CRM.$(function($) {
  $('#s2id_groups').hide();
});
</script>
{/literal}

The problem with css might also be that you don't have a <style type="text/css"> tag around your css?


Linking directly to Contact's Activity from Scheduled Reminder Email I've created a Scheduled Reminder email that triggers 1 hour before each SCHEDULED Meeting or Phone Activity.

In the reminder email I want to include a link directly to the "With Contact" for the Activity. Or, even better, link to the Activity so that I can easily update the Activity.

What's the URL/Token combination needed for a direct link to the Contact's Activity?

This doesn't appear to be covered in the documentation: https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens

I'm using Wordpress as my CMS.

SOLUTION FOUND
It wasn't rocket science but I'm putting it here in case others need it (or when I forget).

Here's how to create a link that will take you directly to an Activity in CiviCRM.

EDIT ACTIVITY PAGE ON WORDPRESS CMS

http://www.MyOrganization.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/contact/view/activity&atype=2&action=UPDATE&reset=1&id={activity.activity_id}&cid={contact.contact_id}&{contact.checksum}&context=activity

VIEW ACTIVITY

http://www.MyOrganization.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/contact/view/activity&atype=2&action=VIEW&reset=1&id={activity.activity_id}&cid={contact.contact_id}&{contact.checksum}&context=activity

If you're using a different CMS you can find the root URL structures at https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens


How to set contact name during Drupal's user registration? During Drupal's normal user registration process (a user registering their own self, as opposed to an admin registering a user) a Civi contact record is created for that user.  That works fine but the only data set for the contact record is the email address.  How do I set it up so that the contact's First and Last Names are set during that process?

Currently I have fields on the user profile for first and last names.  Is there a hook I can use to save these values to the contact record?

I don't see any configuration options for this sort of thing.  I'm kind of mystified by the lack of info on this particular use case when I search the web, as it seems like a standard scenario.

By default CiviCRM comes with a profile called 'Name and Address' which is set to be used for User Registration. First Name and Last Name fields in this profile are, again by default, set as required fields. So when a site visitor goes to user/register they need not only to provide a username/email address/password, but they also see the fields exposed in the Name and Address profile and must provide First/Last name. Maybe you've disabled or removed this profile? Or you can create a new profile that's used for user registration.


Expected import behavior when setting custom field to view only Checking this option in a custom field View Only?  Is this field set by PHP code (via a custom hook). This field will not be updated by CiviCRM.

I had read that it would not update upon import. However I just ran an import and a field did import that was marked as view only. For a previous import I recall that it did not update.

What is the expected behavior here? I thought it was not to update.

It seems a probable bug.
I ran an import of a file containing same field as my custom field and the field was updated by the information mentioned in csv and did not retain its default value. So, Yes, the issue was replicated.
The value of custom field is only retained when we create a contact through CiviCRM and not importing, so it looks to be an inconsistency in the behaviour while importing. An issue will be opened for the same in issue tracker of CiviCRM.  Thanks for reporting!


Update Multiple Activities - Cannot Display "Details" Field I'd like to be able to update multiple Activities easily. I've prepared a Profile and have activated these fields:

Activity Date
Time
Activity Status
Subject
Details
Duration

All works as expected, except for the Details field which contains the Copy icon at the top of the column, but does not display the fields for each row. Instead the column is blank.

Thinking this may be an issue since Details is a text field, I added a Custom text field called Scratchpad. When added to the profile, this custom field displays as expected.

Any ideas as to why the Details field won't play along correctly?

Thanks.

We're using WordPress 4.7.3 and CiviCRM 4.7.17.

Based on above, this seems to be a minor bug or deliberate behavior. I have created an issue https://issues.civicrm.org/jira/browse/CRM-20433 and will close this StackExchange thread.


Upgrade to 5.24 failed I tried upgrading to 5.24 and it hung half way through the upgrade - while upgrading to 5.24alpha1.  Here's all that was in the log - it then died. I've gone back to 5.23.4 (Drupal).  Ideas?

Apr 02 09:21:30  [info] Running task: Cleanup old files

Apr 02 09:21:31  [info] Running task: Checking extensions

Apr 02 09:21:31  [info] Running task: Begin Upgrade to 5.24.alpha1

Apr 02 09:21:32  [info] Running task: Upgrade DB to 5.24.alpha1

Apr 02 09:21:33  [info] Running task: Upgrade DB to 5.24.alpha1: SQL

Apr 02 09:21:34  [info] Running task: Install sequential creditnote extension

I was able to reproduce a similar symptom in a wp-demo configuration. Specifically, the upgrader activates the new, core-internal extension (sequentialcreditnotes), and the activation fired off a general system-flush, and the general system-flush raised an error while handling some data from another extension (civivolunteer). The problem only occurred with the web-based upgrade UI (and not with the CLI-based upgrader).

CiviCRM 5.24.1 has a fix for that case.


The view past events button has disappeared from manage events. How do I view/copy from past events? Using civiCRM-5.35.1-wordpress, and since updating the view past events button under Manage Events has disappeared. Does anyone know where this has gone? Is it now accessible somewhere else? Thanks for your help!

You can find the past events by doing a search based on dates


How to I access the A/B testing features after upgrading to 4.6? When I upgrade to CiviCRM 4.6, I don't see anything about the A/B testing features within CiviMail. How do I access these features?

The A/B testing features come with two menu items. For me, they weren't showing up for some reason, even after rebuilding the menu by visiting civicrm/menu/rebuild&reset=1

I don't understand why this worked, but I did the following:

Go to "Admin" > "Customize Data and Screens" > "Navigation Menu"
Expand the Mailings item and you should see "New A/B test" and "Manage A/B tests" at the bottom.
For each of these two items, take the following steps:

Right click on the menu item and choose "Edit"
Change the # character in the URL field to something else like foo.
Save. Then edit again, and change back to #


Hide Cividiscount box from specific contribution page When you apply a discount to a membership type any contribution page with this membership type shows the discount box. Is there a way to hide the box on particular contribution pages or make discounts admin only I.e only admins can apply a discount? This ways not all members are shown this option and only specific ones can tagged with a discount.

There are a few options to make it so only Admins can apply discounts.

Create a price set for memberships and add a text/numeric quantity field called 'Discount', set the value to $-1.00 and set the visibility to 'Admin'. With this option you can apply custom discounts when entering memberships via the admin panel without using a CiviDiscount Code. The special field for discounts will only be visible to logged in admins.
If you are comfortable with some coding you can use jQuery to hide the CiviDiscount form section from the contribution page template via a custom template. Keep in mind this will hide the CiviDiscount form from all contribution pages.

Hope this helps


Why CiviCRM is not in wordpress.org/plugins/? Why CiviCRM is not in Plugins.wordpress.org? See https://wordpress.org/plugins/search.php?q=civicrm . There are 9 plugins, but not civicrm.

CiviCRM is not a conventional plugin like installing other wordpress plugins and requires a lot more work.  You can view installation instructions for wordpress platforms at https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress


What is the cause of Error: Call to undefined function civicrmVersion() in sparkpost_civicrm_check() Drupal 7.59 Civi 5.1.2 PHP 7 MariaDB 10.1 Debian 9

If our users access "example.com/civicrm" without first logging into Drupal, they receive a generic white page with the message "Error
The website encountered an unexpected error. Please try again later.", but also with a green drupal message saying "Log in successful for ...."

Upon refreshing the page, users can then access Civi normally.

Just one php error in the recent log messages:-

  Error: Call to undefined function civicrmVersion() in
  sparkpost_civicrm_check() (line 145 of
  /var/www/sites/default/files/civicrm/extensions/com.cividesk.email.sparkpost/sparkpost.php).

Could anyone advise the fix for this? Thanks!

I found this on the github issue list: https://github.com/cividesk/com.cividesk.email.sparkpost/pull/58/commits/69a0bdb17bb520334da7f472a2d7670b44da8071

Applied the commit and it has resolved the problem.


Membership Director change We recently changed Membership director, but the old director stills receives email notification when new member sign up.

How do we change that?

In general, how do we set-up email forwarding?  Cannot find references!

There is no concept of 'email forwarding'. It could be that you have bcc set up on the Thank You page settings of your Contribution Pages, so check under Contributions > Manage contribution pages, then click Configure for each of your Contribution pages, and head to the Thank You and Receipting tab.

If you have db access you can look in the civicrm_contribution_page table for emails.


No Gift Option "Pre selected" Need to fix this please Hi so i have a premium contribution page set up and i noticed the "no gift" option is pre selected and grayed out so i cant change it. I need this option to be deselected until the user chooses it. The image below shows what im talking about and heres a link directly to the page

http://www.mendleton.com/merchandise/

It looks like you've got some JavaScript errors.  That's going to break all your JavaScript, including the premium enable/disable script.  See if this post on troubleshooting JavaScript for CiviCRM can help you?


Services from core contrib modules missing!!!! "The service xxxx has a dependency on a non-existent service xxx. " (with solution) In this case it was webform. Webform services wouldn't load, I couldn't clear cache, clearing db caches manually wouldn't work. All I got was:

[Thu May 07 14:37:33.174757 2020] [php7:notice] [pid 2795] [client x.x.x.x:25119] Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: The service "webform_scheduled_email.manager" has a dependency on a non-existent service "webform.token_manager". in /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 31 #0 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(60): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Object(Symfony\\Component\\DependencyInjection\\Reference), false)\n#1 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(28): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->processValue(Array, false)\n#2 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(67): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Array)\n#3 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(28): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->processValue(Object(Symfony\\Component\\DependencyInjection\\Definition), true)\n#4 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(60): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Object(Symfony\\Component\\DependencyInjection\\Definition), true)\n#5 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(28): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->processValue(Array, true)\n#6 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(39): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processValue(Array, true)\n#7 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/Compiler/Compiler.php(140): Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass->process(Object(Drupal\\Core\\DependencyInjection\\ContainerBuilder))\n#8 /var/www/html/www.actionfund.org/vendor/symfony/dependency-injection/ContainerBuilder.php(789): Symfony\\Component\\DependencyInjection\\Compiler\\Compiler->compile(Object(Drupal\\Core\\DependencyInjection\\ContainerBuilder))\n#9 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(1321): Symfony\\Component\\DependencyInjection\\ContainerBuilder->compile()\n#10 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(902): Drupal\\Core\\DrupalKernel->compileContainer()\n#11 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(477): Drupal\\Core\\DrupalKernel->initializeContainer()\n#12 /var/www/html/www.actionfund.org/web/core/lib/Drupal/Core/DrupalKernel.php(693): Drupal\\Core\\DrupalKernel->boot()\n#13 /var/www/html/www.actionfund.org/web/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#14 {main}

Reinstall drupal wouldn't fix it (once custom modules were in).
Deleting vendor and composer install wouldn't fix it.
Reloading DB had no effect.
None of the usual tricks worked.
I was pulling my hair out.

A contractor had added a directory called "webform" to modules/custom to add some custom configurations to webform. Which worked fine after updating webform module, until you cleared cache. Then Drupal blew up with the above error (similar from drush side) and I got puzzled silence on the call with them.

Turns out Drupal looks in custom first, for module directories, and ignores directories of the same name in contrib. When other stuff tried to reference services in the contrib module, drupal stopped looking for stuff in "webform" at the custom directory of the same name and died.

Hopefully this saves someone some time. Learn from our folly!

Changing the name custom/webform to custom/SITE_NAME_webform (with .info.yml etc name changes) fixed issue.

They're killing me.


How to include validation fields to find user for a contribution page to avoid duplicate? Although we have taken many different approaches, it was always been an issue with duplicated contact records.

What I thought is, if I could include few fields like

First Name
Last Name
Email
Post Code

and once that anonymous user fills in those fields mentioned above, CiviCRM would look for matching contact and prefills the details for a contribution page.

Is it something possible to achieve? Anyone have any suggestions, please? Thanks

Your question suggests you may need to reread https://docs.civicrm.org/user/en/stable/common-workflows/deduping-and-merging/ and then set up your matching rule as you describe and use that. if they match then it will add data to the existing contact rather than create a new one


How to edit a shortcode in order to change formatting of profile in a form? Is there a way to edit a shortcode so that a profile being used in a form appears properly on a page? The default mode that appears is a little funky.

Thanks!
+Josh

It looks like you are wishing the profile snippet (on the left) looked more like the form on the right. You can achieve this by modifying your site's css file to style the profile snippet. Add a border, background color, change the font, hide the cancel button, widen the label column, etc. If you're unfamiliar with css, there are many good tutorials on the internet, and firebug is your friend.

To make the labels read like the one on the right, go into the civicrm admin area and edit those fields in the profile to remove "(given" and "(family" from the labels if you wish.


Event Error - civi_flexmailer_required_tokens Everytime I try to make an event, or access any page with event information, I get the following error:

You have requested a non-existent service "civi_flexmailer_required_tokens".

Using latest Civi 5, Wordpress 4.9

we have similar issue but after clearing civicrm cache using menu/rebuild it started working.


how do I create a new template on civicrm / mosaico Is not a question, i just want to share with you how you can create a new template on civicrm / mosaico!

for wordpress:

Template directory:

/www/yoursite/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.mosaico/packages/mosaico/templates/

here you find 3 templates directory that already exists

choose one of the folders (important)
and duplicate and rename folder and the.html inside (respecte the nomenclature)

next step
view your template in the selection area in wordpress

go to

/www/yoursite/wp-content/uploads/civicrm/ext/uk.co.vedaconsulting.mosaico/js

edit index.js

and add your template here:

var viewModel = {
        showSaved: ko.observable (false),
        edits: ko.observableArray (initialEdits),
        templates: [{
          name: 'versafix-1', desc: 'The versatile template'
        }, {
          name: 'tedc15', desc: 'The TEDC15 template'
        }, {
          name: 'tutorial', desc: 'The Tutorial'
        }, {
          name: 'newtemplate', desc: 'newtemplatetitle'
        }]
      };

Final step is create / modify your own template
put your new template with correct name in your Template directory

sorry for my poor english ... I'm french: p

Thanks for this - it helped me out.

I believe the second part of your answer is no longer valid.

The new place to reference your template seems to be in: uk.co.vedaconsulting.mosaico/CRM/Mosaico/BAO/MosaicoTemplate.php.

Edit the findBaseTemplates() method to return another record with your new template's details and it should show up under the Mailings -> Mosaico Templates menu option in the New from base template: section


How do I search for Activity Attachments? Drupal 7.39
CiviCRM (in this case 4.6.7)

We can't find any way to search for activities with attachments.

Am I missing something obvious?

Similar to this question: Search contacts with attachments

This might be an answer to a slightly different question, but... in the past, I've used a mix of add-ons to perform a full-text search on activities and their attachments:

https://github.com/civicrm/apachesolr_civiAttachments

When you run a search with "Search => Full Text" and filter on activities, it will include any matches in PDFs/DOCs/etc that are attached to activities.

That module may be a significant undertaking (e.g. it requires an extra server, Solr, and the documentation is pretty rudimentary), but if you really need it, it might be a piece in the puzzle.


How to access contact ID and checksum for a new contact from the Caldera form that creates the contact? Using a Drupal webform I can create a new Civi contact, and get the contact ID and checksum for that contact from the form submission, enabling me to use it in an email triggered by the form submission. This lets me send a link to a second form, passing the contact id and checksum in the URL, to pre-populate the second form with details of the newly created contact.

I'd like to do the same thing using Caldera forms on Wordpress, but I'm struggling to see whether, and if yes, how, that might work. Can anyone cast any light?

There's an example of how to do the second part of this in the integration module's README.

  Checksum support to auto-populate form with URLs like example.com/some-page?cid={contact.contact_id}&{contact.checksum}

The part I'm not aware of is how to properly redirect from one form to a second form with the right contact ID and checksum. I don't have any Civi-on-WordPress instances to test with.


Scheduled job process_mailing does not complete Running process_mailing scheduled job via 'execute now' starts but does not complete.

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

Some other mailing that were scheduled later have completed.

There are no errors reported in the Civi log.

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

CiviCRM 5.19.1
Mosaico 2.3.1572289217
Flexmailer 1.1.0
Sparkpost 1.3

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

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

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

Since then my issue resolved. I would suggest try that.


PayPal Standard and Webform CiviCRM visiting this page https://forum.civicrm.org/index.php?topic=34814.0 Coleman said "PayPal standard feature is being added to Webform-CiviCRM right now, should be ready sometime next week." It was on November 14, 2014. Any news/update on this subject?

I'd say it should be ready for you to do some testing with. According to this ticket it seems like Paypal Standard functionality should now be active.

(Caveat: Webform_Civicrm is not yet fully compatible with CiviCRM 4.7).


How can I get custom file fields in an activity to display correctly? I have a Civi implementation that uses a custom activity type in which I have - amongst others - four custom fields of the field type "File".

These custom fields work fine in all but one situation. If I view an activity record of this type the pop-up does not display the fields or the links to the files. If I force the activity view to display in a new browser window/tab then the following warnings get thrown up:

Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).
Warning: strtolower() expects parameter 1 to be string, array given in CRM_Core_DAO::getFieldValue() (line 1004 of /data/www/html/sites/all/modules/civicrm/CRM/Core/DAO.php).

My guess being that the four repeated PHP warnings relate to the four custom file fields, and give a clue as to why they aren't getting displayed in the activity view pop-up. The current workaround is to edit the activity record, where the four fields and the links to files are displayed.

It would be really good to fix this. Any pointers most welcome.
Currently using CiviCRM version 4.6.18 on Drupal 7.

It sounds like you're encountering CRM-17791.  This bug was discovered and fixed in CiviCRM 4.7.  I would recommend upgrading a test copy of your site to 4.7 to see if that resolves the issue.  If so, consider upgrading or funding the long-term support team to backport a fix to version 4.6.


Baffled by Views database error on new install Hours-old install of CiviCRM 5.25 under Backdrop 1.9. I've gotten as far as putting in the Board of Directors with dummy bio information, which I was trying to use to generate a View with a page display of names and bios. I get this, with various permutations of what table doesn't exist depending on what I'm doing:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'B1.civicrm_uf_match' doesn't exist

Both Backdrop and CiviCRM are using the same mysql user "B1", who has GRANT ALL permissions on the B1 and C5 tables. Obviously, the data is still there when I go back to review it in the Civi interface. What to check next?

Try adding cms integration in your backdrop settings.php

CiviCRM >> Administer >> System Settings >> CMS Integration.

Step by step documentation : https://docs.civicrm.org/sysadmin/en/latest/integration/backdrop/views/


Memory leak in API create Contact I am trying to use PHP on the Command Line to import 90,000 contacts to Civi 5.0. It seem like there is a memory like when calling:
civicrm_api3('Contact', 'create', $usrArray);

Does anyone know what code in the api could be causing this?

The looping of the CSV has been written not to use up more memory than the line being read, this has been tested alone with memory_get_usage();

Best,
Joel

We have been running this patch in production for some months to address the memory leak

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

When we first deployed it we hit a bug on the use of cloning the DAO in export. I removed that place however there is one remaining when exporting related contacts and I closed the PR until I had a chance to address that

      $allRelContactArray[$rel][$allRelContactDAO->refContact] = clone($allRelContactDAO);

I've now updated for that issue & re-submitted - https://github.com/civicrm/civicrm-core/pull/12276


Strip Drupal Page Template from CiviCRM Contribution Page I want to strip all Drupal navigation etc coming from page.tpl.php for a particular contribution page and all the associated pages of the contribution process. But all just for one contribution page.

In Drupal I know how to create template suggestions for a Drupal theme that will apply only to a specific path. But I don't thing the template suggestions can handle the query part of the CiviCRM URL.

Ideas?

You can assign CiviCRM to use the default template in your Drupal theme settings. The default theme doesn't engage your Drupal theme and menu system.

In Drupal 7, it's https://www.example.com/admin/appearance, then scroll down to the bottom of the page and you can set your theme for CiviCRM.

If you want to retain your template but just strip out navigation, you may need to make a new template based on it for CiviCRM to use and assign it.


Is there a hook for address parsing? As a german user of CiviCRM, i would love to have geocoding for my addresses. But at the moment, it tells me:

  Street address parsing is enabled but not supported by your locale (de_DE).

That's true, the core only supports following locals:

 $parsingSupportedLocales = ['en_US', 'en_CA', 'fr_CA'];

In some way it still works, but I get an info on each save of an adress, telling me it couldn't parse the address.

I would love to try to implement a extension for german address parsing. Is there any hook I can use for that?

I took a look at org.civicoop.streetformatnl but it's old code and overwrites the core function. And it gave me an error 500, using it with CiviCRM 5.20.1.

There are two main differences between american and german adresses:

We write the house number after the street: <street> <number>
We place the zip before the city name: <zip> <city>

Just a clarification first: Parsing is different from geocoding. If all you want is to get lat and long values filled in then regular google geocoding works without parsing.

If you really want parsing, then you might be able to do it with hook_civicrm_post and when $objectName == 'Address' you can parse and adjust the address there.

Note that just for display of zip before city you can alter that at Administer - Localization - Address Settings, but you probably have already seen that, and it doesn't rearrange the edit form, just for viewing and labels.


Inconsistent ACL behaviour We recently started using ACLs to fine-tune access to custom fields. Roughly speaking, our setup is:

all authenticated users can access custom field group 1
role 1 can access field groups 2, 3, 4
role 2 can access field group 5

The problem is that once in a while, a user with role 1 can't see fields in groups 2, 3 and 4 when looking at a contact's summary page.
Refreshing the page fixes the issue.

Unfortunately, if we are using memcache, refreshing no longer helps (which makes sense).

What would cause Civi to not correctly check ACL permissions once but then work on the second attempt?
Of course this appears to happen completely randomly and is impossible to recreate consistently.

Running CiviCRM 4.6.2.

UPDATE: Issues appear to start during Drupal's cron run.

/CRM/ACL/BAO/ACL.php:group() returns erratic and inconsistent arrays of custom field group IDs every time it gets called.
Seems like drupal's cron wreaks some sort of havoc on the acl cache and civi has a hard time rebuilding it.

Ugh. This kind of bug is really hard to diagnose. Good call on noticing that memcache caches this behavior.

Are you on some kind of host with really aggressive caching by default? WPEngine, for example, has caused big problems.

If not, you should report this on issues.civicrm.org. My hunch is that caching/retrieval of the query for visiting the contact summary happens before the ACLs for custom fields are checked.

You may be able to more reliably test this by creating a user not in Role 1 and logging in as them.  I'd be curious if one or both of the following happen:
 - visiting the contact as the non-privileged user causes the privileged user to not see the fields the next time
 - visiting the contact as the privileged user causes the non-privileged user to see the fields the next time (if so, a bad security problem)


Custom field aggregation with Drupal Views I have problems with showing aggregated custom data.

Some frequently asked questions:

Yes, I have succesfully set up Drupal Views connected to the CiviCRM database, with the php.settings.file
Yes, I have checked the Access custom data permissions.
Yes, I have also set up the View with User field, and not the CiviCRM Contact field.

I am trying to achieve this:

The count of new contacts recruited this year (date of recruitment is a custom field).

What I get:

I only get the count of new contact recruited this year that is ALSO a Drupal user. But I cannot find any criteria or field that should refine the result like that.

Do anyone have a tip for what to check for?

If your View is based on 'users' then your result makes sense.

If your View is based on 'civi contact' then your result doesn't make sense unless you are using contextual filter, relationship or filter to specify 'user'.


Development on a plugin - How to transfer values I have created a new plugin structure using civix.  It has created the elements I wanted in the database.

I have used dogregistry_civicrm_tabset to add a tab to my contacts pages.
I used civix to create a page with a php file and a tpl file.

The question I have is how do I transfer a value to the page php file?  I would like to send it contact ID so I can query the database for the entries for that contact but I'm not sure how to do that or whether it is stored already in a variable I can tap into?

Thanks for your help.
Norm

Ok, I think I figured this bit out by using...

$this->_contactId = CRM_Utils_Request::retrieve(...

and making sure the calling url has cid={$contactId} included.  I'm getting the contactID in the php code, which will allow me to execute the queries and such I need to list out the details.

Norm


Attach pdf file civicrm_api3 i need help, i'm trying to attach through civicrm_api3('Attach', 'create'..) a pdf file, passed with a rest call as simply text:

%PDF-1.3
1 0 obj
<< /Type /Catalog
... ecc

.
The attach works, but i thing that during it, the crm's file save function make an escape of some special chars... the results of content of pdf file is:

%PDF-1.3
1 0 obj
&lt;&lt; /Type /Catalog
... ecc

there is a way to avoid this behavior?

thanks

Sorry, this is a half-answer.

The HTML encoding is being added because this line is adding default 'wrapper' functions that include adding HTML entities (CRM_Utils_API_HTMLInputCoder).

You can fix this by altering the defaults passed into WrapperAdapter::construct(), to include 'content' in the array of skipFields. I think you could do this here.

Just add a line like

'content', // For attachment.create

This does work - I tried it.

However this may not be secure because I don't know if any of the other APIs use the rather generic 'content' parameter name. If they do, then removing the protection afforded could result in XSS vulnerabilities or other problems.

So the other way to fix it would be rename the API content something more unique attachment_content - but that would require changing a public API (!)

So another way would be to put in some sort of check that changes the default wrappers for the particular case of attachment.create, but I'm not familiar enough with the internal workings of the API system to suggest that patch.

Hmmm.


Paypal payments - Pending (Incomplete Transaction) We're on civicrm 4.7.5 on Drupal 7.

All contributions paid through the paypal standard payment processor are failing to successfully complete.

The user sees a successful transaction, but the contribution status is "    Pending (Incomplete Transaction)"

There is nothing in the CiviCRM log to suggest an error. The IPN is sent to the correct URL, the status recorded in paypal is HTTP 200 OK.

But when I copy the path into a browser:

https://[ourwebsiteurlredacted.com]/sites/all/modules/civicrm/extern/ipn.php?reset=1&contactID=9994&contributionID=5669&module=contribute&membershipID=9587

this prints the following message to screen:

Sorry, can not load CMS user account.

Any help debugging would be greatfully received!

Issue had been filed https://issues.civicrm.org/jira/browse/CRM-18483 and this is my fix https://github.com/civicrm/civicrm-core/pull/8270/files

As earlier in case of drupal site, CRM_Utils_System::loadBootStrap() eventually calls CRM_Utils_System_Drupal::loadBootStrap() and fails at https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/System/Drupal.php#L545 because we are not passing any drupal userID as $uid parameter in loadBootStrap() fn and got halt at the same point. Unlike in other CMS (wordpress, joomla) the underlying bootstrap code is not too reliant on user id and didn't break.

As per my fix CRM_Utils_System::loadBootStrap($params, TRUE, FALSE) where 2nd parameter stands for $loadUser = TRUE and third $throwError = FALSE so if there is no corresponding CMS userID assigned against civiCRM contactID then it won't break rather it will return false and will complete the workflow just what happen when we call REST url https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/REST.php#L711.

The reason behind calling loadBootstrap function lies in https://issues.civicrm.org/jira/browse/CRM-18245

Can anyone please verify my patch if it works for ya!!

Thanks


Cannot edit prefix, suffix, first name or last name of new or existing Individual After upgrading my CiviCRM to 4.6.4 (& 4.6.6 after that in trying to fix this problem) I cannot see or edit suffix, prefix and first or last name of Individuals on the Contact Screen. Even when creating a webform with the civicrm_webform module I cannot add these name fields in a new webform, they just don't show up and are missing from webforms which used to have them. Also in the administration section on the display preferences page I cannot longer choose to display these fields on the contact screen.

If I create a profile with the name fields for Individiuals I don't have any problem. I can add those fields to the profile and can use the profile to change the names of Individuals. I can also export the fields. Any help would be much appreciated.

Steps I already took: compare my 4.6.6 database tot a fresh 4.6.6 db intall and adjusted the differences I found, several cache flushes, explored the different debug options but the problem is I cannot seem to find an error within CiviCRM when I try to edit the name of an Individual. It doesn't sem to trigger an error or I am no able to find it.

I will try and add some screen shots of the pages with the problem to make it more clear.

SOLVED.
The update to 6.4.4 seemes to have deleted some values in the 'civicrm_option_value' table. These options reffered to the option group with the name 'contact_edit_options' in the table 'civicrm_option_group'. The options for 'First Name', 'Last Name' etc. were no longer present and if these aren't present those fields just dissapear from the contact while editing. They also do not longer show on the 'display preferences page'.

It seems the upgrade to CiviCRM 4.6.4 I did didn't take well and deleted those option values, or it could be that the upgrade needed to add these option values in order to make 6.4.6 work but didn't succeed in adding these to the database, I am not sure. I did experience problems with my database before doing the 4.6.4 upgrade and didn't get the message that the upgrade was succesfull, so it is difficult for me to say what actually caused the problem.

The easiest way to check for the possibility of the existence of this kind of problem is to install a seperate new empty installation of the same CiviCRM version and compare these two tables for options that are present in the 'empty' CiviCRM but not in the CiviCRM with the problem. I was ble to get the name of the option group that had the problem by checking the code from the 'display preferences page'.

Hope this helps someone with the same problem. I spend days figuring this on out.


How to remove User login box from public event registration? I am creating a public event for my organization and is showing the User Login box on the left side. This is the box use to log in into CIVI so as long as attendee ignores it and use the form  there's no problem. But I want to remove it as some people have got confuse with it. Any help?

Actually this is a Drupal question. The login of CiviCRM is handled by the CMS. Form the screenshot I assume it is Drupal. So the visibility of the login block must be configured in Drupal.
You find the configuration with the following URL

http://<servername>/admin/structure/block/manage/user/login/configure

Here you can disable the login box for event pages in the following way:


Stripe/GoCardless Payment Processor payouts - Accounts reconciliation I understand this isn't strictly CiviCRM, but it's more a question to the community in how they work with the payouts of the popular payment processors Stripe & GoCardless.

As I understand it, both payment processors group income and payout at a certain frequency as a single payment to a bank account.

As part of our annual accounts submission, we have to show income separation between membership & donations. At the moment, that requires us to go back into Stripe or GoCardless admin UI once we receive our monthly bank statement and try and piece together how much of that payout was membership vs donations that month. Once that's done, we then can correctly input and tag it in our bookkeeping software (Sage in this case).

Is there an easier or more streamlined way to handle this?

Apologies if this is too far removed from CiviCRM subject matter and thus needs to be removed.

Any input would be greatly appreciated.

The most common approach to reconciliation is to update contributions within the CRM with the identifier from the payment processor. For Stripe we have a few approaches, our most recent is the payout reference from Stripe is automatically pulled back into CiviCRM. This allows the finance departments to run a payout report from both systems and reconcile. This has proved to be a very reliable and streamlined process. With GoCardless it's not possible to do an automated process unless you have the pro version with access to their APIs. You can perform a similar function by updating contributions in CiviCRM using the GoCardless data.

The key to a streamlined process is finance being able to easily find all the transaction which make up the transaction into their bank account, which involves some flow of information back from the payment processor into the CRM. The unfortunate part of this is all of the payment processors have varying levels of APIs and data to access.


How to Dedupe Records I have one member who signed up 3 years in a row online.  Every year he used a different variation of his name.  How can I unify these files using the deduping mechanism?

There is detailed documentation here https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/

If you have your contacts in a Search result, then you can click on them both, and under ACTIONS find Merge Contacts which will take you to a page with url like

civicrm/contact/merge?reset=1&cid=112&oid=144

so the other option is to just paste that in to your url, change the to ids (ie the cid and the oid) and that will give you the screen with the two contacts ready to merge.

At that point you will have a 'flip' button if you want to merge the other way round.

Then repeat for the remaining two.

Note merging records with Membership data does not 'merge' that data, it can 'add' the membership records from one to the other - but you may need to manually adjust the start or end dates if you want to end up with just a single member record.

Also, for future, you should read up about Dedupe Rules and see if you can set this up to help avoid this situation. the other thing to note is if you are sending renewal reminders (manually or via Scheduled Reminders) and use a checksum then it helps avoid this situation as the link temporarily logs the contact in so there is no option to create a duplicate.

hope that helps.


Is it possible to view smart group membership in Views? I have a view set up to display the content of groups but it only works for viewing manual group membership, not smart groups. (I have the form set to require input rather than the basic form style.) I'm wondering if there is a way to display smart group membership in views or, because of the nature of smart groups, this is just not possible.
I'm in Drupal 7, CiviCRM 5.27.7, Views 7.x-3.23 and CiviEntity 7.x-2.2
(Use case: I'd like to have a form where users can quickly pull up the membership of a group set to be used in a bulk mailing. The users could then review membership. While yes, this can be done in advanced search we were looking at a more Drupal style report where we can also easily display specific columns of information.)

You can join to any CiviCRM table with the Views CiviCRM Expose Tables module, so you can join to civicrm_group_contact_cache.
I'm not savvy enough about smart groups to know when this is reliable - this table gets destroyed and regenerated on a regular basis, and may come up empty sometimes.  However, since this is for internal use, you could have some way to guarantee that the cache is full (e.g. by regenerating it as part of the user's workflow).
Another option to consider is Search Kit, if you can upgrade to newer versions of CiviCRM.  It's very Views-like, and can give you a configurable set of columns.


How do I change the CiviCRM Database name When setting up a website with CiviCRM I named the database in a extremely generic format. How can I rename it with breaking Civi? I tried to export the date and import it to a new database with a different name and change the civicrm.settings.php file but that did not work.

Any suggestions would be helpful.

This is what works for me but not sure if it is necessary based on the following http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location :

Edit civicrm.settings.php with new database info
Delete all template files in templates_c/
Make sure there are no references to civicrm database in drupal setttings.php
Clear database caches and session tables


Error on [civicrm.root] as CiviCRM Resource URL After upgrading to 5.23.0, I am getting the error that my resource URL is not correct. Everything seems to be okay though.

In the admin section, the Civicrm Resource URL is [civicrm.root]/

In civicrm.settings.php:

  $civicrm_root =
  '/home/myuser/domains/mydomain/private_html/sites/all/modules/civicrm';

Mistake by myself: there should be a slash at the end of the variable:

  $civicrm_root =
  '/home/myuser/domains/mydomain/private_html/sites/all/modules/civicrm/';


Bulk Delete of Spam Contacts and related Drupal Users I've a list of 8K+ CiviCRM contacts that have been deemed spam/unwanted. I am looking to clear them from CiviCRM, along with their related Drupal users.

I've found and tested this module: https://www.drupal.org/project/userdelete which will allow me to plug in a list of email addresses, arrived at from joining my list of contacts to the civicrm_uf_match table.

My question is, what is the path of least resistance to handle a clean removal of the CiviCRM contacts?

The API explorer seems to indicate that the contact delete method will only take a single contact id at a time, which would force me to write a module or a rest client to iterate through my list.

Would simply updating the CiviCRM DB directly with is_deleted = 1 do the trick?

I imagine this isn't a new situation...

Thanks in advance for your feedback.

Since you are using Drupal, you can install the CiviCRM Entity module, and use Views Bulk Operations to create a View that will delete contacts, or any CiviCRM data in a Drupal Batch API process


Is it possible to integrate a custom Drupal donate form with CiviCRM? I'd like to build a custom Drupal form (not using webform) to use as a contribution form and want to know if it is possible to integrate it with CiviCRM. I am not very familiar with Civi's Api capability, so want to ask to make sure it is doable before I jump in...
Do you know of an existing example of such a form?

So this is definitely possible.  I'm assuming that you asking the question, you have some Drupal FAPI experience.

If you have CiviCRM installed already check out the API explorer, and check out the Contribution entity, transact action

Documentation of this API is spotty to non-existent, but its powerful, and works.

There is actually a sophisticated example of using this API call for Event Registrations in the CiviCRM Entity project, CiviCRM Entity Price Field submodule
https://www.drupal.org/project/civicrm_entity

The code there is a little complex, and your requirements may be simpler, but come into the civicrm entity channel on CiviCRM's Mattermost chat at https://chat.civicrm.org and ping @jackrabbithanna and I can help you get started.


No CiviCRM Menus on WordPress I just installed CiviCRM v5.16.2-wordpress on a WordPress site running WP 5.2.2 Everything seems to be working but I do not have any menus on the top bar. I can get to the Administer CiviCRM screen and have tried different menubar positions under Display Preferences, but still nothing. I am sure I have messed up some setting, but am brand new and have no clue. Thanks for any help.

UPDATE 8-22-2019

Jon G. I followed your suggestions.

I cleared the cache and received this message:

Still no menus.

Checked the Resource URL setting and it is correct.

Tried a different theme, no luck.

Went to the Developer's Tools in my Firefox browser and saw mostly 200s and one 404. Here is a screenshot of that 404 error

Looking at the error details, I went to the location of the file in my hosting File Manager and the file is there (along with several others)

Suggestions for what else I can try?
Thanks.

UPDATE: 8-23-2019

Well, I've been trying different things. I went into Debugging from the Adminster CiviCRM screen, turned on debugging and switched to Development mode. When I saved those changes, the menubar appeared. If I switch back to Production mode they disappear.

I would try clearing caches (click Cleanup Caches and Update Paths on the admin menu).  I would also check your Resource URL to make sure it's correct (click Resource URLs on the admin menu).

I would also try using one of the built-in themes (e.g. "twentynineteen") to rule out a badly-behaving theme.

Finally, I would try bringing up your browser's Developer Tools (press "F12"), heading to the Network tab, and reloading the page.  If you see any 404, 403, 500 errors - really, anything besides a 200 - please update your question with those details.  Also note that you'll want to do a hard refresh of the page in between the first two steps - that's Ctrl-Shift-R on Windows/Linux, and Cmd-Shift-R on a Mac.

UPDATE: Looking at the request URL in your screenshot, that looks pretty squirelly.  I very much doubt thaat's the correct URL.  That says to me that there's probably something wrong with your Resource URL.  Is it possible that you're using a symlink ("alias") in your file path?  If so, try to fix any paths defined either in Administer » System Settings » Directories or in civicrm.settings.php to use the equivalent non-symlinked path.


can CiviCRM reports be archived? Is there any way to archive reports in CiviCRM so they are still available but no on the long list of reports?

I am not sure if we can. One option is to disable report template but it will disable all the reports associated with the template, which i believe you don't want.

However there is column(is_active) in civicrm_report_instance to set report Active/In-active but the report list is not filtered on this field(See here). So adding a where clause AND inst.is_active = 1 will list only active reports and then update all the report instances that you would like to archive to set is_active = 0 through api explorer (CiviCRM >> Support >> Developer >> API Explorer)

Alternate option will be to create a dummy user and assign all the report instances that you would like to archive to dummy user contact through api(so all assigned reports will be visible to dummy contact user only and then set it NULL when you want the report to be visible for all)

HTH

Pradeep


CiviCRM Frontend or Public-Facing Page 404 Not Found It seems that all of CiviCRM frontend/public-facing pages are not working for me, they either redirect to the homepage (Petition), or throws a 404 not found (Other pages like Profile Create Mode & Mailing).
I have:

Created a blank base page named "CMS" and use the base page in Administer > System Settings > CMS Database Integration.
Set all permission for public/guest viewing in Users and Permissions > Permissions (Access Control) > WordPress Access Control

If I insert the Profile forms manually on their own page, they work fine and I can view/submit the form.
CiviCRM Installation Details:

WordPress 5.5.1
CiviCRM 5.24.6

Since you are on wordpress 5.24 you need to have civicrm 5.26 or more. Would recommend to upgrade your CiviCRM to 5.28.4


How to use auto-complete reference field in a profile? I am currently using an auto-complete field to indicate which member is representing which organisation. When I preview the field, either in the personalized fields or in the profile I am using it in, the field appears fine (see first image). However, when I use that profile in a contribution page, the field is only ever rendered as a textbox without any kind of auto-complete enabled (see image 2). Is there some kind of custom permission I need to set or is this simply a bug?

Thank you

Image 1:

Image 2:

Based on testing on the demo server, it looks like custom contactRef fields do work when embedded in the "profiles" section of the contribution page, but fail to work properly when in the special "on behalf" profile. This looks like a bug.

Can you please file an issue in the bug tracker for this?


Include Relationships when creating profile i was wondering if there's an easy way to add the relationship field when creating a profile.

what i wish to accomplish is this:

perform a search for all members of a particular household, plus a few more criteria---easy enough to do.
display the result as:
| Name | Email | Phone | Member of (household) | Some contact specific custom field |

thanks!

There is an easy way to do this if you are using Drupal and that would involve the Webform+CiviCRM module. Happy to explain more if you are on Drupal - but you don't mention your CMS


Using fieldOptions with Custom Fields I have a "Select list" within a Contribution Form. I want to populate the "Select List" with Custom Field values.

I have created the Custom Group under Contacts, so i want to search all contacts and get the custom field "Title" from that Custom group.

Then depending on the "Option" selected i want field values to populate.

I have tried to use the:

hook_civicrm_fieldOptions but its not working (https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_fieldOptions/).

Any advise on how to do this?

Thanks

This is the HTML for field i want to populate:

    Proc Fee
      &nbsp;

   - none -   Proc Fee<input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-6" id="s2id_autogen6">

       Proc Fee       <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-6" id="s2id_autogen6_search" placeholder="">

<select class="crm-select2 crm-form-select" data-crm-custom="Commission:Proc_Fee" data-api-entity="Contribution" data-api-field="custom_276" data-option-edit-path="civicrm/admin/options/proc_fee_20191113181638" name="custom_276_-1" id="custom_276_-1" tabindex="-1" title="Proc Fee" style="display: none;">
    <option value="">- none -</option>
    <option value="accordpt30">Accord - PT - 0.30%</option>
    <option value="accordresidirect045">Accord - Resi - Direct - 0.45%</option>
</select> &nbsp;

As I haven't seen your code, I can only suggest what worked for me:

function myext_civicrm_fieldOptions($entity, $field, &$options, $params) {

  if ($entity == 'Contribution') {
    if (isset($field) && $field == 'mycustomfield_123') {
      $myArray = [
        1 => 'Title 1',
        2 => 'Title 2'
      ];
      $options = $myArray;
    }
  }
}


How do I get CiviCRM working with varnish on wordpress? When I activate CiviCRM I get the following notices regarding varnish status:

Varnish is running but cannot cache.
A plugin or theme is setting a PHPSESSID cookie on every pageload. This makes Varnish not deliver cached pages.
Something is setting the header Cache-Control to "no-cache" which means visitors will never get cached pages.
Something is setting the header Pragma to "no-cache" which means visitors will never get cached pages.

The site is unusable when civi is activated, I can hardly navigate the civi admin pages - I get 'page not found' errors about half the time.
Is there a way to get CiviCRM to play with varnish?

A big part of the pages in civi are not public, so as you might serve different pages to every user, they can't be cached.

But I think your problem is elsewhere, if you are "alone" on your admin pages, it should not be slow, even without varnish

Have a look at the demo pages, are you experiencing the same speed on your server? if not, there is something wrong in your install, and I'd fix that, so you do not need varnish

X+


Ajax issues on WordPress I think the issue is that Civi is (1) not enquing the versions of jQuery that come with WordPress and (2) the code is not written for noconflict mode.

?page=CiviCRM&q=civicrm/ajax/l10n-js/en_US&r=NJqDM:8 Uncaught TypeError: Cannot read property '_defaults' of undefined
at ?page=CiviCRM&q=civicrm/ajax/l10n-js/en_US&r=NJqDM:8
at ?page=CiviCRM&q=civicrm/ajax/l10n-js/en_US&r=NJqDM:103

?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:32 Uncaught ReferenceError: cj is not defined
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:32
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:192 Uncaught TypeError: CRM.$ is not a function
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:192
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:208 Uncaught TypeError: CRM.$ is not a function
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:208
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:259 Uncaught TypeError: CRM.$ is not a function
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:259
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:400 Uncaught TypeError: CRM.$ is not a function
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:400
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:403 Uncaught TypeError: CRM.$ is not a function
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:403
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:563 Uncaught ReferenceError: cj is not defined
    at skipPaymentMethod (?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:563)
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:577
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:618 Uncaught TypeError: CRM.$ is not a function
    at ?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:618
?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2:621 Uncaught ReferenceError: cj is not defined

You need to cross check each and every path configured in Administer -> System Settings -> Resource URLs. Set them as per your site configurations.

CiviCRM Resource URL : is the URL path to your civicrm directory - Eg http://example.org/wp-content/plugins/civicrm/civicrm
Image Upload URL: is the URL path where your image will be stored. Eg http://example.org/wp-content/plugins/files/civicrm/persist/contribute
Extension Resource URL: is the URL path of the extensions used in your site.

Navigate to Administer -> System Settings -> Directories and set the path as per your needs.

Image Directory: should be the same path as above(Image Upload URL) without the URL part. Eg /var/www/site-name/wp-content/plugins/files/civicrm/persist/contribute
Extensions Directory: same path as set for extensions in the resource URL(without the URL part). Eg /var/www/site-name/path/to/extensions/

Similarly, set all the paths and check if it fixes your site display.


Fatal error: Uncaught CRM_Core_Exception: Civi/Core/InstallationCanary.php on line 53 I am just trying to install on a WordPress platform and it said OK for all the checks and fairly sure that everything is okay.  After running with Install button, I get this error and if I click in the WordPress admin menu CiviCRM:
No idea what I have wrong as DB/PHP etc are all in order.  I followed the wiki article exactly.

Fatal error: Uncaught CRM_Core_Exception: [0: Found installation canary. This suggests that something went wrong with tracking installation process. Please post to forum or JIRA. thrown in /var/www/html/wordpress/wp-content/plugins/civicrm/civicrm/Civi/Core/InstallationCanary.php on line 53

I am using PHP 5.6, mysql  Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using  EditLine wrapper ; and Ubuntu 16.04 which I am fairly sure is configured properly as Wordpress runs fine.  I followed every step.  I am a bit discouraged.

I wanted to just get an empty version of Civi going to test out things so as to later migrate from a Drupal environment.  Any Help?

Explain?. It's Ubuntu, php mysql.... What do you mean?. I installed WordPress... And everything works for that.  I installed Civi as a plugin and can't get it running ...I get this error. What else do you want to  know? The others are drupal installs. This is Unix instance on aws. Not sure what you mean explain?  The tables were created. But I can't run plug-in. Ubuntu 16, PHP 5.6 and mysql  5.7

The answer above about deleting the civicrm_install_canary table and the civicrm folder in uploads almost worked for me, except that php timed out ~30 seconds after the green 'successful installation' message appeared. I tweaked max_execution_time in php.ini to 360, deactivated CiviCRM, re-deleted the table and folder, then reactivated and re-installed - this time it finished gracefully and opened CiviCRM.

I am installing CiviCRM on a testing server (running on my laptop), which is a little slower than most working servers, but is configured to show errors one might not otherwise see.  The cleanup and/or 'reset' process that runs after the 'successful installation' message appears to take so much time that it is likely timing out even on some working servers, which results in not finishing the process and leaving the canary table in place.


Add county to reports I'm looking for a way to add sorting and/or grouping by county to reports. Specifically, Membership Details and constituent Details. I've tried a bit of monkeying with the PHP but I don't seem to have a good enough grasp of it. I'm running v4.7.6. Thank you.

Ah yes unfortunately you will need some PHP edits to make that work; Custom
reports in CiviCRM are a good way to start getting into the code base though!

Here's two references for you:
https://sf2012.civicrm.org/sites/default/files/slides/CiviCRM%20Reports-Customize%20and%20Extend.pdf

and

https://alastaira.wordpress.com/2011/03/17/civicrm-creating-a-custom-report/


Inserting a calculated value Currently I am working on a civicrm-wordpress plugin.
I have two custom fields displayed for a contact:
- Date of consent
- Age at recruit

When the user enters the date of consent I would like to calculate the Age at recruit (using the contact's date of birth and the date of consent field). How can I target a custom field and update it with a value when the user clicks on Save?

What I have done so far:
 - Created and enabled a plugin with the following content:

add_action('civicrm_preProcess', 'set_ageatrecruitment', 92,2);
function set_ageatrecruitment($formName, &$form){

        global $recruitmentDate;
        global $contactData;
        global $ageAtRecruit;
        $contact_id=$_GET['cid'];
        $contactDOB = $contactData[values][$contact_id][birth_date];

            if($recruitmentDate !='' && $contactDOB !='' ) {
                $ageAtRecruitment = getAgeAtRecruitment($contactDOB,$recruitmentDate);

            if ($ageAtRecruit != $ageAtRecruitment){
                updateCustomField($contact_id, "OC-Integrator", "Age at Recruitment", $ageAtRecruitment);}
            }

}

//updates the field, returns number of fields updated
function updateCustomField($uid,$group_name,$field_name,$value, $overwriteblank=FALSE){

    //Don't overwrite existing data if our data value is empty/blank
    //We consider anything that is just whitespace to be "blank"
    if ( ( !isset($value) || strlen(trim($value))==0 ) && !$overwriteblank) return 0;

    $results=civicrm_api("CustomValue","create", array (version => '3','sequential' =>'1', 'entity_id' =>$uid, "custom_" .$group_name . ":" . $field_name => $value));

    return 1;

}

There is another hook called before this which will give value to the global variables.

Here's how I would go about this:

Configure a field on the contact. Select "set via PHP" or whatever the option's exact name is.
Generate an extension using Civix. Remember portability - your extension can generate the field in (1), meaning that if you decided to share the extension or use it on multiple projects that.
Use the hook as Ramesh said to fill the values in the field.

It sounds like a neat extension. If you want to commission CiviFirst for this I'd be more than happy to help!

JohnFF


Installed CiviCRM in Wordpress via ftp, but it doesn't appear in plugin directory I have Wordpress 4.2.5 running, with PHP 5.4. I am installing CiviCRM 4.6.8. I followed the directions here: http://wiki.civicrm.org/confluence/display/CRMDOC/WordPress+Installation+Guide+for+CiviCRM+4.5#

Before installing I checked with my hosting provider that I had all the other specs listed on the page to install and their support person confirmed that I did, fwiw.

I downloaded the CiviCRM folder, then uploaded it via sftp into the wordpress plugins folder, after changing the permissions for that folder. I tried both writeable and executable permissions.

When I log in to my wordpress site with my administrator credentials CiviCRM does not appear in the plugins directory anywhere, or in the plugins editor dashboard.

I saw that Jetpack and Super Cache were incompatible with CiviCRM. I deactivated both, but no change.

Please help.

I believe the issue might be what Lesley is pointing out at the end of the comment, regarding the folder structure.
In order for WordPress to identify a plugin, the plugin shouldn't be in a sub-folder, it could have happened that depending on the zip/unzip software you have used to extract the plugin, the civicrm folder (inside your /wp-content/plugins folder) might look like:

civicrm-4.6.8

civicrm

civicrm.php
uninstall.php
civicrm
includes
assets
...

When it should look like:

civicrm

civicrm.php
uninstall.php
civicrm
includes
assets
...


How set Tags And Groups field set to NOT "collapsed on display" Using Drupal 7 and CIVI CRM 5.x on windows 10 and Xampp

I can set this up in custom fields sets, but how do I set the native "tags and groups" field to expanded on initial display?

To add on to @oskylark answer I would use an extra template instead of a duplicate. Easier to manage when upgrading. https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates

In the extra template (TagsAndGroups.extra.tpl) and you could throw some javascript in a {literal} tag along the lines of

cj('.crm-tagGroup-accordion').collapse('toggle');

NOTE: I did not test this js line, just a first guess.


How to map sales team to all my contact Happy Evening !

CiviCRM in Drupal 7 - XAMPP

1) I was trying to connect each contact into a other contact(Sales Team) and to create a relationship as "(Contact of Sales Person 1)".

2) Created a even registration - I want to display sale(s) person contact and in a field called "Company contact" and all these sales person will be listed in the registration form itself...

Any help would be great full

Do I understand the intention here, ie John has relationship to Mary, Bob, Harry, then on an Event registration page automatically fill the form with Mary and/or Bob and/or Harry (as well as John or not?).

There won't be any way to do this out of the box in civicrm afaik. Since you are on Drupal you are more likely to be able to get close.

John can go to a form and use an autocomplete/dropdown to find contacts he has 'permission' to see, which you can provide by making your Relationship between John and the others Permissioned (see this Extension if you want to make those types of relationships always permissions)

You can then set up the webform to allow John to add multiple of his sales team, or probably have them all load automatically

And yes the Webform-civicrm can be used to add these contacts to an Event, and accept payment depending on the type of payment processor you use.

Webform_civicrm is very well documented so i would suggest you read, try and come back with more detailed questions


Unable to map fields when exporting to CSV We are unable to map fields when exporting to CSV. Using Primary Field export gets us the standard csv, but when option to select fields for mapping is checked, seems to go into a loop (see attached screenshot). Cannot use a previously saved field mapping either.
We are running Civicrm 5.32.2 with Joomla 3.9.23 on PhP 7.4 server. Wasn't a problem before last Joomla/Civi updates.
thanks,
Kate
`

This is working on https://dmaster.demo.civicrm.org/civicrm
It will help if you can add your CMS version, CiviCRM version etc to your question. This could be something interfering with the display of the 'add field' feature

If you know how to use your browser 'inspect' you may be able to identify an error in your Console


Example of adding multi-record custom fields to a contact via API When I attach a multi-record custom field group to a profile for contribution pages, Civi only allows visitors to enter the fields once. I've read through jira a bit and see that the capability isn't there currently. Is there a simplified example showing how to use API v3 (preferably PHP, but any method is fine) in a way that adds a multi-record custom field group at the end of a contribution (i.e. after payment processing is complete)?

To clarify this scenario: you must be talking about muti-record contact custom data and not contribution custom data (which only supports single-records currently).

I recommend you use hook_civicrm_postProcess to insert code to store the data on form submission. This code inside your implementation of the hook should use the CustomValue API to save the data. You'll find documentation and examples of how to use it in the API explorer.


Why would the activity date for a contribution differ from the contribution date? Using CiviCRM 4.6.33 on Drupal 7.56. I just noticed, while adding a contribution to this person's record, that for a contribution made on December 31 of last year (2016), the contribution date and the activity date for that contribution do not match. The activity date shows as December 31, 2017, which is 10 days from now.

I was going to report this as a bug, but I have checked donations made by other people on December 31, 2016, and they do not seem to have the same problem. I must have done something to make this happen, I suppose, but I see no way to manually change the activity date.

Here are screenshots of the contributions and activities windows.

Is possible that you first entered wrong date while creating contribution and then updated receive date by editing the Contribution?
There is no form to update the Contribution activity. But you do this using api explorer screen.

First retrieve the Activity ID using Contribution Id(source record id)

(here 689 is Activity ID and 128 is Contribution Id)

Update the Activity date.

HTH
Pradeep


Address Labels Printing I have no problem printing my contact group mailing labels, however is it possible

to only print a full sheet of mailing labels for a single contact?

Any assistance appreciated.

Welcome to SE! There isn't a built in way to print multiple labels for a single contact within the label printing functionality. Demerit's suggestion above is probably what I'd do, but if you have a regular need and want to do it entirely within CiviCRM you could produce a message template with multiple copies of the same address on it and then use the print/Merge Document on the single contact. You would have to be careful how empty address fields were handled to make sure it looked right and the spacing didn't change, but some smarty should be able to do this.


Cron failing after 4.6.16 upgrade Platform: Wordpress 4.5.2 |
PHP version: 5.5.9 |
Mysql: 5.6.30 |
Running: Ubuntu 14.04.4

Yesterday I successfully upgraded to CiviCRM 4.6.16, no errors during upgrade, everything went smoothly, except the cron job is failing with the next error:

PHP Fatal error:
  Allowed memory size of 262144 bytes exhausted (tried to allocate 1920 bytes) in
  /var/www/site/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php
  on line 226

PHP memory limit is set to 512M

line 226 at civicrm/bin/cli.class.php

The cron job runs every 5 minutes and looks like this:

php /var/www/site/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s site -u user -p password -e Job -a execute

If I run the job from the API explorer, it runs successfully with no errors, it also runs successfully if I execute a job with Execute now in the Scheduled jobs page.

Any input is highly appreciated.

So CLI's memory limit was set to -1 like this:

memory_limit = -1 // no memory limit

Setting the limit to other than no limit solved the issue.

I'm not sure why this happened as CLI's memory limit was always set to -1 from the very first day I configured this server 2 years ago.


Memberships in multiple currencies? I am working for an international NGO with memberships. They want to be able to sell memberships in USD, EUR and GBP. The contribution forms will deal with this for donations, etc. The contributions form will also switch the membership currency to the one give in the Amounts page, but the value is the value given in the Membership type. Logical enough, but the membership type seems to be tied only to the default currency. Is there a way to define a membership prices set or even a separate membership in another currency?

Keith

There are many ways you can do this

Create contribution page and price set for each currency. Provide a list of contribution page to user and based on currency they can use the contribution page
Create contribution page and price set for each currency. Add currency field on each contribution page using buildform hook and on selection of currency load the respective contribution page.
Create a price set with radio field and have all the currency as options with same membership type. Using buildform or buildAmount hook change the amount or field label to include currency(not necessary if can add it price field option label). On submit of 1st page set currency in postProcess hook in $form so that right currency is set to send it to payment processor.

HTH

Pradeep


Switched "logging" on - now get 'Unable to reach server'? I just switched logging on for a 4.7.27 install which was working just fine.  Now, when clicking on 'Change Log' tab I get the 'Network Error' popup with the message about being unable to reach the server.  And there's no response at all. The rest of the system works OK still. I checked all the log_xxx tables were created, cleared Civi & Drupal caches. I've also looked at the several questions about this error but none seem to apply - this was a site that was working OK and it's only the change log that's affected. This is a Civihosting hosted account, by the way.  Ideas?

This seems to be a bug as it's also reported by another user.  So I raised this issue https://issues.civicrm.org/jira/browse/CRM-21799


SMTP Service: Do I really need it? Since I took over this project, we have had an active subscription to CiviSMTP for all of our outgoing email in CiviCRM. We already have our email for our organization going through Gmail, but all mail through the CiviCRM is going through CiviSMTP, a service that we have to pay for. From what I understand, it's to help with anti-spam regulations and bounce rate tracking, etc.

Can anyone offer some clarity into if this kind of service is necessary for sending out bulk emails and tracking bounce backs, etc? Is anyone else here even using it?
Can anyone recommend an SMTP service that does work with PHP 5.6 and CiviCRM 4.7.17 and allows TLS? Here is a related post to the issues I'm having with CiviSMTP: Outgoing Mail Settings, CiviSMTP & PHP 5.6.x Problem

http://www.civismtp.com/drupal/

Drupal 7.50 CiviCRM 4.7.15 PHP 5.6

CiviCRM doesn't require an external mail service, it's possible to deliver mail directly from most web hosts. Quality and limitations may vary on some webhosts, and you may have to contend with other websites in a shared environment affecting your reputation.

Running your own mail service on the server/VM you run CiviCRM on is also an option but not for the faint of heart, as it requires expertise and awareness of mailing best practices. It makes sense if you have resources to dedicate, but likely requires more attention than using a reputable paid service - at least until you're sending enough mails to make a paid service expensive. If you self-host mail delivery, expect to get familiar with things like SPF, DKIM, DMARC and mail reputation.

Generally, I'd recommend checking out the hosted options available - they should take care of dependable delivery and reputation for you, and let you stick to what you do best. See:

This CiviCRM blog post on available options,
This listing of CiviCRM Mail Providers over on the wiki,
this recent "Which mail alternatives work well?" question on CiviCRM.SE


Local (flywheel) wordpress install with CiviCRM we are trying to

install latest civicrm 5.23
using latest wordpress 5.3.2
Using latest version of previous Local by Flywheel (version 3.3.0)
I want to install in french language.
I'm following the wordpress install recommandation here: https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/
All requirements on https://lib.test/wp-admin/options-general.php?page=civicrm-install are fine.

If I change language to french from the install page (I installed correctly the language files) I get immediatly this error.

Fatal error: Uncaught RuntimeException: Undefined constant: CIVICRM_TEMPLATE_COMPILEDIR in /Users/f/local/lib/app/public/wp-content/plugins/civicrm/civicrm/CRM/Utils/File.php on line 583
( ! ) RuntimeException: Undefined constant: CIVICRM_TEMPLATE_COMPILEDIR in /Users/f/local/lib/app/public/wp-content/plugins/civicrm/civicrm/CRM/Utils/File.php on line 583

So this makes it impossible to install in another language than english which is annoying.
Any idea about this ?

If language is set to english, it almost works except for an error in some urls:

On a civicrm submenu, like for example administer -> administration console -> configuration checklist

if I click for example on the "Pages" wordpress menu, the url I end on is https://domaine.test/wp-admin/admin.php/edit.php?post_type=page with a blank screen.
This url should be https://domaine.test/wp-admin/edit.php?post_type=page
There is systematically this unnecessary "admin.php" in the url.
We've tried on another computer with this same local version and we got the same incorrect behaviour.
With another instance of civicrm (version 5.17) on this same particul local setup we don't have this error so we think that this is related to one of the following civicrm releases.
Any idea about this ?

We also tried on the new local by flywheel (5.2.5 with php 7.3.5 and MySQL 5.7.28)
Warning: this news version is a different application and connects differently than older Local to the database, using socket.
With that setup we have the same error as above when we change the language on the install page.
Then, if we install in english, it installs and generate the tables and the settings file in uploads/civivrm
Nonetheless I systematically gets several "network error" alerts... and civicrm is not working.
Any idea how to set civicrm with this new version of flywheel ?

I've posted a possible solution to the language part of the problem at https://lab.civicrm.org/dev/translation/issues/40#note_33313. It works for me on drupal 7 and should work for wordpress too I think. Add this to install/index.php around line 141:

if (!defined('CIVICRM_L10N_BASEDIR') && file_exists($crmPath . DIRECTORY_SEPARATOR . 'l10n')) {
  define('CIVICRM_L10N_BASEDIR', $crmPath . DIRECTORY_SEPARATOR . 'l10n');
}

The other part of the problem is already fixed in the latest 5.23.


Why do we need new_link in the mysql DSN settings? I see that in all civicrm settings.php examples the DSN is something like

  mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true

but why the new_link setting? Isn't it much more efficient to re-use an existing mysql connection than to open a new one each time?

If you only ever connected to one database on the same database server yes. If you run e.g. drupal and civi in different databases on the same server you will have problems. Even if you don't, it's theoretically possible a 3rd party civi extension uses its own separate database (but probably rare).


REPORTS-Participant List 4.6.10 I edited the report for our needs, which is a primarily a list of attendees.  We only require the following for our reporting needs:

Name
Organization
Event
Status
Start Date
End Date

I cannot get anything when I preview the report.

I input in filter:

Participant Status: Attended

Participant Role:  Attendee

Event Type:  I clicked on all the events I would need attendee info for

then I input a start and end date

I get no names at all - blank

Under columns I checked off what I needed as well

?????

I am not a programmer.

I've had the same problem - it's a bug in the current version of the
Participant list Count Report which should be fixed in the next release. The bug report is here: https://issues.civicrm.org/jira/browse/CRM-17485

It's the participant role filter that is causing the problem. If you de-select the participant role, you should see all the participants. Depending on what else you need from the report, you might be better off using the 'Event Participant Report (List)' report.


Advice on structuring tuition payment plans. Membership? Contribution? I have an annual tuition total that some parents pay in one installment, some in two, and some in 10 monthly payments. This past year, we set it up as a pledge that parents worked towards with contributions on a contribution page, but as I set up for next year I think it might be more effectively tracked through CiviMember, perhaps with price-sets? I would also like to be able to use the CiviDiscount extension in the tuition payments, and have some way of allowing parents to contribute to a scholarship fund on the same page.

Does CiviMember allow payments on an installment plan?
Does CiviDiscount work with the above answer?
What setup would you recommend for this use case?

Have a read of this one flexible membership billing where Ramesh suggests using different membership types to accommodate the various payment options.


Why are edits not saved on custom field profile? Drupal 7.41
Civi 4.6.9

I've inherited this site recently and see an issue with custom field profiles that I haven't seen before.

Custom field set is tied to contacts with corresponding profile.

When editing the custom field set from the contact page, edits are saved correctly.

However, when I edit them from the profile, nothing is saved.

There are no errors that I can see in any logs.

I've cleared the templates_c folder to no avail.

All users have access all custom data permission.

After more research, if I add a built-in Civi field (like last name) to the profile and edit it, the last name edit is saved but no custom field data is saved.

Any ideas?

In this case the error was due to contacts that were tied to disabled sub-types.

They had created a few sub-types some time ago, added individuals of that type and then disabled the sub-type.

Once I enabled them, they were able to edit using the custom field profiles.

Since they weren't using them, I created a profile to bulk edit their sub-type and pretty quickly cleaned things up.


What organizations use CiviCRM? Okay...call me blind, but I can't find a list anywhere of who is using CiviCRM. I know it exists somewhere (or at least an outdated form of it). Can anyone help me...?

I've seen the page you're talking about, but I don't think it survived the website redesign. Here is a list of CiviCRM Members though, which has the more high-profile names you're probably searching for: https://civicrm.org/members


Sign up for multiple events, get a discount What is the best way to set it up so that people can register for multiple events all at once and get a discount for doing so? Say they are taking 5 trainings that are normally $100/ea and you want to allow them to sign up for all 5 at once and it only be $450?

Using Drupal 7, Civi 5.17.5

Since you are on Drupal, you can create a webform. (You'll need the webform_civicrm module)
Enable 5 event options. Configure each event to be one of your events. Enable the participant fee field and set the price to $100.
Create a conditional
If event 1 and event 2 and event 3 and 4 and 5 are selected then price fields are set to 90.
Enable a contribution form for online payment.


Automated soft credits based on rules Since I started using CiviCRM about 5 years ago I've thought one of the biggest problem areas was related to tracking and searching for contributions based on household, which is generally how non-profit contributions should be tracked. It's been the source of many struggles at 2 or 3 orgs I have been associated with during this time.

Soft credits have helped to some degree, but require consistent and mistake-free work. A possibly very useful solution occurred to me last night - what if any time an individual makes a contribution it automatically soft-credited the household they are a member of?

Ideally it could be turned off and on and have the ability to control based on financial type.

Thoughts?

Here is an extension that automatically creates a soft credit. I use it with my org and it works great. I'm running 4.7.2 with drupal 7.

https://github.com/PalanteJon/coop.palantetech.module.automaticsoftcredit


Exporting data (users) into another location? is there a way to automatically export a file (with contacts information) outside of the CiviCRM installation to another location?
I'm using CiviCRM on Drupal and before looking at Drupal's side, I'm wondering if this is possible with CiviCRM.
I want to connect to a Wordpress site to create users.
Any experience?

You can achieve this using Drupal + views, and can include all the necessary fields of the contact.
From Civi you can use Civi reports and download them as csv using reset=1&output=csv&force=1 in url.
Could also use getrows for reporttemplate entity rest api
You may need to check with user permission on both the options.
HTH
Pradeep


I've inherited old CiviCRM data from a Drupal install - how do I get upgraded and running in Wordpress? I am running Wordpress 4.2.1, with CiviCRM 4.5.6. Everything works for my fresh install of CiviCRM.

Now, I am chair of a political organization, and I got the old data for my county from an ex-member who ran CiviCRM under Drupal, but I don't know what version of CiviCRM he used a few years back (I think it was around 2011).  I have imported the data into mysql as dbname "civicrm_original" and the current running config is "civicrm".

I tried to swap out the data connection string to use the "civicrm_original" database then ran the command:
http://<your_wordpress_home>wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

but then CiviCRM wouldn't run and it had errors like crazy, like fields not in tables and other tables not existing. So now i switched back the dataconnection to "civicrm" and we are running again, just not with all the old data.

1) how can I find out what version that database was?
2) how can I update the imported database to work with my current config?

I would be willing to update to the latest version of CiviCRM if need be.  or, would it be easier to copy the data over to the new database? I know the contacts table has new fields that aren't in my "original" db.

If you look in the database, check the civicrm_domain table and see if there is a value in the version field. (If there is more than one record in this table, you are dealing with a multi-site).

Just guessing, but one problem you may run into is that the original database wasn't on Wordpress. Do you know what CMS it was running on?

(e.g. Drupal upgrades support all the way back to v2.2, but Wordpress upgrades start with v4.1.)

So one approach would be to set up Drupal on a development server, upgrade CiviCRM on this Drupal installation, and then move the updated CiviCRM database to Wordpress as outlined in this StackExchange Q&A.


How do I batch update a standard custom field for event participants? I have lots of profiles which allow me to batch update records. All of the profiles show as an option when I have used a normal contact search to identify individuals. However, when I search for event participants very few batch update profiles are available. The Civibook says: If you wish to update participant fields, you must do the update from a Find Participants search (and only include participant fields in your profile).

The fields I want to update for event participants are normal custom fields which weren't created for or linked to a specific event. Is it possible to include these fields in a profile which then shows up as an option when I choose Batch Update for event participants? (I tried to add some of these fields to a current profile which showed up for event participants but after I'd added them the profile disappeared from the list!)

My current workaround is to select event participants, create a new smart group and then use that smart group with my multiple batch update profiles. It's fine but adds another layer of work when dealing with tens of different events. Many thanks.

From the description of your custom fields as "normal custom fields" and your current workaround, it seems that the fields you want to update are contact custom fields rather than participant custom fields.

If that is so, then do an Advanced Search specifying criteria in the Events section rather than a Find Participants search. On the results page you will have the option to Batch Update via Profiles. Select that option and all your profiles should appear in the selection list.


What is the best way to add a contact to existing membership using relationships? I'm having trouble with adding additional contacts to memberships (CiviMember). The goal is to add spouse, partner, sibling, etc. to an existing membership. The membership type is our own custom type, Household (not the contact type), and I guess I should have set a relationship type when I created it. I can't change the relationship type now; the UI blocks this since the type is in use.

The book's description for this is extremely terse and I can't understand how relationship type works, I have no idea what to expect, it's all cut-and-try. A working example would be great if one exists somewhere.

From your description it sounds like you want to have a membership type that applies to a household and which subsequently applies to any individual with a given relationship to that household (probably the "Household Member is" relationship).

To make this work it needs to be set up before you have any memberships in your database. As soon as one of these memberships is applied to a contact, you can't then change the relationship element of the membership type.

From your question it sounds like this is where you are: you've created the membership type but not set the relationship, and then you have created a membership for one or more contacts and so can't now edit the relationship settings for the membership type.

How to get round this? One option that might be workable subject to the volume of memberships that you might need to edit could be as follows:

Create a new membership type that matches the settings of your current membership type, but add in to it the required relationship setting.

Then you could go through each of your contacts that has one of the original memberships, and edit it to remove the original membership and add the new membership (the one with the relationship setting in place).

Then any related contacts would automatically have the membership applied via that relationship. As I say this approach could be workable if you don't have too many records with the old membership, otherwise it might not be a sensible manual task, and an alternative approach, such as manipulating the database directly, or via the aPI, might be more suitable.

To add a relationship setting to your membership type, you need to decide which relationship is the right one. This is not necessarily intuitive, but depending on the version of CiviCRM you are running, there may be a useful pop-up help window when you click the question mark icon.

It reads:

"Use this field to configure Membership Types where memberships are automatically granted to related contacts. Examples:

Relationship Type: 'Household Member is'

Direct member is: a household

Membership is automatically granted to: 'Household Members' of that household"

I think that might fit your particular requirement. If required you can also optionally set a maximum to the number of these related memberships that are allowed. For a household this might not be particularly relevant, but is often useful when the direct member is an organisation.


How to add a drop down with option groups and option values? I planning to add a drop down button with option groups and option values.

This is my code

$form->add('select', 'a', ts('a'),
            array(
              '1' => ts('value 1'),
              '2' => ts('value 2')
              )
            );

Is there any efficient method to do it? Also i want to capture the option value and save it to a variable in order to save it in the database. I have tried $form->getvalue('a'), but didn't work. Much appreciate if someone could help me to solve this.

If it's a setting for your extension, then take a look at the settings framework: https://docs.civicrm.org/dev/en/latest/framework/setting/#creating-a-new-setting-in-an-extension

If you're modifying a form, then you can get the value when the person submits the form using hook_postProcess: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postProcess. One way it to use $form->_submitValues which is an array.


Is civi automatically adding recurrence to contributions? We've had a really high number of recurring contributions this month. I started becoming worried because some of the amounts are quite high. Doing some digging, it appears that everyone who used paypal to register in the past month has a recurring contribution set. I tried to run a test, but the payment wouldn't go through (for some reason civi is deleting the "sandbox" portion of the URL when I click save. Any idea what's happening there?) In any case, the test appears to have recurrence turned on even though I didn't opt for a recurring payment.

Could this be an issue with our payment settings? Or is there a bug in civi? This bug runs a serious risk of breaking our trust with our members.

We changed over to paypal pro at the beginning of the month, so it really seems that this issue is tied to that change. Credit cards entered on the back-end aren't coming up as recurring, but it appears every single transaction entered on the front end includes recurrence. There's no way 100% of users selected this option. As mentioned, my test appears to confirm this, even though I couldn't complete the payment.

We are running Wordpress 4.5.1 and CiviCrm 4.7.6.

There was an issue that sounds very much like what you are describing (https://issues.civicrm.org/jira/browse/CRM-18277 that is marked as having been fixed as of 4.7.8), but I think you are saying that beyond the source of the first installment, there were actual recurring contribution records created and listed at the bottom of the contributions tab of a given contact that you then are not able to cancel? If that is the case, I would suggest opening a ticket on JIRA - I haven't seen any tickets in this regards.


How to modify Relationships column display? This is a new launch for an old question, see here and here.
We want to modify the columns that are shown in the relationships result display and especially replace city and state/county rows by job title.
Is this something we can now set in admin or do we need to create custom templates? We identified /CRM/Contact/Page/View/RelationshipSelector.tpl for example and are still looking for the body template.
Should we follow on this way?

Take a look at Coleman's searchkit & formbuilder video to see how to create a relationships display.


New Install Civi 5.4.0 getting Uncaught Symfony Rename Error and Blank Screen I installed CiviCRM 5.4.0 locally under both Apache and IIS 6 (PHP 7.0) and did not get this error, but the every time I try to installing it using shared hosting (Everleap - IIS 8, PHP 7.0) the install fails with:

Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "C:\home\site\wwwroot\wp-content\uploads\civicrm\templates_c\Cac3AA.tmp" to "C:\home\site\wwwroot/wp-content/uploads\civicrm\templates_c/CachedCiviContainer.e5d039483e5b5fef124d645e968cad32.php"

Now, I can verify that the file exists (Cac3AA.tmp) in the templates_c folder, so I know the install process created that file (has write access to the folder).  However, the rename fails.  Anyone see that before?

Problem resolved.  The bug is in fact that the PHP rename function running on Windows Server can't handle a double slash (\\) in the path name.  I made three changes (so far).

Symfony - Filesystem.php line 272
        if (true !== @rename(str_replace(array("\\\\", "\\/"), "\\", $origin), str_replace(array("\\\\", "\\/"), "\\", $target))) {

Smarty.class.php line 1253
       $_smarty_compile_path = str_replace(array("\\\\", "\\/"), "\\", $this->_get_compile_path($resource_name));

Smarty - core.write_file.php line 45
        @rename(str_replace(array("\\\\", "\\/"), "\\", $_tmp_file), str_replace(array("\\\\", "\\/"), "\\", $params['filename']));


How do I display a list of civicrm events on a separate wordpress site? Our CiviCRM site is using Drupal but i have another site on a separate server that uses Wordpress that i want to display the event information with links to the other site for registration. I explored using a view to display RSS feeds and using a feeds plugin on the Wordpress site to propagate the info but that didn't seem like a very easy solution.

The Drupal Views + RSS feed solution sounds reasonable to me! There's lots of great support for generating RSS feeds in Drupal and we've had some good successes with that methodology.


CiviCRM on Drupal begins Install and then reverts to "Page not Found" The Title pretty much sums it up. 2 databases, each is correct, I'm running on a Bluehost dedicated server. It has it's own Cpanel account for static IP and SSL (eventually). But first I have to get it installed.
The installer runs for 30-40 seconds and then goes to: "The requested page "/sites/all/modules/civicrm/install/index.php" could not be found."
Does anyone have any ideas????

Check to be absolutely sure you've got CiviCRM installed to sites/all/modules/civicrm.

Also check that you aren't getting bounced from host A to host B, or from http to https, during the installation.

If that doesn't work, watch the PHP error log and webserver access log during the installation; that may show you what's not otherwise obvious.