Wordpress Shortcodes for Displaying subsets of events I understand there is a shortcode for displaying a list of upcoming events, that is

[civievent_widget]

Is there a way to display categories of events as shown below?

http://www.torontodance.com/events/categories/salsa/

Also are there ways to filter events by location and other filters?   If so, how?

Thank you!

The shortcode you refer to is provided by the CiviEvent Widget plugin. It has a number of configuration options which you can read about on the plugin homepage. I would look at the custom_filter options to see if you can make it fit your requirements.

If the widget doesn't allow filtering by event category, I'd consider a more complex (but also more flexible) system based on Event Organiser and CiviCRM Event Organiser which will definitely do what you're after.

Have a look at the standard calendar, an event category and the list of events at a venue for the kind of things that are available out of the box.


civiCRM Cron only run one mail_report scheduled jobs? I'm using CiviCRM 4.4.6 in drupal 7.

In my scheduled jobs list, I had 3 scheduled jobs of membership report: report A, report B, and report C. These reports will send out email with different csv attachment.

When I click "Execute now", these 3 reports send email perfectly.

I'm using Elysia Cron to control both drupal and CiviCRM cron, and use external crontab to run cron in my control panel.

CiviCRM cron runs, but it only trigger report A. Both report B and C is missing.

My question is:

Does CiviCRM cron only allow one mail_report scheduled job to be run?

If so, does it mean that I have to put in multiple report IDs (instanceId) in one mail_report scheduled job?

I tested it, and only one instanceId is allowed in one mail_report scheduled job.

Is there any way I can send out multiple email reports when running cron?

You have to create 3 instances of the mail_report scheduled job.

To do that, use Add New Scheduled Job button on the Settings - Scheduled Jobs page (civicrm/admin/job?reset=1)

On the creation page, set API call to Job / mail_report (api.job.mail_report) and define in Command parameters the appropriate instanceId and format options.


What happended to the ability to expand parent groups in the Manage Groups page? The Manage Groups page used to show a little icon you could click in order to see the child groups of a parent group. Now, under 4.7.6 there are no icons. This means you can't see or manage the child groups. This is a major issue for us.
Any suggestions for how to fix this. Is it a bug?

As you noted in the comments below, there is a JIRA discussion about this issue. The issue has been tracked down, and a patch submitted (which is now in Q&A and slated for 4.7.8).

Per @jitendrapurohit on the Jira thread above:

  Submitted a PR - https://github.com/civicrm/civicrm-core/pull/8323

  1) First issue mentioned above was the regression of CRM-18184. Seems
  the patch attached on that was different from the PR submitted. This
  was later fixed in this PR
  https://github.com/civicrm/civicrm-core/pull/8020

  2) Second point was a regression of this commit. The updated params
  loses the key('parentsOnly') sent from $_GET.


Can i use CiviToken in Custom Fields Can i use CiviToken (https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken) as Default Values in CiviCRM Custom Fields the same way Drupal lets you use it.

Thanks

No that is not possible. The tokens in CiviCRM are used in letters/emails. So they are used for communication with the contacts in your database.

Also note that a token in CiviCRM is always related to a contact.


How to resolve SMTP connection failing problem with code 535? After upgrading CiviCRM from 4.6 to 4.7.14 I was not able to send (test) emails via SMTP. I got the following error:

  authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 Ready to start TLS)]

After replacing some code in /packages/Net/SMTP.php like Matt suggested I'm now receiving the error:

  authentication failure [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 535, response: 5.7.8 Error: authentication failed: authentication failure)]

Maillog says:

  Dec 21 11:19:55 rs0815 postfix/smtpd[31606]: warning: SASL authentication failure: client response doesn't match what we generated
  Dec 21 11:19:55 rs0815 postfix/smtpd[31606]: warning: rs0815.rs.example.de[123.123.123.123]: SASL DIGEST-MD5 authentication failed: authentication failure

I doesn't make a difference if I use PHP 5.5 or 5.6.

Any idea what could cause this?

I had this very same problem with SMTP and couldn't find a solution with the configuration, although I didn't change the code you mention.
I found a workaround by choosing mail() instead of SMTP in Administer>system settings>outbound email, since when I've had no problems.  The default option should apparently work fine on linux systems, if that is appropriate.


Event registration form does not show submit button when a 100% discount coupon is used I run Civi 4.7.13, and trying to setup an online registration form for a CiviEvent.
When no coupon is used, the event registration submit button is the "Pay Pal Checkout" button.
But when the amount is 0 because a 100% discount coupon is used, there is no paypal button and the registration form cannot be submitted.

That looks like a bug, but I notice your CiviCRM is 4 versions behind the current one, so I'd update your CiviCRM first before doing anything else.

I have seen some similar issues in the past - when you have an on-site payment processor, there is some logic that hides the payment form when no payment is due. Perhaps in combination with an off-site processor like Paypal Standard, the hiding of the payment form turns into hiding the submit button.


Removing the contact search on a contribution page I am making a donation page in wordpress using civicrm (latest version for wordpress). For someone who comes to the page for the first time I would like to give them the option of signing up for a newsletter.

The issue is that at this stage they have not signed up yet so they are not in the database. I have a profile attached to the bottom of the donation page to allow them to put in their details. Another issue with the search bar is it allow you to find anyones email address just by searching for their name which is also not what I want.

I was wondering how to remove this search bar asking to select someone else. I would prefer for it to go to an anonymous form that doesn't let you search for contacts. See picture below of the yellow bar containing the form.

I have a fully working donation page set up in civicrm where:

there is a Financial Type "Donations" set up in
Administer/civicontribute/financial type.
Financial Type is set up in the relevant Contribution Page as "Donations".
A Profile is attached to the contribution page that collects
information in fields such as first name, last name and email
address

The settings in the profile are set to 'Used For' standalone form or directory.  'Search views' are switched off.  Advance settings include "Wordpress User account required".

I assume that you have a log in facility set up in the CMS Wordpress and that you have switched on 'Anyone can register' in Wordpress/Settings/General.  When a user completes your form, they should then get registered in both Wordpress and CiviCRM.

You may be seeing the Search Bar only because you are personally logged in as Admin.  Try looking at the contribution page when not logged in and see what shows.

Hope this helps!


CREATE action for profile missing (v3)? I want to create a profile but I don't see that in the action dropdown. Have attached an image

Please help.

The entity is called UFGroup, and UFField for the fields. The naming is historical. The Profile entity is used to do something equivalent to filling out and submitting a profile form on the front end.


How can I allow an anonymous user to generate an email to themself? I am using CiviCRM with WordPress.  I have just learned how to use "contact.checksum" to send an email to a user to safely let them edit their own personal info.  I can do that when they sign up for membership, or other events.  It's great!

I would like to have on my web site a link or button that allows users to fill in an email address and generate an email to that address (with the checksum link).  In other words, "click here to view and edit your data".

Ideally it would then confirm that the email was sent, but mostly I just want "send the checksum email to me please".  I have the message template ready, but how to I let the user trigger it?

Someone else may have a simpler answer, but here's how I would do it:

Install the extensions "CiviRules" and "Email API".
Create a group called "Requested Data Update Email".
Create an email template with whatever you want, including the checksum.
Create a rule that when someone is added to the new group, they receive the email you just created.
Create a profile (or a Caldera form, if you prefer) that requests email, and any other info you like.  Configure the profile so that submissions add the person to the new group.
Optionally, add a second action to your rule to remove the person from the group, depending on whether you want them to be able to request the email multiple times or not.


Social Settings on the bottom of contribute pages On  the bottom of the create page there is a button to turn on social media. Where do I add the links to configure twitter, google, facebook and linkdin?

I believe key here is that what CiviCRM inserts are social media 'shares' - not social media 'links' or 'follow us'.

for social media links we add https://www.drupal.org/project/social_media_links
(I'm sure in wordpress land there are plugins that work exactly like this drupal module).

Social media links behave as you asked in your question: you must configure which icons you want and add their targets (links to them). These targets typically are your twitter feed; your linkedin page; your etc.


Is it possible to send an registration email confirmation to 2 recipients? We are working on an event registration and would like to have the option to have the email confirmation sent to more than one email address.

In some cases an assistant will register people and they want the email to go to the person completing the form and the registrant.

Does anyone have a way to do this?

Using CiviCRM 4.6.26 with WordPress.

Create an Alphanumeric Text custom data field (call it CC Email) in a set of custom fields used for Participants.  Note the name of your set of custom fields.

Add your CC Email field to a Profile. This will allow the registrant to specify a CC email when registering for your event.

Find the table that was created in your database for your custom field set. Assuming your civicrm tables have 'civicrm_' as a prefix, it will be named something like civicrm_value_mycustomfields_#.  This table will have a column for your CC Email field.

Override the sendMail() function in CRM/Event/BAO/Event.php:

Find the section of code in the sendMail() function that deals with adding CC and BCC emails:

$sendTemplateParams['cc'] = CRM_Utils_Array::value('cc_confirm', $values['event']);
$sendTemplateParams['bcc'] = CRM_Utils_Array::value('bcc_confirm', $values['event']);

After this code, query to see if there is value in your custom CC Email field for the current Participant and add/append the CC Email address.

$query = 'SELECT my_cc_email_field FROM civicrm_value_mycustomfields_# where entity_id ='.$participantId;
$dao = CRM_Core_DAO::executeQuery($query);
if($dao->fetch()) {
  $ccEmail = $dao->my_cc_email_field;
  if(is_null($sendTemplateParams['cc'])) $sendTemplateParams['cc'] = $ccEmail;
  else $sendTemplateParams['cc'] .= ', '.$ccEmail;
}


Downgrade 4.7.29 to the latest LTS 4.6.37 - is it possible? I've been asked recently [thanks to this post-https://civicrm.org/blog/jackrabbithanna/why-civicrm-long-term-support-lts-is-important ] about switching to the latest LTS, which is 4.6.37, from 4.7.29.

The first (and only) attempt fails right at the "your database doesn't seem to have civicrm_settings table" message.

So, any way to downgrade (or any arguments for not to?). It updates easily to the latest 5.2., but "LTS is LTS". Thanks!

Is it possible? - Probably, with a lot of time and skill.

In most releases, there are changes to the database structure or table content determined by the files under CRM/Upgrade. To revert back to a previous version you could in principle work through all the updates between your current version and the one you want to go back to and reverse each change in your database.  So if a table had a column added, you would need to remove it etc.  If a column was dropped, you'll have a harder time adding it back as you may not have the right values.

A git diff to show the differences in CRM/Upgrade runs to nearly 10,000 lines (depending on what options you use), so you would have a lot to work through!

Upgrading is regarded as a one-way process. If you do have the time and skills to successfully revert, I'd suggest that is more beneficially put to use in fixing any issues you find in the latest release.


Why aren't State options non-default countries (outside UK) showing for billing address on the contribution page of a webform? Drupal 7.39
CiviCRM 4.5.8
Webform Integration 7.x-4.11

I've got a webform to capture membership info and payments.

To share the address with related contacts, Contact 1's address is captured twice, once in a main details section and again on the final contribution page.

When entering the first address the country and state fields work fine. If a non-uk address is selected the expected state/province fields are available to select. (The organisation already has a number of overseas members).

United Kingdom is the default country in localization settings.

On the contribution section, the uk states appear as default. If Uk is deselected and another country chosen the state field displays only the UK options.

When accessing the related contribution page directly the address fields behave as expected. States list populates dynamically from the chosen country.

The contribution page is configured specifically for use with the webform so no profiles are included the profile tab.

I've tried deselecting uk as default and leaving that for the user to choose. But that meant no states at all were displayed in the state box on the webform.

State/Province is configured as a required field on the webform contribution page so leaving it set to none means payments can't be configured.

As it stands the form can be used for domestic membership sign ups, but cannot be used by prospective overseas members.

Has anyone seen anything like this before? Any pointers to settings I need to amend?

Thank you!

I had this problem too on the main Civi911.com checkout form, and then I was all the more sheepish when it turns out the issue was reported by my coworker Tyrell for one of our clients!  It's a bug in 7.x-4.11 and earlier: https://www.drupal.org/node/2516936

If you upgrade, the state/province in the billing address should update along with the country.


Why am I getting this message when setting up membership payment page? Using 4.6.8 I have a monthly membership that is not auto-renew, and I am using a payment processor that supports recurring payments (Go Cardless for UK direct debit). Now I want to set up a membership payment page.  In the 'Amounts' section I checked 'recurring contributions' but when I tried to save I get the message "You cannot enable both Recurring Contributions and Auto-renew memberships on the same online contribution page."
Which isn't helpful as the membership isn't auto-renew.  What am I doing wrong?

Isn't this because the auto-renew function on the Membership tab takes care of the recurring payment, so you don't need to also enable recurring Contributions? Does the Manual help clarify this for you?


Cannot see On Hold column in Views 3 I am trying to create a view in Drupal listing all contacts marked as 'on hold' due to their email bouncing.

I am unable to find this 'on hold' field for selection in Views. Is this by design or is there some fault with my install.
If this is by design, is there a way to show this in Views so I can complete this 'report'?

I believe the difference maker here is the CiviCRM Entity module.  I have two Civi installs, one with it installed and one without.  The install that has CiviCRM Entity has "CiviCRM Email: On Hold" as a field, just like Catorghans' answer indicates.  The install that does not have the module only has the Email fields listed in your screenshot.

If you are able to install the module, Mark, I think you will find your solution.  It is an excellent module that exposes a significant number of data fields to Drupal and Views.  Out of the box only certain fields are exposed to Drupal as usable fields.


Is there a way to put CiviCRM in read-only mode or deactivate forms programmatically? I have recently set up our website so that I can put it in read-only mode (using the Read Only Mode module) when doing maintenance, such as upgrades and code pulls, however, this is a Drupal function only and I noticed that while in read-only mode, CiviCRM front-facing forms, such as CiviContribute forms, as well as backend functions are still available.

Is there a way to either put CiviCRM into read-only mode or turn off/deactivate the CiviContribute forms? I have written a bash script that runs all my update/upgrade processes and would like to find a way to do this using drush. For staff, I'm thinking of just deactivating the link to CiviCRM in the administrative menu, but I am most concerned with making sure users can't process transactions and write to the database during down-time.

I'm on CiviCRM 5.1.0 and Drupal 7.59

For the CiviContribute forms, you can choose Disable for each form from the Manage Contribution Pages screen (civicrm/admin/contribute?reset=1 on 4.6 LTS).  The Disable option is under the More link. When maintenance is done, you can Enable each one in the same way.

For something from the command line:

There is an entity in the API called ContributionPage with a parameter called "Is Page Active?" (is_active). I just executed the Create action thru the API Explorer and it seems to have worked. I would test it out and see what works best for you. The API Explorer lists the drush command as: drush cvapi ContributionPage.create sequential=1 id=15 is_active=0 (0 being disabled and 1 being enabled)


How to detect/handle card failure from Payment Provider's callback URL I have implemented a payment gateway for SwipeHQ's 1-off payment mechanism. It's similar to PayPal's mechanism in that there's an LPN that notifies CiviCRM of the success/failure of the transaction, and also a callback URL.

SwipeHQ adds a couple of URL parameters to the callback URL to notify of success/failure. These are in addition to the mechanisms in the LPN.

e.g. &user_data=619%2C7%2C5a00dbadde859a90b262eb532f863d98%2C%2C%2C2%2C%2C&response_message=INVALID%20CARD%20NUMBER&response_code=14&result=declined

My issue is that the standard Thankyou page in Civi has no way of picking up this important info and using it to instruct the user to try again. The message there is "Thank you for your payment" or whatever is set up as the thank you message.

So what's the best/right way to handle this?

is there a hook that could be used on the Thank you page to change the message?
or might it be easiest to just override the Thank you php and tpl files in order to display appropriate messages? I'd rather that this could be integrated into the payment plugin rather than having to mess with overrides though.
perhaps just some jQuery added to the page to do some dynamic HTML rewriting based on URL params?
or as suggested in another question/answer, use the LPN trigger URL to give to the payment provider as the callback, and integrate the checking into that file. It would end with a redirect back to the thank you page on success.

The latter seems like a possibility, but may have some issues:

How would you handle HTML display in the case that it's not "success"? Just spit stuff out directly from the LPN? But this wouldn't have any other templating etc from the CMS. What other pages could be used to redirect to?

Thanks in advance for any advice.

I would -

make the return page a CiviCRM IPN callback - civicrm/payment/ipn/XX (where XX is the database ID of the payment processor in use).
from this IPN callback, which is a method in your processor, return a 302 to the Thanks page if the transaction "checks out", and the Unsuccessful page if not

Probably the best "reference" payment processors are NOT those in core, but those based on Omnipay.

Hitting civicrm/payment/ipn/XX will land you in CRM_Core_Payment::handleIPN() which should in turn call your processor's $processorInstance->$method(); determined via CRM_Core_Payment::handlePaymentMethod().
Eileen's Github probably has a few Omnipay based processors worth checking out.


Select2 in php forms? I have a simple quickform --
    $this->add('text','trial_number','Trial Number',TRUE);
    $this->add('date','Trial_Date',ts('Trial Date'),CRM_Core_SelectValues::date(NULL, 'Y M d',15,1) );
    $this->addEntityRef('judge',ts('Assigned Judge'));
    $this->add('advmultiselect','started_components','Started Components',$this->getOptions("regComponents"),FALSE);
    $this->add('advmultiselect','advanced_components','Advanced Components',$this->getOptions("regComponents"),FALSE);
    $this->add('advmultiselect','excellent_components','Excellent Components',$this->getOptions("regComponents"),FALSE);
    $this->add('checkbox','elite_offered','Elite Offered',FALSE);
    $this->add('advmultiselect','games_components','Games Components',$this->getOptions("gameComponents"),FALSE);

However, the advmultiselect fields I would like to use select2 for multiple selections of the options.  I have searched, and searched, yet cannot find any examples as to the format of the select2 add.  The options are straight forward - all in a function called getOptions().  The advmultiselect works, but well, that's just ugly.
What is the format of the add('select2'.... and what attributes can I set?
Thanks
Norm

It should work using the following format
$this->add('select', [YOUR CODE HERE] array('multiple' => TRUE, 'class' => 'crm-select2'));

https://docs.civicrm.org/dev/en/latest/framework/quickform/entityref/
https://select2.org/


configuring SMTP on windows 7 for Civicrm I am running CiviCRM 4.7.20 on Windows 7, Wordpress. CiviCRM will be accessible only in our LAN network. Want to use the mail functionalities. Got stuck with the email configuration. Bit confused with the steps. I need to send emails to my contacts from 1. Gmail 2. My institute's email addresses.

Is SMTP necessary? If yes how to proceed? If no, what other options?

New to Web technology. Any help would be appreciated. Little better explanation than help docs is needed

Thanks,
Partha

If you want CiviCRM to send email, you'll need a means of delivering them! SMTP is the internet protocol for doing this. Unlike Linux, Windows does not typically include an SMTP service out of the box. That's OK - you probably want to outsource that task to a provider!

Since you're coming from a LAN, it may be that your internet provider offers an SMTP server you may use. This would be suitable for limited mail use, but not suitable for large mailouts. Consult with your ISP to understand their usage policy.
You mention you're on a LAN at an institute. It's possible your institute provides an SMTP service already - your IT support (assuming you aren't the IT support yourself!) may be able to help.
Dedicated SMTP providers (Wiki listing) are your next option.

Some of these offer a free tier (see my comment below). Free service may have some other cost associated, so choose a provider that you trust (they will be delivering your mail!) and can rely on.
Some of these providers will require a plugin to work well with CiviCRM.

It's possible to use some "regular" mail providers (Google Apps and similar providers) as an SMTP service. Unless this is a development or test instance, I would not recommend this. (Basically, if you depend on the mails being delivered quickly, choose a dedicated service from those above and pay a few bucks.)
Since you're hosting on Windows, you can't use mail() or sendmail options without installing a local Message Transfer Agent (MTA). This probably isn't the right option for you; choose this only if you have experience with managing internet-facing mail servers.


Registration Form (profile) with selected groups only? I try to set up a user registration form (for the Front End) using a profile. Within the profile the groups should be listed, but just selected ones, not all. I could not find a switch for this.  Is this generally possible just to define the groups to be listed?
Thank you for your hints.

Visibility: Public Pages will be listed; Check your group Admin screen at:

civicrm/group?reset=1

If you're also seeing Groups in your Profile select that are listed as Visibility: User and User Admin Only - do let us know.

Added: if you don't want all your Groups that are configured Public Pages to be listed then try this:

create a custom field
add the custom field to the profile
create a smart group - that has your custom field in the search criteria


Amending relationship types has broken civi case I was updating a site adding new relationships for cases, and relabelling old relationships to make more sense in case context.

What I've since found is that the updates to the relationship table don't automatically feed thru to the case relationships/ settings.

Fast forward a couple of months and it turns out that the case manager is no longer showing in the case dashboard.

I've either changed the designated case manager relationship, or relabelled the relationship and it is not being picked up by the dashboard.

Can anyone point me to where I'd find the case type setting file in the backend so i can start diagnosing what I've relabelled and what relationship the case expects to see as manager?

Check the name_a_b and/or name_b_a fields in the database table civicrm_relationship_type. Check that they match the <name> entries in the <CaseRoles> section in the xml files in <path_to_civicrm>/templates/CRM/Case/xml/configuration. Depending on your version or upgrade history the xml definition might be in the civicrm_case_type table in the definition field.


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

Documentation shows that this should be visible under the "contributions" option in the dropdown list, but we cannot see it or access it at all. See pictures below showing that it is enabled and not able to be accessed in the contributions dropdown.

We had hoped that updating to version 5.8.2 would solve this problem and let us access Pledge, but unfortunately we still have no idea why we can't access it.

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

Any help will be greatly appreciated.
Thank you.

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

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


How can our users request an email with the contact.checksum links? I am using CiviCRM 5.18.4 with WordPress 5.3.2.

We considered having our contacts all become WordPress Users, but decided to go the route of allowing folks to view and update their own contacts, or register for events, using {contact.checksum} to access their own data.

This works well when I initiate the process by sending them an email, but I want folks to be able to edit their own data on their own timeframe, without waiting for an email from me.  So I created a "RequestedLinks" group, and a CiviRule set to send an email with customized links whenever a user joins that group (and then immediately remove them from the group.  So far so good.

But how do I create a profile or form to let them trigger that rule?  I want folks to enter an email address, without prompting, and submit that form.  So I created a one-field profile.  But do I display that profile in "Create" or "Edit" mode?  Neither does what I want.

Once again, I feel I am struggling to invent something that is probably very easy...  So thanks in advance.

The create mode should do what you want - have you ticked "Standalone Form or Directory" in the profile settings?
In case that does not work, we are currently developing an extension that probably does what you need. Unfortunately it is still in development and not yet documented but you can find the code here: https://github.com/systopia/de.systopia.selfservice


How do I get search actions to appear for multi-site users of one site How can I get the usual search actions to show up for a user? Search actions they can already do by editing a single contact, are missing from the list of actions shown after a search.  The missing actions are "Group - add contacts", "Tag - add to contacts", "Tag - remove from contacts", among many others.

When a user for a sub-domain does a search in CiviCRM, there are only 4 search actions available: Email- send now, Email - CiviMail, Export, and Mailing Labels.

In my environment, I am using the extension org.civicrm.multisite version 2.5 on CiviCRM version 4.7.9. I am using the multi-site extension to manage permissions for various sites. (Its a hierarchical organization with a head office and various chapters, so multi-site is a good fit)

When a user for one of the chapter sites (http://chapterA.largeorganization.org) logs in, they can only view and edit contacts within their site (ie their chapter). BUT, most of the search actions are missing as described above.

The user's role has the following Drupal permissions for the subsite:

CiviCRM Multisite: view all contacts in domain
CiviCRM Multisite: edit all contacts in domain
CiviCRM Multisite: list all groups in domain

You still need to grant the other normal civicrm permissions to the subsite user as you would to the primary user. The only difference would be don't enable view all contacts or edit all contacts.


CiviCRM Error - type E_ERROR was caused in line 550 I've got a wordpress site using CiviCRM and recently got an alert email indicating a technical issue identified on the site. Error details is listed below. I've googled for similar issues but went nowhere. Wondering if anyone has come across this or similar ? Any advice will be much appreciated.

Error Details

An error of type E_ERROR was caused in line 550 of the file /public_html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php.
Error message: Uncaught Symfony\Component\Filesystem\Exception\IOException: A temporary file could not be created. in /public_html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php:550
Stack trace:
#0 /public_html/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php(598): Symfony\Component\Filesystem\Filesystem->tempnam('/home/...', 'CachedCiviConta...')
#1 /public_html/wp-content/plugins/civicrm/civicrm/vendor/symfony/config/ResourceCheckerConfigCache.php(138): Symfony\Component\Filesystem\Filesystem->dumpFile('/home/...', '

This error is telling you that due to a filesystem (IO) error the system could not save a temporary file.

This could be due to:

Hardware issues with the storage medium.
No free disk space available.
Incorrect/insufficient permissions to save files in the location required.

You should check that the webserver/PHP user has permission to write to the location which will be in the full logs in your installation's ConfigAndLog folder in the CiviCRM files directory.


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

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

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

Using CiviCRM Version 5.3.2 and Drupal 7.59

This looks like a bug. It's coming from CRM_Case_Page_Tab::preProcess(), which calls CRM_Case_BAO_Case::getCases(), which then returns a list that's keyed sequentially, but then preProcess checks for a key that matches the case id, so there is no match.

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

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


Should "CiviCRM: view my contact" permission result in user being able to edit themselves in CiviCRM We think we have found a bug in the core CiviCRM related to user permissions.

If we give a role (eg authenticated) only the "CiviCRM: view my contact" permission. They have NO other CiviCRM permissions. Then as that user we go to our CiviCRM contact record (we did this by typing in the path as have provided no way to get there ie http://demo.fuzion.co.nz/civicrm/contact/view?reset=1&cid=230). On that page you get a EDIT button, which allows you to edit your contact details, and you are able to save these changes. I would assume this button should only be available if the role is given the "CiviCRM: edit my contact" permission.

We are on Drupal 7.43 and CiviCRM 4.6.14.

This is not the same issue as https://civicrm.stackexchange.com/questions/7151/permissions-view-my-contact-and-edit-my-contact-do-not-seem-to-work as I checked without the "CiviCRM: view my contact" they get access denied on the page.

This issue was a bug that has been fixed. For reference purposes you can see the issue here


Cannot get to Upgrade Now screen - Upgrade from 4.4.3 to 4.5.1 - Wordpress I am trying to upgrade CiviCRM from 4.4.3 to 4.5.1 (and eventually go to the latest version. I am doing it incrementally 4.4-4.5-4.6-4.7 to be safe). I have been following these steps

https://wiki.civicrm.org/confluence/display/CRMDOC45/Upgrade+WordPress+Sites+to+4.6

I am stuck at step 4:

Point your web browser to the following URL (you should already be logged in to Wordpress with administrator-level permissions):
http://wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

I copied the civicrm.settings.php file to the civicrm folder after I uploaded the new 4.5.1 files. When I try to go to the link above I get a Page Not Found error

If I remove the civicrm.settings.php file I get a Page Isn't working error

Does anyone have any idea on what I need to do here? Thank you so much for any help you can provide.

When I last did this, I went to  4.4.latest and then jumped to 4.6.15

I was able to bypass the 4.5 upgrade, the 4.6.x upgrade has all the db update scripts so you will not miss anything.


Creating other relationships for memberships on behalf of an organization Having trouble with memberships created on behalf of an organization that need a different relationship type than Employee of/Employer. I have a suspicion I'm simply approaching it the wrong way.

We have Individual and Institutional membership types. For Institutional memberships, there is a relationship type set of Designate of/Designator. The contribution form for purchasing Institutional memberships uses its own price set and price options set correctly to create that membership.

Included in this contribution form are the 'On Behalf of Organization' profile and the WordPress user account form.

When a new user purchases an Institutional membership the following get created:

New Individual contact (Contact A).
New Organization contact (Contact B).
A new Institutional membership for the Organization.
A relationship of Employee of/Employer between Contact A and Contact B.

Missing from these is the Designate relationship so that Contact A also inherits the membership. I'm not sure why this relationship isn't created despite the membership type requiring it.

The solution I'm pursuing now relies on implementing hook_civicrm_post in a plugin and doing some lookups with the API based on the membership object to create this relationship after the fact.

However it seems to be that nothing about Contact A (individual) who made the contribution on behalf of Contact B is available beyond the employee/employer relationship - which might exist for any number of other employees that are not the designate. I especially want to avoid this potential issue.

My expectation would be to find this in that particular Contribution object but no dice. Right now I'm thinking either getting Contact A's contact_id from the pre hook or from the form submission itself.

Is this behaviour a bug or am I missing an obvious setting? If not, surely there is a better way via the API?

I can think of two approaches.

One - instead of hook_civicrm_post, use use hook_civicrm_postProcess, like you describe, to grab the Contact A id.

Two - use hook_civicrm_post on the Membership object rather than the Contribution object.  This should get you Contact B's id.  You can then use an API get to look up the most recently created Relationship for Contact B, which should be Contact A.  Then use an API create to create your new Relationship.

I'd probably go with option two, personally.


Input file must be in csv format I am trying to import a csv file as a test into Civicrm. I first exported the exact same file from Civicrm, and then i tried to import the exact same file. When i click on Continue, i get an error "Input file must be in CSV format".
I have this error code:

Array
(
    [name] => Map1.csv
    [type] =>
    [tmp_name] =>
    [error] => 6
    [size] => 0
)

Can someone tell me what to do?

With kind regards,
Hilco Regterschot

Your name sounds Dutch, what often happens to me is that if you open this file with Excel and save it again, it is saved with ; in stead of ,

Could that be the case?

It also is possible it is saved as an Excel file in stead of .csv


create an Drupal core account when using a webform I would like to create a Drupal user account when a user becomes a member via a webform. Ideally a user would get redirected from the webform to a profile, but I do not think this is possible?

I have come across this article, which was written over 5 years ago, is it still valid? https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and

It seems like it would work, but for ease would this workflow be suitable?

User applies for account via a profile/Drupal core registration form (Payment pending group/role gets assigned)
Edit some template files so the site checks for current role assigned to a user and displays a message informing they have finalise the membership process and pay if they have the Payment pending role.
User is directed to a webform and pays.
User is removed from Payment pending and Added as a full member

I'm sure both solutions would work. It would be great to hear from other people who have more experience with Civi.

Cheers

You can use Drupal Rules to create the Drupal User for a contact when they get a Membership status of 'x'.

Here is one that KarinG has shared before Using CiviMember to automatically create a Drupal user

Thank you Karin


Can a webform list who has already signed up for an event? I would like to use a webform for people to signup for an event - but they need to see who else has signed up as these events need at least one of each gender. The event is a kind of 'first aid' event where you must have both men and women on duty - not just all men or all women.  I've used webforms for signing up individuals for events, but not run into this requirement before.

You can list the people using CiviCRM Views and add the View to the same page as the webform.  Easiest is to put the View into a block, but you can also do this with the Paragraphs module or Panels.


Can you use VBO to update activities on cases? I'd like to be able to bulk update the status of activities (that happen to be on a case) from a view.
I can get the status to update but the problem is it loses the Case ID along the way. For example, prior to updating the activity, say it was connected to case 1234. After I run the Bulk Update to change the status of the activity, it sets the case number to 1.
Any idea how to overcome this? (I'm in Drupal 7.)
Update: When I add the CiviCRM Activities: Case ID field to the view I get an error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'civicrm_activity.case_id' in 'field list'
The field should be civicrm_case_activity.case_id but I can't find in the code of CiviCRMEntity where to make that change.

Initially, when I built my view I was missing some relationships - thus the SQL error mentioned above. But even after adding the correct view relationships, the issue still persisted.
I got huge help from @jackrabbithanna on mattermost. He provided code for a civicrm_customs.module file that will give an "Update Activity Status" VBO action. https://gist.github.com/jackrabbithanna/34016f1e3dac7c1b44a893cc93eed6db
In notes from his chats:

this provides a separate action, not using "Modify Entity Values" action . . . that sidesteps the entity form irregularities
could do lots of complex things or whatever with API .. but this shows how to make own VBO action to people


How can i solve search issue in civiCRM? In Wordpress I create two forms: one for a teacher and a second for a student. I need to search for teacher data using the student search form. But I can't understand how to do it. Please give solution, how can i solve this issue?

Not sure what you are trying to do exactly, but if you are coding you could use the CiviCRM API to first find the teacher for the student with the API Relationship/Getsingle and then find the data for the teacher with the API Contact/Getsingle?

Aer you familiar with using the CiviCRM API? If not, explanation can be found on the documentation wiki: https://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API


facilitators viewing registration responses We have co-facilitators for our instructional events who are not staff. We want them to be able to view the complete registration profile responses (i.e. 'registration info') prior to their event in order to know how many and who are registered, plan the event content based on registration responses, etc. There may be several events concurrently registering, with different facilitators.

We have created the custom fields and registration profiles and a report that shows responses, and that is working well. Just not sure how to have others view it. Event registration includes some questions common to all events (contact-level), and some custom fields that are event-specific (i.e. participant, not contact, level- such as previous experience with the topic, contexts in which they use the topic, familiarity with the content, etc.)

What's the best way to do this? I am a non-developer user and we don't have IT staff.

Ideas for how to do this include:
a) creating a 'facilitator' role (Drupal 7), which would include permissions to view only the report that contains that event's registration info. Not sure how to do this, might require ACL's?

b) customizing the participant listing to include event-specific registration responses, and sending the link to that. Not sure how to do this, but can look into it if this is the way to go.

c) ?is there a way to get a checksum or profile link that would say ‘here’s our registration’ with an expiration date

Thanks!

The simplest non-IT solution is to create a participant report in CiviCRM with the information you need and then under Actions, Export it and email it to them.

The next option would be to do as you described with Drupal Roles and ACLs. The down side is the learning curve for them to learn to filter and sort the Civi Reports to get the data they need.  In the ACL settings you will probably need to give them access to everything that Donors have access to plus: CiviCRM view all contacts, CiviCRM view all activities, CiviCRM access backend and API, CiviCRM access CiviEvents, (depending on the level of access you want you can give the edit events), CiviCRM acess Report criteria (so they can change the filter/sort/group)

The third easiest would be to use CiviCRM WebForm Integration module Create your event registration form with Webform. You will then have several easy options to get them the registrations. a) You can give the "Facilitators" access to the Webform Submissions, b) you can set the submission emails so that a copy of the registration is sent to them when it is submitted, c) you can schedule a regular submission results (weekly, monthly) to be emailed to them, d) you can download the results and email it to them.

Another way is to create Drupal View page with this information on it. You can create a Drupal Role of "Facilitator" and restrict access to the page to Admin & Facilitator. This option would give you a url that they can access to see and sort the data as they need.


SOLVED CiviMobile won't login "please install CiviMobile in your CiviCRM" When I try to use CiviMobile on my phone to login to CiviCRM I get error "Please install CiviMobile extension in your CiviCRM".

Drupal7.67 / CiviCRM 5.12.2 / php7.2 / Running on Aegir
Installed CiviMobile 4.0.1 on my Android phone from Play Store and
can successfully log in to the demo.
installed CiviMobileAPI v4.0.2 from the repository and it reflects
as installed.
Installation directory is    /data/disk/xxx/static/platforms/platform_name/sites/collaborate2019.co.za/files/civicrm/ext/com.agiliway.civimobileapi
CiviCRM/Administer/CiviMobile settings reflects that the extension is
up to date
Login username and password and website URL
https://collaborate2019.co.za are correct (when I tried
https://collaborate2019.co.za/civicrm it gave me "Server API error")

Any ideas what I can try?

The Civimobile team was great. After updating the extension and app to the latest version 4.1.1 the app works like a dream.


How do I get wordpress and Civicrm membership synced? I have tried multiple times to be able to get Wordpress and Civicrm to be able to sync up when members register. When I go to CiviMember Role Synchronize it redirects to the page for my blog.

What can I do to be able to get Civicrm members and Wordpress users to be able to register and login at the same time

Thank you for your help

Thank you for your help. Turns out I didn't do the first step to installing
Wordpress Civicrm members sync:

  The first step is to Download the Plugin and put it under your sites
  wp-content\plugins\ directory and rename the folder as
  "civi_member_sync". Then Activate the plugin by going to your
  WordPress site's Plugin page at
  http://example.com/wp-admin/plugins.php It will be CiviMember Role
  Synchronize.

https://github.com/jeevajoy/Wordpress-CiviCRM-Member-Role-Sync


CiviReport - Error when registering new Report I've generated a new report in my extension, but when I try to register it with CiviReport, I'm getting the following DB error:
Database Error Code: Field of view 'sporti62_wp4.civicrm_option_value_en_CA' underlying table doesn't have a default value, 1423
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_option_value_en_CA (option_group_id , label , value , name , filter , is_default , weight , description , is_optgroup , is_active , component_id ) VALUES ( 41 , 'Dog Registry with Contacts' , 'dogregistry/contacts' , 'CRM_Dogregistry_Form_Report_Dog_Contact_Summary' ,  0 ,  0 ,  90 , 'Dog Registry with Contacts' ,  0 ,  1 ,  NULL )  [nativecode=1423 ** Field of view 'sporti62_wp4.civicrm_option_value_en_CA' underlying table doesn't have a default value]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_option_value_en_CA (option_group_id , label , value , name , filter , is_default , weight , description , is_optgroup , is_active , component_id ) VALUES ( 41 , 'Dog Registry with Contacts' , 'dogregistry/contacts' , 'CRM_Dogregistry_Form_Report_Dog_Contact_Summary' ,  0 ,  0 ,  90 , 'Dog Registry with Contacts' ,  0 ,  1 ,  NULL )  [nativecode=1423 ** Field of view 'sporti62_wp4.civicrm_option_value_en_CA' underlying table doesn't have a default value]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_option_value_en_CA (option_group_id , label , value , name , filter , is_default , weight , description , is_optgroup , is_active , component_id ) VALUES ( 41 , 'Dog Registry with Contacts' , 'dogregistry/contacts' , 'CRM_Dogregistry_Form_Report_Dog_Contact_Summary' ,  0 ,  0 ,  90 , 'Dog Registry with Contacts' ,  0 ,  1 ,  NULL )  [nativecode=1423 ** Field of view 'sporti62_wp4.civicrm_option_value_en_CA' underlying table doesn't have a default value]"]

)

I know it is likely related wp_globus plugin?  I do have two languages on my site - english and french.

Ok, again solved my own problem after doing more research.  This apparently is a known issue with mySql and MariaDB where strict mode seems to be default.  Adding sql_mode=""
to your /etc/my.cnf file will resolve the issue.


How can I find the transaction date of a payment by check? The question is double :

Is there a way to simply display this trxn date (not the Contribution date, but the date when the check was recorded) ?
The transaction is refered in civicrm_financial_trxn table : id, check #, trxn_date : how can I link this id to the contribution ?

trxn_id is the common denominator on the civicrm_financial_trxn table and the civicrm_contribution table

civicrm_financial_trxn.trxn_id
civicrm_contribution.trxn_id


Can't find MySQL server on WordPress install with sockets I am using Local by Flywheel which connects to MySQL with sockets. My socket is:

/Users/efc/Library/Application Support/Local/run/Qv8NIbiue/mysqld.sock

The MySQL server is localhost, database is local, and both username and password are root (and this really is a root account, I can even create new databases with SequelPro).

When I try to install CiviCRM 5.21.1 on WordPress 5.3.2 I get the error "Can't find the a MySQL server on 'localhost'.: The server requested authentication method unknown to the client" on the "Does the server exist?" line of the CiviCRM Installer screen. Oddly enough, every other item in "CiviCRM Database Details" is "OK" (green). In other words, even though it thinks it can't find the server, it seems to be able to do every other thing OK.

I cannot figure out how to tell CiviCRM what it needs to know to be happy about the MySQL server. How can I make this WordPress install work with sockets?

If I try to put "localhost:/Users/efc/Library/Application Support/Local/run/Qv8NIbiue/mysqld.sock" in the MySQL server field, then "Does server exist" is "OK" but almost everything else goes red.

Note, there are answers to similar questions for folks who have come far enough along in the install process to have a civicrm.settings.php file. But at this stage of the WordPress version's bootstrap it has not yet successfully installed, there is no settings file. This question is about how to respond to this error so that the WordPress version of CiviCRM can be installed in the first place.

Checking out other Stackexchange answers, looks like something along these lines should work

You can set the DSN in the civicrm.settings.php file using this format:

mysqli://user:password@unix(/path/to/socket)/databasename

Use the actual word "unix" in the string to indicate sockets.

For Reference this is the previous answer


How to allow users in ACL group to add & remove contacts in groups I'm implementing ACLs for a client.  Users can only have view or edit to a group when adding permissions, so then don't have the ability to add or remove a contact from that group. In fact, I've found there are ways to add and delete a contact to/from a group - but the more usual methods result in the message "API permission check failed for GroupContact/delete call; insufficient permission: require access CiviCRM and edit all contacts"
 This is a Drupal system & they have 'edit groups' permissions. Giving the permission 'edit all contacts' then opens up all contacts to a user, which is obviously incorrect.
Is this a limitation of ACLs? Or is there some way around this problem?

Can you try apply patch from here ? If the patch works for you than it would be worth adding your test result on PR to speed up the merge process.


Repeating Payments with Authorize.net Problem I've set up repeating payments (CiviCRM 5.21 with Drupal 7.69) with Authorize.net for a client.

In Civi, the transaction hangs at "Pending".

At Auth.net, everything looks good, the initial payment has been processed with a date set for the next transaction.

Also note that one-off transactions from the site process perfectly with the transactions showing as "completed" in CiviCRM.

Not sure on how to troubleshoot this.

I thought that @Eileen's notification log extention might help. However, the system log table is empty.

I'm not sure what the next step is for troubleshooting.

1) Make sure the Silent post URL is properly configured in Authorize.net.
Example: https://YOURSITE.COM/civicrm/payment/ipn/2 (the 2 needs to be replaced with your CiviCRM Payment Processor ID#)

2) It is possible that recurring payments are not processed instantly. It could be that recurring payments are processed in the middle of the night for example and therefore the payment will remain pending until it is processed.


why are my expired memberships showing as current? can't give any other details than looking at my memberships, I see every single membership is showing as current despite we are LONG past the date when the memberships expired.

All memberships were imported from a csv.

Is your cron running and is in the scheduled jobs "Update Membership Statuses" enabled?

If both are active what is in the "View Job Log" of "Update Membership Statuses"?

You can also run "Update Membership Statuses" manually once to see if this will solve your problem.


Number format with SMS Clickatell provider I set up a clickatell account and configured it in Civi. It only works if the phone number has a 1 in front for the country code. None of our numbers have the country code, is there a way around this?

I just faced (and fixed) this problem three days ago for a client by patching the Clickatell extension to prepend the "1" where it doesn't already exist.

In short - someone already wrote this patch, but it only works if you don't have contacts you want to text outside the US and UK.  The patch is referenced on CRM-14160 - or just find it here.

If you're not a developer, but you feel comfortable installing an extension from a zip file, I just made a Github repo here with the patched extension.  That said - I don't want to post it as the "new" Clickatell extension, because it makes some country-specific assumptions.

You can see that I updated the CRM-14160 ticket with what I think is the ultimate solution - which is for CiviCRM to know the country code associated with each country.  Then the Clickatell extension could check for whether it's present or not - and if not, then prepend it.


Uploading donations from a spreadsheet In another CRM program I was able to upload several donations at once into the system (from a spreadsheet). Can I do this in CiviCRM? the program would look for matches of names and update those contacts, then would create new records for ones where it could not match a name.

I have over 100 donations in a spreadsheet that I want to upload rather than going to each donor record and uploading all the information.

welcome to CiviCRM Stack Exchange! In CiviCRM there is an option in the Contributions menu called "Import Contributions". This allows you to upload contributions from a CSV file. Can you give that a try?


why are contacts images stored as absolute URLs? I have made a copy of my civicrm instance i.e from http://www.example.com/example to http://www.example.com/example1 and when viewing a contact, the contact's image url is still pointing to the old sub domain http://www.example.com/example/civicrm/contact/imagefile?photo=firstname_lastname_6580lk2b77fb4029f5a00000035d9.jpg

which causes long response time to view a contact and also i get a warning (Warning: getimagesize(http://www.example.com/example/civicrm/contact/imagefile?photo=firstname_lastname_6580lk2b77fb4029f5a00000035d9.jpg): failed to open stream: Connection timed out in CRM_Contact_Page_View->preProcess() (line 170 of /var/www/example1/sites/all/modules/civicrm/CRM/Contact/Page/View.php)

resource urls and directories have been updated, i'm on version 4.5.5

Note that this is not the case on http://www.example.com/example/

The schema for contact records specifies that the image be stored as URL (civicrm_contact.image_URL).

As an historical matter, I don't know why this was chosen, but it does come with some trade-offs:

If you write a UI in a different PHP stack, it's easier to share image uploads if they're URLs. For example, webform_civicrm accepts uploads using Drupal/webform techniques and then simply sets the URL.
If you have a complex site that spans multiple domains, the contact images can be shared. Similarly, if you're migrating into Civi, you can import the URLs without rearranging the image files.
It's trivial to include the image URL as a mail-merge token.
If you migrate the Civi site to a different URL, the contact images break.
If you access via APIv3, it's can be awkward to manage image data.

To fix contact images after migrating to a different URL, use SQL to perform a search/replace on field image_URL of table civicrm_contact. For tips on composing a search/replace, see, e.g., https://stackoverflow.com/questions/1876762/mysql-way-to-update-portion-of-a-string


How to limit number of contacts in a group? I have a max no of users limit for a group, so whenever someone adds a groupContact using the civicrm dashboard, I would like to present them with an error which prevents adding a new group and stating a message for the same.

I am using a civicrm_api() but could not figure out how to prevent the creation of groupcontact or provide a validation for the same?

Just to be sure: civi doesn't have any limit on the number of contacts per group, it's a business case you have that introduces that constraint, right?

I didn't find a safe way to prevent an operation (I'm not sure it's a good idea, it might introduce lots of problems later on, the best IMO is to fail the query).

One workaround to get that is to introduce an invalid value in the pre hook (eg set contact_id or group_id to null, the query will fail and it will prevent inserting.


Internal Server Error I've been working with CiviCRM for almost a year now. One problem we have is we frequently see the Internal Server Error 500 white screen of death. In particular, we cannot use the contact de-dupe tools. When we try to use them, the page runs for about a minute, then we get the error 500.
Does anybody know how to diagnose what is actually failing when the error 500 happens?
We are running CiviCRM 4.6.9 within Drupal 7 on Windows Server. Thanks for your help!

Generally, look for these logs:

CiviCRM's log (sites/*/files/civicrm/ConfigAndLog/)
HTTPD error log
PHP error log

Unfortunately, the locations of these differ by environment, and I don't know an answer for Windows Server.

Posted a similar (but broader) question: Where should one look for logs when debugging a new problem?


Is it possible to write a report to send a weekly digest of people who have filled in a webform survey I would like to send a report once a week to a client with everyone who has filled in a survey in the last week and has a particular tag.

IN civireport I can see I can filter by activity subject but the field activity date only has last 12 months, custom date, null, not null. I would like "last 7 days".

Also I can only see group not tag. I'm wondering if civireport can do this?

Thanks!

Are you using the Activity Details Report? It has a filter on activity data Last Seven Days including today. See:

In order to filter on a tag, you can create a smart group that contains all the contacts with the tag. That gives you the option to use the Group filter.


How to create and fetch custom URL for advanced search? I like to search for very specific parameters, the resulting URL's look like this:

http://localhost/crm4/civicrm/contact/search/advanced?_qf_Advanced_display=true&qfKey=5aa3233e9b46c807b76a536cee723745_4637

Now I would like to save that URL and create a menu link for it, but it keeps changing dynamically...

How can I do that? Save it as a custom search?

[SOLVED]

Solution is over here:

http://brunovincent.net/data/how-to-add-custom-search-url-links-to-civi-crm-advanced-search/


SEPA Mandate not visible on Contact anymore I have recurring sepa mandates on contacts (Members) but I can't see them while looking at the contacts.
The mandates are working and I can create the XML Export for the bank.
From the contact I can select the 'create SEPA mandate' Action but i can't see existing mandates.
I think the problem started after updating civicrm.

Welcome to Stack Exchnage Hans-Christian.
The latest version of CiviCRM contains changes regarding the display of custom tabs in the contact view that also affect CiviSEPA. You should be able to fix the described issue by upgrading to the latest CiviSEPA version (1.5): https://github.com/Project60/org.project60.sepa/releases


What is the scheduled job linked to Scheduled SMS Reminders? In CiviCRM 4.5, you are now able to create Scheduled Reminders to be delivered by SMS as well as email.

We're having an issue with these reminders, however, I'm not sure which scheduled job triggers their delivery?

Send Scheduled SMS - Sends out scheduled SMS
I thought this was the one to trigger bulk SMS deliveries that have been set up, the same and the Scheduled Email job?
Send Scheduled Reminders - Sends out scheduled reminders via email
Refers specifically to the delivery of scheduled reminders, but the description refers to email only. Has the description just not been updated?

Would be really grateful if someone could point be in the right direction to investigate the other issue we're having.

Heather.

I cannot answer your direct question, but I have an alternative solution.

We are using the extension CiviRules and the extensions SMS API and Email API to achieve the same.

Then you have the possibilities to set certain triggers/events, and conditions. At the end you can set different actions, and one of them is sending sms automatically via the SMS API

We are on 4.4, so you need to try it yourself though...


API for Event Registration with Custom Fields? I am trying to register event participants from code. I have created a custom field group for "Participants".

Using the API, how can I create a value for the custom fields and have them associated with the event that a contact is registered for?

Thanks!

Okay, I just figured it out. I just need to chain the API call with CustomValue create:

CRM.api3('Participant', 'create', {
  "debug": 1,
  "sequential": 1,
  "event_id": 145,
  "contact_id": 2,
  "role_id": "Attendee",
  "api.CustomValue.create": {"custom_223":3}
}).done(function(result) {
  // do something
});


save contact with non numeric phone number gives access denied civicm_strip_non_numeric I recently update civicrm till 4.6.2 till 4.6.4 on drupal 7.38, mariadb 5.5.41.
When saving a contact with a non numeric phone number (+32 123456798) I got the error:

Database foutcode: execute command denied to user 'civicrm-db-user'@'localhost' for routine 'civicrm-db.civicrm_strip_non_numeric', 1370

Array
(
[callback] => Array
    (
        [0] => CRM_Core_Error
        [1] => handle
    )

[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 26 ,  1 ,  1 ,  0 , '+32' ,  NULL ,  1 )  [nativecode=1370 ** execute command denied to user 'civicrm-db-user'@'localhost' for routine 'civicrm-db.civicrm_strip_non_numeric']
[type] => DB_Error
[user_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 26 ,  1 ,  1 ,  0 , '+32' ,  NULL ,  1 )  [nativecode=1370 ** execute command denied to user 'civicrm-db-user'@'localhost' for routine 'civicrm-db.civicrm_strip_non_numeric']
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 26 ,  1 ,  1 ,  0 , '+32' ,  NULL ,  1 )  [nativecode=1370 ** execute command denied to user 'civicrm-db-user'@'localhost' for routine 'civicrm-db.civicrm_strip_non_numeric']"]

)

I found the solution in adding the "execute" privilege to my civicrm-db user in mariadb using phpmyadmin.

I have a second civicrm db (non related to my first) still on the old version 4.6.2 which has no issues at all. I has no "execute" privilege and does not need it.

Civicrm doc (http://forum.civicrm.org/index.php?topic=23489.0) does not mention execute privilege.

list of grants to my civicrm user:
Grants for civicrm-db-user@localhost

GRANT USAGE ON *.* TO 'civicrm-db-user'@'localhost' IDENTIFIED BY PASSWORD 'pwdhere'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE ROUTINE, ALTER ROUTINE, TRIGGER ON `civicrm`.* TO 'civicrm-db-user'@'localhost'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON `civi`.* TO 'civicrm-db-user'@'localhost'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE, TRIGGER ON `civicrm-db`.* TO 'civicrm-db-user'@'localhost'

trigger rebuild did not fix the issue. (/civicrm/menu/rebuild?reset=1&triggerRebuild=1)

automatic_sp_priveleges variable = on in mariadb

Question: did I miss something in the update, does the latest version need different rights? I think I found a workaround, but not the actual error. Has someone the same issue?

Kind regards

Johan.

I checked a site that is currently being test-upgraded from 4.4.14 to 4.6.4, so we have both the 4.4.14 and 4.6.4 versions.

In 4.4.14:
GRANT EXECUTE, ALTER ROUTINE ON FUNCTION mycividb.civicrm_strip_non_numeric TO 'myuser'@'localhost'

In 4.6.4:
GRANT EXECUTE, ALTER ROUTINE ON FUNCTION mycividb.civicrm_strip_non_numeric TO 'myuser'@'localhost'

I.e. the same. This permission normally gets automatically granted for this function, when the function is created, which happens when triggers are set up. This is done automatically by MySQL:

  The EXECUTE privilege is required to execute stored routines. However,
  this privilege is granted automatically to the creator of a routine if
  necessary

https://dev.mysql.com/doc/refman/5.5/en/stored-routines-privileges.html

From the MariaDB docs:

  To run a stored routine, the EXECUTE privilege is needed. This is also
  temporarily granted to the creator if they attempt to run their
  routine unless the automatic_sp_privileges variable is set to 0.

https://mariadb.com/kb/en/mariadb/stored-routine-privileges/

Worth checking the automatic_sp_privileges variable.

Does a trigger rebuild (/civicrm/menu/rebuild?reset=1&triggerRebuild=1) fix the problem?

You say you solved the problem by adding the "execute" privilege to your drupal-db user. Did you mean your civicrm-db user? If you post the results of SHOW GRANTS for the relevant users, that might help to diagnose what's happening.


Totals without showing each contact in Contact related reports Is it possible to have contact reports with listings that do not initially show each contact as a row but displays only the totals for the sorting groups?  I have thousands of contacts and want to have a report that shows how many contacts are within each postal code or totals for each gender, etc.  I know we can get the totals to be displayed using the Sort area and clicking the check box for "Section Header / Group By".  However, my results have hundreds of pages and I just want to see the totals for each category.

We are currently on CiviCRM 4.6.20.0 on Drupal.

one way to do this would be to use the Aggregation feature in Drupal Views. This can be set to give you a 'count' for any of the fields in the row, so you could have your postcode in one column and a 'count' of the 'contact IDs' in the next. You would then be able to make the 'postcode' function as a link so that you could then click through to see all the contacts in that postcode.

Of course it really depends what you want to 'do' with that data after you see it. But if reporting the numbers is the primary goal, this may work for you.

Expect others to provide a 'how to' using Reports directly.


How do I suppress the local country on address labels? I tried to apply this solution to allow me to suppress the country field on address labels for my own country, using the 4.6.2 CiviCRM release. I successfully used this on the project when I built it a year or so ago but it does not work any more, even allowing for line number changes in the current version. Can anyone advise what I need to do to get it working again? Go to say I'm not sure which version it got broken in as I'd forgotten to apply it the last couple of times I upgraded but someone else in our organisation pointed it out to me earlier today.

This extension
https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken

Has a token called 'Conditional country' - which does that
https://github.com/eileenmcnaughton/nz.co.fuzion.civitoken/blob/master/tokens/address.inc#L7

You can use the token in the mailing label
http://dmaster.demo.civicrm.org/civicrm/admin/setting/preferences/address?reset=1


How to clear hook cache When I am changing a query or logic in my hook, I have to reinstall the entire module so then only the updated logic / code works in civicrm.

Is there a settings to clear the cache or something

I tried the below options none works

1. Admin > System Settings > Cleanup Caches

2. http://localhost/drupal/civicrm/menu/rebuild&reset=1

Just go to http://localhost/drupal/civicrm/clearcache. This does a pretty thorough cache clear, including hooks.


Why won't CRM.loadForm render url containing civicrm/a/#? This call:

CRM.loadForm(CRM.url('civicrm/a/#/tournament'));

works very well for any url that does NOT contain 'civicrm/a/#'. As soon as I try to open anything from an extension, the popup stays 'white.' No errors. Just ... white.

Is there a way to make that work for such url?

How about just plain javascript:

window.open(CRM.url('civicrm/a/#/tournament'), 'mywindow', 'scrollbars=yes');

Obviously 2nd and 3rd parameters can be whatever you want.

Works on dmaster.demo.civicrm.org (with 'civicrm/a/#/caseType/new', since I assume "tournament" is something custom).


Disable Debit Card Payment Method option It looks like I can not disable the Debit Card option in CiviCRM.

It is safe to disable this option in the database? Is there another option?

These are reserved payment option to which civicrm does not provide an option to disable or delete them.

Would recommend to first disable it from a development site database since this might result in an unnecessary fatal error as civi expects it to be available in multiple places. If you don't see any error - you can just repeat it on live.


How to display Individual Custom Fields in a Participants View I want to create a View :

which displays some Individuals Custom Data (e.g. Passport information)
where Individuals are filtered according to their Participation to an Event (id=20)

I imagine 3 different ways to do that but none of them is working :

Create a Contact oriented View and filter via some civicrm_participant fields but the civicrm_participant table (and fields) is not accessible for filtering :
Create a Participant oriented View ans add some Individual Custom Fields : but in this case, the custom fields are not populated though I was able to add them :
Create a Smart Group based upon the Participants, and then filter the Contact View on this Smart Group, but Views does not seem to consider Smart Groups, but only Static groups

Of course, I checked that my custom field tables are included in settings

Clearing the caches has no effect

How can I solve my problem ? (civicrm 5.6.0 / Drupal 7.60)

You should be able to achieve what is required by creating a CiviCRM Participants view and using the CiviCRM Participants: Participant's Contact ID as a relationship to bring in contact custom data –

Or import the belew view (I've removed custom data so this needs to be added yourself) -

$view = new view();
$view->name = 'individual_and_participant_view';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'civicrm_participant';
$view->human_name = 'Individual and participant view';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master /
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Individual and participant view';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '100';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
  'id' => 'id',
  'display_name' => 'display_name',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'id' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'display_name' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
);
/ Relationship: CiviCRM Participants: Participant's Contact ID /
$handler->display->display_options['relationships']['contact_id_1']['id'] = 'contact_id_1';
$handler->display->display_options['relationships']['contact_id_1']['table'] = 'civicrm_participant';
$handler->display->display_options['relationships']['contact_id_1']['field'] = 'contact_id';
/ Field: CiviCRM Events: Title /
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'civicrm_event';
$handler->display->display_options['fields']['title']['field'] = 'title';
/ Field: CiviCRM Contacts: Display Name */
$handler->display->display_options['fields']['display_name']['id'] = 'display_name';
$handler->display->display_options['fields']['display_name']['table'] = 'civicrm_contact';
$handler->display->display_options['fields']['display_name']['field'] = 'display_name';
$handler->display->display_options['fields']['display_name']['link_to_civicrm_contact'] = 0;

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'individual-and-participant-view';


Mass mailing Click-Through tracking doesn't include domain in 5.27.3 We sent a mass mailing under 5.27.0 (Wordpress) and the email Click Through links were invalid as noted earlier. They did however include our domain.
We upgraded to 5.27.3 and the links are still invalid. They appear to be missing our domain, e.g.
http://?civiwp=CiviCRM&q=civicrm/mailing/url&u=674&qid=63201

I've not seen this myself (domain missing) but the base page is missing as well from your link.
I'd review the following:

make sure that the base page is set - go to https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fuf&reset=1

Review the Base Page setting and value, it cannot be blank

Make sure there is a published page that matches the one in that page

If there is no value there, add one, civicrm is the default and then create a WP page with that slug

Make sure the page is public and visiuble to all

Once you've done that (or confirmed the base page exists) Visit this page https://example.org/wp-admin/options-permalink.php

Confirm that your permalinkls are set to anything EXCEPT Plain

If it is set to Plain change to one of the other options and save

If it is not set to plain, you can exit the page

Flush CiviCRM Caches go to https://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2FupdateConfigBackend&reset=1  and click cleanup caches

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


System Status reports incorrect version number after update stall I've tried to perform an update from 5.16.1 to 5.17, and the update script at /civicrm/upgrade?reset=1 stalled right at the end of the progress bar. After waiting many times longer than the whole update normally takes, I gave up and refreshed my browser. That page failed with "Your database has already been upgraded to CiviCRM 5.17.0".

Thinking I was in the clear, I went ahead and cleared sites/default/files/civicrm/templates_c/ and set the site live again. Only now I've noticed System Status is reporting that I'm still running 5.16.1 and need an upgrade. In the footer at the bottom of the page it correctly reports 5.17.

Is this likely to be a problem, and should I do anything to fix it? Or should I just wait for the next update and hope that clears it?

If the upgrade stalled out partway through, you'd get a message that you were partially upgraded - so my guess is that the only thing that didn't happen was that version-info-cache.json didn't get deleted.

That file will update on its own after three days, but you can also find it and delete it.  You may want to check the permissions/ownership on it, in case it's owned by the wrong user, and that caused the upgrade to hang.  That would indicate a deeper issue to deal with.


CiviMail click through links and Browse Site button not working. We are running Civi 4.7.22 on WordPress 4.8.1.
We are having a problem with CiviMail.  I have included a link to a MP4 demo video to highlight what is happening.  Please watch for what happens when I click the "Browse Server" button and when I run the Preview and click the link in the preview.
We have contacted our host and they assured us that nothing in the server is blocking or restricting those php functions.  I suspect it is a path issue, but I don't know where to look or how to resolve it.
Please see link to video below.
Thank you

http://meatcuttersclub.org/demomp4.mp4

Problem solved with much much back and forth with our host.    I noticed this issue is all over the forum with no solution, so finally here is the solution: If anyone runs into this issue in the future, check your permissions for /wp-content/plugins/civicrm/civicrm/extern/url.php  The permissions should be 755. For some reason, ours was 775.  As soon as we changed it to 755 the problem was solved.


Field names not showing up on profile screen Wordpress CMS New to Civi, but not new to CRMs/Wordpress.

When using many of the themes that Wordpress provides (actually this problem occurs with everyone I have tried so far), the field names for a profile signup form do not show up.

However, if I just use the base theme, they do.

Any suggestions on how to address this?

This looks like a CSS issue.

I would suggest to create a new css file in you custom directory like /wp-content/plugins/files/civicrm/my_css/my_stylesheet.css Navigate to Administer->System Settings->Resource URLs and set your Custom css URL to the css file http://yoursite.com/wp-content/plugins/files/civicrm/my_css/my_stylesheet.css
more info on how to set a custom CSS path here.

In your CSS file put this:

.label {
   color: #000 !important;
}

The field names/labels are there but they have a white color.

I guess that if put the same style in your Wordpress theme stylesheet section it will override Civi's stylesheet, but the above would be the correct and recommended way to do it.


Stop Webforms loading memberships in the messages section for 'existing contacts'? We have a Webform that creates a single membership. We've set it to use the 'existing contact' which very helpfully pre-fills the webform with the existing user's details - or with the details corresponding to the contact's checksum from a CiviMail. This is all brilliant so far!

However, when the page loads it also shows all the contact's existing memberships. And it shows them in the page's system 'messages' block.

In our use case we don't want to see existing memberships. And even if we did we'd want to see them in a webform component that we can control the behaviour of. When they appear in the system messages block it looks like an extra communication to the user and is rather confusing.

So, is it possible to prevent them from loading at all? Or at least have them load as a component of the webform rather than displaying in the messages block?

We are on Drupal 7.58, Civi 5.0.0

You could add a simple css hack to your webform which sets system messages on the front page of the form to display: none. That's not a perfect solution because it will hide all of them, but it's something.


Find Contributions Search 503 error I'm getting a 503 error when I use the contributions search:

.../wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Fsearch&reset=1

I've checked the following:

Wordpress page called civicrm is present
permalinks are set to post name
under civi's wordpress integration settings, civicrm is set as the wordpress base page.

Thanks for your help.

The web host was running an older php version on their development server.  Updating to a newer version (they said 5+) solved the problem.


Unique custom field - contact creation I want to add a custom field that we use as an ID from a 3rd party. I need to ensure this value is unique as a way to prevent duplicates. What is the best way to do this?

The "external identifier" field on contact records is available so you don't need a custom field. It won't allow duplicates.


Event on several different days I want to create an event in CiviCRM: The event takes place on 8.10., 9.10. and 16.10. So this is an event with three sessions (not an repeating single event). The participants can not book a session individually, therefore they should only register once and they pay a single fee for all three sessions. In CiviCRM I can only create an event that starts on 8.10. and lasts until 16.10. (although there will be no session from 10.10. to 15.10.).
I would like the three listed dates to appear separately in the calendar and on the overview page.
For Drupal I found the plugin ”CiviCRM Multiday Event“ which allows you to do that (https://www.drupal.org/project/civicrm_multiday_event). But I’m running CiviCRM 5.25.0 on WordPress 5.4.2.
Does anyone have an idea how I can get there?
Thanks a lot for your help!
Michael

I don't think what you need is possible using the built-in iCal feed and a single event - not without writing an extension.
However, perhaps @petednz-fuzion can chime in on the status of his yet-to-be-published extension which I think will meet your needs.  You could create three events, use the extension to ensure that there's a single registration for all three, then your iCal feed should be accurate.
The manual equivalent of this would be to create three events, but only expose the registration for the first one.  When registration closes, use a search to find and add the registrants to the second and third events.  This is actually pretty workable when there's only three days in the series - but pretty tedious when there are 12, so hopefully Pete's extension is almost ready to publish :)


CiviCRM WordPress shortcode embedded within a tab shortcode does not load I have a CiviCRM profile that I am using in order to allow a logged-in user to edit his/her address information. In addition, I want to display the user dashboard.
Normally, one would e.g. create a WordPress page and include the corresponding shortcodes like the following:
[civicrm component="user-dashboard" hijack="0"]

[civicrm component="profile" gid="32" mode="edit" hijack="0"]

What I would like to achieve is to display the shortcodes within a tabbed environment, so for example by using the tabs component from Shortcodes Ultimate. An example can be found below:
[su_tabs vertical="yes"]

[su_tab title="Dashboard" disabled="no" anchor="" url="" target="blank" class=""]

[civicrm component="user-dashboard" hijack="0"]

[/su_tab]

[su_tab title="Address Form" disabled="no" anchor="" url="" target="blank" class=""]

[civicrm component="profile" gid="32" mode="edit" hijack="0"]

[/su_tab]

[/su_tabs]

My problem is: The first tab loads the user dashboard correctly. The second tab does not load anything. My question to the community is if anyone has had any experience with CiviCRM shortcodes embedded within any other shortcode?
Thanks!

CiviCRM can only be "invoked" once per page load, so multiple shortcodes on a page won't be functional. Instead they should display as "teasers" with links to the functional CiviCRM content on your WordPress basepage.

In short, you can't have functional CiviCRM forms unless they are they are the only content on a page.

There are a couple of ways you could do this, however:

use the Caldera Forms CiviCRM plugin to embed two forms in your tabbed page
pull in the content of the second tab in via an AJAX request

Personally, I'd ask myself whether implementing tabs is worth the extra development time.


Personal Campaign Page image is not showing Drupal: 7.59
 CiviCRM 5.3.2

Using PCP for the first time. When the user uploads an image it is showing only when the user is logged in to CiviCRM. The image is not showing for the invitees for support for the PCP. If I try to access the image from the developer tools in IE, I get access denied.
Any help would be appreciated as my event goes live in a few weeks

Thanks

Probably you will need to give 'CiviCRM: access uploaded files' for anonymous user. But this is dangerous to provide access to files for anonymous user.


Undefined index: values in _civicrm_api3_api_resolve_alias() I'm using a new installed CiviCRM 4.7.8. with Drupal 7.5  ( Database system version 5.7.12-0ubuntu1 - PHP   5.6.22-4+deb.sury.org~xenial+1  )

The installation was done without errors but now I get:

Notice: Undefined index: values in _civicrm_api3_api_resolve_alias() (line 2310 of /var/www/html/sites/all/modules/civicrm/api/v3/utils.php).
Warning: Invalid argument supplied for foreach() in _civicrm_api3_api_resolve_alias() (line 2317 of /var/www/html/sites/all/modules/civicrm/api/v3/utils.php).
Notice: Undefined index: values in _civicrm_api3_api_resolve_alias() (line 2310 of /var/www/html/sites/all/modules/civicrm/api/v3/utils.php).
Warning: Invalid argument supplied for foreach() in _civicrm_api3_api_resolve_alias() (line 2317 of /var/www/html/sites/all/modules/civicrm/api/v3/utils.php).

on clicking "New Mailing".

Any idea what's wrong or how to solve this error?

Thank you

[debug_info] => SELECT id, component_type
                FROM    civicrm_mailing_component
                WHERE   is_active = 1
                AND     is_default = 1
                GROUP BY component_type [nativecode=1055 ** Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'civicrm.civicrm_mailing_component.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]

After deactivating 'ONLY_FULL_GROUP_BY' in mysql with

msql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

it works...

https://issues.civicrm.org/jira/browse/CRM-18439


Control duplicate entries in Hook Post I'm in need of inserting a control query into a hook post to retrieve if there is duplicate data.

I am using a php query but the only reaction I have is that it continues to compute forever, is it possible that there are strings of CIVI seasoning more suitable for this task?

$check = mysql_query("SELECT * FROM table WHERE code = '$invoicenum'");
    $checkrows = mysql_num_rows($check);

   if ($checkrows > 0) {
WARNING
   }
   else {
OK CONTINUE CHANGE
}

Regards

You're using mysql_query, which is deprecated in both PHP and modern versions of Civi.  The code isn't running forever, it's failed with an error - you should be able to find that error, most likely in your CiviCRM log.

While you could use mysqli_query, the better choice is to use a wrapper, which should give at least partial future-proofing.  Here's my (untested!) attempt at a rewrite:

Use:

$check = CRM_Core_DAO::executeQuery("SELECT * FROM table WHERE code = '$invoicenum'");

if ($check->fetch()) {
  // WARNING
else
  // OK
}

Note also that if you're using the post hook, the data has already been written to the database.  I would put this in a validation hook or an API Wrapper hook if you're trying to prevent the data being written.


How to deal with mail templates? I'm administering a site with some mail templates. They contain pretty much logic, and it is easy to make mistakes when making sure that both the text and the html version displays exactly the same information.

I have considered disabling the text version, but I don't know how. After all, very few don't have support for html in their email client today. As a workaround I have thought of just copying everything from the html to the text.

Any ideas of how to handle this properly?

One option is to remove the content from the text version. CiviCRM will then construct a simplified version of the html for users who specify text only.


How can I customise the display of an event's associated images? In an event, how can I make the picture big enough to be more like a background in the body. I have tried making the pixels larger.

This is really a CSS question, but you can slice it several ways. All solutions will require a bit of understanding or expertise.

CSS only: You could add CSS to a custom site theme which sets the event background based on the event ID. (For example, the event info page contains a region with class .crm-event-id-3 you could target.) This may be less flexible if you don't want to make image changes in your CSS, but it is fine if you can set-and-forget, or don't mind changing text files. This is what I'd typically do - I find CSS an effective tool.
Smarty, CSS via Custom TPL: Depending on your needs, you might find you want to use Event information to set CSS inline (eg, if you wanted to be able to use CiviCRM to change images via the web UI). To achieve this you might provide custom templates for CiviCRM. Documentation is at Customize Built-in, Profile, Contribution and Event Registration Screens and Page Templates. Note that the first page there recommends the next method! I would avoid this because working with Smarty makes me sad, and for backgrounds you'll end up working in CSS anyway.
Smarty, CSS via Extension: The docs above recommend using an extension to customise the Smarty templates or inject custom CSS. This is the "new" means to achieve the above, but may have a higher barrier to entry. It is better to maintain. I'd do this if, for example, client request was "make it possible for staff to change background per event". I'd still avoid Smarty and just inject CSS to the page.

Three options there! How you deliver this really depends on what your design requirements are, but I hope the pointers are some help.


Solved: CiviRules 2.1 and CiviVolunteer 4.7.31-2.3.1 not working with CiviCRM 5.4.0 I'm using WordPress 4.9.8 and I've upgraded our CiviCRM to 5.4.0. After that CiviRules 2.1 and CiviVolunteer 4.7.31-2.3.1 seem not working.

1. CiviRules 2.1, when click New rule, it backs to CiviCRM homepage

CiviRules> Find Rules> could find Rules but can not edit existed Rules. It only shows empty windows like this:

CiviRules> CiviRle Tags work ok

2. CiviVolunteer 4.7.31-2.3.1

Volunteers> New Volunteer Project: Go back to CiviCRM homepage

Volunteers> Manage Volunteer Project: Go back to CiviCRM homepage

Volunteers> Configure Roles> work ok

Volunteers> Configure Project Relationship work ok

Volunteers> Configure Volunteer Settings: Go back to CiviCRM homepage

Volunteers> Volunteer Interest Form: Go back to CiviCRM homepage

Volunteers> Search for... Go back to CiviCRM homepage

Please check and help to fix

Solution: I've follow Aidan's comment: Clearing the caches by go to Administer > System Settings > Cleanup Caches and Update Paths > Cleanup Caches
And all works ok now

Many post-upgrade issues like this can be resolved by clearing the caches.  It should be taken care of by the upgrade process, but it's worth trying it again.

You can clear the caches in various ways including: Administer > System Settings > Cleanup Caches and Update Paths > Cleanup Caches


How can I get Civi CRM to display the currency in reports and so on We have an organisation that can accept money from all around the world. It's usually cash or cheque when that happens. We can record the currency type in the contribution form when entering values. And also on import.

But it's almost impossible to then see what currency a value actually is.

It doesn't show in any of the reports. In fact, when I try to create a custom report, it's not even available as a field to select.

The only way I've found to see it is to drill down to the full details of the contribution, which is really slow and in-efficient.

Can I add it back somewhere?

Oh it's defintively available in a report - let me get to my desk and show you an example;

Install: Extended Report Extension:
Got to your Adminster -> System -> Settings -> Manage Extensions -> Add New -> ExtendedReport (nz.co.fuzion.extendedreport)

After you've installed it -> go Administer -> CiviReport -> Create New Report from Template and select e.g. Extended Report - Contributions with Price Set data

Voila - there is your Currency -> I've checked it to show you where it lives:


Deleting duplicate contact How do you delete a duplicate contact on CRM please?  I have looked at the various fields but can't find any deletion button.

Kind regards
Amanda

The way i would do is use CiviCRM merge duplicate contact feature. Here is the documentation on how you can use Merge contact screen to merge two duplicate contacts in your system.

If you know the contact that is duplicate and want to delete than you can click on 'Delete contact' button that appears when viewing the contact.

Or find the contact you want to delete using contact search and select the contact and choose from action drop down 'Delete contact' or 'Delete permanently'.

Ref: https://docs.civicrm.org/user/en/latest/organising-your-data/contacts/#deleting-contacts

Cheers

Pradeep


A tick box "same as home/primary address" when submitting Event/Contribution from Admin using paypal pro. way to fix it? Although selected contact has an address in his profile (But No Billing address). It would be useful to have a tick box saying "same as home/primary address", admin doesn't need to type in all the info again. Can anyone suggest how to do it in a quick way?

You can remove the requirement of those fields using hook_civicrm_buildForm() - see CiviCRM hook reference

Here's an example from a couple of years ago, although this was written for user-facing forms:

/**
 * Implements hook_civicrm_buildForm().
 */
function example_civicrm_buildForm($formName, &$form) {
  switch ($formName) {
    case 'CRM_Contribute_Form_Contribution_Main':
      $fields_not_required = array(
        'billing_first_name',
        'billing_middle_name',
        'billing_last_name',
        'billing_street_address-5',
        'billing_city-5',
        'billing_state_province_id-5',
        'billing_postal_code-5',
        'billing_country_id-5',
      );
      foreach ($fields_not_required as $field) {
        $form->_paymentFields[$field]['is_required'] = FALSE;
      }
      break;
  }
}


How do I add a video file to an event? We are running CiviCRM version 4.7.24 on a Drupal 7 site. My client would like to add an MP4 video to an event page. I tried a simple upload of the video using the image button and I get the warning "Unknown image format/encoding" and the file is not uploaded. Is it possible to use video in CiviCRM event pages? If so, how do I do it?

Native CiviCRM -> try uploading your video to a third party service (like Vimeo or YouTube) and then embed the reference to it in an iFrame [where you describe/details of the Event].


Custom field default values at database level, not form level? When you set a default value for a custom field, it only exists at the form level.  Is there a practical way to enforce them at the database level?  For instance, by altering the SQL table definition?

I understand that a custom field record isn't created under every circumstance, but if I account for that (e.g. another custom field in that group is always populated) is altering the SQL practical?

A possible downside, although unlikely, is an upgrade might do some kind of batch modify on all custom fields that would wipe your default value.

What are you trying to do that can't be done with a hook or trigger?