Migrating database into a newer version of civicrm? I have tried importing the database from a production server running civicrm 4.4 into a development server running 4.7 - but it appears that only contact names are present - email, address, activities, memberships and contributions are all missing.
Does this mean that I need to start again, downgrade civicrm to 4.4 on the dev server and only upgrade it after porting the database?

If you want to migrate the complete database you should indeed do the following:

Set your old environment in read-only maintenance mode
Set up the new environment (CiviCRM & CMS) using exactly the same versions
Migrate the databases
Update CiviCRM and CMS to the latest versions
Properly test (quite some changes between 4.4. and 4.7)
Go-Live or rollback

As an alternative (if your data isn't too complex) you could export everything you need as csv-files and either use the UI import function of CiviCRM to import into the new environment or give Eileen's import extension a shot.


Incorrect Resource URL warning but menu arrows are present I'm getting the Incorrect Resource URL warning on both an upgrade and a fresh install on WordPress 4.9.1 on an nginx external dev site and on an nginx local site (using Local by Flywheel for the environment).

Nevertheless, the arrows in the menus are present, at least this is what I see:

I'm new to CiviCRM so likely missing something obvious. Any pointers on how to debug this would be appreciated.

I'm starting to regret having written this check!

So far, I have found four scenarios that result in this false positive:

Your php.ini has allow_url_fopen set to false.  This should be corrected, since it will subtly break other parts of CiviCRM (e.g. extension download, update checks).
Your site is behind a .htpasswd, and thus needs HTTP authentication to access files.
You're using WordPress, which has some much discussed issues regarding its ability to detect the directory its in when there's a symlink.  Follow the third link ("issues") for a discussion of how to fix this until the WordPress-Civi wizards resolve this once and for all.
Your server's firewall is configured to reject HTTP requests to itself.  I don't know a way to test for this other than to SSH in and run netcat, something like nc -v <my ip address> 80.  You want a connection that's "open" rather than "refused".  Note that using localhost instead of the local IP address in that netcat command may yield a different result.


Error when creating new Case: One of parameters (value: ) is not of the type Integer I have set up some new Case types and it was all working fine until a user tried to create a case and got the above error, this is happening for all case types now and seems to be being generated by Civirules code.

The only thing I can think of which I have changed recently is I deleted some activity types (through CiviCRM's user interface) and some were likely included in some Case types as sequences or timelines. None of the deleted activity types are included on active Case types that I'm using now but could that be the reason?

Do I need to track down the tables where activity types are linked to cases and get delete rows which are orphaned?

Not sure what was actually causing this but it has been resolved by updating Civirules.


What are all the possible variable fields available in greetings (Email and Postal)? When defining new email and postal greeting formats in Administer > Communications > Email Greeting Formats, I see several available variables like {contact.first_name}, {contact.last_name}, and so on.
I would be happy to see the list of all available variables.
More precisely, when I refer to {contact.individual_prefix}, I have access to the field Label of the corresponding table, but I want to access the field Description of the same table. I would like to know if this is possible, and if I have to install some extension in order to achieve that.

You can see a list of the tokens when creating a mail message (e.g. with mailings > New Mailings). You will see a drop down for the tokens in the top right of the mail body. If you select one you'll see the full token in the message body which you can then use in the greeting format.


Special Characters Become Question Marks "?" in PDF Printing -I'm using Civicrm 5.11.0, Joomla 3.8.0, Windows 7
-SQL is encode in utf8
-Chinese characters in phpmysql are readable
-Chinese characters in Civicrm are readable
-Civicrm saves data in utf8, so import or export contacts in Chinese is fine
-CiviMail can send email with Chinese characters
-Win 7 can read Chinese characters and save word documents in pdf as Chinese
-but when I go to Individual>Contribution>Print Invoice as PDF, they all turn to question marks (one character, one question mark)
-put Chinese characters in invoice templates, turns to question marks too

I tried to change this code

   $dompdf->load_html( $html );

to this

   $dompdf->load_html( utf8_decode( $html ) );

(from ../civicrm/CRM/Utils/PDF/Utils.php)
but nothing happened, still question marks.
What could be the cause of this?

I also tried this on demo site, same results display.

DOMPDF in CiviCRM have a trouble with special characters UTF-8. We have this same problem in Poland. I've create a repo with solution: https://github.com/ngo360/civicrm.dompdf.utf8

For apply this change go to path: path/to/civicrm/vendor/dompdf and delete all files. Then upload files from repo. I think is resolve Your problem.


Convert Submitted CiviCrm Membership Form to PDF Please does anyone know how to generate a pdf document from Membership Forms submitted by members n Civicrm? Is there a way to implement this.

I am using Civicrm/Wordpress

CiviCRM sends a email with PDF attached to it. It has all the data that a membership form has. This email is send to member but you can add CC or BCC in contribution page settings under Thanking-you and receipting.

HTH

Pradeep


Can civirules be triggered off a custom field of type date for eg Date equals Now Client is thinking about several date fields for a contact eg, when are they available to start volunteering' and want an alert for it. My presumption was 'oh let's do it with Activities' but actually I wondered if CiviRules could do this.

I ran a test and saw I can use Field value comparison, and set the field to 'is equal to' - but assume that NOW won't work out-of-the-box but happy to be told otherwise.

Assuming not, can you give me a pointer or know if this has been tried and is 'too hard basket'?

EDIT: so a custom field shows 'date i am available to volunteer' for a volunteer which will be sometime in the future. And the Admin want to get a reminder/notification say 5 days before that date is reached.

So I think the Linked Condition is eg Condition = Field value comparison, and Description is Contact.custom_127 = NOW

And Linked Action would be:
Add Activity to Contact. Type: Email. Status:Scheduled. Subject: check availability. Assignee: Peter DavisFZ

BUT if it ends up needing to be an Activity then I can also think about creating it at the outset on the form.

Reason I wondered about CiviRules is that I though "ha, with civicrm entity I can probably trigger a notification directly via Drupal Rules", and then i remembered CiviRules and wanted to find out more of what it could do ;-)

You are on the right track with using now in field comparision. See my Question and Answer here.

trigger: daily trigger for group members
condition: field value comparison for a date, datetime or timestamp field, where you can use any string recognized by the php function strtotime. So you should be able to use now as explained in the PHP documentation. In your case i would use "+5 days" as the comparison value.

After saving the condition the description should show Contact.custom_127 = 2016-05-19 (date when you saved the condition.)

Hint: use the latest CiviRules from Github, as support for timestamps was added a few days ago.


Custom Search Include/Exclude error message Using Civi linked to joomla web to manage our membership and various mailing lists.

I would like to be able to use a custom search function to find, for example, individuals who are not members, or individuals who are not in our 'newsletter' contact group. Contacts who are not in a give contact group.

I imagine the Custom Search Include/Exclude function would be best for this but when I select this from the Custom Search List I get an error message 'At least one Group and Tag must be present for Custom Group / Tag search.'

Can anyone advise what this means and how I might conduct such a search?

Many thanks

This error is displayed when you don't have any groups OR tags available on your site.

Check if you see any groups listed in civicrm/group?reset=1.
Similarly, check if you have at least one tag available in civicrm/tag?reset=1.

In your case, I think you don't have any tags created on your site. As a hacky workaround - you can create a dummy tag from Contacts -> New Tag menu in order to get rid of the error on the search screen.


How can we see change logs for events? We are using Civi 4.7.13 with logging enabled.
How can we access the logs specifically for events to see the user change history, when an event was deleted and possibly what changed?

I don't think you can get the logs for Events via the UI. If you have access to the db then most tables have a log table, eg log_civicrm_event and log_civicrm_participant


Is there a method in ACL of allowing anonymous access to some events and not others? I want some CiviCRM events to be Member-only and some to be public. But I'm not seeing a way of creating an ACL permission for the anonymous user and then assigning it to an event.

The only way of doing seems to be to revert to Drupal permissioning, which is global and not selective.

Is there a way around this? I'm thinking make all events available to everyone and put ACLs on profiles attached to events?

The title of your question only makes a distinction for "anonymous" users; the question itself mentions "Member-only" vs "public".

If by "Member" you mean "current membership holders as defined in CiviMember", then the Member Only Event extension is probably a good choice.

If on the other hand you only mean "members of my site" a.k.a. "logged in users", then what you're describing is possible with ACLs. The following will default to "authenticated users only" for all events, with exceptions defined on a per-event basis using ACLs.

Configure Drupal (or other CMS) permissions to deny the "CiviEvent: register for events" permission for the Anonymous role, and grant this permission to the Authenticated role.
In CiviCRM, create an ACL that grants "Edit" permission to a single event for the "Everyone" role, as in this example:

Naturally you'll want to test that event and a normal "authenticated user only" event, both as an authenticated user and as an anonymous user, for your own peace of mind that it's configured correctly.

An important caveat here is that with ACLs you are introducing a separate mechanism for managing user permissions, which runs parallel with -- and sometimes overlaps with -- Drupal permissions. That's not a bad thing; it just means it's important to a) have a clear understanding of what you're enabling, b) test to ensure you've configured it correctly, and c) remember to check ACLs as well as Drupal permissions, if you ever find an issue later on where users have different access levels than you expected.


How to use advanced search to search contacts created by logged in user Basically what I need to do is search for contacts created by the current logged in user. I have tried the change log tab but that does not work for me because then it would be contacts created by user x which is not what I want. I don't know if this is possible. Please help.

I need to create a smart group with this search criteria. My end goal is to use this smart group to give access to all users to view/edit the contacts they themselves created,

I don't think this is currently possible with the existing functionality. But you can attain this by custom fields with little customization using extension. What needs to be done is -

Create a contact custom set from Administer -> Customise Data & Screens -> Custom Fields.
Add a single field. Eg. Created By. Make it searchable (Select Is this Field Searchable? to Yes     ).
Create a simple extension using civix.
Write post hook and save a value for this field in DB
Go to Advance Search and search it by using this field.


How to set up membership-only downloads So I want the following to happen:
1. web visitor registers for membership
2. after registering the member would have to "add a pdf to cart" and "check out"

Is there a way on CiviCRM to set something like this up? I am trying to find something, but cannot find anything on having products (a pdf) download available for members to download after registration.

Not sure if CiviContribute, CiviEvent, or CiviCase would be appropriate.

Wordpress is what is being used.

The functionality is basically someone clicks to get a PDF or ebook, and then it takes them to a page where they have to register or donate. In receipt of the donation or registration they would receive the ebook/pdf to download on their computer.

There are a few ways to do this.  I've done something very similar on Drupal but not Wordpress, but there are two different answers depending on your situation:

If membership entitles someone to download any/all publications, then the easiest approach would be to use CiviCRM WP Member Sync in conjunction with Groups.  Make your download pages available only to a Wordpress user role called "Members".  Use Civi-WP Member Sync to make any CiviCRM contacts with an active membership also have the "Member" user role.  And of course, enable signing up for a Wordpress account in the membership signup profile.
If you must pay an additional fee for each publication on top of membership, you'll want to do the above, but also add WooCommerce or another Wordpress e-commerce module.  This is significantly more setup, but if you make your commerce pages available only to members using the approach outlined above, you'll have very fine-grained control.


Importing events - location I found the API CSV IMPORT GUI that allows me to import events. The one thing I can't figure out how to map is the location details - city and state. How do I map those two items?

The address is stored in an Address entity.  You then create a LocBlock entity that links to that address ID, and the event references the loc_block_id.

This is a bit tricky to do with the CSV API Import GUI because it only supports importing one entity at a time, as opposed to using API Chaining.  There are several approaches that support API chaining but unfortunately they're all significantly more complicated than API CSV Import GUI.

If you'd like a manual method:

Note the max ID in civicrm_address (SELECT MAX(id) from civicrm_address).
Import your event addresses.  Note the new max ID.
Note the max ID in civicrm_loc_block (SELECT MAX(id) from civicrm_loc_block).
Create a spreadsheet with a list of new address IDs only.  Import that as a LocBlock entity, mapping to address_id.
Note the max ID in civicrm_loc_block.
Paste the loc_block_id into your original event spreadsheet as a new column.  If you successfully imported all addresses in the same order as they appear on the event CSV, your loc_block_ids should line up.
Import the events.


CiviMail Mailing - Unable to select group, getting error of No recipients I'm using CiviCRM 4.6.4 on Joomla 2.5.17.  I'm new to Mailings so there may be something I am doing wrong, but there are several things that don't seem to work, including selecting a Group, sending an email to an address as well as to a Group.  But, let me first ask about selecting a Group.

I created the Group "test" with two contacts with valid email addresses and marked the group for Mailing.  The group appears in the Recipients drop down, but when I select the group, I receive an indication of "No recipients" and then the Recipients field label is highlighted in Red.  What could I be doing wrong?  Is this a known issue?

I primarily use Chrome, but I have tried in Firefox and Safari and get the same result, so I'm thinking that there is something  misconfigured in a database setting, Javascript file or PHP file, but I wouldn't know where to look to debug.  I have noticed there have been several postings regarding CiviMail and 4.6.x especially from Joomla or Wordpress users, so I don't know if someone has diagnosed this particular issue or if I am simply doing something wrong on my end.

I should also mention that I have upgraded from 4.4.x to 4.5.x over time and then recently to 4.6.2 and now 4.6.4, so I don't know if any of those upgrades broke my CiviMail configuration somehow.

Drupal 6

I had a similar problem and went to: "Administer" -> "System Settings" -> "Cleanup Caches and Update Paths" and then ran "Cleanup Caches". When I went back to the mailing all my groups appeared again.


Gravity Forms/CiviCRM add on - adding record to groups I am using the Gravity forms to CiviCRM plugin. http://shop.civivip.com/civi-plugins/gravity-forms-integration/

It is passing the data but not seeing where it actually will specify what group you want data to send to. Just has Groups but can't select which one.

Have others successfully sent gravity form data into CiviCRM groups?

Can you tell me what version you are running? We added support for groups and tags in our latest version. On the contact feed it looks like this.

If you're wanting to add to different groups based on their selection then you would create one feed per group and make the feed conditional based on that criteria.


Does the CiviCRM API comply with the OpenAPI Specification? Does the CiviCRM API comply with the OpenAPI Specification?

No the CiviCRM api does not comply with the open api specification. Is there any reason why you are asking this?


How to develop a very simple Extension I want to develop a very simple Extension which :

searches the current contact_id
then verifies if he is recorded for a given event (event_id as a parameter)
then, depending on the result, echoes a message or opens an URL.

I read that, to develop an extension, I first had to :

install Civix,
which requires installing first git and composer
... which seems very complicated to me for such a simple program.

Is there a way to write and upload directly the code in the Extension directory, whithout all these prerequisites ?

git and composer aren't necessary to install civix.  In the README it suggests multiple ways to install civix.  The first one is a simple download: https://download.civicrm.org/civix/civix.phar.


Why doesn't custom search enable "Actions" items for selected records after upgrade to 4.6.3? I have a custom search extension and it was working fine in 4.4.14.
Since I have upgraded to 4.6.3, "Actions" items only enabled for All records. But if I select certain records from result it does not enable "Actions" items. My custom PHP & a screenshot is shown below.

    <?php

/**
 * A custom contact search
 */
class CRM_Guestsearch_Form_Search_Guestsearch extends CRM_Contact_Form_Search_Custom_Base implements CRM_Contact_Form_Search_Interface {

  function __construct(&$formValues) {
    parent::__construct($formValues);
  }

  /**
   * Prepare a set of search fields
   *
   * @param CRM_Core_Form $form modifiable
   * @return void
   */
  function buildForm(&$form) {
    CRM_Utils_System::setTitle(ts('Registered Guest (Unassigned)'));

  /**
    $form->add('text', 'name', ts('Name'), TRUE
    );

    $form->setDefaults(array(
      'name' => '',
    ));
     */
    /**
     * if you are using the standard template, this array tells the template what elements
     * are part of the search criteria
     */
    $form->assign('elements', array('name'));
  }

  /**
   * Get a list of summary data points
   *
   * @return mixed; NULL or array with keys:
   *  - summary: string
   *  - total: numeric
   */
  function summary() {
    return NULL;
    // return array(
    //   'summary' => 'This is a summary',
    //   'total' => 50.0,
    // );
  }

  /**
   * Get a list of displayable columns
   *
   * @return array, keys are printable column headers and values are SQL column names
   */
  function &columns() {
    // return by reference
    $columns = array(
      ts('Contact Source') => 'source',
      ts('Name') => 'sort_name',
      ts('Phone') => 'phone',
      ts('Email') => 'email',
      ts('Date of visit') => CIVICRM_GUESTSEARCH_CUSTOM_COLUMN_NAME,
    );
    return $columns;
  }

  /**
   * Construct a full SQL query which returns one page worth of results
   *
   * @param int $offset
   * @param int $rowcount
   * @param null $sort
   * @param bool $includeContactIDs
   * @param bool $justIDs
   * @return string, sql
   */
  function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {

    return $this->sql($this->select(), $offset, $rowcount, null, $includeContactIDs, NULL);
  }

  /**
   * Construct a SQL SELECT clause
   *
   * @return string, sql fragment with SELECT arguments
   */
  function select() {
    return "
      contact_a.id                  as contact_id,
      contact_a.source              as source,
      contact_a.contact_sub_type    as contact_sub_type,
      contact_a.sort_name           as sort_name,
      phone.phone ,
      email.email  ,
      date.
    " . CIVICRM_GUESTSEARCH_CUSTOM_COLUMN_NAME;
  }

  /**
   * Construct a SQL FROM clause
   *
   * @return string, sql fragment with FROM and JOIN clauses
   */
  function from() {
    return "
      FROM      civicrm_contact contact_a
      LEFT JOIN civicrm_activity_contact a ON (a.contact_id = contact_a.id)
      LEFT JOIN civicrm_phone phone ON (phone.contact_id = contact_a.id)
      LEFT JOIN civicrm_email email ON (email.contact_id = contact_a.id)
      LEFT JOIN " . CIVICRM_GUESTSEARCH_CUSTOM_TABLE_NAME . " date ON (date.entity_id = contact_a.id)
    ";
  }

  /**
   * Construct a SQL WHERE clause
   *
   * @param bool $includeContactIDs
   * @return string, sql fragment with conditional expressions
   */
  function where($includeContactIDs = false) {
    $params = array();

    $where = "contact_a.contact_sub_type = 'Guest' AND contact_a.source = 'Guest Greeter Signup' AND activity_id IS NULL ORDER BY date." . CIVICRM_GUESTSEARCH_CUSTOM_COLUMN_NAME . " ASC ";

    return $where;

  }

  /**
   * Determine the Smarty template for the search screen
   *
   * @return string, template path (findable through Smarty template path)
   */
  function templateFile() {
    return 'CRM/Contact/Form/Search/Custom.tpl';
  }

  /**
   * Modify the content of each row
   *
   * @param array $row modifiable SQL result row
   * @return void
   */

}

Since the number of selected records hasn't updated when you check the box, that suggests it's possibly a Javascript error.  Try the steps in Troubleshooting JavaScript in CiviCRM and post back any new diagnostic info you find.


how to configure civimail when using Google mail? My mails are not being sent, even when I choose to send immediately.

My domain uses Gmail servers to handle our email accounts.

I'm assuming my settings at /civicrm/admin/mailSettings?action=update&id=1&reset=1 are not correct but I can't find any good tutorials.  The documentation is not helpful to me.

It's possible to use Google Apps or GMail SMTP directly, but you will have to deal both with limitations of remote SMTP and with any resource limits enforced on your account (esp if using an @gmail.com or similar address).

If you have control of your server, I recommend using Postfix as a local MTA and configuring it to smarthost via Google Apps.

You'll see much better performance from CiviCRM if it can hand mails off rapidly to a local MTA, and
Postfix is far better at conversing with Google SMTP than CiviCRM.

See How do I configure SMTP with STARTTLS? (related question/answer) for why that is.

How to do this via Postfix relay instead

(This requires control of your hosting environment.)

In /etc/postfix/main.cf, configure

relayhost = [smtp.gmail.com]:587
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = plain
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

In /etc/postfix/sasl_passwd, enter

[smtp.gmail.com]:587  yourusername@example.org:password

Run sudo postmap /etc/postfix/sasl_passwd

Run sudo service postfix reload

Now use local mail delivery, and watch /var/log/mail.log to ensure it gets handed off to Google's servers for delivery.


Profiles - Pre Field and Post Field Help I'm working in with civi 4.6.4 in Wordpress, I used to be a Joomla user with a out of date civi and of course there are some changes to how profile fields render.

Previously all the content, pre field help, profile fields and post field help were in one div. Now they are broken into three separate divs, which is totally fine, I can see the advantages!! But the pre-field help and post field help have the same class and id, which is less than helpful. I can not target them separately (i.e. with css or javascript). Would it be too much to ask these be given separate ids in the future? Or has anyone come up with a way to target them separately without having to add code in with the whatever instructions you type?

The pre- and post- field help areas will have identifying CSS classes from CiviCRM 4.7.

This was the issue: https://issues.civicrm.org/jira/browse/CRM-16328

And here's the patch / PR if you want to apply it to your current version of CiviCRM: https://github.com/civicrm/civicrm-core/pull/5667


Extra p tags in profile form inserted via WP shortcode Even though I have disabled autop for shortcodes, I end up with a lot of
extra
 tags in the generated form. Here's a snippet:

     Email
      *

    <input maxlength="254" size="30" name="email-Primary" type="text" id="email-Primary" class="big crm-form-text required" />

Note the stray

 in the middle. But while a bit wrong, this is ok. What's really a problem is that the generated JS code for the datepicker also gets a bunch of random
 tags:

Ok, I figured it out. Here's the auto-relevant bits from functions.php:

function better_wpautop($pee){
    return wpautop( $pee, $br=0 );
}

/* This is a hack to make sure that wordpress's autop filter doesn't apply to shortcodes */
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'better_wpautop', 11 );
add_filter( 'the_content', 'shortcode_unautop', 12 );

I thought shortcode_unautop was supposed to fix this, but I took a look at it and it's a huge hack that tries to strip p tags back out of shortcode content in a truly terrifying way with a regex (ob Zalgo reference). So I made a copy of my standard page template and added the following to the top:

remove_filter( 'the_content', 'better_wpautop', 11 );
remove_filter( 'the_content', 'shortcode_unautop', 12 );

Now there is nothing autop related happening, which is fine, since the entire content of the page comes from the CiviCRM profile.


Calculated member fees Currently exploring CiviCRM as a possible replacement for our current CRM. Our members are all union organisations and the membership dues are a calculation based on a fee x number of members in the affiliated organisation. This means that every member pays a different amount and we need to be able to calculate the fee for each member. From what I've seen you can set up multiple membership types and price sets but I haven't found anything for doing calculated fees. Do any of you do this or know if it's possible?

Many thanks in advance.
Chris

If you run your CiviCRM on a Drupal instance you can use Webform CiviCRM module in combination with Webform Calculator module that you can use for that exact scenario.

Alternatively - see here for an example of how you can use conditionals to build your own fees: How can I create early bird fees with Webform CiviCRM? - the example is for a participant (event) fee, but a membership fee can be built similar to this.


Deduplicate by name AND surname (or vice versa)? I'm just starting to use CiviCRM. So I realize that this could be a very dumb question.

I'm trying to deduplicate contacts by name AND surname. When I create a new deduplicating rule using name and surname, it looks like it gets all the contacts with the same name OR surname.

For example, if I have

Mario Rossi
Mario Verdi
Mario Bianchi
Mario Neri

they are all shown as duplicates...but they are not.

Is there a way to create a rule which addresses just contacts with same name AND surname (or vice versa)?

Thank you in advance.

Welcome to CiviCRM SE. Eileen's answer is definitely the right place to start, but you might want to look at a related question that I asked about the built-in (reserved) de-duplicate rules, as they aren't entirely clear from the documentation. It says "NAME" in the description, but actually uses the fields "First Name" and "Last Name" (You have used different terminology. It took me a while to work out how it worked.

See Reserved de-dupe rules

Update: Remembering odd behaviour with my previous issues, I looked again and have found that the de-dupe rules appear to be cached. So if you create a rule, adjust it and try with the new version, the old version is still used. I missed this before because I was checking the database and the rule is updated properly there. If you go to Administer >> System >> Cleanup Caches and Update Paths and select Cleanup Caches then try the de-dupe rule again it works as expected. If you were experimenting, then I expect this is the problem.

Alternatively if you delete the rule and add the new version it will also work.

A note on the page where you edit de-dupe rules to tell you to clear the cache would be very helpful. Let me know if this solves your problem and I'll report it as a bug/enhancement.


How to update custom report template I am using 4.7.13 on two different sites. On one site, when I update the class and refresh my custom report, all of the changes are visible. On the other site when I do the same thing, the changes are not visible. Even stranger, when I delete the class (i.e., the PHP file), the report is still visible in its old form. I have tried 'flush all cache' and searching for any other cached versions without success. Since this works on one site but not the other I suspect there is some configuration setting that I am missing somewhere.

It sounds like you may have an override file in place.  Check Administer » System Settings » Directories to get the custom PHP path, then look in the appropriate subfolder (if it exists) for an override file.


Register new account via REST application I'm trying to register a new user account to my CiviCRM site and also to create a contact in the CiviCRM system for him. I want to do that via the REST API call application that I'm writing in python.
After some investigations, I saw that I need to send the request to Drupal system and not to The CiviCRM module.
Can anyone tell me how can I do that REST API call?
My CiviCRM is on Bitnami with AWS instance, with Drupal.
Thanks a lot

Since that's straight drupal I would try the drupal docs and if you're still stuck you might get more responses at https://drupal.stackexchange.com.
Another thing you could try but I don't know if it will work is to use civi's api Profile.submit. If you have a profile at admin - customize - profiles which is configured for Drupal User Registration and allows creating users, you might be able to pass in the right parameters to include the account name/email to create the account.


Public listing of newsletters in Joomla? On a Joomla site we would like to allow the public to see a list of newsletters sent through CiviMail. Subject of email would be the link text, body of newsletter including images would be displayed as a site page when clicked. So, similar to a Drupal view like in How can I show users the mailings they have been sent?

What's a good way to do this?

a bit late on this one. It's not an ideal solution, but a quick fix could be AcyMailing which has a CiviCRM plugin and front-end newsletter listings. https://www.acyba.com/acymailing/390-acymailing-plugin-civicrm.html


How can I make civibuild use "Seven" as the default Drupal theme instead of "Bartik"? Every time I run civibuild create or civibuild reinstall to create a local Drupal/CiviCRM development site, I find myself running drush vset theme_default seven afterwards so that I get the "Seven" theme instead of "Bartik" (which I find makes CiviCRM easier to use on smaller screens). This step is easy, but I find myself running civibuild frequently enough that I'd like to avoid the extra step in order to make my workflow more efficient.

Is there a way I can configure my local buildkit installation to run this drush command after running civibuild? Or some other way to set the default theme?

Two options: 1) edit your own buildkit script  or 2) prepare a PR for buildkit and convonce Tim seven is a lot more useful than Bartik; I'll second that!

A third could be a config option; 3) PR a change to buildit where the theme you like become a config option when running amp config


Getting "set_time_limit() has been disabled for security reasons" when importing a CSV file into contacts I'm getting "set_time_limit() has been disabled for security reasons"  when importing a CSV file into my contacts.

The exact warning is "set_time_limit() has been disabled for security reasons in /home/clients/9f584f50407ada97b7c17ed3b0bbc0f0/crm/wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Controller.php on line 31"

I use CiviCRM v5.21.0 under WP last version

Any idea will be much appreciated. Thanks

This case has been solved in adding this two lines in the wp_config.php file after the define section:

ini_set('display_errors','Off');

ini_set('error_reporting', E_ALL );

It is also important to solve it because it can have consequences for CiviCRM (for us in the import process).
Hope this helps


Invalid Currency error when using custom template I'm creating a custom thank you following the instructions here
https://docs.civicrm.org/user/en/latest/contributions/manual-receipts-and-thank-yous/
However the {contribution.total_amount} token is causing an error saying

Invalid currency "USD****~~~~USD****~~~~USD****~~~~USD****~~~~USD"

All of my contributions are in dollars and that's what I've also set in localization.
What could be causing this?
This only happens when using the grouping option.
I'm wondering if it relates to
https://github.com/civicrm/civicrm-core/blob/3bfdcfb534a0b27a4f7f4c65bb07f2670ac31d14/CRM/Contribute/Form/Task/PDFLetterCommon.php#L74
CiviCRM 5.32.2
Joomla 3.9.23

This was a regression and was fixed. https://lab.civicrm.org/dev/core/-/issues/2344


How do I increase the backtrace line length Log files include a backtrace which is very helpful for debugging but I find the lines get truncated so I cannot see all the values.  After about 200 characters I usually see an ellipsis ... and the line is truncated. can this be extended to see more info?

:( it is hard-coded.  I changed $maxArgLen in CRM/Core/Error.php and now I can see the full backtrace.


Smart Groups and 'event dates' might there still (or again) be an issue with 4.7.27 on wordpress like this?

How to use Smart Groups with relative dates?

i'd need to create a dynamic group based on the 'register date' for any event in the date range 'last week' - but it never seems to get updated, the from/to dates look like they're set statically after saving the dynamic group.

This might be related to Smart Group relative date criteria not saving and there is fix for it https://github.com/civicrm/civicrm-core/pull/11486

Please let me know if that works for you.


Civicrm Removing AngularJS url I'm trying to create a tab on the contact page that calls an AngularJS Url. However, civicrm removes the # and everything after it.

I've tried drupal's url() function, still doesn't work. Please let me know if there is a way to do this.

function contactcampaign_civicrm_tabset($tabsetName, &$tabs, $context)
{
    /* Ensure it's the contact view tabset */
    if ($tabsetName != "civicrm/contact/view")
    {
        return;
    }

    /* Add a new tab */
    global $base_url;

    $tabs['personal_campaign_pages'] = array(
        'title' => ts('Personal Campaigns'),
        'url' => '/civicrm/a/#contact/campaign/all',
    );
}

I don't think that is possible, but not for the reason you think. The problem is not whether or not the link gets rendered correctly, the problem is that AngularJS expects to launch a single-page-app, not load an html snippet into a tab. If you need to link to an angular page, you will need to do so as an actual link, and it will have to take the user away from the contact summary page and over to the angular page.


Fixing Paypal error - Payment Processor Error message 10002: Security error Security header is not valid I found the solution to my problem before coming here, but wanted to share it so I'm posting my question first and then going to post the answer I discovered.

I setup Paypal pro for payments using my Paypal sandbox account, but was getting the following error:

Payment Processor Error message 10002: Security error Security header is not valid

See my answer for solution

What I discovered with the help of a friend who has lots of experience in CIviCRM is that I had set up the payment processor with the default URL for both LIve and TEst but used the SAndbox credentials only. By putting in the sandbox urls as the live urls. it fixed the problem.


What is the review process for automatic distribution of Extensions? Some extensions are eligible for being distributed automatically, which means that you can add them via the CiviCRM UI.

This page lists the criteria that needs to be meet for automated distribution and we have an extension ready for review.

Will I need to ask a CiviCRM site administrator to do the (manual) review? Or will they automatically be noticed?

They'll automatically be noticed - I personally use http://civicrm.org/extensions/rss to keep track.  If we're being honest though, the extension review team isn't always the quickest to tackle something!  If you have something waiting in the queue, let me know and I'll make some time for it.


CiviRule Error on Event as Linked Trigger I created a CiviRule with the following

"Event is Changed" as the linked trigger.
Field value comparison => Event.summary is one of [KEYWORD]
Action (tested this before with others linked trigger and it works)

When I make the change of the summary of an event. I get the following error below.

  Sorry but we are not able to provide this at the moment. One of
  parameters (value: ) is not of the type Integer

Thanks for reporting this CiviRulesbug, we appreciate it!

CiviRules, as you might know, has been developed by CiviCooP to suit the needs of some of our clients who meanly deal with fundraising. So the conditions and actions on Contributions are fairly well tested and stable.
Althought we developed CiviRules initially, it is a community extension and we do not feel we are the owners. We do not fix all issues with CiviRules, much like the CiviCRM core team does not fix all issues with CiviCRM. It is a community effort, of which we will take our part.

Based on this, would you be able to dive into this issue, debug it and solve it? The technical documentation on the wiki (http://wiki.civicrm.org/confluence/display/CRMDOC/CiviRules+-+how+to+make+your+own) should give you an idea how the engine works. I would start with testing the condition with other actions to find out if the problem is in the condition or in the action. As you already done part of this, it is probably best to start debugging in the condition and more specifically the isConditionValid function.

If not, would you have the funds to pay someone to fix the error? Or are you just reporting it and happy to wait for someone else with the expertise or funds to fix it?


Can't find a patch for "CiviCRM is not of type Int" CiviCRM 4.6.4/Wordpress.

During API call for Contribution get and parameter id = xxxx, api returns A fatal error was triggered: CiviCRM is not of the type Int.

Adding a return statement in wp-content/plugins/civicrm/civicrm/CRM/Contribute/BAO/Query.php solves the issue but unsure if this will affect other Contribution tasks in production..

Also tried a clean install of 4.6.4 on Wordpress and same issue.

See Line 266:

{
"trace": "#0 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Utils/Type.php(269): CRM_Core_Error::fatal('CiviCRM is not ...')\n#1 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(5238): CRM_Utils_Type::escape('CiviCRM', 'Int')\n#2 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Contribute/BAO/Query.php(373): CRM_Contact_BAO_Query::buildClause('civicrm_contrib...', '=', 'CiviCRM', 'Int')\n#3 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Contribute/BAO/Query.php(251): CRM_Contribute_BAO_Query::whereClauseSingle(Array, Object(CRM_Contact_BAO_Query))\n#4 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Core/Component.php(298): CRM_Contribute_BAO_Query::where(Object(CRM_Contact_BAO_Query))\n#5 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(1894): CRM_Core_Component::alterQuery(Object(CRM_Contact_BAO_Query), 'where')\n#6 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(499): CRM_Contact_BAO_Query->whereClause()\n#7 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(461): CRM_Contact_BAO_Query->initialize()\n#8 /vagrant/donate/wp-content/plugins/civicrm/civicrm/api/v3/utils.php(595): CRM_Contact_BAO_Query->__construct(Array, Array, NULL, false, false, 2, false)\n#9 /vagrant/donate/wp-content/plugins/civicrm/civicrm/api/v3/Contribution.php(217): _civicrm_api3_get_query_object(Array, 2, 'Contribution')\n#10 /vagrant/donate/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_contribution_get(Array)\n#11 /vagrant/donate/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(96): Civi\\API\\Provider\\MagicFunctionProvider->invoke(Array)\n#12 /vagrant/donate/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\\API\\Kernel->run('Contribution', 'get', Array, NULL)\n#13 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Utils/REST.php(404): civicrm_api('Contribution', 'get', Array)\n#14 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Utils/REST.php(640): CRM_Utils_REST::process(Array, Array)\n#15 [internal function]: CRM_Utils_REST::ajax()\n#16 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(278): call_user_func(Array)\n#17 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem(Array)\n#18 /vagrant/donate/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke(Array)\n#19 /vagrant/donate/wp-content/plugins/civicrm/civicrm.php(1188): CRM_Core_Invoke::invoke(Array)\n#20 [internal function]: CiviCRM_For_WordPress->invoke('')\n#21 /vagrant/donate/wp-includes/class-wp-hook.php(298): call_user_func_array(Array, Array)\n#22 /vagrant/donate/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)\n#23 /vagrant/donate/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#24 /vagrant/donate/wp-admin/admin.php(222): do_action('toplevel_page_C...')\n#25 {main}",
"is_error": 1,
"error_message": "A fatal error was triggered: CiviCRM is not of the type Int"
}

The code

CRM.api3('Contribution', 'get', {
  "debug": 1,
  "sequential": 1
}).done(function(result) {
  // do something
});

I remember this bug from a long time ago.  I'm pretty positive it's been fixed.

I would try upgrading a copy of your site to the latest 4.6 to see if the problem still exists.  If it doesn't, then upgrading is your solution.


how do you process mdg.php files during an extension upgrade? What's the best way to trigger managed entity processing as part of an extension upgrade? I have an extension that is already installed on a site. I'm rolling out an upgrade that implements a new custom report, including the .mgd.php file. I'd like that report template to be installed as part of the extension version upgrade. But I'm not sure the best way to "refresh" the system to process that .mgd.php file (which is generally only processed during installation).

I think invoking below method in your extensions Upgrader.php incrementalupgrade function will re-build all your managed entities from all extension.
CRM_Core_Invoke::rebuildMenuAndCaches();


Smart group url parameter to search contributes I'm using CiviCRM 5.27 on Wordpress and I'd like to save Civicrm page URL of contributes with smart group filter.
I tried this:
http://mysite.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Fsearch&reset=1&force=1&group[]=47&contribution_status_id[]=1

but I didn't get any filters.

The syntax doesn't use [] for multivalued fields. You put commas if you want more more than one. See https://docs.civicrm.org/user/en/latest/the-user-interface/searching-url-support/
So the parameters here would just be reset=1&force=1&group=47&contribution_status_id=1


Wrong dates and type on membership email receipts We recently set up a new CiviCRM install (Drupal 7, CiviCRM 4.7.3, hosted on Bluehost). Most everything is fine, but the email receipts sometimes show the wrong dates and membership type. The correct membership dates and type are being stored in CiviCRM.

Some contact and membership data has been imported previously. User H C renewed via the membership page, paid via PayPal Standard. Their membership shows correct since/start/stop dates (since July 30th 2008, start February 29th 2016, stop February 28th 2017).

The receipt emailed to the member shows incorrect dates though: membership start date October 1st 2011, membership end date October 1st 2012. It also says the membership type is Registered when it should actually say Senior.

The contact's membership page shows no other memberships. What might do this? How can I resolve it?

The issue seems to affect memberships inconsistently about half the time.

The issue only affects renewing members.

A similar report came up in the IRC channel - this looks a lot like CRM-18247: Contribution receive date is incorrect/misformatted in email sent by API Contribution.sendconfirmation.

The patch from that issue's PR may solve the issue for you?


Finding memberships with 'Status Override' set I was asked recently if there was a way to find all members who have the 'Status Override' setting turned on. I didn't see an option in the advanced search or member search:

As an alternative, I made a smart group that finds all Primary Members that have a Membership Status of "Current" and a membership End Date in the past (e.g. "Prior to previous day"). This should find all memberships that are hard-coded as "Current" although they are technically expired (right?) but is not actually finding all overridden memberships.

Is there a way to search on whether the membership status is overridden, regardless of what the status is?

CiviCRM has a search builder and the field Override status is available in the search builder.


How to allow an active membership with payment pending? We want to start recording membership payments, but we also want memberships to become current when the start date hits even if the payment is still pending. Our members are schools paying by invoice, and membership grants the member access to a custom portal.

I have been told status override isn't good enough because it would add steps to the process to set it after entering a membership and to remove it once the membership is paid so that it will eventually expire normally.

I have investigated hook_civicrm_alterCalculatedMembershipStatus but this sees what the status would be if it wasn't pending payment- ie already what I want it to be- so I can't change it from pending there.

I'm on 4.4.13 if it makes any difference.

For offering membership privileges on your site, you should be able to give the same privileges to pending as current. You should be able to give discounts to pending members too.

Drupal: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMember+Roles+Sync

WordPress: https://github.com/tadpolecc/civi_member_sync (this seems to be working correctly on CiviCRM 4.6.6)


Exporting group contacts to an excel file How do I export a group to an excel file?  Pretty standard.  Wanting to export email as well as name, mailing address, city, postal code.

Thank you,
Shara

Using Wordpress

The User Guide has instructions and screenshots here for exporting contacts: https://docs.civicrm.org/user/en/latest/common-workflows/exporting-your-contacts/

Search for the contacts and select the Export Contacts action from the drop-down list.


Styling the webform contact autocomplete box I've been working on a site using bootstrap which has a dark background and white text. This seems to be causing some problems for the webform contact autocomplete box where the default background is white, but is presumably picking up the white body text also.

Could anyone point to the CSS file which styles the autocomplete box?

Many thanks!

If anyone's looking for it in future, it's found in

  sites/all/modules/webform_civicrm/css/token-input.css


Why do I get `(Object) CRM_Contact_Page_DashBoard` at ~/dashboard? I'm running Civi 5.19.alpha1 locally, installed using buildkit with drupal-clean on my laptop running Ubuntu 19.04.

So I just manually installed or updated a bunch of Drupal modules (I started off just wanting to install webform-civicrm and ran down the rabbit hole of other required modules).

I now see only (Object) CRM_Contact_Page_DashBoard at http://localhost:7979/civicrm/dashboard.

I also see this message at http://localhost:7979/:

hook_civicrm_pageRun called. This hook is called before a CiviCRM page is rendered. Note that this does not execute on every CiviCRM page in the general sense. CiviCRM's pages are classified as either 'Forms' or 'Pages', and this only runs on pages classified as 'Pages'. If you are not sure if a particular page is a Page, test it by adding some temporary debug code to /CRM/Utils/Hook.php

I've run drush updb and get No database updates required,  drush cvupcfg and get Config successfully updated.

Been Googling around, looked in Civi docs, checked StackExchange, not figured out the problem yet.

I could and maybe just should go back and uninstall/delete the modules I just installed, of course, but prefer to not have to re-install later.

UPDATE: see the answer below. I had enabled the Drupal civicrm_developer and Devel modules, though of course, I did not have to, to enable the webform_civicrm_integration module. I was enabling other Drupal modules that looked useful.

It sounds like you enabled the civicrm_developer Drupal module.  I would disable that.


MySQL errors when transferring database from one server to another I am shifting my server for my DRUPAL7 + Civicrm website.
I followed the process outlined here
I have the drupal site working fine and a fresh install of Civicrm working fine. Now i just need to transfer my data from old server to new. When i try to import the data - i get following MySQL error
Error
SQL query:
CREATE TABLE IF NOT EXISTS civicrm_acl ( id int(10) unsigned NOT NULL COMMENT 'Unique table ID', name varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'ACL Name.', deny tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Is this ACL entry Allow (0) or Deny (1) ?', entity_table varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)', entity_id int(10) unsigned DEFAULT NULL COMMENT 'ID of the object possessing this ACL', operation varchar(8) COLLATE utf8_unicode_ci NOT NULL COMMENT 'What operation does this ACL entry control?', object_table varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The table of the object controlled by this ACL entry', object_id int(10) unsigned DEFAULT NULL COMMENT 'The ID of the object controlled by this ACL entry', acl_table varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'If this is a grant/revoke entry, what table are we granting?[...]
MySQL said:
1215 - Cannot add foreign key constraint
pl help.

Try doing the migration after emptying (dropping all the tables) the DB for the clean install of CiviCRM (so that there is no data or structure in the DB for CiviCRM). I have not had any issues doing an import of my CiviCRM DB into a fresh DB.

I do a full DB dump and don't bother ignoring any tables. Before exporting your CiviCRM DB clean all the caches (drush cc civicrm). Then simply do a mysqldump -u user -p mycivicb > civicrm_db.sql

Clear the cache after import (civicrm and drupal). Initially you will get a bunch of errors when loading the page. You'll need to setup your directories and resource urls again. Clear cache whenever you have problems after changing a setting...

Let me know if this works for you. It is a pretty quick process to see if it does...

Note: I usually do a full dump of the drupal and civicrm DBs and import those.


How do I find individuals that are participants in multiple (two) events? I want to see who is registered for both of two events. How can I do that as a search or a report?

You could do it in multiple steps:

search for Event 1 participants then create a group
use advanced search, enter the new group in the group box, and in the events section select Event 2 participants

You could create both of those as smart groups if you want to check progress as registrations come in.

But hopefully someone has a more streamlined method!


private notes: how to restrict visibility to a certain group? private notes is very  usefull , but I miss the functionality to restrict visibility to a group of users.
Is there a way to realise this in civicrm or is it necessary to make a new extension?

You might want to try this extension: https://github.com/AlainBenbassat/eu.businessandcode.notepermissions

It creates a permission in your CMS for each note type you create in CiviCRM.
You can then selectively assign these permissions to users who have to see the corresponding notes.

The extension has not been extensively tested, so I'm looking forward to user feedback.


CiviCRM Database Upgrade White Screen I have followed the instructions located on the CiviCRM Website to a fault.

https://docs.civicrm.org/sysadmin/en/latest/upgrade/drupal7/

The files are a fresh install and the Status Page tells me to click here to upgrade:

I go to UPGRADE PAGE a blank white page shows. I have checked the error files/logs i cant see anything relating to the upgrade page.

To Confirm the Title of the page is: "Upgrade CiviCRM to Version 5.13.4"

Thanks,

After hours of trying to figure out the issue, i have been able to fix this by changing the Theme in Drupal.

When i made the Theme into a default theme the upgrade page showed with no issues.


Missing wordpress civivolunteer commendation table We have wordpress 4.9.4 and civi volunteer 4.7.21-2.2.3

When someone makes a contribution or joins as a member, we get a missing table database error (from the error log):
Table 'vahcrm.civicrm_value_volunteer_commendation_7' doesn't exist

This error occurs after the transaction goes through and civi tries to update the database and the user gets the error:
Failed to update contribution in database

When we try to renew a membership, we get (from the error log):
Table 'vahcrm.civicrm_value_civivolunteer_5' doesn't exist

A little background....I'm a volunteer for a non-profit. The previous web/civi admin person moved everything to a new site, broke the site into a multi-site configuration without fully setting everything up, and then quit. I came to the civi problems having only heard the word civi before. I would appreciate ANY help I can get to figure this out.

How do I go about finding and fixing this problem?

What might help in such situations is to disable, uninstall the extension and then install it again in the hope it will create the missing fields and tables.

It is a good idea to make a backup before you disable the extension because there is a high risk of losing data.


Send e-mail to multiple contacts as as separate mails If I do a search, and then want to send en e-mail to the resulting contacts, (by using "Send mail", not by using "Send Mass Mailing") all of the contacts get put in the "To:" field.

But I want to either

send all these e-mails separately. (x e-mails, with only 1 recipient per e-mail
or put these recipients in the BCC: field instead of the To:

How can I achieve this?

As the previous answer states correctly, CiviCRM does in fact send individual emails to each contact you selected. The simplest way to know this is thats the only way tokens would work properly. If everyone was just to'd in one big list they'd all see one set of tokens (mail merge fields) which would not be correct.

If you wish to add others then you can using the BCC and CC fields but they'll get copied into every single email i.e. if 50 contacts are emailed then they'll get copied into those 50 emails.


Contact Reference Field Import & Batch update How can someone import or do a batch update using a profile using a contact reference field? I have tried both and get errors on the import even though the format of the text is correct and those fields do not appear on the profile when doing a batch update. Thoughts?

Contact Import should work for contact reference fields, I did a quick test against 4.6 and it works as expected.

Currently batch update for contact reference fields is not supported in 4.6 or below version of CiviCRM.


Change Log Shows Incorrect "Changed By" Name I'm on CiviCRM 5.16.2 on WordPress, and we have a situation where we have removed one of our organization's email addresses from one user account and added it to another account, but when the new user takes actions in CiviCRM it still shows the old user's name in various areas, one example being the "Changed By" name in the change log, but it also shows up incorrectly if the user enters a contribution, etc.

To explain in a bit more concrete way:

User Alice has email address foo@myorg.org
foo@myorg.org email address is removed from Alice's record in CiviCRM
foo@myorg.org email address is added to Bob's record in CiviCRM
User Bob changes a record in CiviCRM
Go to change log for the record, "Changed By" shows up as Alice, and even links to Alice's record if you click on the name in the change log

I don't see a way to fix this in the admin interface and I've confirmed that the email in question is absolutely not still in the old user's record, and if you do a search for the email address the only hit that comes up is the new user, so I'm a bit flummoxed why it'd be behaving this way. Any ideas would be greatly appreciated. Thanks!

First, on the wordpress side, check what email is listed for Alice in her wordpress user record. If it still has foo@myorg.org that might be the problem.

Otherwise there's a civicrm_uf_match table in the database that is used to map between user accounts in the CMS (wordpress) and contacts in CiviCRM and it's partly based on email address. If you look in this table the email address might still be showing as connected to Alice's wordpress user id.


If I use php to display a count from my database am I causing a security problem? I would like to count and display on my front page how many people have signed a civi petition. This I have been able to do using php as below. What I am wondering is if I am causing any kind of insecurity in my system - if I can get the data out what  is to stop someone else inserting data in?

Sorry this may be a 101 question but I haven't been able to find this out by searching.
Thanks! Caroline

open php
$sql=("SELECT COUNT(*) FROM civicrm_activity WHERE activity_type_id=32");
$rs = mysql_query($sql);
$result = mysql_fetch_array($rs);
echo "
 SIGNATURES SO FAR:     $result[0]
 ";
close php

I would highly recommend you use the CiviCRM API to access this information.

A php version would look something like this:

$result = civicrm_api3('Activity', 'get', array(
  'sequential' => 1,
  'activity_type_id' => "Petition",
  'options' => array('limit' => 1000),
));

(Setting limit to be something larger than you would expect to get.)

Which would return the count (in addition to the activities which you can ignore).

{
"is_error":0,
"version":3,
"count":1,
"id":1,
"values":[{
    "id":"1",
    "activity_type_id":"9",
.....

If you are using version 4.6, in place of the get action, use getcount, which will only return the count... without detail and not requiring the limit.

You can play with the call by going to /civicrm/api/explorer.


Is there a way to create a two part profile? I am trying to make a profile that based on a previous selected it would either lead you to another part of a profile. Like if you select an option on the first part of the profile and then you could hit another button to take you to the second part of the profile.

You would need to use jQuery to handle selection on first profile then show/hide base class of second profile. Also you would need jQuery to handle validation of second profile as the fields may or may not be required based on selection of first profile fields.


Views Proximity Search on Latitude / Longitude Has anyone used a proximity filter or sort in Drupal Views based upon a contact's geocoded address?  I think it would be doable with the GeoPHP module and a special handler, but I don't know if it has been done.

We've done this with OpenLayers
https://www.drupal.org/project/openlayers
and Openlayers Proximity
https://www.drupal.org/project/openlayers_proximity

I wrote a blog article which in part describes how to create a OpenLayers map and Openlayers Map Views overlay with CiviCRM Event location plotted on a map.
This should give you enough pointers to design your own Openlayers Map, View and get you started:
http://jackrabbithanna.com/articles/drupalcivicrm-integration

This article does not include the Proximiy functionality you are looking for, but just install Openlayers Proximity and the filtering will be made available in the Views UI


Presales / Functionality Question Presales Question…

I’m trying to determine which features can be turned on & off with this CRM system, so I have a couple of questions I need to ask based on the scenario that I’m trying to solve for the project I’m working on.

Scenario:

I’m designing a website for a business group that I belong to that “refers” each other clients based upon each of our specialties. The goal of the site will be to help each other know how effective each of these referrals actually end up being.

While there will be no monetization towards each of the members within the group, the concept will be to track that Member A referred Client B to Member C. And that Member C made whatever amount of money from Client B. Then subsequently Client B referred Member C to however many people (call this Tier 2 referrals) and they made additional referrals and so on.

The goal is to show (long term that Member A actually should be credited with the total sales volume that Member C made from the down line of that original referral of Client B.

There are no actual commissions to be paid back to Member A since Member C actually is the one that generated the income from that entire referral chain.

Questions:

So based upon what I see, CiviCRM is a traditional CRM with some added features that could potentially be utilized to achieve this is sort of a referral tracking. How do I allow Member C to keep track of their sales activities with Client B (and their referrals) while at the same time allowing Member A to show a referral accumulation (number of referrals and the money generated from them all) for all of the members within our group as a single item. In this case there are 36 of us that are members of this group.

Are these features able to be visual shown across the dashboard as well for each of the members?

Is CiviCRM able to track a Many-To-Many relationship?  In this case the scenario calls out Member A tracking an associated "credit" for Client B and all of the subordinate tiers of referrals from that original referral to Member C?

And lastly is there a summary report that the admin (me for now) can actually utilize to generate a consolidated report for all of the members to see/have?

Thanks in advance for your response.

from a quick read I would expect you to be able to get most of the way, if not the whole way, but using Activities (or possibly Cases) to store the data for referals, and use Drupal Webforms to capture the data for referrals, and Drupal Views along with the Permissioned Relationships ACL extension which Fuzion created, to manage the job of who can see what at various levels of these daisy chains.

Others might suggest doing this directly via the Civi UI etc but we have found that Views + Webforms + Permissioned Relationships can get you a long way past what 'out of the box' civi can do, and without requiring custom coding.

Alternatively, or if required in addition to the above, I expect a developer could fill in any missing steps with an Extension.


Why do Personal Campaign Pages stay live after their Contribution Page is closed I'm working with someone who posed the following question to me:

  Why do personal campaign pages stay live, even following the closing date for the contribution page they are attached to?  How do I make it so they automatically turn off when the contribution page does?"

Any ideas?

Joe says it's a bug; I say it's a feature! If you have donors fundraising for you, you might not want to have their writeup and list of donors disappear when the campaign is over. Something elegant ought to be done to have the PCP still visible, the contribution page disabled, and not have it seem like the link is broken, however.


Forum Link instead of SE Link Where would I put a "bug report" about a link pointing to the old forums, rather than here?  It's on the Wordpress demo page, at the very bottom of the page.

http://wpmaster.demo.civicrm.org/

Asking here is a good step. I forwarded the info to someone on the core team who should know who to pass it on to. thanks for reporting it


Import – match to contact by email without creating duplicate email address Is it possible to use the import function for contacts and match by email, without creating duplicate email addresses for existing contacts?

Example:
We organize frequent webinars with participation in the hundreds per event. After the webinar is over, we import the email addresses of those who  participated back from the webinar platform into CiviCRM, so that we can set their event status accordingly in CiviCRM. We don't have the CiviCRM IDs to import, so we need to do the matching by email. However, this seems to create a duplicate email record in matched contacts. This would not be much of an issue for the occasional import, but as many contacts have participated in dozens of webinars, they consequently also have dozens of email addresses in their CiviCRM record.

Do you know if there is a way around this when importing? Both "Update" and "Fill" has the same problem. With "Skip", it says it has added the imported contacts to a group, but in fact it hasn't...

Note: As our contacts will have different location types set for their primary email address, I am matching by primary address rather than a specific location type.

As far as I understand, provided you are importing to the same Location Type then the match should occur without adding a new email address.


Unable to filter contributions by date in Drupal with views and civicrm_entity I am trying to use Drupal Views to create a report of contributions.  I would like the user to be able to filter the contributions by financial type and by date.

To allow the user filter by date using a simple drop down I have installed the civicrm_entity module.  I have previously used this module to create views for activities and events and was able to filter these by date.  However this doesn't work with contributions for some reason.

Using the devel module I have looked at the SQL that is created by views.  It appears that for contributions the receive date is converted from unixtime which gives NULL.  As a result the query returns no results.  If you remove the FROM_UNIXTIME() and ADDTIME() functions from the query, it works as expected.

This is the SQL code for the activity view, which works fine:

SELECT civicrm_activity.activity_type_id AS civicrm_activity_activity_type_id, civicrm_value_publication_details_5.type_of_publication_8 AS civicrm_value_publication_details_5_type_of_publication_8, SUM(civicrm_value_publication_details_5.publication_price_9) AS civicrm_value_publication_details_5_publication_price_9, COUNT(civicrm_activity.id) AS id
FROM civicrm_activity civicrm_activity
LEFT JOIN civicrm_value_publication_details_5 civicrm_value_publication_details_5 ON civicrm_activity.id = civicrm_value_publication_details_5.entity_id
WHERE (( (DATE_FORMAT(civicrm_activity.activity_date_time, '%Y-%m') >= :civicrm_activity_date_filter AND DATE_FORMAT(civicrm_activity.activity_date_time, '%Y-%m') <= :civicrm_activity_date_filter1) ))
GROUP BY civicrm_activity_activity_type_id, civicrm_value_publication_details_5_type_of_publication_8 LIMIT 10 OFFSET 0

This is the SQL code for the contributions view, which doesn't:

SELECT civicrm_contribution.id AS id, civicrm_contribution.receive_date AS civicrm_contribution_receive_date, civicrm_contribution.total_amount AS civicrm_contribution_total_amount
FROM civicrm_contribution civicrm_contribution
LEFT JOIN civicrm_contact civicrm_contact ON civicrm_contribution.contact_id = civicrm_contact.id
WHERE (( (DATE_FORMAT(ADDTIME(FROM_UNIXTIME(civicrm_contribution.receipt_date), SEC_TO_TIME(3600)), '%Y-%m') = :civicrm_contact_date_filter OR DATE_FORMAT(ADDTIME(FROM_UNIXTIME(civicrm_contribution.receive_date), SEC_TO_TIME(3600)), '%Y-%m') = :civicrm_contact_date_filter1) ))
LIMIT 10 OFFSET 0

I'm not sure if this is an error with the civicrm_entity module or with CiviCRM.  Can anyone help?

This is working in beta6 of CiviCRM entity...probably before, can't remember exactly when I fixed this.

Relevant D.O issue https://www.drupal.org/node/2570319


Country list in profiles only shows US We recently suffered a DoS attack which forced us to recreate our site from a fresh latest Drupal installation, install DoS protection and move the site back to its original location. We did not upgrade CiviCRM (currently using 4.6.0).

The site is back on line and working fairly well, but now only "United States" shows in profiles and contact edit forms. The table civicrm_country looks ok, with all countries correctly listed. Any ideas?

Thanks

Miguel Peirano

It is fixed. It was as simple as returning to Admin > Localization and re-enabling the country list. Sorry about asking before thinking :-)

Miguel


After update, emails have to be written out in full html! We updated CiviCRM and the next time I tried to email a contact, I found all the buttons to insert bold, hyperlinks etc. had disappeared and the only option seemed to type it all in manually, even including the <p> </p> at beginning and end of paragraphs! Same thing when I looked at the mass mailing function. Is this a bug, deliberate, or some weird problem that only we have?
Many thanks

Using WordPress I had a problem where CiviCRM was installed on a subdomain and I to do a workround. See WYSIWYG editor not present with WordPress. This has to be redone when you upgrade. So possibly this is a solution?


Still can't send SMS individually via Twilio extension I keep getting

  One Message Not Sent

  A 'From' phone number is required. For more information, see https://www.twilio.com/docs/errors/21603

... despite having followed all the setup instructions at https://wiki.civicrm.org/confluence/display/CRMDOC/Setting+up+a+SMS+Provider+for+CiviSMS#SettingupaSMSProviderforCiviSMS-twilio to the letter. Is something in the extension out of date? Something I need to change in the code to make it work with the current Civi iteration?

WP 4.7.2 / Civi 4.7.15

The instructions on the Civi wiki weren't clear enough for my sleep-deprived brain. I had omitted the From= prefix from the API parameters in my SMS Provider Settings in Civi. Soon as I added From= to the front of our Trilio phone number, it worked like a charm.

Now to put some ice on this palm-shaped bruise on my forehead ...


How to set page title in an angular page? I have created an angular page and module and it does exactly what I wanted it to do. However the page title is CiviCRM and I want to change that.
How do I do that?

I have tried to set it in the javascript:

angular.module('myemma').config(function($routeProvider) {
  $routeProvider.when('/my-emma-accounts', {
    controller: 'MyemmaMyEmmaAccounts',
    templateUrl: '~/myemma/MyEmmaAccounts.html',
    title: 'MyEmma accounts',

    // If you need to look up data when opening the page, list it out
    // under "resolve".
    resolve: {
      accounts: function(crmApi) {
        return crmApi('MyEmmaAccount', 'get', {});
      }
    }
  });
});

However the code above does not seem to work.

Short answer: add this to the top of your main angular html template:

<h1 crm-page-title>{{ts('Hello')}}</h1>

More info:

Documentation can be found in the crmUi code.
This feature is in 4.7+ (although if you use it in 4.6 it won't crash - it just won't look as good).
Note the support for setting document title seperately if you wish.


How to show contribution items in CiviReports for Contribution Reports I have contribution items in a single contribution report and need to show a quantity of an item purchased in a month.

What is the ideal way to get quantity used for a month in multiple contributions.

I dont see the option for the same.

I believe what you are referring to are line items - if the contributions in question are event contributions, then you can use Extended Report - "Participant Line Items" that will allow you to filter by event, otherwise, Extended Report - "Contributions with Price Set Data" should also show you what you need- but it may take a bit of trial and error, i.e. the report offers several grouping options for line items:

Price Field Label
Price Field Value Label
Line Item Financial Type
Price Field (line item)
Price Field Option (line item)

You'll want to select whatever option(s) you are grouping by as display columns as well as the following columns:

Quantity
Line Total
Unit Price (if interesting)

E.g. Grouping by Price Field Option (line item) will yield the following:

Hope this helps!
Tamar


Fatal error: Call to undefined method CRM_Contribute_Task::taskTitles() Civicrm 4.7.31 on Wordpress
I get this error when attempting to edit a Membership. Initially, I get a blank pop-up with the message "Network Error. Unable to reach the server. Please refresh this page in your browser and try again." I then right clciked on the link and opened it in a new tab and I get the error
"Fatal error: Call to undefined method CRM_Contribute_Task::taskTitles() in .../www/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Task.php on line 163"

At the moment, we are unable to view or edit any memberships so that we can edit them and update details or change the status if members cancel. How do we resolve this issue?

Sudesh,

I am not sure if you are using right CiviCRM version. As I can see on 4.7.31 the function does exists and the line number you pointed in your question i.e 163 is showing me different code.

Please make sure your code base is using 4.7.31 version and since you are using older version of CiviCRM, I would recommend you to upgrade atleast to 5.3.1 because of security issues.


Extended Reports Extension - reports do not appear I have installed the Extended Reports Extension, but cannot see any reports, or any configuration options related to them.  Where should I be looking?

I have tried on two installations with the same result:

Extended Reports 3.5;  CiviCRM 5.5.1; Drupal 7.60-dev; PHP 7.2.11-2+ubuntu18.04.1+deb.sury.org+1

Extended Reports 3.5;  CiviCRM 5.3.0; Drupal 7.59; PHP 7.1.16

The extended report lists the newly added report as a template, so you need to look at civicrm/admin/report/template/list?reset=1, i.e, Administer -> CiviReport -> Create New Report from Template menu path.

Click on any template to create your required report.


Civicrm search results page URL How can I save the Civicrm search results page URL to link to it directly later from any account. At present the link we get is based on the qkey that does not work once we logout and login later.

We want a URL that takes us directly to search result page & we should be able to pass filters also in the URL like date range etc.

I don't think it helps with passing the filters in the URL, but you can save the search as a Smart Group and then use the link to the contact list for that group. I think you can strip of the qfkey portion of the URL in this case. Something like this (although this smart group on the demo site will be deleted shortly, the URL structure is what I want to show):

http://d46.demo.civicrm.org/civicrm/contact/search/advanced?force=1&reset=1&ssID=1&context=advanced


Multiple groupings of info on an event It's hard to explain it in a headline, but here is what I am trying to do:

We're trying to move our event process fully into CiviCRM instead of doing part of it in Drupal. I know how to add fields to an event, which takes care of like 75% of our need to add fields. But we run into one problem - we need a group of fields that you can use over and over. That would be the details on the hotel. Typically events have at least a few hotels, up to about 5. In Drupal we can just tell the form that we need to utilize a set of fields multiple times; however, as far as I can see you can only do this with fields for Individuals in CiviCRM.

Hopefully I explained this well enough that you can get what I mean. Looking forward to a way to be able to do this.

Thanks!

I would probably make 'Hotels' a contact subtype for Organization, and add a repeating custom group to Event with a custom field of the type 'contact reference'? Does that make sense?


How to give a group by default to a new contact? I'm a new user testing CiviCRM 4.6.2 with WordPress 4.2.2.

I have users U1, U2... belonging respectively to groups G1, G2...

I would like that when user U1 creates a new contact, this contact would automatically be added to group G1. Is there a simple way to achieve this?

One option is to do it with profiles. You can automatically add contacts to a specific group when they are entered via profile. Create two different profiles for your two groups, and have your users enter all contacts through their own profile page in Profile-Create mode. However, if you find yourself needing to create a unique profile for every user, then it's time to re-assess the need. An extension would be better at that point.


CiviCRM 5.4.0 Install "You do not have permission to access this page" I am stuck on this step:

  Then go to Settings > CiviCRM Installer:
  http://example.org/wp-admin/options-general.php?page=civicrm-install

In version 4.7 and above you will see a link on the wp-admin page to the Installer screen

There is not link on the wp-admin page like it says and if I manually use http://example.org/wp-admin/options-general.php?page=civicrm-install with my domain it gives me a "You do not have permission to access this page" error.

I basically cannot access the installer at all.

Sometimes even i face similar problem when i try to install CiviCRM. But i make it work by commenting the line that throws this error.

You can find quick solution here.


Add extra field to group contact - relation Is it possible to add an extra field to the group contact relation ?

I have contacts grouped but in these groups they all have different functions.

For example:

User 1 connected to Group 1 - Function of user 1 in group 1 is "chairman"
User 1 connected to Group 2 - Function of user 1 in group 2 is "secretary"

If i understand correctly, in your example, you have 2 organizations contact called "Group 1" and "Group 2" and one individual contact called "User 1".

In that case, I can think of several way of doing what you want :

create different relationship type "Chairman", "Secretary", ... and use the proper relationship between the contacts. This way, you will see in the tab Relationship all the information you need
Have one type of relationship (e.g. Employee) and add the function in the description. The description is visible in the Relationship tab so it will give you a quick way to see the function but it is less obvious in a user experience point of view that description = function
Create a custom field "Function" on the Relationship type that you want. The drawback is that your custom field won't be visible from the Relationship tab without clicking on the "View" link for a particuliar relationship.


Importing Contribution should update Membership period I'm trying to do an "Import Contribution", Member Dues, but the membership period in not extended by the expected year. How can I manage that automatically? Should be possible! I have probably not found the correct method. This is our first steps to do Imports.
Claes

There are two issues that you have to deal with when importing membership payments in order to extend your memberships:

You should connect the contribution (mebership payment) with the correct membership after the import. Technically you don't have to but it makes a lot of sense in order to keep a good overview.
You need to extend the membership (set a new membership end date)

The bad news is that afaik there is no user interface in CiviCRM-Core that allows you to connect existing payments with memberships. CiviCRM only offers to extend a membership and create a corresponding payment at the same time, but that does not work if you already have imported the payments.
There are also scheduled jobs that can change your membership status but that will probably not solve your problem either (a lot of information on renewal concepts can be found in CiviCRM's documentation).
The good news is that there are some extensions that can facilitate both connecting payments and memberships as well as extending your membership (e.g. by extending it's end date), for example this one:  https://github.com/Project60/org.project60.membership
It can do much more than only connecting memberships and contributions via the UI so make sure that it's not an overkill for your purposes ;)
Unfortunately, there is no coherent documentation so for some features you may want to contact the maintainer (Björn from SYSTOPIA) for info and/or add to the documentation once you know your way around the extension.
If you only want to connect payments & meberships, https://github.com/CiviCooP/org.civicoop.membershippayment may do the trick.


Copy a Sites Customizations (Custom Fields, report instances, etc) I would like to make a copy of our production site that includes all the custom changes that we have made (fields, event templates, tags, groups, etc). I need this copy for development purposes, but do not want any of the data relating to contacts, events or contributions.

I have tried transferring the schema and running data comparisons but I always seem to run into some sort of issue.

Does anyone have any experience dealing with this?

Currently I have a custom extension that makes various API calls to clear out content. This is quite slow, but seems to work.

The API approach you're using is the "best" approach - but agreed it can be slow.  There are alternative approaches though:

Delete all the records in civicrm_contact with a direct SQL call - except the default organization and logged-in user.  This will remove most of the other records (e.g. contributions) via cascading deletes.  However, it doesn't delete all records - e.g. activities.  With a similar delete of civicrm_event, I would usually call this "good enough", if the resulting database will never see production use.  I'd avoid this if your dev work involves reporting on activities, financial line items, or other tables that lack foreign keys.
Store your CiviCRM config in code.  CiviConfig is an option; others have written a "Features CiviCRM" extension for Drupal folks, and of course you could do this with hook_civicrm_managed.  However, the tools for creating these configs are weak!
Depending on my staging site's requirements, I'll often use a RAM disk for MySQL and store it all there.  This usually gives me a 250% speedup on API calls compared to raw SSD - if your database is stored on spinning disks the improvement will be far more dramatic.  Just remember to dump the db before shutdown!


How to create a mailing based on a template with API I'm trying to create a mailing based on a template through the CiviCRM API.

Here's my code:

$params = array(
  'name' => $subject,
  'msg_template_id'=> 87,
  'created_id' => 1,
  'header_id' => 1,
  'footer_id' => 17,
  'from_email' => $from,
  'groups' => array(
    'include' => array(
      '0' => 893,
     ),
  ),
  'mailings' => array(
    'include' => array(),
    'exclude' => array(),
  ),
  'options' => array(
    'force_rollback' => 1,
  ),
  'api.mailing_job.create' => 1,
  'api.MailingRecipients.get' => array(
    'mailing_id' => '$value.id',
    'api.contact.getvalue' => array(
      'return' => 'display_name',
    ),
    'api.email.getvalue' => array(
      'return' => 'email',
    ),
  ),
);

$result = civicrm_api3('Mailing', 'create', $params);

In mailing everything is correct, the template chosen in the settings is the correct one. But there is no content in the mail.

How to make the content of the mail automatically filled by the content of the template and not from the body_html parameter?

We are using a seperate api call to retrieve the required parameters for subject, body_html and body_text:

$result = civicrm_api3('MessageTemplate', 'getsingle', array(
   'id' => 87,
 ));

You could use api chaining with Mailing.create but I dont see a huge benefit.


packages/Net/UserAgent/Detect/APC.php flagged as malicious by Wordfence Firewall Our Wordpress firewall Wordfence has flagged packages/Net/UserAgent/Detect/APC.php as possibly a malicious file.  Based on past experience, I assume this is a false positive.  However, I posted it here in case it is a real problem.

Filename: wp-content/civicrm 5.18.3/civicrm/packages/Net/UserAgent/Detect/APC.php

File Type: Not a core, theme, or plugin file from wordpress.org.

Details: This file appears to be installed or modified by a hacker to perform malicious activity. If you know about this file you can choose to ignore it to exclude it from future scans. The matched text in this file is:

The issue type is: Suspicious:PHP/antibotInclude.C.7882

Description: Inclusion of an antibot file, often used in phishing kits

What I believe it's flagging based on the "description" line in your post is probably that the UserAgent tool could be used by bad people to get information about a browser, possibly to look for versions or configurations with known security holes to exploit. But it doesn't seem to be used in CiviCRM as far as I can see, and the APC.php subclass file all it does is store the results in the APC cache if you're using that. I wonder if the whole Net/UserAgent folder could be removed from Civi.

UPDATE: It looks like the file will be removed in civi version 5.22: https://github.com/civicrm/civicrm-packages/pull/272


Forgot to make new database for civi... how uninstall? I installed CIVI but forgot to create a new database just for civi... how do I undo or uninstall and start over?

You can remove civicrm.settings.php and run the installer again.  Here's where to find it:

Backdrop: <webroot>
Drupal: <webroot>/sites/default
Joomla: <webroot>/components/com_civicrm
WordPress: <webroot>/wp_content/plugins/civicrm

Note that this will NOT remove the old tables from your existing database.  To do that, see here.


Database constraint error on enabling CiviCase I'm running civicrm 4.4.20 on the latest Joomla 3.4.5. When I try to enable CiviCase I get an database constraint error (see below).

[code] => -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] =>
      INSERT INTO `CIVICRM_OPTION_VALUE` (
        `option_group_id`, `label`, `value`, `name`,
        `grouping`, `filter`, `is_default`, `weight`,
        `description`, `is_optgroup`, `is_reserved`, `is_active`
      ) (
        SELECT
          @option_group_id_case_type, 'Housing Support', @max_val + 1, 'housing_support',
          NULL, 0, 0, @max_wt + 1,
          'Help homeless individuals obtain temporary and long-term housing', 0, 0, 1
         FROM   DUAL
         WHERE  NOT EXISTS (SELECT command.plist infoShowed
                            FROM   `CIVICRM_OPTION_VALUE`
                            WHERE  `name` = 'housing_support')
      )
    [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`xxx_joomla`.`civicrm_option_value`, CONSTRAINT `FK_civicrm_option_value_option_group_id` FOREIGN KEY (`option_group_id`) REFERENCES `civicrm_option_group` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error

Resolved. I found the code that was inserting the sample data. It was first pulling from option_group where name=case_type. For some reason my database did not have this row - so the subsequent line inserting into option_value with the retrieved id of the option_group row failed.

I manually inserted a row into option_group with name of case_type. (I used "Case Type" for both title and description and set the is_active column and is_reserved column to 1 and is_locked to 0.

This got rid of the error.


Can I manually add an "Email" activity in the GUI without sending it? To keep track of communications with contacts, CiviCRM has Activities e.g. documenting e-mail conversations. In the Activities tab of a contact I can create these from the New activity dropdown.

This provides the option Send an Email. However, using that I can only make CiviCRM actually send out an email to the contact. We usually send emails from a normal mail client instead.

What I am looking for is a possibility to add an Email activity to a contact without actually sending out a mail. (To document an email that has already been sent from outside CiviCRM)

Currently we use a workaround: A custom activity type documented Email. But it would avoid confusion, if all mail would be of the same activity type Email regardless of how it was send out.

Is there a way for this in Civi or an extension?

Have you checked the inbound email processor script. You can forward and/or cc a mailbox, and civi can read from the mailbox and attach it to the relevant contacts.

Details are here:

http://wiki.civicrm.org/confluence/display/CRMDOC/Autofiling+email+activities+via+EmailProcessor


Why are CiviCRM fields not displaying from a view in a panel in Drupal? I feel like I am missing something fairly basic, but here goes.

I am trying to display CiviCRM Contact fields from a view that will be displayed in a content pane of a panel, but they just don't appear.

My view has a mix of Drupal and CiviCRM fields.  The Drupal fields appear in the panel, but the CiviCRM fields don't.  When I display the view as a standalone page, the CiviCRM fields appear along with the Drupal fields.

It would seem, then, that the problem is passing the CiviCRM data to the panel.

Is there a context or relationship that is required in the panel?

I have added CiviCRM fields directly from the 'CiviCRM Contact' tab of the 'add content' wizard in Panels, but they exhibit the same behaviour.  The fields don't appear on the front end of the site (or in previews).

I am working with Drupal 7.50 and CiviCRM 4.7.6.

Thanks for your help,
Lewis

It turns out the issue was not specific to CiviCRM fields.  The issue is in the relationship between Views and Panels, specifically, passing arguments between the two.

The missing piece for us was using the 'Argument input' setting in Views to pass the arguments properly.

Eventually discovered a great post about it here:
http://www.metaltoad.com/blog/passing-page-arguments-view-panes

I won't try to reproduce it.  Following these steps solved our problem.

Enjoy,
Lewis


How do i delete country from my mailing label format How do i delete country (United States) from my mailing label format.
I can't seem to print mailing labels without United States on the last line and the USPS doesn't want that.

There are two ways to do this.

If you are based in the United States, go to Administer > Localization > Address Settings.  Set Hide Country in Mailing Labels when same as domain country to Yes.  You can double-check that CiviCRM thinks you're US-based by going to Administer menu > Communications > Organization Address and Contact Info and checking the Country field under Default Organization Address.
If you are NOT based in the United States, go to Administer > Localization > Address Settings.  Remove {contact.country} from the bottom of the Mailing Label field.  Note that this removes country for ALL mailings.
If you need something more fine-grained (e.g. you're not US-based, but need to remove country from mailings sent to the US), install my extension com.megaphonetech.addressl10n.  This will let you do per-country mailing label formats.


Best Relationship Type When Organization is Primary Member What relationship is best to use in a scenario where an individual signs up on behalf of an organization but the organization is actually the Member? Is it the Employer of or Employee of relationship type?

I want the Organization to be the primary Member.

If the Organization is the Member, then you need the Membership Type to be set to use the "Employer of" relationship. If you go here and click on the '?' next to Relationship Type it says

Relationship Type: Employer of

Direct member is:   an organisation

Membership is automatically granted to: 'Employees' of that organization


Webform CiviCRM integration with REST I'd like to integrate a Drupal webform on a non-CiviCRM install with a Drupal CiviCRM install on a separate server. It seems to me that using a stripped down kind of module like webform-civicrm using a REST interface with CiviCRM might be a feasible option, stripping out some of the more complex integrations that require any native Civi code.

Has anyone tried something like this?

Author of the module here...

Great question. I've forseen a need for this and have over the past few versions been stripping out sql queries and BAO calls when possible and replacing them with api calls. But that work is only around half done. And the low-hanging fruit has been picked. The remaining BAO/DAO calls are mostly still in there because there is no equivalent api.

The reason for this approach is that CiviCRM supports api calls over REST, so once we decoupled Webform-CiviCRM from calling internal Civi functions, it would be theoretically possible to pipe all the api calls over REST (assuming you had a nice fast connection between the two servers).

The only "quick 'n easy" way forward I see would be to install CiviCRM on your host Drupal site just so the internal function calls won't bomb, then swap the wf_civicrm_api function in utils.inc to use REST. That should more-or-less work, depending on your use-case.

The "correct" solution is probably to write a CiviCRM extension, installable on the source site, that provides an api wrapper for all required internal functions, and patch Webform-CiviCRM to use that api instead of direct DAO/BAO calls. This would, in theory, allow you to host CiviCRM on WordPress and integrate with a Drupal webform.


Mobile responsive email template Has anyone created a mobile responsive email newsletter template to work with Civimail? If so, can you please share the link to an example of the email newsletter which uses the template? If you have suggestions for how to create it easily, please share some tips. Thank you!

We worked on our main email template this last summer, using the 'Sample Responsive Design Newsletter - Single Column Template' from within Civi as a springboard.  We also created an account with MailChimp to see how MailChimp put their templates together.

As old as they are, HTML Tables are still the way to go because of how differently email clients handle display.  We used <style> tags as needed and used media queries within those <style> tags.  We ended up using a good bit of the CSS from our website to maintain our look; we just had to adapt our website's CSS to work with tables.

Here is an example mailing we did from last summer:
https://glenwoodcc.org/civicrm/mailing/view?reset=1&id=77  We usually email short snippets and point back to our website, so we typically only have one main header image, one heading and then the content.  Our two column footer was a challenge to sort out responsively with tables, but we got there.  We also have a template that repeats the simple template so we could have multiple sections (image/heading/content) to the email.


How is a draft removed since looks like only option is continued How to remove more than 1 draft since only option appears to be "continued"?

You haven't given much information but I assume you are refering to bulk emails under civimail.  After creating a draft bulk email, there is the option to continue with it or delete it.  Look under Mailings>Draft and unscheduled mailings>Action column, where you will see a 'Delete' option.

Hope this helps.


Why do click and open reports show times in UTC rather than the site's timezone? The mailing and click tracking reports are showing times in UTC. There is no PHP MySQL timezone mismatch - and mysql -e 'select now()' and date return the right times - as per timezone.

Mailing clicks and opens are registered via scripts in extern (which are quite old) - and don't appear to use the cms environment - as such if the timezone isn't set for php and has defaulted to UTC - this won't show in the warnings - despite it being the issue. To detect this compare the result of php  To confirm this is the problem run

php -r 'echo date_default_timezone_get() . PHP_EOL;'

if the result is UTC - then you can fix by setting the date.timezone value correctly in your php.ini or similar file.

This won't resolve historical data but will mean clicks and opens in the future are recorded in the correct timezone.