Configuring cronjob in wordpress installation (siteground) I'm working on my first installation of civicrm (with wordpress) ever and I have a trouble configuring the cronjob. My host is on Siteground and I wolud like to create the cronjob from cPanel.

Before adding the command in cPanel, I've logged in via ssh. By following a previous thread, I've figured out to write this line:

/usr/local/bin/php public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php

But it throughts this Fatal error:

Fatal error: Class 'CRM_Core_Page_Basic' not found in /home/amicsdel/public_html/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php on line 37

Any idea about how to solve it? Where this class is suposed to be declared?

Thanks!

This should help you,

https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs#ManagingScheduledJobs-PHPclimethod

You can follow either of the methods mentioned on that page, depending on how your server is set up.

HTH,
Edsel


Renewal not recording activity I'm doing some testing on a CiviContribute page in preparation for implementing CiviMember.

During the course of testing, it seems that renewals aren't creating activity records.

Is there some kind of date differential requirement before it logs?

My current testing involved creating a new membership, but also renewing the same day. This initial "renewal" was also an upsell. I then renewed that using the same level.

I also got the same result when testing a renewal without an upsell.

I'm running Drupal 7.37 with CiviCRM 4.6.3. No extensions are installed.

Any help would be much appreciated!

I believe the issue to be as a result of CiviCRM seeing the payment as being a test.

Essentially, I used the PayPal sandbox configuration for the "production" processor. Looking back at the contributions for the membership, it stated the type was 'Member Dues (test)'.

After setting up and using the dummy processor, the contribution stated was just 'Member Dues', and it then recorded the contribution and membership renewal activities.


Where does Civi store membership and membership signup info? We are moving to a new site, and when I tried to import our entire current Civi MySQL database to the new site, I had problems.

So I have created a fresh database on the new site and want to try importing things bit-by-bit, starting with memberships.  We have a membership signup page as well as info about past signups.

Can anyone tell me which tables from the current database I need to import to the new site? Any other advice/warnings would be welcome, too!

I am not able to get into the Civi interface (e.g. contributions, events, administer) on the current site, but can access the Civi database. So I want to do this just by exporting and importing from/to the databases.

(I can access Civi and WordPress files on both sites via FTP if that's helpful.)

Both sites are WordPress 4.9.1 and Civi 4.7.29.

Old site is at 1and1, new site at civihosting.

Best thing to do is to do a complete dump of your old database and import it into a fresh database on your new server. Then use that for your new Civi install. Importing piece by piece creates problems because there is too much data that is reliant on other tables.


Secondary .htaccess file? I was looking at the apache2/ssl_error.log and found an error relating to a secondary .htaccess file inside the <drupal_root>/sites/default/files/civicrm/uploads directory. Below is my stackoverflow post about the error, however, my question for here is this: is it normal to have a secondary .htaccess file within the civicrm files uploads directory or should I remove it? It only contains the following lines:

<Files "*">
  Order allow,deny
  Deny from all
</Files>

https://stackoverflow.com/questions/42287602/apache2-ssl-error-invalid-command-order

Even though I posted in stackover-flow, if anyone has any idea why I'm getting the this error, feedback would be greatly appreciated here or there, thanks!

This .htaccess file prevents files in this directory from being publicly downloadable. These files could be eg scans of membership forms or could contain other personal/identifiable data that you'll want to keep private;


Webform CiviCRM Case Tokens Has anybody had success in using the CiviCRM Webform Case autocomplete tokens? We are using the cases for case management and would like to give users an option to update an existing case via a custom URL in a webform. It works for one user but does not work for another. Is there some permissions missing? Currently using ?case1=1 for Case ID one to prepopulate in the form. This works. But once I go to case1=4 or 5 it does not work.

But once I go to case1=4 or 5 it does not work

The case loaded on the webform is specified by passing the id in the form of case{fieldset}=<case_id>.

For eg loading case id = 1 on fieldset 2 would be done by adding case2=1 in the URL.

Also make sure the contact loaded on the same fieldset is a client of the case. For eg - if contact A is attached to caseid = 2. Add this in the URL to load the case on the form =

webform_url?cid1=<contact_id>&case1=<case_id>

Similarly, if case is loaded on fieldset 2, the url would be -

webform_url?cid2=<contact_id>&case2=<case_id>


Installation on local wordpress server I'm trying to run CiviCRM v.5.34.0 with Wordpress v.5.6.1 on a local server. Unfortunately the installation of CiviCRM crashes with the following error:
Fatal error: Uncaught Civi\Setup\Exception\SqlException: Cannot execute CREATE TABLE `civicrm_address_format` ( `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Address Format Id', `format` text [...]

The server is running via xampp v3.2.4:

Server-Typ: MariaDB
Server-Verbindung: SSL wird nicht verwendet Dokumentation
Server-Version: 10.4.17-MariaDB - mariadb.org binary distribution
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/8.0.2
Datenbank-Client Version: libmysql - mysqlnd 8.0.2
PHP-Erweiterung: mysqli Dokumentation curl Dokumentation mbstring Dokumentation
PHP-Version: 8.0.2

The mysql user has all privileges and GRANT access.
I really would like to test CiviCRM to see if it satisfies my needs, which it promises to do.
Hope someone can help me.

This appears to be an incompatibilty with php 8, even though the message initially suggests a SQL problem.


How do I identify a Cron Job? I scheduled a CiviMail but it hasn't gone out yet even though the scheduled time has past.  When I ask for a report it says:

Delivery has not yet begun for this mailing. If the scheduled delivery date and time is past, ask the system administrator or technical support contact for your site to verify that the automated mailer task ('cron job') is running - and how frequently.

How can I get the mailing to go out?

Cron is a operating system level function, which may be available for you to manage in your host panel of your server.  It is basically a scheduler that can run programs on regular, scheduled times.... like every 10 minutes.

The first thing to do is to see if other scheduled jobs are running via cron.  Go to Administer | System Settings | Scheduled Jobs.  On the resulting page is a list of all the possible jobs that might run via cron.  Note the column "Last Run"... if cron is running hopefully you will see a recent date/time shown in here.

If cron is running, then find the scheduled job entitled, "Send Scheduled Mailings".  This is the job that actually will send your CiviMail job out.  Make sure it is enabled.  If not, enable it and see if things run.

If cron is not running, your best bet is to contact with your hosting company to have them check for you.  Refer to the CiviCRM documenation for help in setting it up:  http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs


Drupal Webform Autocomplete Existing Contact Limit Is there a limit to the amount of contacts that can be searched for on Existing Contact using autocomplete on a Drupal Webform?  I have 1+million contacts.  If I restrict the webform to a group with a limited number of contacts the autocomplete works well.  However, if I do not restrict to a small group the autocomplete fails and wants to create a new contact.

The autocomplete works and does not have a limitation (we have 900k contacts and no problems).  My mistake was in the selection of the Contact Display Field for the Existing Contact on the Drupal WebForm.  I was using the "Display Name" as the structure but I was entering search as if it was the "Sort Name"  I was getting unexpected results.  Once I started entering the search with the correct format the results were as expected and all the contacts are included.


Get the ID for the default organization through API Is there any way to get the "default organization" contact id through the API?

The default organization contact id is stored in civicrm_domain table. You can use domain api to retrieve the contact id i.e

  $result = civicrm_api3('Domain', 'getvalue', array(
      'sequential' => 1,
      'return' => "contact_id",
      'id' => 1,
    ));

HTH

Pradeep


first click to reach CiviCRM dashboard results in long delay and error message I am managing a Drupal site and when I first log in and click CiviCRM menu link, there is a long delay followed by this message:

  Service Temporarily Unavailable
  The server is temporarily unable to service your request due to maintenance downtime or capacity problems.
  Please try again later.

I have increased the PHP max execution time, and it did help to eliminate this message, but the message is happening again.  I also increased the memory limit to huge.

Can someone tell me how to set some debugging or logging to show me what exactly CiviCRM is doing during this delay?

Drupal 7.5.2.  MySQL 5.5.52-MariaDB.  PHP 5.6.30 as FPM.  CiviCRM 4.7.16.

thanks!

I updated the Drupal core to version 7.54 using "drush upc", which reported pending database updates, so I also did "drush updatedb".  The Drupal core update also caused several "projects" to be updated as well.

All of this seems to have cleared the problem I originally reported – I no longer see a long delay when I first log in and click CiviCRM.


Is it possible to reassign a contribution linked to a membership? I had a member sign up for an annual membership while their current membership was still active, but they used a slightly different address and so it created a duplicate contact with a new membership. I merged the two contacts and so now I have one contact record with two memberships. I want to keep the older membership and delete the newer one, so I manually renewed the older one. However, deleting the newer one will delete the contribute record associated with that membership.

How can I reassign that contribution, or at least remove the link between the contribution and the newer membership, so that I can delete that membership?

Thanks!

Through UI its bit difficult(impossible). If its a matter of single record then i would suggest you to use API explorer to do it.

Navigate to CiviCRM >> Support >> Developer >> API Explorer

Create Membership payment for old membership (23 is old membership id(without contribution) and 45 is contribution id)

Delete new membership.

  Note: Backup db before performing any api actions


How do I add debug lines? Currently, I'm developing a civi extension in a Wordpress environment. I want to add some debug lines to make sure I'm receiving the intended result from variable/function.

I refer this guide it says the log files are saved in ConfigAndLog directory.but that directory is not available.

I want to know how to include debug lines in the code and from where I can view the results?

Thanks in advance!

At the link you referenced it says you can use Civi::log()->debug(); this section, so for example Civi::log()->debug(var_export($my_variable, true));

I'm not sure what you mean by the directory isn't available? This article says how to find it: Where are the "ConfigAndLog" and "templates_c" directories?


CiviCRM for selection and subscription to paid online content Consider this case:

We manage a very very long hiking trail across many states. It's divided in 20 sections.
To get the digital maps, section coordinator contacts, section emergency alerts, section online updates, right to access private land, people have to signup and select as many sections as they want during the signup process. For each section there will be specific email sent and online content available (1 page per section to start with, maybe a blog + forum + chat per section in the future). Some hikers might decide they need them all. Some only need a couple of the sections.

Hikers are then subscribed to the selected sections for 1 year, renewable.
There is a specific cost associated per section. They pay for the total + a national annual membership fee.

Can we use CiviCRM for this purpose? It's mostly online digital subscription which is close to the concept of membership, IMHO.
But I'm not clear on the data mapping and which entities to rely on.

Is each of the 20 section a different membership type? Or a different price in a price set? or a different priceset?

Should we use CiviRule to add contact to groups based on the membership types they selected (or priceset element?) Creating 20 membership types seems overkill, isn't it? Do I have to then create 20 organisations in CiviCRM to map the 20 sections?

I've used CiviCRM in the past for traditional NGO, so I'm keen to also reuse all the other features too. I have development background and will hire Drupal devs to help out.

Very cool!

I think this has webform civicrm written all over it;

First thoughts:

20 Membership types -> 20 checkboxes on one webform
+ annual fee;
inject specific waivers based on Membership type selection(s)

All on one multi-page form!

Use Membership Role Sync to map Memberships to Drupal Roles so you can use Drupal access/permissiom to give hikers access to maps for specific sections from their /user account;

Those are just first thoughts - you can totally get very far native Drupal/CiviCRM on this.


Moved Wordpress and CivCRM to new server recently Recently I moved my Wordpress Install with CiviCRM over to a new server. I changed the path location in civicrm.settings.php file to reflect the new location. The front end of appears as if nothing is wrong but on the admin dashboard this appears:

  Warning: require_once(/CRM/Core/ClassLoader.php): failed to open
  stream: No such file or directory in
  /home/xxx_xxx/public_html/wp-content/plugins/civicrm/civicrm.settings.php
  on line 399

  Fatal error: require_once(): Failed opening required
  '/CRM/Core/ClassLoader.php'
  (include_path='.:/home/xxx_xxx/public_html/wp-content/plugins/civicrm/civicrm/:/home/xxx_xxx/public_html/wp-content/plugins/civicrm/civicrm//packages:.:/usr/lib/php:/usr/local/lib/php')
  in
  /home/xxx_xxx/public_html/wp-content/plugins/civicrm/civicrm.settings.php
  on line 399

If I deactivate CiviCRM, everything else appears to work fine, but I need this to work for this site. Any and all help is greatly appreciated!

Looks like you've a couple of hangovers! These are usually in the CiviCRM Administer > System Settings > Resource URLs, and Administer > System Settings > Directories pages. Update those, clear cache, and you should be good to go!


Would like to know how difficult customise CIVICRM ? did anyone contacted the partners ? I am looking into customising CIVICRM for thinkForward UK. However I would like to know how hard and complicated customising the solution would be.

Does anyone contacted the partners and contributors? does it worth it or it can be done with some technological help. The charity can get that from a few graduates not working full time though.

Think forward definately needs Civicase and core civicrm as well as reports

Many thanks and regards
Nada Kartouch

That's like asking how difficult it is to customise your car: it depends on multiple factors but primarily what you want to do and your skills.  If you just want to add a fluffy steering wheel cover - go right ahead, anyone can do that.  If you want go-faster stripes painting on, then you might do that yourself depending on your artistic abilities.  Tinkering (safely!) with the suspension or engine is a specialist job beyond most of us.

Many people do work with partners and contributors but they are all different so the experience of working with one doesn't tell you how that might work out with another one.  Each practitioner has their own unique set of experiences, skills and interests so you might want to talk to more than one to find someone who is a good fit for your organisation.

There is a lot of documentation around and there's no "external magic" - all the code is right there on your server, so if you or your graduates have the time, inclination and skill then they can learn. That will give them knowledge but not experience although you can benefit from the experience of others as Pete has already described. All of us started sometime from the point of knowing nothing about Civi!


API: Contact get/getcount by primary address country stopped working on upgrade to 4.6.9 I spoke too soon, there was one hiccup on the recent upgrade.

I have a bit of custom code on one site that pulls contacts based on 'Primary Address country' as follows (example):

$contactcount=civicrm_api("Contact","getcount", array ('version' =>'3', 'contact_type' =>'Organization', 'country' =>'United States');

When I try this on the API Explorer on the demo site, I get this error:

"error_message":"A fatal error was triggered: United States is not of the type Positive"

It seems to have stopped working with an upgrade from 4.6.7 to 4.6.9. Did something change in the API call?

Update:

I was trying to rough in some temporary code to make this functional by using the Country ID instead of the Country Name, and there seems to be a problem there, too. The country ID field in the API seems to be essentially ignored.

$contactcount=civicrm_api("Contact","getcount", array ('version' =>'3', 'contact_type' =>'Organization', 'country_id' => 1228);

I verified this on the demo site, too. I have opened a bug ticket for this.

This has been fixed at https://github.com/civicrm/civicrm-core/pull/6985 where you can get the Contact using different address fields specifying the names (country, state_province, etc.)


How can I change a CiviEvent status using Webform Conditionals? I am currently using Drupal 7.52, CiviCRM 4.6.24, and Webform 7.x-4.14

I have a CiviEvent where I want to register multiple registrations and a matrix of different combinations of payment levels and options. I am currently configuring a Webform where I have configured (at least in a draft form) for the CiviEvent participant fee to be passed to Stripe and the registration.

I also have the participant_status_id field exposed to the Webform; within CiviCRM processing I have the Event Registration > Registration Status set to * User Select * - I noted that if it was set to anything else then it would not be exposed in the Webform.

What I want to do is set the Registration Status using conditionals. So if the registration is paying using Stripe in full then set to Registered, or if paying by Cheque set to Pending from Pay Later.

The Webform Component allows me to select which CiviEvent status I want exposed to the form (I opted for Registered, Pending from Pay Later, Partial Payment), but I then can't set that using Conditionals. I also notice that when I can not set a Select Option webform component using Conditionals as well; maybe it is not possible?

I suspect my alternative would be a simple textfield, but I am looking for a better way.

What you are attempting to do should already be handled by the module automatically. Simply omit the status field from the form (leave it set to "Automatic" on the CiviCRM tab of your webform) and the status will be set based on the payment status to either "Registered" or "Pending from pay later" or "Pending from incomplete transaction".

You can see where this is handled by webform-civicrm here in the code.


Mailing list member received unexpected opt-out message Using CiviCRM 4.3.4 (update necessary, I know) one of our mailing list members has received an opt-out message, that he was unsubscribed from all mailing lists. In fact this is not true. He is still member of all those groups and has never been removed. Now I'm wondering why he received this e-mail. Any ideas?

In civi, you have two ways to be removed from a mailing: unsubscribe from the group or opt-out (from any mailing).

The later doesn't remove the contact from any group, but change the status of the email and automatically exclude the contact from any mass mailing.

When you do to the contact summary, do you have a red icon next to his/her email?

If you want to have the contact receive mass mailing again, you need to edit the contact and uncheck the opt-out (beware, you should only do that for contacts that actually want to receive emails)

As for why she/he was opted out, it's likely the email was forwarded around, and one of the recipient that received the forwarded email clicked on unsubscribe. Obviously, instead of preventing friends to forward you emails, it did unsubscribe the original recipient, hence the opt-out message.


Is there a way to make some events a sub-category for another event? I'm trying to figure out how to categorize some events under a sort of "mother" event so that you can only register for the child events if you have registered for the mother event. Is this possible?

Thanks!

Take a look at this extension: https://civicrm.org/extensions/event-additional-signup

This will register users for additional events automatically when they select specific price set options.


Is there a simple cron command that I can enter on cPanel to trigger scheduled jobs? I'm trying to set up a cron job on cPanel for Civicrm 5.9 running on Wordpress 5.1.1.  I've read so many "you need to do this" "you need to do that" my head is spinning.  Is there a simple command line that I can enter on cPanel to trigger scheduled jobs? Job.execute isn't getting the job done.  I'm not a programmer so I rely on step by step or solid examples and so far haven't found any that make sense to me.

The reason this is a difficult question to answer is that it depends so much on your hosting provider.  If you have a hosting provider, I would ask them for assistance.  If not, you may want to find someone in https://chat.civicrm.org who can assist.  There are also third-party "webcron" services available.


How to use Contact name if nickname is not present in bulk mail? I need to send an email with Nickname as first preference, if that not present then use Contact name. Cant figure out what token to use?

I have tried this but seems not rendering correctly in email:

{capture assign=nickname}{contact.nick_name}{/capture}
Dear {if $nickname}{contact.nick_name}{else}{contact.sort_name}{/if}

OUTPUT:

{capture assign=nickname}Tota{/capture} Dear {if $nickname}Tota{else}Mr. Tapash Datta{/if}

can anyone help please? Thanks

You will need to turn on CIVICRM_MAIL_SMARTY in civicrm.settings.php to use smarty templating for conditional and more complex logic.

Cheers

Pradeep


Update script fails: database already upgraded Trying to update from Wordpress CiviCRM 4.7.11 > 4.7.23.
Update script does not work. Keep getting the same message:

"Sorry but we are not able to provide this at the moment. Your database has already been upgraded to CiviCRM 4.7.11"

I did everything exactly as described: stayed logged in during the process, removed the complete civicrm plugin, installed the new version, removed cache files, cleared browser cache etc.

Does anybody know what the problem is? I know there must be old files somewhere. But where?

Please check related question and answer on this link: How do I deal with "Your database has already been upgraded" error?

Also see documentation on upgrading CiviCRM for Wordpress on the following link: https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Wordpress

It is also recommended to use the CiviCRM stackExchange search to check if a similar question has already been asked before posting a new question.


Is there anyway to search on a non-primary email address? Right now, as far as I can tell and from what I've seen in old issues and current jira issue, searches only search for primary email address.  Worried about performance issues.

So it appears there is no way to search any email address that isn't marked as the primary other than writing sql or a custom search.

Maybe I'm missing something and there is a way.  If not, to me this is major weakness, but maybe I'm alone in my thinking.  The issue has been out there for 6 years and was last put off until after 4.7 so maybe it isn't a big deal for most people.

In Search Builder (Top menu > Search > Search Builder), you can specify which type of email address you would like to search for (on the demo: Home, Work, Main, etc.). By linking the searches with "Also include contacts where", you can specify each type to include (see image).  It doesn't cover the specific search "emails that are not marked primary," but it will search emails that are not primary along with the primary ones as well.


Extension Download Errors I'm looking for help troubleshooting "Extensions Download" errors. Like Error: Can't Access CiviCRM Extensions, I've recently been getting lots of "Unable to download extension from ..." lightbox errors. My host confirmed there aren't any SSL protocol errors logged on our end, and suggested the issues are probably with civicrm.org's certificate(s) and/or the encoding of the xml files.

The System Status page reads:

  Extension Download Error: The CiviCRM public extensions directory at https://civicrm.org/extdir/ver=4.7.14|cms=Drupal could not be contacted - please check your webserver can make external HTTP requests or contact CiviCRM team on CiviCRM forum.

I'm running CiviCRM 4.7.14 with Drupal 7.52, and can usually troubleshoot issues, but I'm new to CiviCRM and can't think of anything I can do about this. Any suggestions?

two reasons I can think of:
- civicrm website was overloaded or down for a short maintenance operation
- your server or network connection prevents your site to connect to civicrm

if it's the former, wait a bit an retry, everything should be back to normal

to test if it's the later, try to connect to the site from the command line (if you have ssh access to your server) and run curl https://civicrm.org. if you have an error message, it should point you to the right direction

(we did change something about the TLS/SSL protocol accepted but don't recall if it was the main site or not). In any case, it would probably mean you have very old software on your server and you should upgrade your OS


Having a Problem Installing CiviCRM 4.7.25 on WordPress I'm having a problem installing the latest version of CiviCRM on WordPress 4.8.2 (Ubuntu 16.04.3 LTS, Apache 2.4.18, PHP 7.0).

Steps to Reproduce:
1) Log in to the WordPress site's administrative interface.
2) Click "Add New" under "Plugins" on the administration menu.
3) Click "Upload Plugin," then browse to and upload the plugin's Zip file.

Output:
Unpacking the package…
Could not extract file from archive. civicrm/civicrm/packages/kcfinder/themes/dark/img/files/big/..png

Expected Results:
The package should have extracted and installed with no errors.

Please advise.

The CiviCRM "plugin" for Wordpress CMS is not installed like a conventional Wordpress plugin.  There are many more things to be considered and you would be advised to read and follow all the stages described in the following Wordpress Installatin Guide for CiviCRM at https://docs.civicrm.org/sysadmin/en/master/install/wordpress/

Hope this helps.


Replace flash-based charts with something that doesn't use flash Several core reports (as well as some reports provided via extensions) use the OpenFlashChart library to create nice looking charts via flash.

Unfortunately (or fortunately depending on how you look at it), flash is on the way out. Many browsers disable it by default.

Has anyone worked on a drop-in replacement for Reports that use html5 or javascript or anything but flash? I know about Xavier's CiviVisualize which looks very promising, but it's not clear how to use it in a report to replace the chart functionality provided by OpenFlashCharts.

As Lobo would say, "patch welcome."
I think everyone agrees the open flash chart library needs to be replaced, but that's about as far as it's gone to-date.


CiviCRM Profile not showing on User Account Page I am using CiviCRM on Backdrop (Drupal 7). I am new to CiviCRM, but not new to Drupal.

I have read the CiviCRM documentation on Groups, Profiles,etc. Well all of it pretty much. Also read old an new posts about Accounts and Roles and Profiles. I am pretty sure I have everything set up correctly.

I have a CiviCRM Profile used for new user registration which works fine. It is creating the Backdrop Roles, Civi Group and Membership Type as I want.

Logging in as the new user having got a password sorted, there is no sign of the Civi Profile or a link to it on the User Account Page.
In the Profile Settings I have checked the 'View/Edit Drupal User Account [ x ] CiviContribute' field so it should show up.

I have unchecked the Backdrop Permisssions for 'access all custom data' and in the Civi ACLs I have tried setting both 'A profile' and 'A set of custom data fields' in the 'Type of Data' but no go. The Profile is not seen on the Account Page. Even when logged in as the Administrator I cannot see this data on a user's accounts Page.

I must be missing something here, but what?

I would check what is happening by setting up a Profile with the simplest possible profile eg just First and Last and Email

That will help rule out the issue being related to any of your Fields or permissions related to eg Custom Fields.


Passing a drupal field to civicrm report We'd like to pass a Drupal field (Organic Group that a user belongs to) to a CiviCRM membership report. Has anyone done this and could give pointers or an example?

One option would be to do this with Drupal Views though I think you would end up needing to display a View within a View to deal with the multiple results you could have for both the OG memberships and the Civi Memberships. I did a quick proof of concept to check if all the joins were available which I attached to this blog.


Add/Update form actions(context?) detection from hook_buildForm Is it possible in hook_buildForm to define which "$action" link (view/add/update/delete/etc) opens the form? We need to set different $defaults depending on "context". There is such kind of detection/check in TPL files, but what about hook_buildForm?

This should be it:

    $mode = $form->getVar('_mode');
    // civicrm mumbo jumbo below targets EDIT form mode
    if (in_array($mode, array(CRM_Profile_Form::MODE_EDIT)))
    {}

But it doesn't work for all forms, so, for example, for Relationship add/edit form, we should check if $form->getVar('_relationshipId')  isset/empty :
thus no Relationship has been created  yet: we are in Relationship ADD "mode".


Migrate CiviCRM from Joomla to Wordpress I don't even know where to start. I have been tasked with migrating an older version of CiviCRM (3.4.8) on Joomla 1.5 to a newer version of CiviCRM on Wordpress. I got a fresh install of CiviCRM done on Wordpress 4.4, but I'm not sure where to go from here. I'm not familiar with Joomla (this is not my website), so please be very specific. I need everything (users, customizations, whatever else) moved over without having to delete anything on the current site.

In case it helps anyone, this is what I did:

Initial set-up:
- a working Joomla site, with Civicrm and Joomla tables in the same database
- a separate installation of Wordpress on the same server (articles and static content already imported from the Joomla site and redirects set up as required)

Aim: migrate the Joomla Civicrm tables and data to the Wordpress installation. In this case we chose to do it without moving the Civicrm tables, for simplicity.

Result: Wordpress tables and Civicrm tables are in two separate databases

Backup Joomla Civicrm tables or the whole database.
Make a note of:

Civicrm version number in Joomla Civicrm
what components and extensions you have installed in Joomla Civicrm
any user permissions in Joomla Civicrm (if you use permissions).

Install Civicrm in Wordpress (check version is same as Joomla Civicrm).
Install/remove Civicrm components to match the Joomla Civicrm.
Install any Civicrm extensions (check versions) to match Joomla Civicrm.
Export data (should be just one row) from Wordpress Civicrm table civicrm_uf_match. Disable foreign key checks just in case.
In the Joomla Civicrm database, make a copy of table civicrm_uf_match (in case you need to revert to Joomla).
In the Joomla Civicrm database, truncate the table civicrm_uf_match and import the data exported from Wordpress Civicrm table. Preferably disable foreigh key checks.
Edit the Wordpress civicrm.settings.php file (by default it's in wp-content/uploads). Change CIVICRM_UF_DSN and CIVICRM_DSN to point to the Joomla database.
I also edited the row 'userFrameworkUsersTableName' in the table civicrm_setting, to change joomla-table-prefix_users to wp-table-prefix_users, but I don't know if this is necessary.
You should now be able to access the 'old' Civicrm tables through Wordpress.
Civicrm->Administer->Users and permissions->Synchronise Users to Contacts

That's it. There's a bit of tidying up to do (see below), but at this stage you can still easily revert to Joomla if necessary by replacing the table civicrm_uf_match with the copy, and by reversing steps 9 and 10.

Tidy up: manually set up Civicrm user permissions to correspond to the old Joomla setup. Add any missing users. I had already used the FG Migrate Joomla to Wordpress plugin to migrate users and articles from Joomla.
Tidy up: drop all the Joomla tables (and any other non-civicrm tables) from the Joomla database.
Tidy up: drop the civicrm tables from the Wordpress database.

Comments/corrections welcome.


CiviCRM 4.6.3 says no extensions available I cannot update my Mandrill Transactional Emails extension (v 1.5) to version 2.0, because CiviCRM  won't list any extensions.

How can I install the update?  Extension documentation says that if I uninstall, all database records are removed for prior mailings. There's no documented "manual install" process, and as noted, it's not offering an update to version 2.0 of the extension.

I posted this on the Mandrill Transaction Email extension github (issue 86), and he said to post the question here because it appears to be a CiviCRM problem (my paraphrasing). https://github.com/JMAConsulting/biz.jmaconsulting.mte/issues/86

CiviCRM 4.6.3
Joomla 3.4.1
PHP 5.5.25
Linux

Although demo site (running 4.6.0) says there are extensions available, my site running 4.6.3 says "No Extensions Available"

Going to the link provided "requested extensions from here": (https://civicrm.org/extdir/ver=4.6.3|cms=Joomla) only leads to a second page with even more extensions. It NEVER actually downloads/opens any xml files. Clicking the link on that page just gets a "circular reference to a longer page of all extensions, which then doesn't do anything when clicked.

Thanks in advance for any help.

You can control which extensions are displayed by overriding $civicrm_setting['Extension Preferences']['ext_repo_url']

try something like $civicrm_setting['Extension Preferences']['ext_repo_url'] = 'http://civicrm.org/extdir/ver={ver}|cms={uf}|status=';

obviously be careful that you install things that are compatible.


Custom API Action: Access Request Body I'm developing a custom API v3 action which is intended to handle a webhook request from Zoom (https://marketplace.zoom.us/docs/api-reference/webhook-reference). Zoom follows REST standards by putting the data inside the request's body (not like the CiviCRM api where you put the data inside a json parameter). So, is there a way to access the request's body from my custom action or custom extension?

This is typically handled by adding a webhook endpoint to your extension.  The Mailchimp extension does this - see Webhook.php.

If you've already written your API action, it shouldn't be too tough to use a webhook to grab the data and push to API.

It sounds like maybe you're past this point, but https://lab.civicrm.org/dev/financial/issues/55 is an issue I raised to deal with handling POST data stored as JSON.


Not receiving Telerivet SMS to CiviCRM I've followed all the instructions according to this documentation but when I test the incoming SMS', I do not see the SMS's coming into CiviCRM.

Below are the settings I have set up in Telerivet and then copied to Civi

This is the Webhook settings

And here I would expect to see the option to send an SMS

I also would like to see where the incoming SMS would come into. According to the video, a report can be set up to show all the incoming SMS's but I cannot seem to create the same report.

For sending sms, the contact should have Phone number of phone type as 'Mobile' and Primary as true. The option will be visible once you set required phone type.

The incoming message will be shown under Activity tab of Contact of Activity type as Inbound SMS. You can also check using Activity search with filter Activity type as Inbound SMS. You can also create Activity report with with filter Activity type as Inbound SMS and have it available on dashboard.

HTH

Pradeep


Unable to create InnoDB tables. MySQL InnoDB support is required for CiviCRM but is either not available or not enabled in this MySQL database server I'm trying to install an old CiviCRM version on Drupal 6, the purpose is to migrate an old database data to the latest CiviCRM version, but I'm getting this error when I try to install CiviCRM in a clean Drupal install:

Unable to create InnoDB tables. MySQL InnoDB support is required for CiviCRM but is either not available or not enabled in this MySQL database server.

Everything else seems to be ok, I'm gettinig this error in a windows environment. First I tried with wamp, now I'm trying with Laragon. I tried also with vagrant and homestead which is a linux environment I think, same results.

I tried setting innoDB as the default engine and a lot stuff that is there on internet, but anything seems to work. Any idea?

This is what "SHOW ENGINES" return:

Just go to civicrm/install/index.php and change the line with code if ( $dbName != 'Drupal' ) and either exclude the entire if statement (comment it out) or change it to if(true).


How should I delete a CiviCase or a Case Type If I need to delete a CiviCase Type or a CiviCase it can be confusing given that 'deleted' Cases are not actually removed from the db.

Civi Case Types cannot be deleted while there are Cases of that Type. Cases can be changed to a different Case Type which can then permit you to delete a Case Type with no Cases.
But if you just want the Civi Cases gone then note that Civi Cases themselves, when 'deleted', remain in the system for audit purposes.
To delete a Civi Case entirely it is necessary to do so either via the API Explorer (at /civicrm/api/explorer) or via sql.

Via API Explorer use
CRM.api('case', 'delete', {'id' : xxx});

Via MySQL use

DELETE c, ca, a FROM
civicrm_case c LEFT JOIN
civicrm_case_activity ca ON c.id = ca.case_id
LEFT JOIN civicrm_activity a ON ca.activity_id = c.id
WHERE case_id = xxx;

and this should take care of any case_contacts data and any rows in civicrm_relationships that have case_id


Error - search members belonging to a group No matches found for:
Group(s) In Client Mailchimp Newsletter ...AND...
Group Status "Added"

I have created a group and was trying to look at the full list of group members but getting above error message. Not sure what is this "status". I was not searching on this

Group Status "Added" is included in the search automatically and is what you probably mean by being 'a member of the group'.  Group Status can have other values such as "Removed" - meaning that the contact was in the group but is no longer.

The message simply means that there are no contacts currently in the Client Mailchimp Newsletter.  Have you tried to add any contacts to that group yet?


Capturing Price Field selection onto Membership record We've been doing Membership pricing with a straight Membership Type list i.e. without Price Sets, but now want to add an option to receive the quarterly newsletter via snail mail, with a surcharge. I created the Price Set and managed to create the Contribution Page with a checkbox for the newsletter. I need to capture the newsletter option into the Membership, how do I do that? I set the Financial Type as "Publications", maybe that's wrong.

When you set up your Price Set you need to set them up for Memberships, then when you create eg a Radio button field you should be offered your Membership Types when you add an option to that field.

You should then see these line items on the Contribution record eg

You should also be able to get these out via Reports such as the ones the LineReport extension offer.


Track activities and changes that were made in civicrm by staff What is the best way to track what changes that a staff member has made in civicrm? I am trying to track activities and changes that were made in civicrm by staff.

Under administer - system settings - misc you can turn on logging which tracks changes.

Also if using drupal turning on the statistics module is sometimes helpful in seeing what people have been clicking on since it makes a recent hits report available.


How to set a recurring membership start date to be 1st of the month We have Authorize.net and Stripe as payment processors. We'd like to have recurring memberships run on the 1st of the month. I see under contributions there looks to be the potential to set it but that isn't working. (Does Civi still support the ability to set a specific start date for recurring contributions?) There is no such setting for membership.

How can we pass this data to e.g. Authorize.net? Is it technically possible to have custom code achieve this and has anyone done so?

Auto-recurring memberships are triggered by the corresponding recurring contribution, so what you need is:

A payment processor that supports future dates for recurring contributions.
A way to restrict which dates are allowable.

For 2., the functionality is built into the iATS Payments extension, and also in my extension here:
https://github.com/adixon/ca.civicrm.contributionrecur

I'm not sure if my implementation in that custom extension will work with Authorize and/or Stripe, but you could try it. Those processors might need a small patch for it to work.


How does one get rid of the CSS errors regarding dashicons.eot Or is this a Microsoft Edge only problem?

The page you loaded seems to be about widgets and not related to civicrm


How to call my post_provision_install hook after CiviCRM installed? I want to automate the removal of households from CiviCRM, right after it has been installed via Aegir on Drupal 7.

I implemented my post_provision_install hook, but it runs before the same hook of Hosting CiviCRM module, means before the install of the CiviCRM module.

How can I change the calling order of the post_provision_install hooks in this particular case?

Or how can be an post_hosting_install_task hook implemented and called?

You could perhaps do this with a CiviCRM extension rather than a Drupal module so you are sure it is only executed once CiviCRM is installed? Not sure if it is possible in your scenario.


Export tags to separate column? When exporting information, is it possible to separate each contacts' various tags into separate columns?

That way I'd be able to sort the resulting spreadsheet by specific tags, instead of having to create a separate spreadsheet for each tag.

What you're asking for isn't doable out of the box.  However, most spreadsheet programs (including Excel and LibreOffice Calc) will do this for you.  Here's a formula that I tested in LibreOffice and should work without modification in Excel:

=IF(ISERR((SEARCH("Volunteer",$A2))), "", "Volunteer")

Paste this into an empty column at row 2.  Replace both instances of "Volunteer" with the text of the tag you'd like in that column.  Change the "A" in "A2" to the letter corresponding to the column that contains your tags.  Your new cell will now contain (only) the tag you're searching for in your tags if it's present, or be blank if not.  Copy this formula down the page for all rows, and of course repeat in new columns for any other tags you want to track in other columns.

Note that if you're just doing this to count numbers, you're better off with something like this:

=COUNTIF(A:A,"Volunteer")


Cron job not working after CIVICRM update (Joomla 3.7.0 and CIVICRM we used to send emails to members with great succes before.
Now, I've upgraded the site's Joomla and CIVICRM versions, prepared a draft email, but started to receive emails from the system about a bad configuration, her's the message:

Warning:  ini_set(): A session is active. You cannot change the session module's ini settings at this time in /home/XXX/public_html/libraries/joomla/session/handler/joomla.php on line 46  Fatal error:  Call to a member function get() on null in /home/XXX/public_html/libraries/joomla/session/handler/joomla.php on line 71

I tried to execute the cron by entering the URL in a browser (wich worked before the upgrades) but I get the same error.

So what should I look after? I tried to see by myself and looked in forums, but can't nail how to have it work out.

Thanks for your help!

Marc.

I feel like the first thing to do is try to isolate the issue (or clarify it): did civicrm work before upgrading to Joomla 3.7, it was it civicrm that you had upgraded (what was the exact upgrade that broke the cron jobs).

It's strange because those errors look more like a session cache issue.

Did you try the "run all scheduled jobs" link from the jobs page?

Are you executing with a user that had the needed permissions?


What's the best way to code for extensions to work for multiple civicrm versions? For some extensions, we need to have a different behaviour for different civicrm versions.

I can either manage two branches, but I'll have to backport some fixes and that seems a big overhead. For most of our extensions, I'm tempted for a lighter approach with a single code base

We have used the domain in some extensions, like so:

$civiVersion = CRM_Core_BAO_Domain::version();

if (version_compare($civiVersion, '4.5', '<')) {
  //in CiviCRM 4.4 the invoke function has 5 arguments maximum
  return $hook->invoke($numParams, $arg1, $arg2, $arg3, $arg4, $arg5, $fnSuffix);
} else {
  //in CiviCRM 4.5 and later the invoke function has 6 arguments
  return $hook->invoke($numParams, $arg1, $arg2, $arg3, $arg4, $arg5, CRM_Utils_Hook::$_nullObject, $fnSuffix);
}


Contact Form 7 CiviCRM integration not connecting to remote CiviCRM website I'm trying to connect my a form to a remote CiviCRM website. To do that I'm following this tutorial using FormProcessor Contact Form 7 and Contact Form 7 CiviCRM integration https://docs.civicrm.org/formprocessor/en/latest/sign-up-newsletter-wordpress/
My CiviCRM Contact Form 7 Settings is filled correctly (with the path for wordpress, the api_key and site_key are correct). My contact form field are similar to the FormProcessor input and should be ok, I tested everything on RESTer chrome extension and it work the contact is added on my remote CiviCRM but when using the extension with the form it doesn't.
In Contact Form 7 "CiviCRM" tab my entity is set to FormProcessor and my Action has the correct name. I didn't filled the "params" field.
Wordfence is disabled

I used Caldera Form instead of Contact Form 7 on the remote website, I added the plugins "Connector to CiviCRM with CiviMcRestFace" and
"Integration of CiviCRM's Form Processor with Caldera Forms". In the parameters CiviMcRestFace Connections there is the same interface as CiviCRM Contact Form 7 Settings but the path you have to input is different. When you create or edit the form with Caldera don't forget to add a processor in the processors tab, and make sure this processor connect to the Form Processor you created on CiviCRM.


Can we add Register buttons to the public-facing Events Listing page? Is there a way to add Register buttons to the public events listing page (.../civicrm/?page=CiviCRM&q=civicrm/event/ical&reset=1&list=1&html=1)?  I'd like a website visitor to be able to choose to register from this listing, rather than having to go first to the event detail page to find the Register button.

Using 4.7.29 on Wordpress 4.9.2.

Thanks for any help!

Despite it not really being best practice, but lacking programmers to work thru the API, I created a customized template directory structure as described here.  Then I made a copy of the ICalendar.tpl file (the default one found at wordpress/wp-content/plugins/civicrm/civicrm/templates/CRM/Event/Page), placed it in wordpress/wp-content/civicrm-custom/CRM/Event/Page, and made the modifications to show the registration links (see here for how to locate your template file).  The modifications were:

Before the table begins, add the line {* CNP force registration links *} {assign var="registration_links" value=true;}.  This is because the registration link code is actually already there but hidden by default (unless you use the Shopping Cart mode - then it becomes an "Add to Cart").  This sets it to show by default.
In the table's header row, the line {if $registration_links}{ts}Register{/ts}	{/if} is good as is.
In the body of the table, I modified the existing IF as so: {if $registration_links}{$event.registration_link_text}	{/if}.
I also moved that link column to be the 2nd column on the event listings page, but that's a matter of personal choice.

Afterwards, remember to add this custom template path in CiviCRM at System Settings, Directories, Custom Template Directory (my path was [cms.root]/wp-content/civicrm-custom/).


CiviCRM Cannot add or update a child row: a foreign key constraint fails error after upgrading from 4.7.30 to 5.0.2 After running the command to upgrade the database I got a constraint violation error.

ERROR USERINFO: ALTER TABLE civicrm_case ADD CONSTRAINT FK_civicrm_case_case_type_id FOREIGN KEY (case_type_id) REFERENCES civicrm_case_type (id) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails...

I tried adding the foreign key in the database but that did not work. I got this error:  MySQL ERROR 1005: Can’t create table (errno: 150)

The Foreign Key exists on the my live site's db so I imported a db backup from the lives site. Ran the db update command again and got the same error.

How do I prevent the migration from deleting the foreign key?

This is my civicrm_case:

CREATE TABLE civicrm_case (

  id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique Case ID',
  case_type_id int(10) unsigned NOT NULL COMMENT 'FK civicrm_case_type.id',
  subject varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Short name of the case.',
  start_date date DEFAULT NULL COMMENT 'Date on which given case starts.',
  end_date date DEFAULT NULL COMMENT 'Date on which given case ends.',
  details text COLLATE utf8_unicode_ci COMMENT 'Details about the meeting (agenda, notes, etc).',
  status_id int(10) unsigned NOT NULL COMMENT 'Id of case status.',
  is_deleted tinyint(4) DEFAULT '0',
  PRIMARY KEY (id),
  KEY index_case_type_id (case_type_id),
  KEY index_is_deleted (is_deleted)
  ) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

A workaround to this is to comment out the SQL lines in the file that drop, modify and rebuild the FK.  /CRM/Upgrade/Incremental/sql/4.6.18.mysql.tlp

This will have to be done for every upgrade with a db that does not include the FK.


CiviCRM 4.7.27 upgrade undefined method CRM_Price_BAO_PriceField::getVisibilityOptionID() After upgrading to CiviCRM 4.7.27 on WordPress 4.9.1 the civi contribute pages for donations are only rendering for users who are logged into the WordPress backend. Enabling PHP error reporting gives this error: Fatal error: Call to undefined method CRM_Price_BAO_PriceField::getVisibilityOptionID() in /var/www/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php on line 1062.

Any suggestions for resolution? I checked the documentation for CRM_Price_BAO_PriceField and could not find the referenced method (edit: I was able to find the method in the github files and on my server (PriceSet.php and PriceField.php), it just doesn't appear on the doc.symbiotic.coop core file information pages)

The current error doesn't seem to be generating a backtrace, you can go to www.parksandtrails.org and click on the 'Donate Now' or 'Join or Renew Now' links to see the error as listed above, but no backtrace when that happens.

That method IS present in 4.7.27 - it's at line 892.

If it's not present for you, then either:

There's something squirrelly in your upgrade process - perhaps some file wasn't actually replaced;
You've got some extension or PHP override that's overriding the file in question.


No emails sent automatically when someone joins a group The documentation says:

  After people subscribe to mailing list groups—via the subscribe link
  or a profile—CiviCRM will automatically send them an email asking them
  to confirm their subscription. Until they click the confirmation link
  in the email, their contact information will appear in CiviCRM with
  their group subscription set to Pending. When they confirm, CiviCRM
  will automatically change their group subscription status to Added and
  they will be sent a welcome message. (Note: When users subscribe to
  multiple groups at once, a confirmation email is sent for each group
  separately.)

I cannot get this to work. Civimail works fine. Send mail to individuals or to a list that resulted from a search works fine.

People join a group through a profile. The advanced settings in the profile has the group name ("Volunteers") and a return ddress but no emails are sent.

I have checked to see if there is a scheduled job that handles this but could not find one that seemed relevant.

Check your settings in Administer > CiviMail > CiviMail Component Settings:


Upgrading to CiviCRM 4.63 from 4.4x on current Joomla 3.x The upgrade went fine - the DBs script ran with no errors --

Can view contacts, members, past events just fine

When I go to try to manage event - I get the errors below - I also get issues when I try to use a contribution page (same error) and I can not initiate a new mailing - I just get a page with the civi headers on it but no mailing content. (image attached for clarity)

Thoughts and thanks

editing an event error
Database Error Code: Unknown column 'filters' in 'field list', 1054
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            1 => handle
        )

[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] =>

SELECT  id,
    code,
    description,
    amount,
    amount_type,
    events,
    pricesets,
    memberships,
    autodiscount,
    expire_on,
    active_on,
    is_active,
    discount_msg_enabled,
    discount_msg,
    count_use,
    count_max,
    filters
  FROM cividiscount_item i
  WHERE is_active = 1
  AND (count_max = 0 OR count_max > count_use)
 [nativecode=1054 ** Unknown column 'filters' in 'field list']
    [type] => DB_Error
    [user_info] =>
  SELECT  id,
    code,
    description,
    amount,
    amount_type,
    events,
    pricesets,
    memberships,
    autodiscount,
    expire_on,
    active_on,
    is_active,
    discount_msg_enabled,
    discount_msg,
    count_use,
    count_max,
    filters
  FROM cividiscount_item i
  WHERE is_active = 1
  AND (count_max = 0 OR count_max > count_use)
 [nativecode=1054 ** Unknown column 'filters' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="
  SELECT  id,
    code,
    description,
    amount,
    amount_type,
    events,
    pricesets,
    memberships,
    autodiscount,
    expire_on,
    active_on,
    is_active,
    discount_msg_enabled,
    discount_msg,
    count_use,
    count_max,
    filters
  FROM cividiscount_item i
  WHERE is_active = 1
  AND (count_max = 0 OR count_max > count_use)
 [nativecode=1054 ** Unknown column 'filters' in 'field list']"]
)

Can u disable the cividiscount module. Seems like that module is responsible for the above error.


How to clear pseudoconstant cache? I find that if I create a new tag via the api, and then try to attach it to a contact with the entity_tag api, it will sometimes fail with the message "'##' is not a valid option for field tag_id".

This is because the entity_tag api checks for the existence of the tag_id using a pseudoconstant lookup -- which is a cached value. How can I easily clear that pseudoconstant cache after the tag has been created to ensure it can be added to the entity?

You can manually clear caches with civicrm_api3('AnyEntity', 'getfields', array('cache_clear' => 1)); (use any valid entity, it doesn't matter which).

However, if you are using the api to create tags, and this does not automatically clear the cached list of tags, I would consider it a bug. If you are able to reproduce it in the latest version please look in the issue tracker for an open bug report, and if there isn't one, please open one.


When Sending a Mailing the Reply-to email is different than the From Address I sent out a mass mailing via CiviMail and the reply-to email is default+r{seemingingly_random_string}@gmail.com
I am using Sparkpost to send these mailings.
CiviCRM 5.29.1
Any idea why the reply-to email is this odd-looking email and not the same as the From address?

This is a mechanism for handling bounce messages and replies in response to the mailing so that they are associated with the individual that mail was sent to. It is quite complicated and you should start by reading https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/ and probably also the Sparkpost documentation as well. Too much to explain here. I presume that you didn't set the Sparkpost up. You could talk to whoever did.


Programmatically Re-Use CiviMail Emails I am trying to write an extension that monthly will send a series of CiviMai emails. Basically, it would be the same if a user went to the Sent mailings and clicked Re-Use and sent the email again without any changes to the email at all.

Obviously, I need the email to be sent the first time but after that, I am not sure how I would use the API to duplicate the email and then schedule it to send.

Any help is greatly appreciated. I am using Drupal 7 and CiviCRM 5.11.

Thanks,
Josh

Look at the bottom lines here to get you started:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/Controller/Send.php

i.e.
$clone = civicrm_api3('Mailing', 'clone', array('id' => $mid));
and then follow thru the rest of the code.


How can I display message after form submission I have created CiviCrm profiles. How can I display a message when user submits the profile?
First It should display a message (pop or alert) and then redirect to another page.

In the advanced settings of a profile, there is a Redirect URL field. Copying from the CiviCRM user guide:

"This applies only to Profiles that are being used as standalone forms; it will not apply when the Profile is embedded in an event sign-up or contribution form. The Redirect URL field allows you to send people to a specific web page after they submit their form. For example, you may want to create a web page that thanks people for submitting their information. If this field is left blank, people will be directed to a page which displays the information they've just entered."

At the top of the default redirect page, a generic statement of "Thank you. Your information has been saved." will be displayed, but this is not a pop-up. If you want to change this wording, you could use Administer > Customize Data and Screens > Word Replacements, but keep in mind that this replacement will be applied globally - i.e. you should not use this option if you want the wording to be different for each profile submitted.

Hope this helps!


Cannot redeclare civicrm_enable() I am trying to migrate a Drupal+CiviCRM from an old server to a new one.

I copied the files and database, updated civicrm.settings.php and settings.php, cleared the cache and made a drush up + drush updb, both ran fine.

As the new server uses PHP 7.0, I downloaded civicrm-4.7.31 drupal and l10n files to replace the version 4.4.19 that was used. However, I still have a white screen when going to the homepage.

In /var/log/nginx/error.log, I can find this error:

2018/04/30 17:54:16 [error] 20389#20389: *845 FastCGI sent in stderr:
"PHP message: PHP Fatal error:  Cannot redeclare civicrm_enable()
(previously declared in
<civicrm_root_path>/sites/all/modules/civicrm/drupal/civicrm.module:781)
in
<civicrm_root_path>/sites/all/modules/civicrm/drupal/civicrm.install
on line 40" while reading response header from upstream, client:
XXX.XXX.XXX.XXX, server: XXXX, request: "GET / HTTP/1.1", upstream:
"fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXX"

Edit:
I already saw this post but that didn't help me fix my issue. I have only one copy of CiviCRM under my module directory. I tried the "drush vset civicrm_class_loader ''" command and now I have a new error message:

"2018/05/03 10:36:07 [error] 7010#7010: *2972 FastCGI sent in stderr:
"PHP message: PHP Fatal error: require_once(): Failed opening required
'CRM/Core/ClassLoader.php'
(include_path='.:<civicrm_old_root_path>/sites/all/modules/civicrm:<civicrm_old_root_path>/sites/all/modules/civicrm/packages:.:/usr/share/php')
> in <civicrm_root_path>/sites/default/civicrm.settings.php on line 280"
> while reading response header from upstream [...]"

With  being the root path on the previous server, so it must be cached somewhere, but I cannot find where. This error disappears after a drush cc.

As answered by @davejenx here ("Cannot redeclare class CRM_Core_ClassLoader" in backup site) this could be your issue.

  It sounds as though there is either a cached path to ClassLoader.php somewhere or there are two copies of the CiviCRM code under your modules directories. Various scenarios and solutions are discussed in this forum post: svn installation says "Cannot redeclare class CRM_Core_ClassLoader" Please post back here rather than on the forum, though.

  If you're sure that there aren't multiple copies of CiviCRM under /home/mydomain/www/backup/ then the most likely fix is to clear the Drupal variable civicrm_class_loader, e.g. using drush:

  drush vset civicrm_class_loader ''

  There's a good chance the fatal error will prevent the use of drush. In that case, you can delete the row from Drupal's variable table where name = 'civicrm_class_loader'. It's possible the variables are cached in addition -- you may need to clear Drupal's cache tables manually. (A targeted approach -- in Drupal 6, anyway -- is to delete the row from Drupal's cache table where cid = 'variables'.)


Link Price sets to imported members How to link price set to already imported members ? So that when a member login, they can see their membership fee overdue

Jaisal

As Pradeep responded to your original question,  there is a  contact dashboard that will display information about a person's activity (e.g. contributions, memberships, etc.).

Syntax is important when asking questions - a price set is an entity that is used in conjunction with contributions and the contributions will have a given status. You specifically mention the "Overdue" status which is used with pledges, not with contributions - in your original question it sounds like what you want to use are contributions for membership payments (you can use either pledges or contributions, but not both).

You could create a custom membership status rule called "Overdue" and have that be the status assigned to memberships that would otherwise be in "Grace" or "Expired" status, but on the contact dashboard, it will still be listed as "Expired / Inactive Memberships" (at the bottom of the first screenshot below) unless you have word replacement in place. Before word replacement, the contact dashboard would look like this:

Using word replacement to replace the original text of "Expired / Inactive" with "Overdue", the dashboard will look like this:

If this was not the response you were looking for, please try to elaborate further.


Importing Gift Aid records I am moving our memberships over to CiviCRM and we have a few thousand active members. I have implemented the Gift Aid extension and I would like to import Gift Aid records for all the existing customers. Can someone recommend a process for this or help me with api calls. I am happy to write php code but I can't identify which api calls are necessary.
Thanks for any help

You can import Gift Aid records with Import Contacts, but as they are as they are multi record fields, you have to use the ... option which is hidden away. You need to click on the ? help for Import Records, which, at the end, gives you a link to the Import Multi-value Custom Data screen. Obviously you have to get your data into a suitable csv file to import and will have to add the contact id to match to the contact record (but easy enough with an export of all contacts and a lookup - checking duplicate names) or use external id if you have used one for the import of contact data.


How to remove an old email link from an event page I have created a new event page and on the online registration page I have entered the 'Confirm From email' address that I want to use. However, when someone registers for the event the confirmation email is being sent to a different email address that was used for an event in 2018. This alternative email address was listed as disabled on the 'From email addresses' list and I have since deleted it but messages are still being sent to it from this new event page. I can't find anywhere in the CiviCRM system where this email address exists to change or delete this association with the event page.
Where can I look to edit or delete this association?

Thank you for your help.
I have now fixed the problem- it was hiding on a profile page for conference registrants in the advanced settings section at the bottom of the page (which I had missed!)


Event calendar for Civi 4.7.x? Related to this earlier question and this earlier question, I'm looking for a front-end event calendar. The most current extension I could find doesn't seem compatible beyond Civi 4.4, and we're running 4.7.16 ... on WordPress 4.7.2.

Assuming others are running Civi 4.7 with some sort of working front-end event calendar, what's the most direct way to do this?

I'm not sure if it fits to your necessities but CiviEvent includes iCal for public events.

As you can see on CiviCRM user guide

  Select the Public Event box to include the event in promotional listings such as RSS feeds, iCal files or feeds, and event listing pages.

You can find more related information on how to use this functionality in this  forum topic integration with iCal and/or Google Calendar - private calendars?


Howto extend a civi db field's size (maxlength, varchar) We are facing a problem with CiviCRM's default field length for organization names.

Background:
In our setup we handle big departments or organizational units as distinct contacts. Since the sole department's name isn't sufficient for naming the contact and due to some limitations of CiviCRM (as discussed here) we've decided to compose the the name from the base organization name and the department's name.

Example:

Contact A: Base Organization named "University of Bielefeld",
Contact B: Department of A named "University of Bielefeld || Faculty of Physics"
Contact C: Department of A named "University of Bielefeld || FooBar Institute"

This leads in come cases to names exceeding the maxlength of contact name fields which is 128.

Setting those in the database is easy but adjusting CRM/Contact/DAO/Contact.php's column definitions makes core updates harder :/

How would you handle this? @Civi developers: Any chance to make field size configurable or increase size to 255 in general?

Interesting one. I would probably add a custom field at Organization level with the full name and use an abbreviated version in the display name. Possibly add an extension to show the custom name in forms with the buildForm hook and the summary hook. Also add an apiWrapper hook to add the longer name to the API.


First time donor report I am trying to pull a first time donor report. I am using the Repeat Contributions report. I set the Initial Date Range as custom from beginning to Dec 31, 2016. The Second Date Range is This Year. I set Range 1 Amount as Less than 1 and the Range 2 Amount as Greater than 1. It shows 0 results. I tried several different combos (Is not Null/Is null, etc). All combos I tried either show 0 or they show all donors. Can I use this report to show first time donors? Those that did not give in the previous period but gave in this period.

ps. I know that I have new donors, so with the right polling, I should see results.

There's actually a way to specifically run a "First Time Donors" report, though it's a little hidden.

Go to Reports menu » Contribution Reports.
Select "Contribution Details Report".
Under the "Filters" tab, set "Contribution Ordinality" to "First by Contributor" to only show first-time donors.


Compatible IATS Payment Extension What version of IATS Payments extension is compatible with Civicrm 4.7 Beta5 release?

We're just setting up for a large test grid with master on CiviCRM 4.7 - I've done some preliminary testing - and look forward to completing the entire grid. If you're able to run some tests yourself - clone master from https://github.com/iATSPayments/com.iatspayments.civicrm - and let us know what you find [in the GitHub queue is best].


How to set a custom country field using the API Some fields that are stored as id references to other tables can be set by simply passing the value as an id, e.g. setting gender_id=Male works.

I have a custom fieldset attached to contacts that includes a country (of origin - it's different to of residence!) field, known affectionately as custom_77.

But I've noticed that the API doesn't like me to pass custom_77=Uganda - it complains that Uganda is not an integer. Can't fault it there :-)

My answer to the setting gender question provides a working solution: you can get it from getIdForLabel('contact', 'custom_77', 'Uganda'), or from any other country field, e.g. getIdForLabel('address', 'country_id', 'Uganda'), but as that turned out to be a very long winded solution when it was actually very simple, I thought I might, once again, be wrong! Hence this question.

Any field (including custom fields) that accepts an option value will take either its machine name or it's id. The machine names for countries are their ISO codes, e.g. the code for 'United States' is 'US'. So you could do:

civicrm_api3('Contact', 'create', array(
  'custom_77' => 'US',
));

which is equivalent to

civicrm_api3('Contact', 'create', array(
  'custom_77' => 1228,
));

The label "Uganda" will not work, as it's not considered reliable given translations and word-replacements.

To find the ISO code for a country, use the api explorer. Api Country get with name = Uganda reveals "iso_code": "UG"


Add eCommerce to CiviCRM 4.7 on Drupal We take Contributions and Event registrations via our website, and I'm hoping to add a simple eCommerce facility for resources we sell.

Just wondering what options might exist for adding this facility. We would want eCommerce customers to become CiviCRM contacts, but we're open to whether this happens at the front-end or via a back-end function (we're not anticipating large volumes of sales).

Our current toolset includes: CiviCRM 4.7, Drupal 7, CiviCRM Webforms, Entity Forms.

There are many options/ways to go about doing this! One option would be to add Drupal Commerce module to your toolset. I use it for a number of projects - when I don't really have the need to track what users purchase in CiviCRM (e.g. school cafeteria order details (which child has which meal/drink every single day) and reservations for research institute with/without GPS rentals etc).

The integration you want depends on your needs (cliche...) - but the easiest - no code required one is to string together: Commerce, Commerce_[your_payment_processor], Webform, Commerce Webform, Webform CiviCRM, CiviCRM.

Commerce Webform will let you add Commerce Product Sku-s to your webform - and then these get pushed into the Commerce Cart for checkout; Once checked out -> Commerce Webform has a Rule that then goes back to the webform and mark skus->paid;

Webform CiviCRM will let you pull in info from a specific logged in Existing Contact - relationships etc.

Voila - here's a screenshot of a specific Order in a User's Orders tab:
Drink options are Drupal Commerce SKUs; Student info -> is pulled in from CiviCRM (relationship child of logged in existing Contact);

user/2/orders/32659


Differences in results between 'Find Cases' and a 'Case Report' Using 4.6.10 currently, although aiming to update shortly, I've created a case summary report from the template that simply lists all cases that are either 'ongoing' or 'urgent'. This lists 10 cases. All good.

However, if I then use 'Cases' > 'Find Cases' and specify the exact same criteria (i.e. find all cases with the status 'ongoing' or 'urgent', it lists 14 cases.

Comparing the two results lists and looking for differences between the cases that might explain the difference in results, I can see none. We have only one case type, and all the cases as listed in the civicrm_case table carry the same case type id, they are all open and not deleted, the status id values marry up as I would expect, and I can see no differences that might lead to these four cases not being included in my report.

My assumption/conclusion is that the case summary report template is in some way broken in this version? As I say I'm about to update to the current 4.6.x version (4.6.14 at the time of writing), but wondering if others have had odd results with the Case Summary Report, or indeed the 'Find Cases' search facility?

The Case Summary report has a grouping on contact. Do two or more of the cases have the same client?


Undefined index: params in CRM_Event_BAO_Event::buildCustomProfile() - CiviEvent I just came across this error (that I'd just like to clean up) after cancelling my PayPal transaction and returning to my site:

Undefined index: params in CRM_Event_BAO_Event::buildCustomProfile()

Are there any fixes for this issue?

Thanks! Matt

I also came across this notice, I've submitted a pull request: https://github.com/civicrm/civicrm-core/pull/12678


Search > Find Memberships: Difference between Membership Status Current AND Current Member? Search > Find Memberships -or- Search > Advanced Search and I use the Membership criteria in my search I usually set the Membership Status to Current but I just noticed today below the Status field there is a radio button fieldset with a label Current Member?

What is the difference between the Status = Current and the fieldset for Current Member? being checked

There is a setting in each MEmbership Status where you decide if a Status should be considered 'current' or not.

Current Membership?
Should this status be considered a current membership in good standing.
EXAMPLE: New, Current and Grace could all be considered 'current'.

It is confusing that 'current' is used in two different ways.


Find and remove contacts based on no activity, contributions, memberships and events At some time our CiviCRM/Drupal installation has had lots of spam accounts created. As these are over a period of time I can't isolate by date. One tell-tail sign that the accounts are spam is their Civi contact summary has no recorded touch points (activity, contributions, memberships and events). Is there a way to search for contacts that meet this criteria and delete? I've looked at the Find Contacts - Advanced Search but there doesn't appear to be an option for null values. I've also looked at modifying one of the Contact Report Templates which does allow null matches but haven't been able to find a setting that gives the spam accounts.

You could find them via groups (or tags) and the custom include/exclude search.

If you have always used CiviCRM for everything then I think you should only need two groups or tags:

All contacts
All contacts with activities (as activites are created for contributions, membership and events)

If you have migrated data from a previous system or imported contributions, memberships or event participants then you may need to create groups or use appropriate tags for the all of the following:

All contacts
All contacts who have made contributions
All contacts who have memberships
All contacts who have registered for events
All contacts who have activities.

Then go to Search > Custom searches > include/exclude search. You include All contacts and exclude the rest.

You can delete contacts from the results screen.


Can't select Mailing Template in CiviMail after upgrading CiviCRM to 4.7.30 After upgrading Civi to 4.7.30 the Template dropdown on the New Mailing screen has disappeared - the only option is to save to a new one:

We upgraded from Civi 4.7.29 to 4.7.30 on Joomla 3.8.5, but the same happens in a pristine 4.7.30 on Wordpress 4.9.4 environment.

Opening the Javascript Console in Firefox gave me this:

It appears a ~/crmMailing/Templates.html is missing, called from Templates.js in the same folder /civicrm/ang/crmMailing/.

Anyone able to reproduce this?

Thanks for your help,

This is a bug in 4.7.30. See CRM-21759. There is now a patch for it, or you can wait for 4.7.31.

  in 4.7.30 there is a call to a non existent angular templates file. This means that the Message Templates section of a new mailing doesn't load.


Mapping database from Neon to Civi Our organization is considering moving to CiviCRM after many years with Z2Systems Neon CRM and in downloading the MySQL database from Neon we note that there are 10 pages of table in the Neon database and only 4 in the Civi template.  How do we map Neon to Civi?

Another tool that folk who are moving to CiviCRM and Drupal may find interesting is the Drupal module CiviMigrate. There is a fairly historic write up of it here


What is the best way to collect and store event feedbacks? I am looking for a solution where I could collect feedback with an automated email after the event. I figured, I could use schedule reminder for the emailing part.
But stuck with the step of collecting feedback in a way which could show a visual graph of the feedback submitted, as well as keeping the feedback record within contact record with event details (at least title & date).
I could create a set of custom field for contact as a table. This would allow me to keep multiple record of events feedback. Then add the custom fields to a profile and add checksum link to the scheduled reminder mail. But I cant get the event name pre-selected within the profile/custom field.
Has anyone tried any sort of work on this or any workaround? Any help would be very much appreciated. Thanks.

I would use webform and on submission create a activity of type 'XYZ'.


CiviMail html format splits images and text On the preview the email looks as it should, with pictures and formatted text, when i test email all of the pictures will appear above the text completely separated.

Most email clients only accept a limited subset of html tags, and many do not respect style attributes. If your image markup looks like <img style="float:right"... try changing it to <img align="right"...


Where is the search and replace feature? I want to replace the value in a field (yahoo Home) with another value for multiple contacts. The field is in the summary screen for contact types = Organization.

Not sure about "Search and Replace", but you can do the above from the "Update multiple contacts" task on the contacts returned on Advanced Search.

All you need to do is add your field(I think it's IM Screen name in your case) to a profile (Created from Administer -> Customize Data and Screens -> Profiles).
Use Search -> Advanced Search to filter and get your contacts -> Select Update multiple contacts on the Action dropdown.
Select your profile where you've added the field in step 1.
Enter the new value for the contact(You can also make use of Copy icon to copy text to all the rows) and click Update Contacts button.


CiviCRM_API3_Exception: Expected one CustomField but found 0 in civicrm_api3() (line 45 of sites/all/modules/civicrm/api/api.php) I was cleaning up some extra custom fields in our DB. ONe of these , though it was disabled did not stop displaying in the contact profile. So I clicked to delete it.

I then got this error when I tried to do anything in Civi:

CiviCRM_API3_Exception: Expected one CustomField but found 0 in civicrm_api3() (line 45 of /var/www/crm/sites/all/modules/civicrm/api/api.php).

I tried commenting out the offending code in api.php, which got me past the error, but produced a whole bunch more warnings.

I saw in the table - civicrm_custom_field, that the record for the field that I tried to delete was still there. I manually deleted it but that did not help.

IN this situation I can;t get into CiviCRM at all to turn on backtrace or any other logging.

Really and truly stuck. Any help would be appreciated.

Probably it's existance is cached - try truncating civicrm_cache and  / or calling the System.flush api


Can't Get CiviCRM BuildKit files From Repository Unable to get CiviCRM buildkit files.

I am running:

OS:           Linux   -  Ubuntu 18.04 bionic
WebServer:    Apache/2.4.29 (Ubuntu)   built:   2018-04-25T11:38:24
Database      MYSQL  Ver 14.14 Distrib 5.7.22
Language:     PHP   -  Version 7.2.5-0ubuntu0.18.04.1
Language:     Node.js  - v10.5.0
VCS:          git version 2.17.1

Executed command below as advised at https://docs.civicrm.org/dev/en/latest/tools/buildkit/

curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir ~/buildkit

Got the results below.

root@joe-Meerkat:/home/joe# curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir ~/buildkit
Detected Ubuntu 18.04 LTS.

Task: acl git wget unzip zip mysql-server mysql-client php7.2-cli php7.2-imap php7.2-ldap php7.2-curl php7.2-mysql php7.2-intl php7.2-gd php7.2-dev php7.2-bcmath php7.2-mbstring php7.2-soap php7.2-zip php7.2-xml apache2 libapache2-mod-php7.2 nodejs npm php-pear libmcrypt-dev libreadline-dev

Warning: This system will not support php-mysql extension

Run automated installation? [Y/n] y
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
-
-
-

Hit:9 http://ppa.launchpad.net/system76-dev/stable/ubuntu bionic InRelease

Err:10 http://ppa.launchpad.net/midori/ppa/ubuntu bionic Release
404  Not Found [IP: 91.189.95.83 80]

Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/midori/ppa/ubuntu bionic
Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is
therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@joe-Meerkat:/home/joe#

Does anyone know the cause of this and what can be done?

joseph.c.mansigian@gmail.com

At that point in the install script, it is attempting to run sudo apt-get -y install for a bunch of packages.

It looks like you have added a ppa for midori but that does not have a bionic release yet.  You can run sudo add-apt-repository -r -u ppa:midori/ppa or find the entry for midori in /etc/apt/sources.list or /etc/apt/sources.list.d and comment it out and run sudo apt update

Once you can get sudo apt-get -y install to run cleanly on some (any) package, try again with the get-buildkit.sh script.

Note also that bionic comes with php 7.2 which is marked as 'not yet tested' in https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-version so unless you are only interested in the very latest releases and debugging 7.2 issues, you probably want php 7.1 (see eg https://tecadmin.net/install-php-7-on-ubuntu/).  However, if you do that you'll need to install the 7.1 version of the php extensions.  Look at the php7.1-* list in the 'do_system_artful' function of get-buildkit.sh


Warning when importing contacts/activities warning pop up note when importing contacts or activities, same warning on the drupal demo site, go to contacts -> import contacts/activities: 'Upload max filesize ('upload_max_filesize') should not exceed Post max size ('post_max_size') as defined in PHP.ini, please check with your system administrator'.

Is this something to worry about or this warning has always been there?

This message means that your upload will likely fail on larger files. Update your PHP.ini file to fix this conflict.

More info: PHP change the maximum upload file size


Multi-Select Field No Longer Working I have a site I manage that uses a "Multi-Select" HTML field type.  I do not use the field so I cannot say exactly how recently but no more than the last month our field stopped being able to be edited or shown in search forms.
If I switch to checkboxes it works perfectly. If I switch back Multi-Select I get the same problem and when I save I get the error, "Please enter valid - Data and Input Field Type."
It is like it is trying to use the pre-CiviCRM 4.5 form element. I do not know how that could be.
I am running CiviCRM 5.28.2 in Drupal 7.
Any help is greatly appreciated.
Thanks,
Josh

I could not recreate this. The most simple solution was to make a new field and then import the old data into the new field.


Anyone else getting a webform error for a non-required date field? I'm experiencing, in the current Webform version (7.x-4.16), an issue reported fixed last year (issue #2612844). Anyone else experiencing it?

A date field with "Hide" checked for Day and Month (only interested in the year).  The hint says "A hidden day or month will be set to 1." Instead getting errors for Month missing and Day missing upon form submission.

Yes I get this when I add a Relationship on a webform and set Day and Month to be hidden.

I expect this needs to be done as an 'improvement' to the webform_civicrm code - you might want to open an issue at drupal.org/project/webform_civicrm but it will probably require some effort/funding to get it added


Case type edit not saving, broken case types - how to debug? On a particular Civi 4.6.4 / Drupal 7 installation, recently upgraded from 4.4, there are some misbehaving case types. They appear to have been created through the CiviCase UI since the 4.6 upgrade, as there are no corresponding xml files in CRM/Case/xml/configuration/ under the custom template directory. These case types have no activity types and no timeline specified. The xml in the definition field of the civicrm_case table is just this:

<?xml version="1.0" encoding="utf-8" ?>

<CaseType>
<name>engagement</name>
</CaseType>

When I try to edit one of these broken case types through the UI, e.g. adding activity types or adding a standard timeline containing Open Case, it does not save. No error is reported on screen, in CiviCRM.blah.log, Drupal watchdog, Firebug console or the web server error log.

The following civicrm/ajax/rest call is shown in Firebug on saving:

action: create
entity: CaseType
json: {"id":"4","name":"engagement","title":"Engagement","is_active":"1","is_reserved":"0","weight":"2","definition":[],"is_forkable":"1","is_forked":""}

Note "definition":[]. This I assume should hold details of the activity types & timeline I have just attempted to add. The response is as expected, given the data that was provided:

{"is_error":0,"version":3,"count":1,"id":4,"values":{"4":{"id":"4","name":"engagement","title":"Engagement","description":"","is_active":"1","is_reserved":"0","weight":"2","definition":[],"is_forkable":"1","is_forked":""}}}

However I was able to create a new case type OK.

Any advice on debugging this would be much appreciated.

The commentary suggests that the history of this case-type may have allowed some weird data in.

In case one did want to dig in more, a couple debug tricks that might be interesting:

Open the case-type admin UI and edit the current URL to append ?angularDebug=1. This will cause it to display a panel with the "live" content of the CaseType and its definition. This is available in most Angular pages.
If you're experimenting on a dev/staging site, you might try unsetting the definition via SQL (UPDATE civicrm_case_type SET definition = NULL where id = ...). This is sometimes useful for forcibly revertig a definition (even if the UI is misbehaved).


How can I find an expert CiviCRM WordPress developer? I want to hire a CiviCRM WordPress to perform various tasks in our Civi site. We have a list of needs, but the most pressing is the following. We have registration pages for our events. When you look at the registration pages on desktop, the form looks acceptable. But when you look at it on mobile, the form looks horrible and I can't image anyone filling out this form on mobile.

We need you to immediately step in and make whatever CSS or form tweaks are necessary to make the mobile view look good.

This is only one of several tasks that we need done. We are ultimately looking for continuous and long-term support.

Thank you,
Steven

A great place to find a CiviCRM expert is on CiviCRM.org! There's a list of CiviCRM providers at https://civicrm.org/providers

You can use the filters on that page to identify a good match by (for example) services offered, CMS expertise, language and location. Here's a listing of CiviCRM / WordPress implementors.

Being an open source project, much of the work happens out in the open. Other places you can identify good people to work with are places like Stack Exchange (this site), CiviCRM chat, the CiviCRM bug tracker, and other community resources.


CiviCRM API: How to get event by custom multiselect field option? I have an event with a custom field custom_1 which is a multi select or checkbox list with two options Category A and Category B:

"custom_1": [
  "category A",
  "category B"
],

Now I'm trying to get all events which have at least option category A:

CRM.api3('Event', 'get', {
  "sequential": 1,
  "custom_1": "category A"
}).done(function(result) {
  // do something
});

With this request I just get the events, which have category A, but not category B:

"custom_1": [
  "category A"
],

But I need all events with category A, regardless if they have another category. So events with this custom field values should also be returned:

"custom_1": [
  "category A",
  "category B"
],

Is it possible to make an API request like "Get all events which have at least one of this custom field options."?

I think the feature you need is A 'contains' operation for the api to search multiselect custom values, which is work in progress. See the associated pull request #6612 for discussion of progress - it seems to have stalled but with good work already having been done.


Connecting existing contribution to pledge This Sunday was the first day for our church to receive payments in a financial campaign we are running. Some people have made pledges, and we have used CiviPledge to record those pledges.

I was under the assumption that when we recorded the donations to the same financial type as the pledge that CiviPledge would automatically figure out that that gift should count as a pledge payment.

However, it did not. I have since discovered the "Pledge" tab on an individual contact page which allows me to record a pledge payment, but that adds a completely different workflow to our record keeping.

Therefore, I have two related questions:

Is there some way to connect a contribution to a pledge when the contribution is entered using the standard contribution entry form?
How can I connect an existing contribution to a pledge after the contribution has been entered? (I am comfortable using the CiviCRM API, but have never programmed for the pledge component before.)

Any help will be appreciated.

Indeed, different workflow. with pledges, you create "expected" contributions for each time the donor said she'd contribute. You can then alter them via the api (eg with the api explorer)

The entity you want to change is pledgePayment. you can update the contribution_id, the amount and the status and it should then be working as expected

"values":[{
    "id":"1",
    "pledge_id":"1",
    "contribution_id":"10",
    "scheduled_amount":"500.00",
    "actual_amount":"500.00",
    "currency":"USD",
    "scheduled_date":"2009-07-01 00:00:00",
    "reminder_count":"0",
    "status_id":"1"
},


Batch edit one contact field (source) with same information I have over 50,000 contacts that I would like to batch-edit with the same contact "source" information. What is the best way to do this?

Personally I'd write a tiny php script but you could use the api explorer under civicrm/api:

Chose entity contact and action get
Add your search criteria
Add option "limit" to something high enough (Defaults to 25) or combine with option "offset"
Hit "chain api call"
Chose entity contact and action create
Enter json like "{source: 'your source'}"
Run

You could test it with one contact by adding it's id in the get criteria.


Link Contact Type with Drupal Roles I have the CiviGroup Roles Sync working fine but realistically i want to link Drupal Roles to the CiviCRM Contact Types.

Is this possible? So if i add a role in Drupal it will be reflected in Civi? Instead of being added into a group.

Thanks,

Moe

Can you create a smart group for each contact type and then use CiviGroup Roles Sync?

Also if you add contact sub type field on the user registration profile and so that you can update the contact type and role on same screen.

HTH

Pradeep


CiviCRM expert in India I'm representing an NGO based organisation in India. We have decided to move from paper based process to paperless process or at lease "less-paper".  We need an expert to implement CiviCRM in our organization. I couldn't find any Indian contacts in civicrm website , Can someone suggest an alternative solution to find an expert?

I do think that the find expert page is the preferable way to find experts. If they are not on that page the question will arise how good they are in terms of involvement with the civicrm community.

If you want to find experts in India, you could best google it.
There are some people in the community who are based in India. I do know that Harshal is based in India.


GitHub, Jenkins and coding standards I have submitted a few PRs recently for code developed using NetBeans.  I have configured NetBeans Code Sniffer to use what I think are the coding standards for CiviCRM.  However, this produces lots of errors/observations regarding comments etc. that Jenkins, the system that checks coding standards in GitHub CiviCRM.  The result is that it is very easy to miss those errors to which Jenkins objects. Does anyone know how to solve this?

what sort of code style errors are you coming up against? CiviCRM's code style is very similar to Drupal's code style. I found some information about setting up NetBeans on CiviCRM's wiki, here:
https://wiki.civicrm.org/confluence/display/CRMDOC/IDE+Settings+to+Meet+Coding+Standards#IDESettingstoMeetCodingStandards-NetBeans

Hopefully these links provide the right answers. Otherwise let's update the wiki page!


Fatal error: require_once(): Failed opening required 'CRM/Core/Payment/SDD.php' When I go to Configuration >> System Settings & URL >> Clear Cache and Update Paths
https://www.example.com/civicm/admin/setting/updateConfigBackend?reset=1
I tried to reset path and I get a WSOD with the following error

Fatal error: require_once(): Failed opening required
 'CRM/Core/Payment/SDD.php'
 (include_path='.:/home/hob/www/lyme/sites/all/modules/contrib/civicrm:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/packages:.:/home/hob/www/lyme/sites/all/modules/contrib/civicrm:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/packages:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/tecnickcom:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/phpseclib/phpseclib/phpseclib:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/pear_exception:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/auth_sasl:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/net_socket:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/net_smtp:/home/hob/www/lyme/sites/all/modules/contrib/civicrm/vendor/pear/validate_finance_creditcard:.:/usr/local/php56/lib/php')
 in
 /home/hob/www/lyme/sites/all/modules/contrib/civicrm/Civi/Payment/System.php
 on line 59

I see a similar error listed out here : CiviCRM 4.7.8 error after upgrade on eWay Recurring

Also when I checked the database for civicrm_setting table, I found all the values to be null.

When I looked into CRM/Core/Payment/ folder, I did not find SDD.php
is that an issue?

I went to the database and set all the payment processor.is_active = 0 .
I go back and Reset Paths and I get list of errors which are as given below

and last error on this list is this

Error loading module file (). Please restore the file or disable the module.

If you have performed path reset than path of extension must have been updated and the system already have SDD payment processor created therefore it is throwing file not found error.

You can fix this in either of 3 ways:

If you have db access then update civicrm_payment_processor.is_active = 0 for SDD payment processor type and then update the extension directory path by navigating to Administer >> System Settings >> Directories
Update the extension directory path in civicrm_setting table where name = extensionsDir (make sure you serialize the data correctly)
Over-ride the extension directory path in civicrm.settings.php

$civicrm_setting['Directory Preferences']['extensionsDir'] = 'xxx/sites/default/files/civicrm/persist/contribute/';

and then update the directory path by navigating to Administer >> System Settings >> Directories

HTH

Pradeep