Merging two contacts I am looking to merge two contacts together as they are duplicate records. I want to ensure all the tags, groups and contributions all carry over too. I just want to do this on an individual record and not merge an entire group of contacts. i have looked at the 'Find and merge duplicate contacts' tab, however that seem to be only for groups.
Does anyone know how to do this for one person who has two records please?

Thanks,

Grace

To merge 2 contact records, select both contacts from a list then select the action 'Merge contacts' from the 'Actions' drop down.  In the resulting screen you will see there are several options that you can check/uncheck - one of the most useful ones is the option near the top of the screen to 'flip' the 2 contacts - the left hand one is regarded as the duplicate.  Also, the deleted record goes in the trash so if you make a mistake you can always retrieve it.


Is there a way to update CiviCRM through the Drupal Admin/Modules panel? This is getting so frustrating!  It is a real PITA to update CiviCRM every single time there is an update.

We use several extensions.  According to the documentation, I have to disable each extension (which you can't do in bulk, you have to disable them one at a time), back up the database, make a copy of the site, delete all CiviCRM files, download the update, unpack it twice (.gz and then .tar), upload it to the hosting provider, run the update script, figure out why the system still thinks it it's in update mode (causing many things to not work!), re-enable each extension individually, then try to find out why this stupid unserialize error at line 153 keeps popping up (I have yet to figure out what table is causing this, but I have determined it does have something to do with the database, I even downloaded an extension that is supposed to tell me, but I can't seem to get it to work).

We are on a shared hosting plan (non-profit so cheap cheap cheap), so sometimes the admin side is painfully slow and it is not unusual for it take 4 hours or more to do a simple update that should be able to happen like updating any other module through the Drupal panel and take about 15-20 minutes.

Is it every going to happen this way, or will I always have to do this manually?

Thanks.

I feel your pain.

There is no way to do it through the modules panel.

However, I believe the instructions you are following are unnecessarily complex. What we do is back up, then delete the civicrm directory, upload the new version and then run the update script. We don't bother disabling and enabling extensions. We use maintenance mode if it's during working time - you don't need to unless you expect people to try and use the system during the upgrade.

To be fair we do have a test system that we do it on first. But we have not had any trouble (sometimes things don't work after upgrade but this has always turned out to be the result of bugs rather than anything we did), and in any case you are already backing up first so if something did go wrong you could restore.

I think this is quite a common approach, see for example https://civicrm.stackexchange.com/a/11436/465

As for the error that you say appears after upgrade - usually one or two clears of the drupal cache will fix such things http://www.inmotionhosting.com/support/edu/drupal-7/configure-caching/clear-caching


How do I search for CiviDiscount code redeemed (to allow an action on those contacts) We've got CiviDiscount working to apply the appropriate discounts for memberships and events, but would like to be able to add all contacts that have used a discount to a report (for our sponsors) or smart group.  When I go to the CiviDiscount page, I can see the list of contacts who've redeemed each code, but would like to be able to search and act on that information.  So I guess my question is how can I add a Custom search for codes redeemed?

We have made a participants view in Drupal that shows all event participants who have redeemed a code. We can then add them to a group for use in further searches in Civi.

I don't know how you would do this with a smart group, but at least this might get you part of the way.

We'll be doing a similar thing for memberships in due course, if that's possible.

To do this you need:
Drupal, Civicrm entity (ours is beta9), and turn on the sub module: civicrm_entity_actions as Pete mentions in the comments to the first answer here: How to configure Views VBO action to disable relationships?
You also need Views Bulk Operations

The participant view needs to have this relationship: CiviCRM Contributions: Contact Record ID

The view also needs to have an exposed filter of the Participants fee level field. (NB, don't confuse this with the Events Fee level or the Contribution Amount label fields. They won't produce the same results).

Then you can filter your view by keywords from your codes.

Add the field, (CiviCRM Contact, with custom fields) Bulk operations: CiviCRM Contact. Note this will need a relationship to Civicrm Contact. Initially it won't give you the option to add a group, but after saving the field and then re-editing it you will see Add contact to group as an option.

You will have had to previously made a suitable group in Civi.

Et Voila! Now you can bulk add participants who've used your code to your group.

I can send you an export of the view if that's helpful. Good luck!

NB: it might be helpful to know that the Contributions: Amount label field will work fine for this purpose for online event bookings. But bookings taken through the admin interface may not contain the discount code in the Amount label field.


Set Hidden Field Value on Webform Connected to CiviCRM on Submit I want to set a value on a field in a CiviCRM webform only when the form is submitted and not when saved as draft. The field is a CiviCRM field that appears in the webform but is not shown to the user.

The reason is I want to allow users to access and edit the information in the webform, but find a way of preventing them from accessing/editing the form once it has been "submitted".  So I had created a yes/no field in Civi which I could set to yes when they submit the form and then prevent them from accessing the form if the value for the field was yes.

I was trying to set the value of the field using hook_webform_submission_presave but kept on getting errors. Not sure if this was because the form is split up into several pages and is using the "Save Draft" functionality. I'm not sure also if this is the right approach for CiviCRM enabled webforms.

This webform could be for either creating a new CiviCase record or editing an existing one.

Am open to suggestions of any other ways of preventing users from accessing the form after they have already submitted it.

I am using CiviCRM 5.3.1 with Drupal 7.59.

I managed to get this to work by creating a custom text field in Civi. I then included this text field in the webform as a hidden component and set a default value. This value then gets set (for the text field) only when the form is submitted. I can then test the field to see if it has the set value or not and use this to hide or block the webform from the user.


SMTP connection failing problem Just want to throw this question here so the answers can be easily found by people who met similar problems.

Problem came up when we were trying to test some new mailing services with CiviCRM 4.7, we kept getting "connection refused" errors and other similar messages with different protocols and ports entered in outbound mail settings.

The environment we have: Ubuntu 14.04, php 5.6, Drupal 7.3.x, CiviCRM 4.7.x.

PHP5.6 has enabled peer verification by default from 5.6.x. The most likely cause of this issue is that the SMTP server's SSL cert does not validate against the certs available to the hosting environment.

So, on PHP5.6+, an SMTP connection via SSL and TLS will fail in CiviCRM if the certificates are not peer verified. This is an issue either with the SMTP provider or your hosting environment's CA chain.

It is recommended instead to resolve the underlying issues with your hosting/SMTP service, but if you want to connect to a server with a self signed certificate (for example) you can patch CiviCRM to bypass this verification.

Change in packages/Net/SMTP.php

line $this->_socket_options = $socket_options;

to $this->_socket_options = array('ssl' => array('verify_peer_name' => false));

Updated: I have updated the comment here since the summary in the ref link has also been updated to include:

  While not recommended in general, it is possible to disable peer certificate verification for a request by setting the verify_peer context option to FALSE, and to disable peer name validation by setting the verify_peer_name context option to FALSE.

The above works around the problem with SMTP failure however it is better to ensure the server is set up with valid SSL certificate and configurations.


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

There are several answers to this; I'll give you three!  Use whichever works best for you.
Note that I originally thought that either Summary Fields or Event Count custom search extensions would be part of this solution, but neither can count only events in the last 12 months without modification.
Easy, best for now
Search for active members.  Add them to a group.  Run the event report, filtering by the Active Member group.  If you need to run this report regularly, the Active Member group should be a smart group.
Coming soon
There's an alpha version of the Search overhaul that ships (disabled and hidden) in CiviCRM 5.28 (which released three days ago).  This will allow doing searches like you describe in a single search pretty easily.


Drupal Webform CiviCRM Warning message When my Drupal CiviCRM Webform is filled out and submitted, the CiviCRM database appears to be updated correctly. That is, a new contact is created with all the proper information included from the form. The Webform confirmation page announces: "Thank you, your submission has been received." However, a red error box also appears that says:

"Warning: implode(): Invalid arguments passed in CRM_Core_BAO_CustomGroup::postProcess() (line 1551 of /home/mywebsite/www/crm/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php)."

Any idea what this means and how to get rid of the error message?

Drupal 7, CiviCRM 5.14.1

That's just a notice -> best to hide all notices and errors on a production site:

go to your:
admin/config/development/logging

and set the radio button to:
None


CiviXero - what's the status? I'm looking to hear from users of Eileen's excellent CiviXero extension!

1) Do you have any active bugs with CiviXero? Instances of data not being updated in Xero or Civi when they should be?

2) Is there anything that you need CiviXero to do which it currently can't?

3) Any problems associated with high volumes of transactions?

4) Does anyone know 100% for sure that it works with Membership purchases and renewals?

5) Does this work on a "batch" system for insertion and retrieval? (I see nz.co.fuzion.civixero/CRM/Civixero/Job/job.mgd.php, usually for scheduled jobs right?). If so, are there throttling settings (I can't see any in nz.co.fuzion.civixero/settings/Civixero.setting.php)?

Thanks - I really do appreciate all responses!

The Issue list for the extension is at https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/issues and is the logical place for 1) bug reports, 2) feature requests, 3) bug reports re: performance, 4) feature requests/bug reports re membership purchases. You can probably also use that issue queue to ask 5) about how it is implemented, or even better, offer to update the documentation if provided with that answer.


How do I run a report for an event How do I run a report on an event that includes things such as participant name, email and organisation they are from?

The best approach depends on what you intend to do with the list, but generally speaking you'll use the Reports menu as follows:

In the CiviCRM menu, click Reports menu » Event Reports.
Select Attendee List.
Click the Columns tab.  Check the box next to Email and Current Employer (and anything else you need).
Click the Filters tab.  In the Event box, select the event(s) you want a report on.
Click the View Results (or Refresh Results if you already pressed it once).


CiviCRM on Backdrop - Oops incorrect Drupal version Oracle VM
Linux Mint 20.1 Ulyssa
LAMP through Mint
Backdrop v1.18.1
CiviCRM 5.35.1 for Backdrop
I go to http://localhost and get Backdrop just fine.
I go to http://localhost/modules/civicrm/install/index.php and get "Oops! Incorrect CiviCRM version ... can only be used for Drupal version of CiviCRM".
I downloaded CiviCRM 5.35.1 for Backdrop three times, extracted, placed folder into modules and get that same message.
Clearly it is installed correctly or I wouldn't be getting that message. Perhaps the Backdropcms version and the CiviCRM version are not compatible?
/module/civicrm/README.md says it is good for Drupal, Wordpress and Joomla.
but
/module/civicrm/install/index.php line 67 says acceptable are "drupal, wordpress, backdrop"
Any help would be appreciated. Thanks in advance.
John in Medford, Oregon

Giving credit to Laryn, but not sure how to do that other than this.
Key point: http://localhost/modules/civicrm/install/index.php?civicrm_install_type=backdrop – Laryn - CEDC.org 22 hours ago


Price Set with a conditional 'Other' field I have scanned the issue queue for any questions related to mine, and have come up empty, but apologies if there is another issue that I missed that would render this redundant!

I have a client organization that takes in money from event registrations. They would ideally like to have ~4-5 set pricing options as radio buttons for users to choose from, that would also include an 'Other' option which would allow the user to manually enter the amount they would prefer to contribute to the event, if not otherwise listed.

Now, while I know that this is certainly possible on Contribution pages, no such capability seems to exist within the Event page fee options, nor within Price Set options. Is there something that I am missing here, or is it really not possible to have an array of radio buttons to select a contribution amount for an event that includes an 'other' option?

You can create an option in the event fees for 'Other' with a price value 0. Then create another price field with the type 'Text / Numeric Quantity' and a price of 1. Some other things you may want to consider with this method:

Hide prices in the field setup and put them in the line item descriptions. This avoids the user seeing the $0 amount on the 'Other' option.
In the 'Other' line item description you may want to add something like 'Enter amount below'
With some simple jQuery you can hide the other amount field unless the 'Other' option is selected.

Hope this helps...


Why does the Constituent Summary & Detail reports contain deleted contacts? (or, how to remove them?) The constituent summary & constituent detail reports both contain deleted contacts - this is 4.7.21 (and 4.7.23) under Drupal.  I verified the problem on this demo site.  This doesn't seem right to me - is this a bug or WAD? Either way, any advice on how to remove them from these reports? If a bug I will report it, of course, but I wonder whether I'm missing something obvious here!

I think the answer is that the contacts probably haven't been deleted but are in Trash.  You can search for deleted contacts in Advanced Search>Search Settings where you'll see a box labeled "Search in Trash".  On completion of the search, click on Actions and they can be deleted permanently there.  They will probably not then appear in your reports.


Running Cron scheduled jobs - Wordpress Not a question so much as an answer. After installing Civi 4.7.6 under WP, I tried running all scheduled jobs using: easyCron, Cron (through CPanel) with wp-cli, cron.php, and from commandline  curl, php...wp-cli, php...cron.php.  Finally I was successful running all jobs using URL 'https://mysite.com/wp-content/plugins/civicrm/civicrm/bin/cron.php?user=adminuser&password=mypwd&key=sitekeyfromcivicrmsettings
I had to move civicrm.settings.php to wp-content/plugins/civicrm - the install had placed it under wp-content/plugins/uploads/civicrm.   Some errors I got when trying to run as an actual cron job (putting it into crontab) referred to 'not finding default/civicrm.settings..' which sounds to me like a Drupal-oriented message, since that's where Drupal civicrm.settings.php go but not Wordpress.
HTH someone else.

I had verified by running php -v (after shelling in) that (cli) was supposedly enabled but I could not submit a cron job using wp-cli.  I tried using curl, but got "Protocol http or https not supported or disabled in libcurl".  I didn't fare well with easyCron - I felt uneasy supplying my pswd there; but after seeing jobs tagged with 200 ('succeeded') in logs, my installation didn't reflect that.  One important bit of information - this site isn't live yet, so I am pointing to it via my Hosts file. But I have to verify that stuff works BEFORE go-live.
So, from where I stand, using the URL method seemed to be the one workable method.
(also, I could run it locally and debug it!)


Primary Emails not Being seen as primary I have an a bunch of organizations we imported via csv. The email addresses are checked under the contacts summary as 'primary'. However they are not receiving emails and reminders and in search results no email is showing. If I go into the record and click on the email section and then click 'save' the email is then seen as primary.

I am wondering if there is a way to fix this in bulk. It's not that many records (approximately 200-300). Any suggestions would be great.

CiviCRM 4.7.27 with WordPress 4.9.5

Thanks

I found a solution to this using the 'Update Multiple Contacts' feature. Here are the details:

I created a profile to be used for search views that contained the Org name and Email (main).
From search results I selected the Org that the primary email was not showing and selected 'Update Multiple Contacts' from the action menu.
I  selected my newly created profile for updating email.
When the update screen loaded I just hit the update button and this updated the main emails to be primary.

Since this was a relatively small amount of records this solution was manageable. Probably not the best solution for a larger amount of records.


Which SMTP relay to replace Mandrill as mandrill have just announced they are becoming an add-on to mailchimp, and transactional email service will be attached to a subscription to MailChimp.
And as my provider mail service drop all bounces, I have to fall back on other solutions that can be integrated properly with CiviMail.
What are solutions (free or very little expensive because we are a very small structure) that would send 600 messages per month maximum (Google, Zoho, ...)?

Thank you for your help.

This conversation has been taking place on the CiviCRM Partners' list in the past week.  Fortunately, some folks from the list created a wiki page to track the best options, which is available here: Mailing Providers.

I like Amazon SES, which termdark referenced (I'm the author of that documentation they linked).  However, CiviCRM partners with much larger installations don't like it because it lacks some high-end features (e.g. sub-accounting) and because they can vary their throttling.

If you're only sending 600 messages/month, you can probably use your web host's SMTP servers.  If you're on a VPS, you can set up Posfix yourself - you're unlikely to get blacklisted with such a low volume if you configure it right, and being able to configure Postfix is an important part of how to set up Amazon SES.

EDIT: There's a lot of interest amongst the partners in SparkPost.  They offer 100,000 free messages a month, and support many of the high-end features.  There's also an extension under development by the folks at CiviDesk to use the more efficient (and easier to set up) API for bounce handling.


CiviCRM mail sent 200% of intended recipients. Why? It is CiviCRM 4.6.14. The mailing was scheduled via the api as per this stackexchange question.

It appears to have sent all the messages twice. Any ideas why? See report.

Check under-the-hood. If the "execute query" was double clicked, could that have caused this?


Upgrade MySQL to v5.7+ I have a message in my installation as follows: "To prepare for CiviCRM v5.34+, please upgrade MySQL. The recommended version will be MySQL v5.7+ or MariaDB v10.1+."
My site is hosted on Siteground. They said I can't upgrade to MySql 5.7+ at the moment, but will be able to do so soon. I currently have this version of MySql: Server version: 5.6.40-84.0-log - Percona Server (GPL), Release 84.0, Revision 47234b3
What will happen if Civi upgrades to 5.34+ before I can upgrade to MySQL 5.7+.
Thank you.

5.34 is 6 months from now. So it depends what siteground means by "soon" :)


Contact Layout Editor menu item not available I installed the new Contact Layout Editor extension, but I am not finding the new menu item, which should be at Administer / Customize Data and Screens.

Joomla 3.8.12
Civi 5.5.1

(Aside: in this process, I discovered that the extension created a new SQL table as MyISAM, which threw a warning in Civi. Easy enough to change the table to InnoDB, but it seems like a new extension should be using InnoDB by default. See https://github.com/civicrm/org.civicrm.contactlayout/issues/14. Fixing the engine did not solve the problem of the missing menu.)

I had the same problem but fixed it - the problem was that I didn't have the pre requisites installed before installing the extension. One of them I installed afterwards. So, I disabled then uninstalled the contact layout extension, then re-installed it.  Then the menu item appeared as 'Contact Summary Layouts' as the last item on the 'Customise Data and Screens' menu.


Why is WP displaying a shortcode to end users upon profile submission? I have a profile form that logged-in users can fill in. When the form is submitted what should happen, as far as I'm aware, is the profile should get redisplayed along with a message to confirm to the user that their contact information has been submitted.
What is actually happening is that the user is shown the page with just the shortcode displayed - [civicrm component=”profile” mode=”edit” gid=”28″] - and no confirmation message.
The URL is https://example.com/application-form/?civiwp=CiviCRM&q=civicrm%2Fprofile%2Fview&reset=1&id=102&gid=28
Nothing in the browser console.
WP: 5.5.3, Civi: 5.31.1.

In my experience with using profiles on Wordpress sites, where the profile is presented via a shortcode, is that when the form is submitted the user does not get presented with the default text statement alluded to in the help message about their contact information having been submitted, but is instead just presented with the page again. Worse than this, the profile isn't shown to the user, but they see the shortcode in all its ugly unhelpfulness.
The workaround that I've implemented is to ensure in the profile settings that a redirect URL is set, pointing to a nice thank-you page.


Manually started scheduled email not completing I started a mailing yesterday using Administer->System Settings->Scheduled Jobs->Send Scheduled Mailings->More->Execute Now.  The job started and sent about 5000 of 7000 emails but then seemed to hang.  Over 2000 remain unsent, and the job log shows "Started..." but not "Finished...", and the status of the job is "Running."  It's been more than a day since I started the job.  Any idea what's going on?

Do you have a cron job configured for CiviCRM that runs periodically?

Can you check CiviCRM and/or Apache Error log for any errors?

Scheduled Mailing jobs are executed in batches of 1000 or the batch limit specified under Administer >> CiviMail >> Mailer Settings.

If the recent Schedule job log says 'Started' then the last job was terminated because of error. This might be for several reasons like php time out, memory allocation, mysql connection time out, DB errors etc. To trace the problem you will need to check CiviCRM and Apache logs to see if any errors were recorded.

To complete the job you can re run the Send Scheduled Mailings manually if your system is not configured to do it automatically.


Can I link memberships to relationships automatically? I'm using CiviCRM to manage sponsors of children in India for an NGO. I'm configured it and set up some custom fields in order to have the children(contact) connected to the membership.

So far so good, I can generate reports to see payments due, etc.

The problem is, I can not work the other way around, that is, seeing which children don't have sponsors.

My guess to solve this was to use Relationships, as I could then report and filter on that. But I've not been able to automatically create a relationship between sponsor-child when adding the membership. (doing it manually would be really tiring for the people who manage this).

Is it possible?
Any other ideas on how I could go about this?

thanks in advance

You can set type of relationship to be used for a membership type. So when a membership is purchased the contact will have relationship with the organization automatically and also will be set to inactive when membership is expired or cancelled.

You can also check documentation for more information at https://docs.civicrm.org/user/en/latest/membership/defining-memberships/ (search keyword - Relationship Type)


Error Deleting memberships I am running CiviCRM 5.20.1 with WordPress 5.3.2. We have decided to redefine a membership type (actually an annual recertification) and I needed to delete the current members before I upload a sanitized version of the data (error free and more complete data).

I originally posted this question believing the memberships had not be deleted. They were. It would still be nice to fix this appearance of a problem.

Anyway, I am getting the following error when I delete the current members:

 Notice: Undefined offset: 1260 in
 **/home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Member/BAO/Membership.php** on line **632**

 **Fatal error:** Uncaught Error: Call to a member function delete() on
 null in /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Member/BAO/Membership.php:664

Stack trace:
#0 /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Member/BAO/Membership.php(613): CRM_Member_BAO_Membership::deleteMembership('1260', false)
#1 /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Member/Form/Task/Delete.php(83): CRM_Member_BAO_Membership::del('1260')
#2 /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(495): CRM_Member_Form_Task_Delete->postProcess()
#3 /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Done.php(75): CRM_Core_Form->mainProcess()
#4 /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Done->perform(Object(CRM_Member_Form_Task_Delete), 'done')
#5 /home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Pa

in **/home/websiteweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Member/BAO/Membership.php** on line **664** There has been a critical error on your website. Please check your site admin email inbox for instructions.

 Learn more about debugging in WordPress.

I've looked at the lines in question, but I don't see (or understand) the problem. Any suggestions to move this project forward?

The error is happening in the deleteMembership function, and the error says: you're trying to execute the method "delete" on an empty (i.e. null) object. The object that is "null" is expected to be a membership object.

That suggests that the code might have been running two copies in parallel - e.g. perhaps you clicked twice on the delete button (would not be difficult, since you're trying to do a mass delete on a lot of memberships).


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

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

{contact.last_name}{, }{contact.first_name}{ }{contact.contact_id}

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

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

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

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

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

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

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


CiviCRM Multi-day Events + Drupal Calendar + Views How can I show CiviCRM Multi-day events on drupal calendar module (Not fullcalendar), civicrm Entity module and views in drupal 7 ?

I am trying to achieve something like this: https://www.drupal.org/files/images/civicrm_events_calendar.png

Thanks in advance!!

This is available as a CiviCRM extension.

Under the administer tab, click "customise data and screens". You should see a "manage extensions" link - hit that.

In the extensions manager, click on "add new". Look in that list for the calendar, then install it!

If it‘s not in that list for you then please post back including your civi version.


In Rules Fetch Contact Entity from Tag Creation I am trying to fetch the contact entity in a rule which triggers when a specific tag is added to that contact. I seem to be able to load and fetch the Drupal user for the contact but not the actual contact entity itself.

Is there a way for me to fetch the contact entity when a certain tag is added?

I want to fetch the contact entity so I can then delete it, using entity delete action in rules.

Ultimately I am using Webform for this which will add the tag which triggers the rule.

I know this sounds a bit dangerous but I hope to put some safeguards in place to prevent anyone with access to the webform deleting any contacts!

EDIT to Clarify:

I am trying to build the ability to delete a contact in CiviCRM using a webform in Drupal.

The way I wanted to do it, was that a CiviCRM contact with a Drupal user account logs into Drupal where they can see a list of all employees for the same organisation that they are employed by (I have done this part). I then want to give the logged in contact the ability to delete other employees of the organisation that they can see listed.

I have already managed to give logged in users the ability to create new contacts for their organisation with an option to create a Drupal account for the new contact as well.

I added the ability for logged in users to create new contacts, as well as a Drupal account, by following the very clear and helpful steps given in How can I create a Drupal user when someone submits a CiviCRM-Webform?

This method above, involved adding a tag to a contact which then triggers the add Drupal account rule. I was thinking to use the same method of adding a tag to a contact to trigger the delete contact rule. however, I can't seem to fetch the contact as an entity within the rule in order to delete the entity.

I am using Drupal 7.58 with CiviCRM 4.7.28.

You'll need the module CiviCRM Entity installed. https://drupal.org/project/civicrm_entity
You will also need the Webform Rules module https://drupal.org/project/webform_rules

What you could do is add a checkbox for each contact that can be deleted to the webform, could just be a regular Webform component.

Then respond to the submission of that webform with a Rule.

In the submission data, there will be a value for the checkbox you add. If it is checked, then load the contact by cid, it will also be there in the submission data.

With CiviCRM Entity, CiviCRM entities like contact, become proper Drupal entity types, in this case civicrm_contact is the entity type. You can then use the regular "Delete an entity" Rules action.

Before you delete the contact, you will have to load it first. There is a Rules action, "Fetch entity by id", use this, and pass it the contact id you get from the webform submission data.


Changing a recurring contribution with multiple line items CiviCRM 4.7.22
WordPress 4.8.1
iATSPayments

I am not sure if this should be asked in this exchange or the iATS github.

We have a donor with a recurring donation that was $125 a month, with $50 for Line Item 1, $50 for Line Item 2, and $25 for Line Item 3. Several months ago they wanted to make it $50 for all three funds. So they went into their recurring contribution and edited it to be $150 instead of $125. Since then, it is processing it at $150 but it is not changing the Line Item Table to show $50 for each fund.

I thought that it used to just look at the previous contribution for the Line Item info. So I edited the line item table with $50 for each fund. But it continues to do the next recurring as $50, $50, $25.

I also changed the Invoice Id in the recurring table (see screenshot) to a contribution that I had edited. Thinking that it must look at that invoice id for future recurring details. But it still processes $50, $50, $25.

Any ideas where it refers to for a template to populate recurring Line Items? How can I make this work correctly from here forward?

Can I change the start date to the date of a correct donation? Does it use the first contribution as the template?

The 1.6.x branch of the iATS extension is using contribution repeattransaction API -> to get the details of the contribution and its line items that need to be repeated;

If a recurring contribution has lineItems associated with it - we don't allow updating it in the GUI:

You can (as you noted) update this in the backend -> however -> repeattransaction API will continue to use the lineItems associated with the first contribution in a recurring series as the 'template';

Best solution in this case is to start a new recurring series -> with both the correct total amount and the correct break down; Two ways to do this:

1) ask the donor to initiate a new series on an online contribution page;

2) since you have the iATS customer token -> you can use phpMyAdmin to set up a new series - and attach the token to this. It's tricky in that you will need to touch a number of tables -> and possibly bookkeeping entries as well (if you care about those);


Anonymous user can't view CiviCRM user dashboard in WordPress I have a wordpress page with a user-dashboard shortcode embedded in it ([civicrm component="user-dashboard" hijack="0"]). When logged in, it works fine. When using a private window (and a user id and checksum) I get told I must be logged in to view the page.

I assumed that I had forgotten to set the permission for anonymous users and the user-dashboard, but it seems I have that set correctly:

I assume I'm missing something else obvious, but web searches (including this database) have revealed nothing. I would love an answer or even a suggestion of where to look.

Based on the suggestion below, I've added some debug code to the user-dashboard:

  public function __construct() {
parent::__construct();
echo "<!-- " . CRM_Core_Permission::check('access Contact Dashboard') . " -->\n";
if (!CRM_Core_Permission::check('access Contact Dashboard')) {
  CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/dashboard', 'reset=1'));
}

$this->_contactId = CRM_Utils_Request::retrieve('id', 'Positive', $this);
$userID = CRM_Core_Session::singleton()->getLoggedInContactID();

echo "<!-- userID:" . $userID . " -->\n";
$userChecksum = $this->getUserChecksum();
echo "<!-- userChecksum:" . $userChecksum . " -->\n";

I was somewhat surprised to see that the checksum and cid aren't making it there:

<!-- 1 -->
<!-- userID: -->
<!-- userChecksum: -->
<div id="crm-container" class="crm-container" lang="en" xml:lang="en">

Now, this is a Wordpress page, not a civiCRM page, but I assumed that since there is a shortcode to add the user-dashboard, that these values would come through as well. Am I deluded in thinking this?

For completeness, here is the (slightly redacted) url: https://mywebsite.com/workshop-registration/?aca11184e16a867aeee5f317ab706f58_1570552008_1440&cid=2

I also tried this one just in case: https://mywebsite.com/workshop-registration/?cs=aca11184e16a867aeee5f317ab706f58_1570552008_1440&cid=2

So, to close the loop on this, the answer is this:

inside WP, but outside CiviCRM, the checksum and cid need to be identified on the GET string as cs and id respectively
inside CiviCRM, the checksum stands alone (no separate variable, though it seems to work as cs too) and the client id must be cid as id is used for other purposes in CiviCRM.

I discovered no way to cleanly pass these values through a page. I used a PHP insertion plugin to Wordpress to extract the values from the $_GET global array and pass them back into the page.

Thanks to Demerit in helping me figure this out.


Http 500 Page not Found error when plugin clicked on backend - Wp-engine I recently moved from linod sever to Wp-Engine server.  I did the migration but Civicrm plugin wont work. I see it in the sidebar but when I click on it to access it I get a Http 500 page not found error.  I am unsure what to do to fixed it.

You should double check your civicrm_settings.php file. Particularly the section on File System Paths. Make sure the setting $civicrm_root is the correct path to civicrm for the new server.

Hope this helps...


Has anyone gotten CiviRebux working? Has anyone successfully gotten CiviRebux installed and working? UPDATE: If you have CiviRebux running, would you be willing to post a comment with the version of MySQL that your server is running?

The blog post and video demo look great but I have not had any luck getting it to function. I run into a fatal syntax error:

[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => CREATE TRIGGER civicrm_civirebux_configuration_after_insert after insert ON civicrm_civirebux_configuration FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_civirebux_configuration (id, name, renderer, aggregator, vals, rows, cols, time, desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW.renderer, NEW.aggregator, NEW.vals, NEW.rows, NEW.cols, NEW.time, NEW.desc, NEW.type, CONNECTION_ID(), @civicrm_user_id, 'insert'); END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW' at line 1]
[type] => DB_Error
[user_info] => CREATE TRIGGER civicrm_civirebux_configuration_after_insert after insert ON civicrm_civirebux_configuration FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_civirebux_configuration (id, name, renderer, aggregator, vals, rows, cols, time, desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW.renderer, NEW.aggregator, NEW.vals, NEW.rows, NEW.cols, NEW.time, NEW.desc, NEW.type, CONNECTION_ID(), @civicrm_user_id, 'insert'); END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_civirebux_configuration_after_insert after insert ON civicrm_civirebux_configuration FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_civirebux_configuration (id, name, renderer, aggregator, vals, rows, cols, time, desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW.renderer, NEW.aggregator, NEW.vals, NEW.rows, NEW.cols, NEW.time, NEW.desc, NEW.type, CONNECTION_ID(), @civicrm_user_id, 'insert'); END IF; END [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, type, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.name, NEW' at line 1]"]
)

Versions:

PHP 5.5.38
MySQL 5.5.52-cll

As Chris says, the problem is due to CiviCRM's Data Logging feature having a problem with column names that are MySQL reserved words. As John says, in this case it's the column named desc.

I think this is a bug in Civi logging rather than in the extension: it's allowed in MySQL to have a column name that is a reserved word, provided it is properly escaped when referred to. Civi logging should deal with that.

I have filed an issue: SQL syntax error creating logging triggers if column name is reserved word and tested a fix against 4.6.27, which from a quick look at the code should apply to 4.7 too - I'm going to test that and create a pull request. If you test the fix, please leave a comment on the issue with your results.

Update 20 Jun 2017: I've now replicated the problem with the latest 4.6 & 4.7 (master) code and verified that the fix (suitably adapted) works for both versions. Created PRs for 4.6 & 4.7 . The 4.7 one has been merged and the issue marked fixed.


As of 5.4.0, Activity Search gives an empty result set - patch is available We just upgraded our CiviCRM sites to 5.4.0 and found out that Search | Activity Search always leads to an empty result set. We're on Joomla 3.8.11 but I see the same result on the demo civicrm sandbox (which is running 5.6 alpha 1 on Drupal). Activities are still in place - they show up on contact pages and in the search builder. Is there a change in functionality on the Activity Search page that we're not aware of or is this a bug? Anyone able to confirm?

I could replicate this issue on my local machine, this seems to be a core bug and have logged issue at https://lab.civicrm.org/dev/core/issues/353.

I think the search does provide results when we disable record type options

So in the mean time until the bug gets fixed you can rely on this option (hope it shoes correct count of results ;))

I have also submitted PR for this at https://github.com/civicrm/civicrm-core/pull/12713 if you can please try after applying patch and then comment on PR about your QA that would help to speedup the process of merging the code in next release.


Associate state and country fields when not tied to a particular address type I am building a profile to collect a list of states for various countries a person holds a license in.  The states/countries I'm looking for are not associated with any particular address type so I'm not seeing just the states for the selected country like you do normally. It becomes very cumbersome to sort through ALL the states for ALL the countries! Is there a way to tie the state and country fields together?

If I understand your question correctly, I may have just posted an answer to a similar question I had.  Hope it helps you.

https://civicrm.stackexchange.com/a/18093/2169

In summary, it's to use the civicrm_buildForm hook in order to tie your country and state fields together.  That will cause the states' list to be refreshed when you choose a country.


Payment Offline missing on contribution Page I have a brand new installation of Civicrm on a Joomla 3.2.7 site.
When I set up a Contribution page I told it to accept Credit Cards and Offline Payments. The Credit Card shows up, but not the Offline payment.
You can see it here:
https://events.toastmastersd47.org/en/ads

Is there a setting in the administrator area that I need to set as well?

Looks like there's a problem with your theme.

I am not seeing the total amount show when you select a sponsorship level. The images for the credit cards and Empowered by CiviCRM are also missing.


Moving site from WordPress to Drupal I've been moving a CiviCRM from WordPress to Drupal but getting a strange array of errors.

It's on the same hosting so I've set up a new database for the new CiviCRM, moved all the tables except the 4 cache tables and the domain. I've cleared all the cache, rebuild menus, (attempted) to sync the users (only got about 180 out of 280 but that's a good start).

My problem is that a number of the pages in CiviCRM throw up the 'DB table does not exist' error:
When I edit/create a contact
Organisation address and contact info
The page to edit the navigation menu opens but the triangle is just spinning
Quick search doesn't work (nothing happens) but Find Contacts does work.

I've turned on the advanced logging, and getting errors like the following:

Notice: Undefined index: frontend_title in CRM_UF_Page_Group->browse() (line 329 of /home/xxx/www/data/sites/all/modules/civicrm/CRM/UF/Page/Group.php).

Any ideas?

Thanks

For some reason, the back up hadn't recorded the updated version of CiviCRM (it may have happened before I reran the update script) so when I checked the domain table in the back-up just now, it was still showing version 4.7.29. I did a manual back-up AFTER double-checking the domain/version was correct in the WordPress site, then I copied over the database tables again and it's working.


DB Error: constraint violation (WordPress) I am trying to update an install from CiviCRM version 4.4.5 to the current version.

I was unable to because the WordPress site was using PHP 5.6.

So I installed CiviCRM 4.7.31, and then updated the server to PHP 7.0.

Now when I click the CiviCRM menu link in the dashboard, I get this:

DB Error: constraint violation

Aaron welcome to stack exchange, Can you logout and login again? If its a new install than you contact id might have not set properly in session.


CiviCase Users Unable to Edit & Add Activities on Cases They've Been Assigned We have assigned the Wordpress Access Control permission “CiviCase: access my cases and activities” to a variety of users who we want to assign case roles to.  The description of “CiviCase: access my cases and activities” permission indicates that users with this permission should be able to view and edit case activities with cases they are associated with.

Users with this permission can view the cases that they've been assigned to, but they are unable to edit case activities and add case activities on cases that they’ve been assigned a role to. A popup box that says "Sorry, an error occured. You are not authorized to view this page" appears. The only way users assigned to a case are able to edit and add new activities to a case they've been assigned to is to enable the permission "CiviCase: access all cases and activities", which is something we prefer to not enable.

Another Civicrm user brought this issue a couple of weeks ago, so it appears to be an issue experienced by other users. It's a significant issue for organizations that will rely on Civicase. Is there a bug?

Users with Case roles cannot edit activities assigned to them: is this a bug?

We are using Civicrm Wordpress version 4.7.2.

To me this reads like a bug - either the description is misleading, or the permission isn't functioning. You should log this at issues.civicrm.org, including all the detail you've added here (and a link back to this page).

Your options from there are basically:
1) Wait for the core team to fix it.
2) Pay for the core team to fix it.
3) Recruit a freelancer or an agency to fix it for you.

Message me if you want me to look at this in more depth for you.


Paypal IPN no longer updating contributions Contributions that are made via Paypal are no longer being updated from pending to complete.
This happened suddenly on multiple sites.
Is anyone else experiencing this?
I cannot find any errors in any logs.
Any clue how to approach debugging this?

I am using CiviCRM 4.6.25 + Drupal 7.5x hosted by Pantheon

I'm not using this system, but I may have an explanation.  We use a custom coded donation system that expects PayPal to report back to us when there is a transaction.   On 7/26/17, 7/27, and 7/29 so far there have been no such transactions, on 7/28 we only received too.   The problem is confirmed to be a PayPal issue, and after fighting with them for 2 hours got a trouble ticket opened.  Log into PayPal and check your activity, then go to IPN (Instant Payment Notification Logs): https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history   If there is a problem communication with your site, it will show transactions that failed.  In my case, it clearly shows that PayPal is simply missing transaction entries under IPN that show up on the regular activity log.


Related Permissions Extension: Existing Contact widget on Webform not showing related contacts We are using Webform and the Related Permissions extension to allow parents to register their children for summer camp events. An Existing Contact select widget is included so that parents can select children they have previously registered (which established a permissioned relationship between them).

With "Enforce Permissions" selected on the webform component, the drop down list does not work - no contacts are included in the list, even though the user is logged and has related and permissioned contacts.

When "Enforce Permissions" is de-selected, the drop down list shows the first 500 contacts as expected.

The logs show the following error:

The CiviCRM "contact get" API returned the error: "DB Error: unknown error" when called by function "_webform_render_civicrm_contact" on line 387 of contact_component.inc with parameters: "Array ( [is_deleted] => 0 [contact_type] => Individual [check_permissions] => 1 [rowCount] => 500 [sort] => sort_name [version] => 3 ) "

Drupal 7.50
Civi 4.7.11
Webform 7.x-4.14
Related Permissions Extension 1.2 (with latest codebase installed a couple of weeks ago)

Any ideas appreciated!

According to here this has been fixed with this patch


Import Contacts with Email field issue If I import contacts via a CSV file and indicate a home email, the email address does get imported without any issue.

However, in order to send an email to the contact (in my case sending to an entire group in CiviMail), I currently need to open the contact and select "Add or edit email", and re-save it in order for it to be active.

Once it is active (which can be determined when the field label "Home Email" is then bolded), CiviMail then recognizes the email address and can then send.

Update: I should add, this could likely be a bug since the issue is also present on the Civi demo site at https://civicrm.demo.civihosting.com

Yes it appears to be a bug.  You should file one.

Here seems to be the conditions:

Importing update or fill, i.e. contact already exists
Has no existing email address or any existing has is_primary flag = 0
Has a street address or are also importing one

There seems to be no way via import to fix these or to import them correct.  Well, if you are also importing a street address, you can to do two imports, first just adding email address and second adding the address.

I guessing the design is for any new additional email address imports to not make them primary (makes sense) and for some reason the existence of a street address makes it think there is already an existing email address.

Here is some sql that will give you back any contacts with email addresses that don't have primary one.

select c.display_name,
       e.email,
       e.on_hold,
       e.is_primary,
       e.id eid,
       t.name,
       c.id cid,
from   civicrm_contact c,
       civicrm_email e,
       civicrm_location_type t
where  e.contact_id = c.id
and    e.location_type_id = t.id
and    not c.is_deleted
and    not exists
       (select 'email primary'
        from   civicrm_email e2
        where  e2.contact_id = e.contact_id
        and    e2.is_primary)
order by 1


List all recent activities I'm a newbie with CiviCRM.. sorry if my questions sound stupid. As I understand, activities are central to this CRM. Yet, I can't find a quick way (e.g in the menu) to display all recent activities. I have to digs into reports (3 or 4 clicks) or have a "preview" within the CiviCRM dashboard.
What am I missing?
Thx!

Welcome to SE! You need to use Find Activities under the Search menu. This allows you to filter by date (and other things). If you want something more complicate try Advanced Search with Display as Activities.


Authorize.Net errors after updating to Civi 4.7 I updated from 4.6 to 4.7.7 yesterday and if a guest user comes to our site to register they receive the following errors:

  Notice: Undefined index: user_name in CRM_Core_Payment_AuthorizeNet->__construct() (line 55 of .../civicrm/CRM/Core/Payment/AuthorizeNet.php).
  Notice: Undefined index: password in CRM_Core_Payment_AuthorizeNet->__construct() (line 56 of .../civicrm/CRM/Core/Payment/AuthorizeNet.php).

However, if I am logged in to my drupal site, I do not receive these errors. Any idea why this is happening? I went into the Admin > System > Payment Processors and there's no place for user_name or password. I'm guessing they are looking for a drupal username; however we do not require login to register or donate using civi.

We are using Civi 4.7.7 on Drupal 7.x (can't remember which version).

Try this :
This happens only for the payment processor

so please try to delete the payment processor and uninstall the payment processor extension if you have any

Then install the payment processor extension and add a payment processor again

Then clear all your cache and try again


CiviCRM Entity Tags does not appear in Rules I am trying to follow the procedure outlined in How can I create a Drupal user when someone submits a CiviCRM-Webform?... but when I try to add the Event to the Rule described, 'CiviCRM Entity Tag' does not appear in the list of possible triggers.
I must be missing some module or configuration option, but can't see it.
Any help welcome,
Thanks, Tony

Try this:

{ "rules_self_create_user_account_and_login" : {
"LABEL" : "Create User Account",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "civicrm", "rules" ],
"ON" : { "civicrm_entity_tag_create" : [] },
"IF" : [
  { "NOT civicrm_entity_user_exists" : { "civicrm_contact" : [ "civicrm-entity-tag:entity-id-contact" ] } },
  { "data_is" : {
      "data" : [ "civicrm-entity-tag:entity-table" ],
      "value" : "civicrm_contact"
    }
  },
  { "data_is" : { "data" : [ "civicrm-entity-tag:tag-id" ], "value" : "XXXX" } }
],
"DO" : [
  { "civicrm_entity_action_create_user" : {
      "USING" : {
        "civicrm_contact" : [ "civicrm-entity-tag:entity-id-contact" ],
        "is_active" : "1",
        "notify" : "1",
        "signin" : "1",
        "username_format" : "email"
      },
      "PROVIDE" : { "civicrm_user" : { "civicrm_user" : "Created Drupal User" } }
    }
  },
  { "redirect" : { "url" : "civicrm\/user?reset=1" } }
]

}
}

set XXX to be your Tag ID

EDIT (thx to jackrabbithanna) Make sure Entity Tag is enabled here: admin/structure/civicrm-entity/settings


Event registration's 'Continue' button disappears when Payment Processor is changed I have an online registration with a donation-based registration fee (zero to any amount is accepted).

Everything works great until I change the Payment Processor of the event registration. When I change it, the continue button of the registration form disappears as long as there is no donation amount entered, which then does not allow the user to register without donating anything.

I've set up 2 completely identical events, besides their Payment Processor to demonstrate the issue:

The good one:
https://terranova.tamera.org/en/civicrm/event/register?reset=1&id=1945

The missing button one:
https://terranova.tamera.org/en/civicrm/event/register?reset=1&id=1946

Another thing to mention, is that the 2 Payment Processors are completely identical except for the PayPal's 'Pay' button image url, and their name.

My question is, what makes the continue button disappear in the 2nd one?

The missing button is there - it just has display set to none. It looks like there is a bunch of javascript on the page that hides various things, then reshows them - but I'm guessing behaves differently for different payment processors.

The issue looks to be the javascript is using .prop to reshow the element.

      $('.crm-submit-buttons input').prop('disabled', false);

This function was added to jQuery in 1.6 but it looks like you are using jQuery 1.4.4. If you are able to use a more recent version of jQuery you should hopefully see the missing button load. There are a number of solutions documented here:

To easily update your jquery you can use this module to check if it resolves the issue. https://www.drupal.org/project/jquery_update


How can I change a cell in dataTables (custom data type tab with table) to disable the inline edit? I need to make a change where some of the contact identifiers (extension Identity Tracker) can not be changed by the user. I can do that with the validateForm hook. But the Contact Identities are actually custom data of the type "tab with table" and you can also edit them inline.
The custom data tab with table uses the jQuery dataTables, and do not respect any hook unfortunately. In the  is a  with the class "crm-editable-enabled". If I can change that class to "crm-editable-disabled" I would be fine, but I have no idea how to do that with the dataTables API and the documentation shows stuff like this:
CRM.$(function($) {
  var myTable = $('.dataTable').DataTable();
  myTable
          .columns('.crm-editable')
          .nodes()
          .flatten()  // Reduce to a 1D array
          .to$()      // Convert to a jQuery object
          .removeClass('crm-editable-enabled')
          .addClass('crm-editable-disabled');
});

I can get the var myTable, but the rest does not seem to have any effect....any ideas?

how about using apiwrapper hook and throwing exception?


cv error: "Call to undefined function Civi\Cv\Command\posix_getuid()" When I run cv on a server, I get the following error:

[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined function Civi\Cv\Command\posix_getuid()

Furthermore, I noticed that usually when I run cv --help the output is in color - on this server the output is in black and white.

cv has a PHP dependency that CiviCRM doesn't - the posix plugin.  It's installed by default on many systems with PHP (e.g. Debian/Ubuntu) but with the Red Hat/CentOS "remi" repository, it isn't.  You can install the php-process package to resolve this.


KCFinder sometimes won't upload images Following on from many many months of difficulties with KCFinder being incredibly slow, and other posts, we now have a situation where KCFinder 'sometimes' refuses to upload images.

We haven't yet found a pattern as to when it does and doesn't upload images. We can always upload the images directly to the folder by ftp.

We have over 1,000 pictures in the folder, so it's quite likely that's the cause! :-(

But how can we gain control of the situation? It's hard to simply delete images since they may have been used in recent emails.

I've tried looking in /var/log/apache2/error_log, the Civicrm log and Drupal log, and none show any issues. We're using Drupal latest and Civicrm 5.24.4. Thanks for any help you can give us!

Sounds like a combination of a slow-ish server/network, too many images and possibly some configuration bits.

The KCfinder runs in a little popup window that makes it extra difficult to diagnose, and tries to load thumbnails of all your existing images so you can select one. All that work is overloading both your network and your server (and maybe even your browser, though unlikely).

You may be able to customize kcfinder so that it's not generating quite so many thumbnails, and/or fix your server so that it doesn't have to do it each time (i.e. with some caching, though that's a bit tricky, e.g. ensure you have mod_expires enabled with apache).

You're right that you're somewhat painted into a corner, and a more powerful server might be the easiest solution.

Alternatively, you could set up a separate directory for old images and move over ones that are more than a month old.

Going forward, you may also want to make sure you're not uploading really large images, i.e. scale them on your own machine before uploading them.


"My Registered Events" listing (with cancellation option) for user dashboard page I've searched and researched and come up empty - is it possible to present a dashboard (summary) view of the events that a person has registered for, along with the ability to easily cancel from any of the listed events? It seems like a very useful thing to have but I'm coming up empty when trying to find any mention of doing so with CiviCRM.

The feature you're referring to is called the "Contact Dashboard", and it's accessible from https://yoursite.org/civicrm/user in Drupal and Backdrop, not sure about WordPress.
You can add/remove sections from it at Administer menu » Customize Data and Screens » Display Preferences.
It doesn't allow self-service cancellations, but I wrote the extension "Event Self Service from User Dashboard "to deal with this specific scenario.


How to fetch CiViCRM events externally [ Drupal 7] I'm new to CiViCRM. I want to fetch events which are created in CiViCRM which is hosted on another server. So basically I want to fetch CiViCRM data from one individual site to my site. I don't know that which are the ways to do it and which is the best one. But I think Rest option would be good if I'm not wrong. I'm not able to find any similar example which is near to my task. All I don't understand that how should I use my rest url with code:

1) Option 1:

$api = new civicrm_api3(array ('server' => 'http://localhost/abc',

'api_key'=>'123456789',
  'key'=>'123xyzABC'));

2) Option 2:

 $contactxml =       simplexml_load_file("http://localhost/abc/sites/all/modules/civicrm/extern /rest.php?entity=contact&action=get&key=<site    key>&api_key=$apikey&last_name=Koot");
  foreach ($contactxml->children() as $contact) {
    $display = $contact->display_name;
  }

Is there any other options. I want to go for option 1 if that is possible. How to get response in JSON?

Any help would be appreciated.

Thanks

Option one: API will be the best option

Please use this link in your instance
http://localhost/abc/civicrm/api/explorer
or
http://d46.demo.civicrm.org/civicrm/api/explorer#explorer

you will get JSON output


onbehalfof organisation sign up problem We have a problem that may have started after upgrading from 4.4.11 to 4.4.19 on Drupal - anyway, it's started happening fairly recently.

We have public page that allows for a membership contribution for an individual to register/sign up and create an organisation at the same time (Employer of). Normally there's a contribution in the Organisation and a membership record in the organisation - and a membership by relationship for the individual.

The problem is that the individual membership record is not being created now. (It can be fixed up by admin to create the relevant record).

I've been tracing the code and I think it is a relationship permission problem.  If I remove a permission check in CRM_Contact_BAO_Relationship::getRelationship() then the right record is created. However this doesn't seem like a good fix for the problem.

Can anyone think of a change to permissions or onbehalfof around this time which might have this effect.

We do have some custom code in this area - which adds permission is_permission_b_a in CRM_Contribute_Form_Contribution_Confirm::processOnBehalfOrganization() - I think I've tried removing that .

Thanks, Chris

There was a similar issue reported in https://issues.civicrm.org/jira/browse/CRM-17067 where inherited membership(s) not created due to permission check in getRelationship(). I have submitted the PR in the ticket itself and the reason why the PR is still not merged is because there are some ACL changes going in 4.6.9 and that will fix the remaining issues reported by Dave Jenkin in his last comment.


can't install civicrm on fresh wordpress Warning: Smarty error: problem creating directory 'C:/domains' in
  C:\domains\xxx.be\subdomeinen\wordpress\wwwroot\wp-content\plugins\civicrm\civicrm\packages\Smarty\Smarty.class.php
  on line 1094

  Warning:
  include(C:\domains\xxx.be\subdomeinen\wordpress\wwwroot/wp-content/uploads\civicrm\templates_c\en_US\%%E6\E65\E656EDCD%%wordpress.tpl.php):
  failed to open stream: No such file or directory in
  C:\domains\xxx.be\subdomeinen\wordpress\wwwroot\wp-content\plugins\civicrm\civicrm\packages\Smarty\Smarty.class.php
  on line 1264

  Warning:
  include(C:\domains\x.be\subdomeinen\wordpress\wwwroot/wp-content/uploads\civicrm\templates_c\en_US\%%E6\E65\E656EDCD%%wordpress.tpl.php):
  failed to open stream: No such file or directory in
  C:\domains\xxx.be\subdomeinen\wordpress\wwwroot\wp-content\plugins\civicrm\civicrm\packages\Smarty\Smarty.class.php
  on line 1264

can't find sollution; Any ideas?

This really looks like you're trying to install on a hosting provider, but you downloaded the WordPress package for Windows. I can see how this might have happened given the WP site, but it's not at all what you wanted.
Which hosting provider are you using? Do they offer WHM/cPanel? Or Plesk? These are management frameworks for hosting providers. Inside them you should find something like Softaculous - this will do the WordPress install for you. Once your domain has the minimal WP in place, you'd do the following.

confirm you can reach your VPS using the ssh protocol. You will use ssh for remote management tasks and scp (secure copy) to move files back and forth.

Download the Civi zip file.

scp (using WinSCP or similar) the file to the default location for user root - that's the manager account.

ssh into the system, change to the WP plugins directory, and unpack the Civi zip file. This might vary depending on the system you're on, but here is how we'd do it on the cloud provider I manage:
ssh root@brandnewwpsystem.com

cd ~/wp-content/plugins unzip

/root/civicrm-4.7.19-wordpress.zip

Log into WordPress, you should have a Civi tab at the upper left. Depending on the layout you might have to manually configure the MySQL database.

This is a five minute task for someone who's done it a few times. Do not hesitate to ask more questions if you get stuck.


Donation/Contribution Page Best Practices Are there examples of Donation/Contribution Pages that have been created with CiviCRM or Drupal Web Form that you think work well?

Are there advantages of creating it with CiviCRM or Drupal Web Forms?

Also are there ways to get it to work, so it uses the organization's url?
name.org/donate?

Thank you.

After going back and forth from CiviCRM forms to Drupal Webforms for contribution forms, I find that the way to go for Contribution pages is CiviCRM forms.

A couple of issues that come to mind with Drupal webforms as a contribution form was:
1) The payment instrument was always set to "Check" even though they pay with Credit Card.
2) The Contribution thank you letters weren't sending out automatically.


How to troubleshoot CiviRules triggers? I have just installed CiviRules 1.12 on CiviCRM 4.7.14. I tried to create a few simple test rules, but none of them worked. I suspect I might have to look for solution somewhere else.

Trigger: Contribution is changed
Linked Condition: Contact in group TEST
Linked Action: Remove contact from group: TEST

I also tried a few similar Rules, e.g.:

IF Contribution is added THEN remove from Group.
IF Tag is added THEN remove from Group.
IF contact is removed from group THEN display the Message.

All were set to run IMMEDIATELY without delay.

What might have gone wrong? Something with setup or configuration? I did not see anything unusual.

UPDATE:

Upon further tests the issue was narrowed down to a single CiviRules action, namely, Remove contact from group.

I would as a test forget about the display message first, and start only with adding to and removing from group. I would expect those to work.

I have just tested a rule on my CiviCRM 4.7.15 local install as in the screen print that I have attached, and that works fine? Can you test with the same rule?


Contribution Page not Submitting I have a contribution page here https://flbc.edu/donate/flbc-donation/, but when I click on confirm it just brings me back to the same initial page. It was working before and I just upgraded to the newest Civi and now it is not working. Any ideas why this might be happening?

When reproducing your experience, I see:

flbc.edu/:1 Uncaught SyntaxError: Unexpected token '<'

Which is weird, since it seems to be loading your whole page as javascript.

It shows it on the initial page load as well as after submitting. And the province selector after selecting a country is also broken, that's probably a symptom of the same problem.

When I look at the html source of your page, I notice that it ends with:

<script type='text/javascript' src='https://flbc.edu/wp-content/plugins/js_composer/assets/js/dist/js_composer_front.min.js'></script>

That's bad - you're not getting your closing html or body tags output.

Conclusion: I suspect you might be hitting some kind of server limit (your page has a lot of css/js loaded).

Do look at your server logs, there's probably a hint in there. I don't think it's CiviCRM-specific.


how would I send a monthly email automatically I'm looking for suggestions on how to accomplish the following:

Send a regularly scheduled email (monthly or weekly or whatever I choose) based on a specific message template to a specific group without having to go in and schedule it every time.

I'm thinking something like a Weekly Inspirational Quote email or Daily Bible Verse email. The content would change but the basic layout of the email would be the same.

You could use the CiviRules extension to accomplish this in combination with the Email API extension. Both extensions can be found in the extension directory.

In CiviRules the DailyGroupMembership trigger does what you want, it only does it on a daily basis rather than once a month. You might either come up with some CiviRule conditions to make it run only once a month or even better, adapt the DailyGroup trigger to allow a selection of day/week/month.

Some examples of CiviRules can be found here: https://wiki.civicrm.org/confluence/display/CRMDOC/CiviRules+Cookbook


How can Members download their own Membership Certificate/Card? This is a request I get quite often. Below is my favourite solution for it.

No custom code required! If you're on Drupal Views integration, which ships with CiviCRM - all that's required here are Drupal modules Views, Views PDF and installation of two libraries for the PDF generation: tcpdf and fpdi;

Here are the steps:

First we will create a Membership tab in your Drupal /user screen where we will display the relevant Membership details pulled from CiviCRM:

To create this Membership Tab:

a) setup your CiviCRM - Drupal CMS integration by following the instructions here:
Administer -> System Settings -> CMS Database Integration
direct link: civicrm/admin/setting/uf?reset=1
This makes the CiviCRM tables available in your Drupal Views.

b) on the Drupal side - enable Drupal Views; and Create a new View - key elements are Relationships -> connecting CiviCRM Contact w/ Drupal user ID and Contextual Filter -> so we can create a path user/%/membership and the Menu item: Tab: Membership

c) here is a complete Views configuration for the Page:

2. Hitting the Download Membership Certificate link produces:

To create this Certificate (a PDF download):

a) you need to download and install module: Views PDF -> which requires libraries: tcpdf and fpdi -> put them in a /libraries folder that is accessible by your site - either sites/default/libraries or sites/all/libraries.

b) when installed -> add a new display in your View -> of type PDF Page. I've selected PDF fields -> in Settings you can: upload and select a background template of your choice; you can also specify an offset X and Y for each of the CiviCRM variables to position them exactly where you want them!

c) In your PDF Page View -> Note the path:

d) Now that you've made the PDF Page display: add a Field on your user/%/membership page -> Custom text -> e.g. Download Membership Certificate. Hit Rewrite Results -> select Output this field as a link as follows:


Creating thank you letters redirects to a contribution page I just had a report of someone who was trying to generate PDF thank you letters for recent contributions, and when they click "Make Thank-you Letters", instead of downloading a PDF they were redirected to a Contribution page on the front end.

That sounded bizarre, so I tested and it did the same for me. I can't think of any recent change on the site that could cause this. I just upgraded to the latest release (from 4.7.27 to 4.7.29) and cleared caches, but it didn't solve it.

Has anybody else seen this type of behaviour before? Where to start looking to figure out what's happening?

There didn't seem to be anything related in the CiviCRM log (with logging turned on) or PHP error log. In the Apache error log there was a strange error:

AH01797: client denied by server configuration:
/home/username/public_html/sites/default/files/civicrm/custom/delete-this-MDH295Ww25

Permissions all seemed fine, however.

I ended up installing wkhtmltopdf and bypassing dompdf which isn't really a solution to the problem but is an alternative.


field like "Current Employer" that creates new organization and relationship Is there a way to create in a new custom field the functionality in an Individuals "Current Employer" field?

For example, trying to create a generic "Organizational Affiliation"...

How to create the relationship between the Individual and this Organization?  And if the organization does not already exist then to create it on-the-fly?

Then this field could be added to profile for use contribution page for membership signup.

Edit: This is on Drupal.

Edit: This question turning into "How to create relationships between contacts on contribution pages?" I started out saying "in a new custom field" but new custom field isn't important and as @Coleman points out is bad idea.  But some sort of field that allows constituent to enter name of another contact they're related to and have the relationship get created upon form submission.

If you want a custom "Contact Reference" field to always create a relationship whenever it is saved, you would need to add some custom code implementing hook_civicrm_post.

However, before you go down that road I suggest you clarify why you want to create both a custom field and a relationship to store the same data. Is it just because that's what the "Current Employer" field does? Not a great reason in my opinion. It's generally a bad practice to store the same data in two places, so the overly-complex "Current Employer" field is not setting a great example of tidy database practices.

I suggest you decide to use a custom "Contact Reference" or a custom relationship type, and not both. Trying to store the same data in 2 places is rarely worth the trouble it causes.


Error whilst sending email via Mandrill extension on Wordpress / Civi 4.7alpha5 When attempting to send an email to event participants (via participant listing > action > send email), I receive the following error:

  Cannot read unrecognized property CRM_Core_Config::$civiVersion.

Upon trying to send to them as a group via CiviMail, I also get the same error in my process_mailing log

Any advice on how to resolve this would be appreciated!

Running CiviCRM 4.7alpha5 on Wordpress 4.3.1 with Mandrill and Clickatell extensions installed

JMA will be releasing a version of the extension that works with 4.7 in the first week of February. Sorry for the inconvenience.


How do I grep the CiviCRM universe? I'd like to remove some deprecated code from CiviCRM core, but I'm not sure if it might be used by other extensions in the CiviCRM universe. Is there a way to search the code of all known extensions?

You can use build kit to generate a repo including the civi "universe"  https://docs.civicrm.org/dev/en/latest/tools/universe/

civibuild create universe

or

mkdir ~/src/universe
fetch-universe ~/src/universe

could be worth checking extension usage to see if there are any widely used ones that don't make the cut to get included.

Happy grepping!


Public Cannot Access Contribution Pages All of a sudden, out of blue, none of my contribution pages can be accessed by the the public. I am installed in WP and there is no "Make online contributions" permission as an option.

(From the Wiki:

Notes on Specific Permissions
Make online contributions:
If you plan to use CiviContribute and want to allow online contributions, enable this permission. Be sure to assign this permission for the "anonymous" role if you want to allow un-authenticated visitors to make contributions.)

It was all working fine and then out of the blue, it wasn't. Working with 4.7.25.

I see the "Make Online Contributions" permission.  I found it by going to:

Administer menu » Users and Permissions » Permissions (Access Control)
Select "WordPress Access Control".
Find "CiviContribute: make online contributions".  You'll probably want to check all the boxes next to it and press "Save".

See screenshots for all the steps above:


Can I put custom field tokens into a message template? I want to add custom fields to mail templates without writing tokens.  Is this possible?

If so, where can I find the entity relationship diagram for civi?
Thanks,

Yes it is possible to include custom contact fields for individuals in messages sent by CiviMail by just selecting the custom field from the list of tokens.

The help on the Insert Token widget for CiviMail explains how to do it for custom organizational contacts, and the same process works for custom household fields as well:

  Custom tokens (based on custom data) can be added for organizations as well. These tokens will not be displayed in the list of available tokens, but can be added manually. The format is {contact.custom_12} – where 12 is the ID of the custom data field. To find the custom data field ID, go Administer > Customize Data & Screens > Custom Fields and click ‘edit’ on the field you want to use. Look at the URL. The last part of the URL will be an equal sign and a number (=12). The number (12 in this example) is the id of that custom field.


CIVI Crm Wordpress with Xampp crashes my SQL I installed CIVIcrm on latest version of wordpress, and appart from PHP version 5 (they recommend 7) it seems like it installed fine, however, it crashes my Sql any idea?

Here are some of the errors , file is too long, so will only paste some of it:

DB_Error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code]
=> -1 [message] => DB Error: unknown error [userinfo] => CREATE TABLE
`civicrm_participant_status_type` ( `id` int unsigned NOT NULL AUTO_INCREMENT
COMMENT 'unique participant status type id', `name` varchar(64) COMMENT 'non-
localized name of the status type', `label` varchar(255) COMMENT 'localized
label for display of this status type', `class` varchar(8) COMMENT 'the general
group of status type this one belongs to', `is_reserved` tinyint COMMENT
'whether this is a status type required by the system', `is_active` tinyint
DEFAULT 1 COMMENT 'whether this status type is active', `is_counted` tinyint
COMMENT 'whether this status type is counted against event size limit', `weight`
int unsigned NOT NULL COMMENT 'controls sort order', `visibility_id` int
unsigned COMMENT 'whether the status type is visible to the public, an implicit
foreign key to option_value.value related to the `visibility` option_group' ,
PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE
utf8_unicode_ci [nativecode=1813 ** Tablespace for table
'`wpcivi`.`civicrm_participant_status_type`' exists. Please DISCARD the
tablespace before IMPORT.] [backtrace] => Array ( [0] => Array ( [file] =>
C:\Core\01-Xampp\htdocs\wpcivi\wp-
 content\plugins\civicrm\civicrm\packages\DB.php [line] => 985

It looks like you may have attempted to install this more than once, or maybe run out of diskspace?  The error message above shows:

nativecode=1813 ** Tablespace for table '`wpcivi`.`civicrm_participant_status_type`' exists. Please DISCARD the tablespace before IMPORT.

https://dev.mysql.com/doc/refman/5.6/en/server-error-reference.html#error_er_tablespace_exists

This looks like it might have some answers for you: https://stackoverflow.com/questions/15694168/error-tablespace-for-table-xxx-exists-please-discard-the-tablespace-before-imp


Can't seem to find the correct CSS selectors for public buttons - contributions pages (Save, Cancel and Review Your Contribution) Does anyone have the correct CSS Selectors for these 3 buttons? I want to remove the icons (they don't display on all browsers) and change the overall style of the buttons to match buttons on the rest of the site.
https://wordpress-435088-1363156.cloudwaysapps.com/join/
https://wordpress-435088-1363156.cloudwaysapps.com/volunteer-scpa/

It should be something like
div.crm-submit-buttons i { display: none; }
div.crm-submit-buttons span { /* your styling */ }
div.crm-submit-buttons input { /* your styling */ }

If you want it specific to the page you'd add something like div.crm-contribution-page-id-1 or div.crm-profile-name-volunteer_interest in front.


Can a recurring email be setup to send to a group? Can an email to a group be setup to send every week?  We have a weekly event that we want to send the same email to attendees reminding them to come.

Yes you could use schedule reminders for sending e-mails to participants of events.

You could setup the reminder to run a week before the event takes place. I would assume that it will also works with a recurring event.


Preventing slow performance with smart groups After doing some research (Capacity Planning), it appears as if Civi slows down when there are a lot of smart groups or if the smart groups are children of other groups.  What should be some good practices to put in place so that the performance/speed of Civi isn't dramatically impacted by a large number of smart groups?  Thanks.

Do you have a few smart groups on which many others depend? If so it's worth making sure they're as quick as possible. We have a script that generates the important ones once per hour - but by putting the contacts into regular groups, rather than smart groups. Regular groups are much faster, and that speeds things up a bit.

We've also turned off smart group caching. This very much depends on your use-case. But if you have a lot of intermittently-used smart groups it can be better to generate each one as needed rather than have a cron job regularly slow everything down by generating them all. But obviously ymmv on this.


Apply Cividiscount to only one price. We are using Civi 4.7.22 on Wordpress 4.8.22

We have an upcoming three day event with several price options.  Our full-price is $189.00 and we want to give members of our organization a $60.00 discount when they purchase the full-price ticket to the event. We do not want to give a discount to the lower priced tickets, whether the person is a member or not.

So far when using cividiscount, the discount price is applied to the entire price list and not just the full price.  I don't yet see an option for controlling this.  Does anyone know what I can do?

Thank you

If you are using a price set, you can set which line items the code is valid for by selecting the line items in the field 'Price Field Options' under 'Additional Options' when you setup the code. You still need to set the event it is valid for under the 'Discounts for Events' section.

Hope this helps.


Cron error after upgrade to 4.7.1 Upgraded from 4.6.11 to 4.7.1 and now this this error when running /wp-content/plugins/civicrm/civicrm/bin/cron.php

  Fatal error: Uncaught exception 'Exception' with message 'Function
  "is_admin()" is missing, even though WordPress is the user framework.'
  in
  /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:261 Stack trace: #0
  /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(219):
  CRM_Utils_System_Base->theme('PEAR_Error('DB Error: insuf...', -26, 16, Array, '
  [nativecode=10...') #5
  /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564):
  DB_Error->DB_Error(-26, 16, Array, ' [nativec in
  /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php
  on line 261

On a WordPress site with CiviCRM 4.6.10 I had the same problem but switching from the "URL" to the "CLI" method of executing cron fixed the problem.


webform-civicrm error when creating CiviCRM custom data group When creating (or saving) a custom data group or (field)set the following error pops up:

Notice: Undefined offset: 0 in webform_civicrm_civicrm_postSave_civicrm_custom_group() (line 436 of /home/unidosnow/www/www/sites/all/modules/webform_civicrm/webform_civicrm.module)

The code throwing this:

/**
 * Implements hook_civicrm_postSave_tableName().
 *
 * Handles adding/editing a custom group.
 *
 * @param CRM_Core_DAO_CustomGroup $dao
 */
function webform_civicrm_civicrm_postSave_civicrm_custom_group($dao) {
  module_load_include('inc', 'webform', 'includes/webform.components');

  // get all fieldsets with custom group ID
  $customGroupId = $dao->id;
  $dbResource = db_query("SELECT * FROM {webform_component} WHERE type ='fieldset' "
          . "AND form_key LIKE '%cg{$customGroupId}_fieldset'");
  $fieldsets = $dbResource->fetchAll(PDO::FETCH_ASSOC);

  // check if dao fields have been fetched
  if (!$dao->title) {
    $dao->find(TRUE);
  }

  // run only if the title of the custom group has changed in civicrm
  -->>  if ($fieldsets[0]['name'] != $dao->title) {  <<-- Exception here
    foreach ($fieldsets as $field_info) {
      $component = array();
      $component['name'] = $dao->title;
      $component['type'] = $field_info['type'];
      $component['form_key'] = $field_info['form_key'];
      $component['weight'] = $field_info['weight'];
      $component['nid'] = $field_info['nid'];
      $component['cid'] = $field_info['cid'];
      $component['pid'] = $field_info['pid'];
      webform_component_update($component);
    }
  }
}

The custom set creates successfully, haven't yet tried to use it in a webform.  Before the 4/25 update I had created custom data sets without this error.  Don't have record of the versions I was using at the time, the current versions that show the problem are CiviCRM 4.7.29, Drupal Core 7.59, webform-civicrm 4.20, and webform 4.17.

This was not a bug that caused any loss of functionality, just a php notice which has since been fixed via this patch: https://github.com/colemanw/webform_civicrm/pull/139


Navigation menu is not loading I have just upgraded to 4.7.29.

When i go to manage>screens>navigation menu... the navigation menu won't load.
It keeps loading.
What can i do to resolve this?

error log when I try to rebuild:

[info] $ManagedEntities_failed = Array
(
    [entity] => RelationshipType
    [action] => create
    [params] => Array
        (
            [version] => 3
            [name_a_b] => Case Coordinator is
            [name_b_a] => Case Coordinator
            [label_a_b] => Case Coordinator is
            [label_b_a] => Case Coordinator
            [description] => Case Coordinator
            [contact_type_a] => Individual
            [contact_type_b] => Individual
            [contact_sub_type_a] =>
            [contact_sub_type_b] =>
        )

[result] => Array
    (
        [error_code] => already exists
        [sql] => INSERT INTO civicrm_relationship_type (name_a_b , label_a_b , name_b_a , label_b_a , description , contact_type_a , contact_type_b , is_active ) VALUES ('Case Coordinator is' , 'Case Coordinator is' , 'Case Coordinator' , 'Case Coordinator' , 'Case Coordinator' , 'Individual' , 'Individual' ,  1 )  [nativecode=1062 ** Duplicate entry 'Case Coordinator is' for key 'UI_name_a_b']
        [tip] => add debug=1 to your API call to have more info about the error
        [is_error] => 1
        [error_message] => DB Error: already exists
        [debug_information] => INSERT INTO civicrm_relationship_type (name_a_b , label_a_b , name_b_a , label_b_a , description , contact_type_a , contact_type_b , is_active ) VALUES ('Case Coordinator is' , 'Case Coordinator is' , 'Case Coordinator' , 'Case Coordinator' , 'Case Coordinator' , 'Individual' , 'Individual' ,  1 )  [nativecode=1062 ** Duplicate entry 'Case Coordinator is' for key 'UI_name_a_b']
    )

)

Dec 31 14:48:09  [info]
$Fatal Error Details = array(3) {
  ["message"]=>
  string(35) "API error: DB Error: already exists"
  ["code"]=>
  NULL
  ["exception"]=>
  object(Exception)#10841 (7) {
    ["message":protected]=>
    string(35) "API error: DB Error: already exists"
    ["string":"Exception":private]=>
    string(0) ""
    ["code":protected]=>
    int(0)
    ["file":protected]=>
    string(90) "/home/kmdero1q/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php"
    ["line":protected]=>
    int(456)
    ["trace":"Exception":private]=>
    array(13) {
      [0]=>
      array(6) {
        ["file"]=>
        string(90) "/home/kmdero1q/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php"
        ["line"]=>
        int(234)
        ["function"]=>
        string(10) "onApiError"
        ["class"]=>
        string(24) "CRM_Core_ManagedEntities"
        ["type"]=>
        string(2) "->"
        ["args"]=>
        array(4) {
          [0]=>
          string(16) "RelationshipType"
          1=>
          string(6) "create"
          [2]=>
          array(10) {
            ["version"]=>
            int(3)
            ["name_a_b"]=>
            string(19) "Case Coordinator is"
            ["name_b_a"]=>
            string(16) "Case Coordinator"
            ["label_a_b"]=>
            string(19) "Case Coordinator is"
            ["label_b_a"]=>
            string(16) "Case Coordinator"
            ["description"]=>
            string(16) "Case Coordinator"
            ["contact_type_a"]=>
            string(10) "Individual"
            ["contact_type_b"]=>
            string(10) "Individual"
            ["contact_sub_type_a"]=>
            NULL
            ["contact_sub_type_b"]=>
            NULL
          }
....

What version of CiviCRM are you using? Can you check for any Javascript error on browser?

Try rebuilding menu by running /civicrm/menu/rebuild?reset=1 or clearing CiviCRM cache.


set standard recurring unit on contribution site is there a way to set a standard for the dropdown of the recurring units (yearly, monthly, etc.) on a civi contribution site? We would like to have "yearly" instead of "monthly".
I tried to find sth in the configuration but apparently there is no easy way to do so.
Thanks for your help in advance.

The recurring configuration is present on contribution page under amount tab. There you can select the units that you want user to select when doing donation or payment.
The units supported by Civi are Year, Month, Week and Day
Doc: https://docs.civicrm.org/user/en/latest/contributions/online-contributions/#amounts-tab


Extension download error I am trying to install CiviVolunteer. When I go to extensions I get two errors:

"The CiviCRM public extensions directory at could not be contacted - please check your webserver can make external HTTP requests or contact CiviCRM team on CiviCRM forum."

and

"Unable to download extension from /single. Error Message: malformed"

Help!

Thanks!

I don't know if this is related to your download problem, but CiviVolunteer is currently incompatible with CiviCRM versions 4.7.21 and greater.

There is a beta version described here which restores partial functionality.


In Wordpress, I want to convert my installation from an external database to use the default database I am using CiviCRM on WordPress and I am moving my hosting to WP Engine - where I have all of my other sites hosted.  Unfortunately, I set this instance of CiviCRM to use a separate database, however, WP Engine only supports one database per install.  I am trying to convert my existing CiviCRM install to use the default WordPress database before I migrate the site to WP Engine.  Is this possible?

If I can't convert the install, can I create a new install (using the WordPress database) and IMPORT the data from the old site?

It's actually quite simple to combine your databases.

Do a database export of your WP database:

mysqldump -u [username] -p [wp database name] > wp-original.sql

It'll ask for your password and then output your WordPress database to the wp-original.sql file.
Do a database export of your CiviCRM database:

mysqldump -u [username] -p [civi database name] > civi-original.sql

It'll ask for your password and then output your CiviCRM database to the civi-original.sql file.
Create a new database that'll be your combined database.  This way, you will still have your two original ones in case of emergency.  Grant permissions on the new database to the user that has permissions for your WordPress database.
Load the two exports into the new database:

mysql -u [username] -p [new database name] < wp-original.sql
mysql -u [username] -p [new database name] < civi-original.sql

Edit your wp-config.php to have the new database name:

define('DB_NAME', '[new database name]');

Edit your civicrm.settings.php to have the new database name (and appropriate username/password, if you had different ones for CiviCRM).  This will need to be done in both places--once for the CMS database and once for the CiviCRM database.

define( 'CIVICRM_UF_DSN', 'mysql://[username]:[password]@[hostname (probably just "localhost")]/[new database name]?new_link=true' );

define( 'CIVICRM_DSN', 'mysql://[username]:[password]@[hostname (probably just "localhost")]/[new database name]?new_link=true' );

You can probably just copy the CIVICRM_UF_DSN value once you've fixed the database name and paste it in place of the CIVICRM_DSN value.
Log in and make sure everything works on your existing server.

For Drupal and Joomla users, the principle is the same, just with settings.php and configuration.php, respectively, instead of wp-config.php.  The only difference is that on Joomla, you need to fix both civicrm.settings.php files (in administrator/components/com_civicrm and components/com_civicrm).

Now, I used to say that you should never put your site on WPEngine because they used to only run a version of PHP that was too old for CiviCRM.  That's been fixed.  However, they still run very aggressive caching, and you may find it to be a problem with CiviCRM.

You should definitely do your first run over there as an experiment and test it heavily, logging in as various users and trying out a variety of CiviCRM features.  There's a good possibility that it will either be unusable or take more of your time than you'd save by having things in the same place.  If you think of it, please comment with your experience--whether it works or doesn't.


Import participants with fee levels and price sets Is there any information available on if it is possible to import event participants with price sets, and if so how?

There is a field in the field matching that says "Fee Level" but I am not at all in the clear about this. Is that the text from the field in the standard fee level?

Fee level indeed represents the options selected within a price set for a given event (if you look at the "Events" tab on a contact record, you will see a column where fee level selections are concatenated per event registration).

To avoid duplicate participant records, I'm thinking you might need to do this in two passes - first, import the participants without any associated contributions (using the GUI import wizard should suffice), then import contributions. Since you can't use the GUI to import multi-line item contributions, you may wish to make use of an API if one is already available so that all of the relevant financial tables will be updated and all entity tables linked accordingly.

Hope this helps,
Tamar


How to setup Clickatell I am having issues trying to setup Clickatell SMS provider, I am running Civi 4.6.26 on wordpress 4.7.5 using the clickatell extension 3.0 and have a Clickatell Platform account.

I keep getting "ERR: 001, Authentication failed" I am not sure why I have checked the username and password, and I can log into the Clickatell portal using those details.

I have tried putting in the "api_id=" in front of the api key but then it says it is invalid.

any help would be appreciated

Here's a link to the current docs for setup of CiviCRM / Clickatell.

In that there's an example that suggests api_key=XXX is the correct format. It gives this example (when using a specific 2-way config):

api_id=1234567
from=15558238168
mo=1

Those docs also give instructions to set up an API product and obtain the key (which it looks like you've done), and say "Be aware that your Clickatell API password may differ from your Clickatell account password." which may be the problem you're hitting?

If you're getting a meaningful "authorization failed" response back I'd be inclined to take that as it is given and verify those authorization details (username, API password and API key) are configured right.

Next steps might be to debug around this line to see if the parameters are being set correctly, or to seek out support from someone able to do so.