Ran direct SQL update to bulk update contact names, changes not appearing until editing and saving I'm finishing up a migration to CiviCRM from a homegrown Python application I wrote, and without going into too much detail as to the why, I needed to do a bulk update of all the contact name fields in the civicrm_contact table using a spreadsheet dump from the old application.

I wrote a script that loops over the rows in the spreadsheet and runs an update statement on each record in civicrm_contact table using the external_identifier field to match.

This all seems to have run fine, but when I go to the contact in CiviCRM the old values are still there. However, when I click at the top of the contact screen to put the name fields into edit mode, the new values are in the form fields, and when I hit save the new values appear.

Is there some caching going on such that this will fix itself, or does updating the name fields directly as I did have some other implications/consequences I should be aware of? Thanks.

It sounds like you imported the first_name and last_name values - but the value at the top of the record is the display_name.  You have two options:

Use your SQL script to update the display_name accordingly.
Export ONLY the contact_id of the affected records (or all records).  Reimport the contact ID via the "Import Contacts" functionality.  All records will be resaved when you import the contact ID and the display_name is recalculated on save.

Incidentally, this is a good if fairly harmless example of why directly updating the database via SQL is usually a bad idea.  If this were imported via the API, the display name would have been recalculated.  In this case, there was no data loss - but if you had tried updating, e.g. donation amounts, the lack of corresponding changes to your line item and financial transaction tables would be difficult to recover from!


Membership Name-Your-Own Price (above Minimum) on Contribution Page How can we enable users to enter a custom amount above the minimum fee when they are creating or renewing their membership through a contribution page?

For reference, this is the membership structure we want:

Annual Member ($25/annual) auto-renew optional
[Other types] ($[x fixed] / annual) auto-renew optional
Sustaining Member ($[user-custom >= 10] / month) auto-renew required

We're having trouble with the last one - on contribution pages, the fee shown for "Sustaining Member" is fixed at $10 and there is no option for users to input their own price (e.g., a textfield).

From the CiviCRM Book, "Defining Memberships" section,

  …we have an option to encourage people pay more than the minimum for a membership if they want to.

I have found no way to enable this, even through membership price sets (we don't want to create discrete increments, e.g. $10/15/20/25/etc.), nor through integration with Drupal webforms.

EDIT:

Here's a mockeup of what we'd like the membership signup form to look like, if it helps:

I gather you are not looking for a development solution (ie. extension, custom template, etc.) since the API/template system is extremely extensible.

If that is the case you might consider creating a button or link on the form (if you are slick you might adjust the css or use jquery to place it in the price-set.) that takes the user to a separate contribution page with the name your own price.

I realize it does not match the mockup but it may serve the functional requirements.


Searchable Custom Field doesn't appear in Quicksearch options list and is not a sort option in reports I have 2 membership custom fields that are set as searchable. One field is integer the other is alphanumeric. Neither field appears in the Quicksearch options in Search Preferences. The custom fields appear as column options in the membership reports but they are not available as sort options.
Is there anything else I need to configure to make them available for search or sortable in reports?

I have tested with a Contact custom field and this works as expected.

Thanks for any help

The quicksearch function is for searching contacts, and therefore doesn't call to any of the other components of Civi for data fields.

As per Civi's Docs, if you're looking for data regarding a specific component (i.e Memberships), each component has it's own search function. In Find Memberships, this should also show your custom fields to allow you to search from.


How can we Make separate option for standing Orders Is there any way to make a separate option for the orders which are not delivered yet or standing orders in civi.

Thanks in Advance

Yes you can add a new payment method - Standing Order

Steps:
Administers -> System Settings -> Option Groups

Look for "Payment Methods" - Edit the option and add a new payment method and call it as "Standing Order"

I guess this helps!!!


testing recurring contributions -- gone wrong! Please help!

I've made a new recurring contribution page for membership renewals. I tested to contribution page to make sure recurring contributions would go through -- they went through so I thought it was all good to go.

I tested the page the following week just to make sure it was still running smoothly and... nothing. Now, anytime I submit one-time member dues (i.e. a one-time contribution of $30) it works fine, but once I add that I want to contribute that amount of money every month, on the user side it says the payment went though Authorize for processing, but it doesn't show up in Authorize and it doesn't record anything in Civi.

Curiously, after I complete a transaction, I "told a friend" and then that action showed up in my activities in Civi. That is to say, something is connecting, but recurring transactions are just not.

I've submitted them under my name and another's. Both unsuccessful.

Payment processor: Authorize.net
Civi version: 5.17.5
Drupal core version: 8.7.8

The recurring contribution workflow is more complicated than the one-time workflow. For authorize.net, it means that a request for a recurring contribution is sent, but relies on the payment processor to come back with any information about whether the recurring contribution has completed or not (as well as communicating about any future transactions), and typically that will not happen immediately, but at some later time.

I'd guess that you will see pending payments in CiviCRM for these recurring requests, and that for some reason your payment processor account is not configured to properly handle recurring requests (i.e. the callback or IPN isn't firing properly). Perhaps your payment processor account is used for other purposes than online payments?


Is it planned to use SPIP as a basis CMS for CIVICRM? SPIP is a multilingual open-source CMS created in 2001, and a lot of non-profit use it as their website tool in France and other countries. Is it planned, or do you heard about some people willing to use civicrm together with SPIP ?
Many thanks in advance,
Cyril

From what I can see, it seems that SPIP is a CMS and not a CRM.  While there are no plans for native integration between CiviCRM and other CMSes beyond the four currently supported, many organizations still integrate CiviCRM with their existing CMS.  Simple integration options include remote profile submissions using snippets.  You can also use remoteform, which also works with contribution pages.

If you wanted a deeper integration, you could use CiviMRF, but that would take development work.


How can I hide contact tabs depending on user role? I want to give all Drupal Users with a specific role access to basic contact information from our database, but I don't want them to see things like the list of activities, groups joined, notes, cases, etc.

Is there a way to give some users the ability to view only access to a specific set of contact data?

We often find that for most Drupal users who don't really 'need' access to civicrm, it is less painful for them to 'access' the data they should be able to get to via a Drupal View (which can be set with Role-based permissions). If you are not familiar with Drupal Views for Civi Contacts or CiviMemberships you may find something in our 'treasure trove' aka Views Library


Is it possible to have an updateable log for an event? We have a requirement where we want to have a user updateable 'log' (text area) attached to an event. A custom field is the obvious answer but the  screen to update the field (event config) would not be suitable as it exposes critical data. Webforms for events are oriented toward contact signups - not at the event level but at the contact level, so are not suitable. And profiles can't be used for events, can they? The event in question is a nightshelter, where we use a webform to sign in guests. We want the night staff to be able to use Civi to keep a log for the night (i.e. the event), but apart from adding a custom field to the event (as described above) there doesn't seem to be a usable solution for us. Any suggestions?

What about using activities and a contact for the shelter?
Each activity would be an entry, you can use activity types, so it might make it easier to get some analysis on the log.

There isn't any direct link between the log and the event, but you can filter by date and get the activities linked to a specific event (night).

you could write an extension to change the layout of the event backoffice and provide a filtered view.


Can not add Relationship to contact post CiviCRM 4.7.30 upgrade Although, I had orignally thought the issue was on the "Webform CiviCRM Integration" module end, further testing shows it is likely an issue on the CiviCRM end since when I manually try to create the relationship I end up with a "spinning wheel" and a page refresh gives the following error:

"unknown relationship create error API (EntitySetting, get) does not exist (join the API team and implement it!)"

Any insight?

Ensure you have extension nz.co.fuzion.entitysetting enabled as it is a requirement of nz.co.fuzion.relatedpermission


Where is the civicrm.settings.php file on Wordpress 4.95 with CiviCRM 5.1.x I'm having trouble with the resource url in a new implementation of wordpress 4.95 and civi 5.1

It is greyed out when listing it via admin/ Settings - Resource URLs

A popup tells me that "Some fields are loaded as 'readonly' as they have been set (overridden) in civicrm.settings.php."

There is no longer a civicrm.settings.php file in /wp-content/plugins/civicrm/civicrm

There is a folder called settings and a lot of stuff under that.

Whats all this about? Documentation doesn't help much with this.. just keeps referring me to the non existent civicrm.settings.php

The /wp-content/plugins/civicrm/civicrm path is for CiviCRM versions older than 4.7.  For a new install you should find it under /wp-content/uploads/civicrm


Illegal mix of collations Using Joomla 3.8.6, CiviCRM 4.7.31, php 7.0.28, mysql 5.6.39

What should the database collation be for the CiviCRM tables?
Mine are all utf8_general_ci. None of the tables in the database are utf8_unicode_ci, but I'm getting the illegal mix error below. Not sure when it started (may have been after upgrade to 4.7.31), but clicking on "Reports listing" or one of the report collections like "Contribution Reports" generates the following error:

"1267 ** Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='"

The error seems to come from CRM/Report/Page/InstanceList.php.
See traceback below.

Edit: I now realise that the whole Report menu is not as it should be. It looks like this:

whereas it should look more like this:

Could this be related to the upgrade issue CRM-12136?

If so, how can I correct the Report menu? Thanks.

[debug_info] =>
    SELECT inst.id, inst.title, inst.report_id, inst.description,  inst.owner_id, v.label, v.grouping, v.name as class_name,
    CASE
      WHEN comp.name IS NOT NULL THEN SUBSTRING(comp.name, 5)
      WHEN v.grouping IS NOT NULL THEN v.grouping
      ELSE 'Contact'
      END as compName
      FROM civicrm_option_group g
      LEFT JOIN civicrm_option_value v
             ON v.option_group_id = g.id AND
                g.name  = 'report_template'
      LEFT JOIN civicrm_report_instance inst
             ON v.value = inst.report_id
      LEFT JOIN civicrm_component comp
             ON v.component_id = comp.id

      WHERE v.is_active = 1  AND v.component_id = 2
            AND inst.domain_id = 1
      ORDER BY  v.weight ASC, inst.title ASC [nativecode=1267 ** Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=']
[type] => DB_Error
[user_info] =>
    SELECT inst.id, inst.title, inst.report_id, inst.description,  inst.owner_id, v.label, v.grouping, v.name as class_name,
    CASE
      WHEN comp.name IS NOT NULL THEN SUBSTRING(comp.name, 5)
      WHEN v.grouping IS NOT NULL THEN v.grouping
      ELSE 'Contact'
      END as compName
      FROM civicrm_option_group g
      LEFT JOIN civicrm_option_value v
             ON v.option_group_id = g.id AND
                g.name  = 'report_template'
      LEFT JOIN civicrm_report_instance inst
             ON v.value = inst.report_id
      LEFT JOIN civicrm_component comp
             ON v.component_id = comp.id

      WHERE v.is_active = 1  AND v.component_id = 2
            AND inst.domain_id = 1
      ORDER BY  v.weight ASC, inst.title ASC [nativecode=1267 ** Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=']
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="
    SELECT inst.id, inst.title, inst.report_id, inst.description,  inst.owner_id, v.label, v.grouping, v.name as class_name,
    CASE
      WHEN comp.name IS NOT NULL THEN SUBSTRING(comp.name, 5)
      WHEN v.grouping IS NOT NULL THEN v.grouping
      ELSE 'Contact'
      END as compName
      FROM civicrm_option_group g
      LEFT JOIN civicrm_option_value v
             ON v.option_group_id = g.id AND
                g.name  = 'report_template'
      LEFT JOIN civicrm_report_instance inst
             ON v.value = inst.report_id
      LEFT JOIN civicrm_component comp
             ON v.component_id = comp.id

      WHERE v.is_active = 1  AND v.component_id = 2
            AND inst.domain_id = 1
      ORDER BY  v.weight ASC, inst.title ASC [nativecode=1267 ** Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=']"]

First check the default collation. If it's different it may be causing implicit conversion:

show variables like 'collat%';

If that's not it then note that individual columns can have their own collation. It seems unlikely to be the problem here given that particular reports query, but check the individual column definitions, e.g.

show create table civicrm_report_instance;


Where can our small non-profit find assistance with CiviCRM? Looking for an individual in Michigan, USA, to assist with understanding a civicrm database that was created for our non-profit.  Many bugs and errors in the system, and training on system needed for staff.
Recommendations needed ASAP.
Thanks
M Janes

Best place to look for a CiviCRM Partner/Contributor is here: https://civicrm.org/partners-contributors - there are many Partners/Contributors in the US - even if you can't locate one in Michigan - with today's tools like GoToMeeting so much can be done online;


Correct means to update Drupal Node after user submits a donation Drupal 7.37, CiviCRM 4.4.15

We are collecting tracking information when a user makes a contribution associated with child sponsorship (using URL parameters, custom fields, and a profile assigned to the contribution form). The tracking information included the id of the Drupal Node that needs to updated.  We need to change the Sponsored field, Boolean value, to true after the payment has been processed successfully (credit card or ACH).

Would we use something like this:

myhooks_civicrm_post($op, $objectName, $objectId, &$objectRef) {

if ($op == 'create' && $objectName == 'Contribution') {
   //retrieve contribution from civicrm database
   //retrieve tracker information from civicrm database
   //if tracker.appeal > 0
   //   retrieve node from drupal database
   //   update node in drupal database
}

That looks correct, though I have some suggestions for improvement:

Your first step is "retrieve contribution from civicrm database".  The contribution is already going to be stored in $objectRef, so that should be unnecessary.
If you want to avoid coding, you can probably accomplish this with the Drupal Rules and civicrm_entity module.


How do I enable or disable Ajax Deduping? A recent bug report mentions that it affects users only when Ajax deduping is enabled. How do I find this option to review it? Both Google and code grepping are failing me.

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

You can disable/enable Ajax Deduping in Display preference.
Navigate to CiviCRM >> Administer >> Customize Data and Screens >> Display Preferences.

HTH
Pradeep


REST API 'between' parameters I'm trying to make an external REST API call to rest.php.  I was getting "Unable to decode supplied JSON", but then I figured out I could take the values I was stuffing into json (from the API Explorer) and then make them their own parameters (REST API without JSON just key=value).

I'm trying to request contributions between two dates.  In the json style as shown in the API Explorer, it's like this:

&json={"receive_date":{"BETWEEN":["2017-12-01","2017-12-01"]}}

I'm trying this, and it's not working:

&received_date[BETWEEN]=2017-12-01,2017-12-02

Any ideas?

I just figured it out:

&received_date[BETWEEN][]=2017-12-01&received_date[BETWEEN][]=2017-12-02


Assigned Activites not showing up on users Contact Dashboard I'm needed to add a scenario where a specific user role has access to edit/update activities they are assigned but access nothing else in civi. What is the best way to do this?

edit: after the discussion with petednz we found that there is an issue with assigned activities showing up on the contact dashboard.

edit2: filed jira issue at https://issues.civicrm.org/jira/browse/CRM-16557

Maybe over complicating things a lot here. But assuming you have confirmed this isn't possible directly via 'permissions' and the users Contact Dashboard, I would try the following in Drupal. Build an Activities based Views block which uses Contextual Filter and Views 'relationships' (to get the Activity assignee) which will show the user 'their Activities'. Assuming that gives you the list you want, then add a link to each Activity in the View that jumps them to a Webform-CiviCRM with the activity ID in the URL. That might be getting you close.


Fetching Contribution Information I am working on an extension which requires me to use Civi Contribute.Yet i have not tried anything yet as i don't now the approach, so i wish to obtain the details of a particular contribution transaction such as total_amount, email ... so that i can use it in the extension, I have thought of using an API method but i am not clear of the details and if at all that is what i have to use. Something like the content of $params?

I think you are looking for the API getfields action? In the API explorer you can do a getfields and it will show you the possible fields for the API.


CiviCRM 4.7 - DB Constraint Violation - possibly dashboard_id should possibly be marked as mandatory for this API We have moved our hosting to  new hosting provided (CiviHosting). CiviHosting installed a fresh installation of CiviCRM 4.7. We then imported our previous sql dump from our old site which also had been upgraded to 4.7. The import was done via c-panel. After the import, we get this error when running CiviCRM:

CiviCRM_API3_Exception: "DB Constraint Violation - possibly dashboard_id should possibly be marked as mandatory for this API. If so, please raise a bug report."

#0 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(125): civicrm_api3("DashboardContact", "get", (Array:5))
#1 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(158): CRM_Core_BAO_Dashboard::getContactDashlets()
#2 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/DashBoard.php(47): CRM_Core_BAO_Dashboard::getContactDashletsForJS()
#3 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Contact_Page_DashBoard->run((Array:2), NULL)
#4 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#5 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
#6 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:2))
#7 [internal function](): CiviCRM_For_WordPress->invoke("")
#8 /home/iskcon/www/www/wp-includes/plugin.php(524): call_user_func_array((Array:2), (Array:1))
#9 /home/iskcon/www/www/wp-admin/admin.php(222): do_action("toplevel_page_CiviCRM")
#10 {main}

How do we go about importing our previous database to the new installation? I would appreciate a simplified explanation of the steps to resolve this.

Maybe you can try to run the upgrade script again to go from 4.7.10 to 4.7.12

http://<your_wordpress_home>/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

Documented on the  Wiki Upgrading CiviCRM for Wordpress .


Views PDF : class not found Probably a Drupal issue, but you never know :

I am running Drupal 7.56 / Civi 4.7.20

I have been using Views extensively for some months now. I want now to create custom pdf pages from some Views.

I have installed jQuery_update, then Views PDF Display Module, then copied fpdi and tcpdf libraries into the Libraries folder (via FTP).

Now, when I want to add a PDF Page to a View, I get the following error message :
Fatal error: require_once(): Failed opening required 'sites/all/libraries/fpdi/fpdi2tcpdf_bridge.php' (include_path='/home/my_hostname/www/www/sites/paroisse/civi_extensions/nz.co.fuzion.cmcic-master/:/home/my_hostname/www/www/sites/paroisse/civi_extensions/nz.co.fuzion.extendedreport/:/home/my_hostname/www/www/sites/paroisse/civi_extensions/org.civicrm.sms.twilio/:/home/my_hostname/www/www/sites/paroisse/civi_extensions/com.drastikbydesign.stripe/packages/:/home/my_hostname/www/www/sites/paroisse/civi_extensions/com.drastikbydesign.stripe/:/home/my_hostname/www/www/sites/default/fpdf:.:/home/my_hostname/www/www/sites/all/modules/civicrm:/home/my_hostname/www/www/sites/all/modules/civicrm/packages:.:/home/my_hostname/www/www/sites/all/modules/civicrm:/home/my_hostname/www/www/sites/all/modules/civicrm/packages:/home/my_hostname/www/www/sites/all/modules/civicrm/vendor/tecnickcom:/home/my_hostname/www/www/sites/all/modules/civicrm/vendor/phpseclib/phpseclib/phpseclib:/home/my_hostname/www/www/sites/all/modules in /home/my_hostname/www/www/sites/all/modules/views_pdf/views_pdf_template.php on line 22

I suspect that this is due to a bad installation (btw, the fdpi library contains no fpdi2tcpdf_bridge.php), but find no clear and up-to-date installation tutorial.

I am not a programmer (just able to edit and ftp a file if necessary)

Any help is welcome.

I went back to fpdi-1.6.2, and the error disappeared (the internal fpdi folder content has completely changed between the two versions).


CiviEvent - front end registration error page - permissions or something else All our event registration pages have stopped working in 4.7.14 & 4.7.15

Error is: You do not have permission to access this page.
I've checked all Joomla ACLs for the public group and everything that needs access does and it worked ok before.

In the Logs I see this:

.../administrator/components/com_civicrm/civicrm/CRM/Event/Form/Registration.php(243): CRM_Core_Error::fatal("You do not have permission to access this page.")
...

And that file around line 243 has this:

  // check for ability to add contributions of type
  if ($isMonetary
    && CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()
    && !CRM_Core_Permission::check('add contributions of type ' . CRM_Contribute_PseudoConstant::financialType($this->_values['event']['financial_type_id']))
  ) {
    CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
  }

I have checked the financial type records on the events and I've also checked the new minimum amounts in the price sets etc..

I can't work out why this would be failing.

Has anyone seen this or knows if there is a bug in 4.7.14/15?

Cheers,

Dave

OK, found out what this was. There is a new check box in CiviContribute Components Settings 'Enable Access Control by Financial Type' In the users system this was checked. I don't know whether an administrator accidentally ticked that without knowing what it did or whether an update process ticked it.

Anyway, this being ticked with no civi ACL obviously locked everyone out of being able to access the financial types and therefore broke the front-end event registration process.

Un-check that field and save and the system is fine once again.

Hope this helps anyone else in this situation.

(PS - it looks like super users within Joomla are somehow treated differently which threw me initially the normal civi ACL checks obviously don;t apply to Super Users - hmm)


CiviMail not delivering to certain mail servers eg. wp.pl CiviMail fails to deliver some emails to specific domain servers: @wp.pl. Each time I send a mailing I receive a bounce message which reads like this:

This is the mail system at host stpuk-org.nazwa.pl.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<xxx@wp.pl>: host mx.wp.pl[212.77.101.4] said: 550 SPF Error:  Senders are
    required to provide correct SPF records. If you are
    a poczta.wp.pl user check SMTP configuration:
    http://poczta.wp.pl/autoryzacja/ (in reply to MAIL FROM command)

Final-Recipient: rfc822; xxx@wp.pl
Original-Recipient: rfc822;xxx@wp.pl
Action: failed
Status: 5.0.0
Remote-MTA: dns; mx.wp.pl
Diagnostic-Code: smtp; 550 SPF Error: Senders are required to provide
correct SPF records. If you are a poczta.wp.pl user check SMTP
configuration: http://poczta.wp.pl/autoryzacja/

The original message header is:

Return-Path: <bounces.stp+b.215.1467.3d8a9854510a5876@gmail.com>
Received: from mydomain.nazwa.pl (unknown [85.128.142.61])
    by stpuk-org.nazwa.pl (Postfix) with ESMTP id 2CE5F2411C0
    for <xxx@wp.pl>; Sun,  8 May 2016 23:28:11 +0200 (CEST)
To: <xxx@wp.pl>
Subject: =?utf-8?Q?=5BSzkic_CiviMail=5D_Og=C5=82oszenia_STP?=
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="=_7bef5881a1e24565cf35e4ad4b65e26c"
Reply-To: =?utf-8?Q?Stowarzyszenie_Technik=C3=B3w_Polskich?=
 <office@stpuk.org>
From: =?utf-8?Q?Stowarzyszenie_Technik=C3=B3w_Polskich?= <office@stpuk.org>
List-Unsubscribe: <mailto:bounces.stp+u.215.1467.3d8a9854510a5876@gmail.com>
job_id: 215
Precedence: bulk
X-CiviMail-Bounce: bounces.stp+b.215.1467.3d8a9854510a5876@gmail.com
Date: Sun, 08 May 2016 23:28:11 +0200
X-HTTP-Posting-URI: http://www.stpuk.org:80/civicrm/ajax/rest
X-HTTP-Client: 92.1.74.193
Message-Id: <20160508212811.2CE5F2411C0@stpuk-org.nazwa.pl>

I spent some time testing various approaches but without success. Few additional comments:

Civimail is successful delivered to main providers such as gmail, yahoo
For gmail I get a spf=softfail (txt below) but still delivers:

(google.com: domain of transitioning bounces.stp+b.197.1415.436c299ebc4d880a@gmail.com does not designate 85.128.169.253 as permitted sender) client-ip=85.128.169.253
My DNS configuration has spf: "v=spf1 ip4:85.128.169.253 ~all"
I use Google apps to handle my mail, hosting to handle website and CiviCRM and gmail for bounce processing

I believe I am missing something but I have no idea what.

Demerit is correct, but I'll add a bit more detail and how you can fix it.

Your CiviCRM sends emails as bounces.stp@gmail.com from 212.77.101.4. The SPF records looked up are those for the sender's domain, gmail.com, which does not include your webserver's IP.

Gmail treats this as a softfail, but nazwa.pl seems configured to treat failed SPF more strictly. Both are SPF fails.

Unless you control @gmail.com, you can't fix this via SPF for that originating email. What you can do is send messages from your own domain, with working SPF configuration.

To address this, change the originating email address (CiviCRM Menu > Administer > CiviMail > From Email Addresses) to eg bounces@stpuk-org.pl.

This mailbox can in turn forward to your Gmail address, so CiviCRM can continue monitoring that mailbox for bounces.


Can multiple mailings have deduplicated email addresses, so each address will not receive multiple emails? We'd like to send a mailing in a few slightly different versions to different groups. What we'd like to avoid is having two contacts, who share the same email address and are in different groups, receive two different versions of the email.

Deduping happens before a specific mailing is sent and I can exclude previous contacts who were recipients of the first mailing from the next mailing, but what I am trying to do is exclude previously emailed addresses from the next mailing, not just previously emailed contacts.

Is there any way to either exclude previously emailed addresses directly or to search for contacts who share a primary email with contacts in a previous mailing or group?

Hopefully someone else comes by with a simple strategy - here is an off the cuff idea.

a/ you know the emails you sent to
b/ if you import emails then you can add them to a Group
c/ i don't know if when you import an email that is used by several folk they all get updated, it may only update the lowest cid
d/ if the import does do what you want then you can probably figure that path from there


How are civicrm_group and civicrm_uf_group related? Running WordPress CiviCRM version 4.7.7

In the log below, where is this gid coming from? I checked all civicrm_uf_* tables and there is no reference gid=14. Is there another relationship with another table I am missing?

The only reference to Profiles I can find in the UI is on Administer/Custom Data and Screens/Profile. There is no gid=14 listed.

In the website I am administering the ids and names in civicrm_uf_group and civicrm_group look almost identical, but civicrm_uf_group is missing gid=14 and civicrm_group is not.

So where do you Administer the civicrm_group in the CiviCRM user interface?

Even knowing which page or menu item is causing this error would be helpful.

See the following CiviCRM log:

  May 29 15:06:44 [info] $Fatal Error Details = Array ( [message] => The requested Profile (gid=14) is disabled OR it is not > > configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR you do not have permission to access this profile. Please contact the site administrator if you need assistance. [code] => )

  May 29 15:06:44 [info] $backTrace = #0 /../wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(371): CRM_Core_Error::backtrace("backTrace", TRUE)

    /../wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFGroup.php(368): CRM_Core_Error::fatal("The requested Profile (gid=14) is disabled OR it is not configured to be used...")
    /../wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/UFGroup.php(217): CRM_Core_BAO_UFGroup::getFields("14", FALSE, 2, 5, FALSE, FALSE, "Profile", 5, NULL, 5)
    /../wp-content/plugins/civicrm/civicrm/CRM/Profile/Page/Listings.php(143): CRM_Core_BAO_UFGroup::getListingFields(2, 5, FALSE, "14", FALSE, "Profile", 5)
    /../wp-content/plugins/civicrm/civicrm/CRM/Profile/Page/Listings.php(288): CRM_Profile_Page_Listings->preProcess()
    /../wp-content/plugins/civicrm/civicrm/CRM/Profile/Page/Router.php(124): CRM_Profile_Page_Listings->run()
    /../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Profile_Page_Router->run((Array:2), NULL)
    /../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
    /../wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
    /../wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:2)) 10.internal function: CiviCRM_For_WordPress->invoke(Object(WP))
    /../wp-includes/plugin.php(601): call_user_func_array((Array:2), (Array:1))
    /../wp-includes/class-wp.php(737): do_action_ref_array("wp", (Array:1))
    /../wp-includes/functions.php(952): WP->main("")
    /../wp-blog-header.php(16): wp()
    /../index.php(17): require("/var/www/vhosts/casem-acmse.org/httpdocs/wp-blog-header.php")
    {main}

The short answer is that civicrm_group has nothing to do with civicrm_uf_group.  The former is actual groups, while the latter is profiles (groups of user-frontend fields).

If you have no profile with that ID, that would explain why you don't have access. The question really comes down to why you'd have a link there.


How to download a pdf instead of sending it per email? I'm sending a membership certificate attached to an email template with Drupal 7 / CiviCRM using CiviRules and PdfApi but often the emails don't reach the recipients because of deliverability issues, even though I use a professional SMTP gateway.
I'm wondering about sending a link to the pdf instead of sending the pdf attached. Is this possible knowing that members don't have access to CiviCRM, they have no User account?
Any experience with this topic?

I would just create a page and based on cid, checksum and mid using pdfapi would recreate the pdf to download (via extension)


Printer Friendly Contact Record What is the best way to setup a custom printer friendly link on each contact record? i would like to have a print button on the top of each contact record that would allow someone to view a better looking pdf version of the information on a contact record.

If you use Drupal, I'd recommend setting up a view that lays out the bits you want for your print-friendly data screen, and then use the Drupal print module to give you the print-friendly and/or pdf-generated versions.

The print module can actually generate both print-friendly and pdf-generated versions of any page (via a url trick, prefix with "print/"), i.e. you can use a url like this:

/print/civicrm/contact/view?reset=1&cid=yourcontactid

but they probably won't look very nice. You can do some customziations via the print.css file of your theme.

It's probably harder than you think, less useful, and not a good idea most of the time as noted in the comments above.


How to handle irrelevant employers we don't really want as separate contacts? So, sometimes a contact's employer is entirely irrelevant, we have basically no value in keeping that information. Or maybe there's no reason not to note it, but it's not an organization we care about.

How should we manage this type of situation? I don't really want to clutter our contact lists with all sorts of random companies just because they employ someone. Is my thinking sensible in terms of avoiding making extra contacts?

Can/should I make an employer field that is custom that doesn't require the entry to have its own contact record? Should we just accept the excessive contact records? Or should we leave employer blank whenever we don't think we want a contact record for that institution?

Basically, the employer part seems confusing. It seems it would have made more sense to just make it a simple field like any other and choose to enter employers and add the relationship in just those cases where it seemed worthwhile, and it would then make it far easier to deal with cases where we want more info, such as for people who have multiple employers and/or track their employment changes over time…

One of the distinct advantages of CiviCRM is that nobody is limiting your number of contacts.  Although there is admittedly a bit of overhead in maintaining organizations--mainly in merging different wordings and abbreviations of the same place--this is less trouble than you'd go through to prevent these contacts from being created.

Like the proverbial tree falling in the forest, a contact in your database doesn't make a sound if nobody's searching for it.  Mark your important contacts in ways that you'll find them, but a contact that's just in there as an employer won't clutter up your work unless you're making grossly over-broad queries.

(Besides, who knows if they'll end up as the employer of other contacts?  You might consider a workplace giving program.)

Most importantly, don't let the mere existence of a contact in your database signify anything to you.  Segment your data based upon location, activity, opt-ins to lists, and so forth.  If a contact is exclusively an employer of another contact, with no further information, they'll never have any of this other data--the information that you should really be basing your communications and analysis on.

In short, don't fight this core feature of CiviCRM.  It's innocuous, and it would be confusing and/or expensive to work around.


REST API and ACLs - should the API return contacts made accessible via an ACL? My REST API call returns data fine as long as the user has 'view all contacts' permission. But if I turn that off and instead grant the user access to a particular group via an ACL, I get nothing. I've confirmed that the user can see the relevant data through the UI.

Should that work? Or are ACLs not taken into account by the REST API?

Using WordPress and Civi 4.5.8.

Update 1: this issue on the forum suggests it might not be WordPress specific.

Update 2: Just to clarify exactly what I'm doing, here's the relevant part of the URL:

/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=get&api_key=xxx&key=xxx

I can get the data I want by using the API key of an admin, or if a non-admin has 'View all contacts' permission. But I get no results if the non-admin lacks this permission and only has access via an ACL. (If I change the API key I get an authentication error, so I'm confident that's correct.)

When the Contact Get REST api is triggered, I can see that the permission clause for the ACL is being generated from the whereClause() funcion of CRM_ACL_API. Here a contactId(previously passed as NULL) is fetched from the session (logged in user id) and the contact from api_key is actually not taken into account. Hence a 0 is set for ContactId and ACL permissions are not respected.


Importing Activity Error '1' is not a valid option for field custom_133 When i try and import activities I get the following error message  '1' is not a valid option for field custom_133 across all 5 activities that I am trying to import.

By a process of elimination it is the 'details' field that is causing the problem. Within that field we have a lot of free-flow text copy- paste  of emails and stuff like we have 115 similar activities to upload that therefore hunting within them to eliminate what ever is cause the problem isn't an option.

Is there a simple solution to this.

Thanks

William

What is the field type of the custom_133 field? I'm guessing it is an option group/ select list type of field. In that case, you would have to make sure that the value of the field you are supplying in the import matches to either of the option values that the field has.

HTH,
Edsel


Backdrop authentication function missing I am using Backdrop CMS 1.10.1 with CiviCRM 5.2.2 and I am having trouble with the kcfinder, when uploading and inserting images, both into CiviMail and CiviContribute.

The initial problem was a 500 error.  Based on this bit of the log,

[Thu Jul 05 16:53:47.624995 2018] [fcgid:warn] [pid 6591] [client ] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Function name must be a string in [site]/public_html/modules/civicrm/packages/kcfinder/integration/civicrm.php:67

I traced it down to this switch statement in /kcfinder/integration/civicrm.php

switch ($config->userFramework) {
    case 'Drupal':
    case 'Drupal6':
      $auth_function = 'authenticate_drupal';
      break;
    case 'Joomla':
      $auth_function = 'authenticate_joomla';
      break;
    case 'WordPress':
      $auth_function = 'authenticate_wordpress';
      break;
    }

This is missing the case for Backdrop, so $authfunction never got assigned to a string.  I tried to add a case for Backdrop, as well as the authenticate_backdrop function, but I don't know how to make it work.  First, I tried making the authenticate_backdrop function the same as authenticate_drupal, but it gives me the error:

You must be logged in with proper permissions to edit, add, or delete uploaded images.

I removed everything except the permission check from the function, so that it just looks like this:

function authenticate_backdrop($config) {
  // check if user has access permission...
  if (CRM_Core_Permission::check('access CiviCRM')) {
    error_log("There is permission.")
    return true;
  }
}

It gives me permission, and allows me to upload an image and insert it. Here is the original file with the authenticate functions for drupal, joomla and wordpress.  https://github.com/civicrm/civicrm-packages/blob/master/kcfinder/integration/civicrm.php

What is the correct way to implement authenticate_backdrop?  It is okay to just have the CRM_Core_Permission::check?

Per comments above, this bug was fixed by @herb in https://github.com/civicrm/civicrm-packages/pull/216


Neither Advanced Search nor Search Builder offer option to save as Smart Group The documentation says I should be able to save a search as a Smart Group, but I don't see an option anywhere to do so. I've used both Advanced Search and Search Builder. Neither results screen offers anything to click or select to save.

On WordPress 5.2.1 and CiviCRM  5.13.4.

In the documentation here https://docs.civicrm.org/user/en/latest/organising-your-data/smart-groups/#creating-smart-groups at step 6 it says it's a choice in the actions dropdown. If you don't see that option, check that you have CiviCRM:edit groups permission.


Weird issue when upgrading to 5.12 - errors re deleting a payment processor type I don't know why it would want to delete a payment processor type, but it did. I ended up clearing the civicrm cache again and running the upgrade again - this time with no issue.

The recent civi upgrade tries to disable some obsolete extensions during the process. This functionality was added in https://github.com/civicrm/civicrm-core/pull/13298

And from the comment posted at https://github.com/civicrm/civicrm-core/pull/13298#issuecomment-462961558, it seem it do provides a list of extensions that will be disabled.

The above error seems to be triggered when an extension related to payment processor type is disabled which in turn tries to remove the payment processor type attached to it.

Not completely sure, but this is what it seems from the backtrace shown.

UPDATE -it looks like there are 4 noted extensions which are checked by the above PR during the upgrade process.

uk.squiffle.kam, com.aghstrategies.slicknav, de.systopia.recentitems, and com.ixiam.modules.quicksearch.

If any of the extension is present on the site, it will try to disable them which throws the error on upgrade.

Note that none of these extensions are related to any payment processor.

So, it must be something in your DB which mismatches with the expected values resulting into this error. Would recommend disabling these extensions manually before starting an upgrade process.


HTML Email won't save; related to size We have an html email message that won't save and it seems related to size. if we remove a table or a few characters, we can save. But once we hit this unknown limit, we can't save a blank space. We can't make any more changes.

Anyone else run into this and know where the settings are to change this?

body_text and body_html are the fields in the database that store these values, and the are of type 'longtext', which are of size 4Gb. So you're probably not hitting this limitation.

More likely, it's your php.ini configuration that is limiting the size of your "posting" (i.e. post_max_size), or a mysql limitation (e.g. max_allowed_packet).

It's also easy to put way too much bad html into these fields, particularly if you're copy/pasting from say, Word. If you take a look at your source, you might find a bunch of html you can and should remove.


After updating civi 4.6.15 to 4.6.16 no access to contacts After succesfull updating civicrm 4.6.15 to 4.6.16 (files are installed database is updated), I find that access to contactdata in the admin side of my joomla 3.5.1 website has gone. I get a white screen, and after going back to the previous page I get an error notive that says: "Invalid Entity Filter"

I flushed the cache but that does not change anything.
At the frontend of the website I can change my contactdata and save them and get the usual okay message after that. I cannot open the samen contactdata in the backend.
I recreated the site from a backup updated again and got the same results again.

I updated another joomla 3.5.1 site with the same civi version 4.6.15 and that went without any problems.

I set error reporting to maximum in Joomla and do not get any errormessages at all only an empty white screen.

As advised in the comment below I checked the error log inside civicrm.

I got this error-message in a sea of messages:

"$Fatal Error Details = array(3) {
  ["message"]=>
  string(21) "Invalid Entity Filter"
  ["code"]=>
  NULL
  ["exception"]=>
  object(CRM_Core_Exception)#448 (10) {
    ["errorData":"CRM_Core_Exception":private]=>
    array(1) {
      ["error_code"]=>
      int(0)
    }
    ["cause":protected]=>
    NULL
    ["_trace":"PEAR_Exception":private]=>
    NULL
    ["message":protected]=>
    string(21) "Invalid Entity Filter"
    ["string":"Exception":private]=>
    string(0) ""
    ["code":protected]=>
    int(0)
    ["file":protected]=>
    string(105) "/home/--deleted--/civi/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/CustomGroup.php"
    ["line":protected]=>
    int(658)
    ["trace":"Exception":private]=>
    array(14) {
      [0]=>
      array(6) {
        ["file"]=>
        string(105) "/home/--deleted--/civi/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/CustomGroup.php"
        ["line"]=>
        int(449)
        ["function"]=>
        string(23) "validateSubTypeByEntity"
        ["class"]=>
        string(24) "CRM_Core_BAO_CustomGroup"
        ["type"]=>
        string(2) "::"
        ["args"]=>
        array(2) {
          [0]=>
          string(10) "Individual"
          [1]=>
          string(14) "Verenigingslid"
        }"

So: the code trows an exception. However I do not know why. I am logged in in the backend of joomla as superuser, so I should getaccess to all groups in civicrm, with no private execeptions???

I looks like CRM-18567 and CRM-18504

Have a look at Chris Burgess comment, there are couple of commits that seem to fix the issue.

https://github.com/fuzionnz/civicrm-core/commit/a0bcc16171d2f30c4416aeec079bab56c313390a
https://github.com/fuzionnz/civicrm-core/commit/d3e9ab21a0f2256197125854fe6312c3fa0c8c8a

I would recommend to create a backup or replicate your installation in a development environment, apply the commits mentioned and check if it solves the issue.


Is revealing Internal id a security risk? We are planning on a mail out with recipients returning completed paper forms, then we'll update Civi with the results.  This is where we have no email address for users.  On the returned form we are planning to print the 'Internal id' of the contact to allow easy update.  Is this considered a security exposure? We don't give access to contacts in Civi - only admin staff have a signon so I can't see that there would be a security problem.  But best to ask & check!

I think it is a pretty common practice - similar to the way your utility bills have their customer number on them


Approve member before payment I need members to be approved by admin before they pay their membership. How do i do this?

I have setup membership levels and created the contribution page but I can not find any option for approve member before payment process. Do I need to create a free member and approve them? but then how do the system sends payment after I approve them? Do you know if there is anything that I can setup to do that?

You can proceed with the below steps -

Create a pay later contribution page for membership.
Let user register for membership using pay later. So Each Membership here would have a pending status.
Create a searchable custom field for Contribution Eg Approved? with Yes No Field values.
Set this to yes on editing contribution record for those you want to approve.

Completing the Pending Payment (If you're using above 4.7 version)-

Navigate to Administer -> CiviContribute -> CiviContribute Component Settings (civicrm/admin/setting/preferences/contribute?reset=1).
Check Enable Deferred Revenue option and set the Default invoice payment page. Record its page id(you can find it in Manage Contribution Pages where ids are shown for all of them).
From Find Contribution search for all whose Approved field is set to yes.
Select an action to send them an email mentioning the following URL.

http://<site_name>/civicrm/contribute/transact?reset=1&id={page_id_from_step_2}&ccid={contribution_id_token}

Using this url, users will be able to complete their payment and Pending Membership would be updated to New.


How can I create a list of the contacts in a household? How can I create a list of the contacts in a household?  What I want to see is which contacts are currently in a household.  I also cannot see how I can add a person to an already established household.

I assume you are using Relationships to connect individuals to their Household. So if you start from the H/h or from the Individual you should be able to go to the Relationship Tab and click Add Relationship.

On the Rel. Tab of the H/h you should also see any Individuals already related to it.


CiviMail Alternative Outbound Mailbox/From Address We are using CiviMail, but I'm a bit confused on the purpose of the FROM field when sending mailings. We have about four different email addresses set up in the CiviMail From Email Addresses screen, all with the same domain for different administrators. However, no matter which FROM address is used, all the sent mail uses the same mailbox for sending. So when we look at our sent items folder, even if we used a different email address in the FROM field, it still uses the default mailbox.

Is it not possible to use the mailbox associated with the FROM address when sending mail using CiviMail? Or will it always use the mailbox that is specified in the Outbound Mail screen, no matter which FROM address is specified?

EDIT:

Just for clarity, in our Outbound Mail Settings we have selected SMTP not mail(). Not sure if this makes any difference.

is it not possible to use the mailbox associated with the FROM address when sending mail using CiviMail?

It is possible to send email using different from email address. The expected behaviour is that the email address you choose when composing a CiviMail is the email address that appears to the recipient in their email client.

It sounds to me like your SMTP service is rewriting the from address before sending the mail. That might be because the SMTP credentials you have supplied are only to be used to send email from that specific email account (in which case, it is not particularly well suited for use as a CiviMail mailer).

You might want to check with the email provider to see if that is the case. Or run a test using a different mailer in 'Settings - Outbound Mail'  (e.g. 'Mail', or 'Redirect to database') and see what the From addresses look like when sent using these methods.


How do I put saved searches or smart groups as menu options in WordPress? Is it possible to make custom searches (smart groups) available from the custom menu. For instance, I am tracking elections (organizations) with custom fields for special elections, open races, candidates by district etc. Would like to make it easy to search from the menu for all open races, all members of the U.S. Senate etc. Is the only way to put custom searches on the menu to learn .php and create a custom search page on the backend?

!]1

You could generate report using the Smart Group as your filter and save that report.  The report can be used as a dashlet which is available upon login or you can have it emailed to you as well.  More dashlet info is here:

https://docs.civicrm.org/user/en/latest/events/reports/


word replacement with accent "Événement" by "Missions et PAD" not working but word replacement is OK I try to replace the Menu Title "Événement" by "Missions et PAD". But it is not working.
I tried different word replacements and they are working well. Is it due to the accents ? to a bad coding ?
I am using CiviCRM for wordpress.

For word replacements you often have to use the english word as the original word, so you would put:

Events => Missions et PAD

For menu entries you can also edit it at Administer - Customize Data and Screens - Navigation menu. Right-click on Events and edit it to change the title.


CIVICRM with MYSQL encrypted on ecryptfs I managed to have CIVICRM (5.15.2 on WP 5.0.7 on Ubuntu 18) running on MySQL (5.7.28) from an encrypted mount via ecryptfs.  Currently only the mysql files are in the encrypted mount and it's running a few days now and all seems good.  I would like to check whether there are experiences from similar setup and whether there would be issues to anticipate ?  Thanks.

Linking to your other question which is similar but slightly different since it's about using encryption that's natively supported by mariadb: Civicrm on mariadb with data encryption.

For this question, I have used a similar tool encfs once for a non-civi setup to put the mysql files on an encrypted partition and it worked fine but the problem I had was the same as in the other post, that it partly defeats the purpose if you have to store the keys/password unencrypted on the same server, or else you can't do unattended reboots. It's a trade-off.


How do I duplicate a mail template I have an existing email template I have made and now I want to repurpose it for another use while keeping the basic layout. How can I duplicate my original template please?

You can click on the button to display the source code and then copy all.

Open a new template, click on the (same) button to display the source code, and paste what you have copied. Then click on the button again, and voilá, you have copied an email template!


How to alter the InvoiceID/ContributionID count I'm wondering if is possible to alter the current Contribution_ID start count.

The invoice prefix is set to "INV" so when viewing a contribution I can see the invoice ID like INV76, I guess the ID comes from the contribution_id which matches with invoice_id in any single contribution. I would like to alter the current count so the next contribution_id starts with for example 4076.

Resuming, my target is to change the count of the invoice_id so it matches with our current invoices count (right now is about 4356) as we would like to use this fantastic CiviCRM feature.

Any help is appreciated.

CiviCRM 4.6.X Wordpress 4.3

You want to change the auto-increment number:

ALTER TABLE civicrm_contribution AUTO_INCREMENT = 4356;

Note that this is very dangerous if you set the number backward rather than forward.


Contribution Widget Not Displaying Properly I am running Drupal 7 and CiviCRM 4.7.1.  Since upgrade, my contribution widgets are not displaying properly, they just show placeholder.  I was able to recreate the issue in the sandbox.

Console shows the following error: ReferenceError: jsondata4 is not defined

At a loss of where to search next.  Thought it might be related to modsecurity or .htaccess, but since the sandbox experienced the same issue, not so sure anymore.

Suggestions please...

Thanks to Marty Wright for reporting the bug and providing a solution.

https://issues.civicrm.org/jira/si/jira.issueviews:issue-html/CRM-17965/CRM-17965.html

The widget code generated for a contribution page fails trying to retrieve the json page data from the server. The output from http:///sites/all/modules/civicrm/extern/widget.php is:

Fatal error: Call to undefined function drupal_add_http_header() in //sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 789

This happens because Drupal is not booted when extern/widget.php runs, and CRM_Core_Page_AJAX::setJsHeaders() calls CRM_System_Utils_Drupal::setHttpHeader() which attempts to call drupal_add_http_header().

To reproduce on the demo site:
Enable the widget on the "Help Support CiviCRM!" contribution page.
Find the javascript source url at the bottom of the generated code:
http://dmaster.demo.civicrm.org/sites/all/modules/civicrm//extern/widget.php?cpageId=1&widgetId=1&format=3
Copy and paste the url into a browser to view what should be the json output, but instead:
Fatal error: Call to undefined function drupal_add_http_header() in /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 789

To fix the problem, I added a call to loadBootStrap() in CRM_System_Utils_Drupal::setHttpHeader()

  public function setHttpHeader($name, $value) {
    self::loadBootStrap(NULL, FALSE);
    drupal_add_http_header($name, $value);
  }


Smarty and future proof code I am trying to be a more conforming civicrm coder.

Smarty used by civicrm for pages (and forms?)

I have never used Smarty.. Is it going to be part of civicrm going forward? And are there any tips for writing good future proof smarty?

Going forward, much of the Civi UI will be written in Angular. However at least 95% of the application uses Smarty and it's still a perfectly acceptable way to mark up a form or page.

Depending on your use case you may be able to create an Angular page for what you want.

If you are writing an extension, you can try both. Use civix generate:page or civix generate:form to create traditional smarty-based pages & forms. Or try the newer civix generate:angular-* commands for the alternatives.


CiviCRM Dasboard Disappeared Since updating to WordPress 5.5, my CiviCRM dashboard is gone and the "Configure Dashboard" link does nothing. Also, all of my menu bars are gone. My data still seems to be there, but the top bar menus to access and manipulate them are gone.
Is this a common issue, or has something gotten screwed up in translation?

Try adding below lines into end of civicrm.settings.php file
global $civicrm_paths;
$civicrm_paths['civicrm.root']['path'] = '/path-to-wordpress/wp-content/plugins/civicrm/civicrm/';
$civicrm_paths['civicrm.root']['url'] = 'http://sitename.org/wp-content/plugins/civicrm/civicrm/';


User and Permission table distorted in Civi/WP I'm trying to configure Civi 4.63 on WP 4.2.2. and the rows for the users and specific permissions don't line up. I tried expanding the Permissions column to be a single line (like the User columns) with no luck. Here's what I get:

I'm new at WP, but this was a whole lot easier in Drupal.
Any advice will be much appreciated.

Slightly hacky way around it: zoom out. In Chrome that's CTRL and -.


Problem using CiviMail with Bluehost CiviMail likes to use VERP for bounce processing, but it looks optional because there's a checkbox for it on CiviMail Component Settings (where is the documentation for this screen??). Bluehost doesn't support VERP, but I found this thread, which explained how to comment out two lines in smtp.php. I did that and email blasts work now, but I did a test with a bad email address and it didn't bounce.

Can anyone explain the ramifications of commenting out those two lines? Will this ever work on a host that doesn't support VERP? Where is the documentation for CiviMail Component Settings? Thanks much in advance...

VERP is not optional in CiviMail, the two lines you comment out are the one needed to be able to identify who was the recipient, so if it bounces, Civi can identify it properly.

If you don't process bounces, you will not know if an email is invalid, and you will keep sending emails to invalid emails. It's something mail servers really don't like, and one of the sure way to get you categorised as spammer and blacklisted.

If you have developer skills or budget, you could add a feature to handle the bounces not based on the email the bounce returns to (VERP), but on an extra field added to the header as discussed here

However, switching to a better mail server is usually a cheaper alternative than developer's time, especially if the result is likely to be less efficient as identifying bounces.

As for the civimail component setting:

Track replies using VERP in Reply-To header
- If checked, mailings will default to tracking replies using VERP-ed Reply-To.

It isn't about bounces (not having VERP isn't an option), but for what's happening when a recipient replies: should it go directly to civicrm and be processed there or should it bypass civi and go directly to the inbox of the sender?


how to fix 'Warning Error loading module file (). Please restore the file or disable the module.' error message? I'm using civicrm 4.5.5 in drupal 6
I enabled tracing to explore another problem and when I removed the defines in the settings.php file that setup the query logging, this error appeared.

How do I get rid of it?

Visit your Extensions page @ civicrm/admin/extensions?reset=1.
Click Refresh.
If visible, uninstall the extension which is currently not found.
Worth trying Cleanup Caches too @ civicrm/admin/setting/updateConfigBackend?reset=1


URL for cron Jobs gives me a 404 error I'm attempting to run all my jobs using the URL Method. The URL I'm trying (anonymized here of course) is:

https://mysite.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=MY_USERNAME&pass=MY_PASS&key=MY_SITE_KEY

Visiting this URL gives me a 404 error.

To test that cron runs at all on my server, I created a simple php script,

<?php
mail ("cron@mysite.org", "Cron is Go", "Hello World from my-cron.php!");
?>

and put it in a file my-cron.php. It sends me an email when visited. I then created a cron job to curl its url every minute. It worked in every directory I moved it too until it got to bin at which point the cron job did nothing and visiting the URL in browser gave me a 404 error.

Changing the permissions on bin from 0775 to 0755 allows the script to run. I thought that the jobs URL would work, but I still get a 404 error.

Update: I changed bin from 0775 to 0755 and cron.php to 0755, and it works now. Is this safe to do?

Two answers:  First, yes, changing the permission should be safe to do.  Note, however, that you'll have to repeat this process every time you upgrade.

Second - this isn't a normal restriction, so I'm guessing you're running CiviCRM on shared hosting.  The change you described removed the "group owner can write to this file" permission of cron.php.  You did NOT change who could read or execute the file - so this shouldn't have had an effect.


MyISAM vs InnoDB - WordPress Installation We're running CiviCRM 4.6.8 on WordPress 4.3.1.

I've been getting the following error message since the last CiviCRM upgrade:

  Warning Your database is configured to use the MyISAM database engine.
  CiviCRM requires InnoDB. You will need to convert any MyISAM tables in
  your database to InnoDB. Using MyISAM tables will result in data
  integrity issues.

The site is on a shared server, so I can't change the storage engine unless we move the website to a VPS package.

Does it matter? Should we fork out the $ for a VPS? Migrate elsewhere?

To speak to the worth of a VPS -- yes, it is worth the money to use a VPS instead of shared hosting when CiviCRM is involved.  Certainly, you get the benefit of controlling your server environment for things like database engine changes, but perhaps the biggest benefit you will see is increased performance. The shared environment may work in the short term, but as your database and needs grow, I suspect you will hit limitations with your hosting.

See this question for reference: Choosing a VPS solution for CiviCRM


Why is Microsoft Edge autofilling disabled fields on my Webform CiviCRM? We're struggling with a complex Webform that is auto-populating the wrong values into some text fields in Edge browser. The text fields are pulling data (phone number, email, address) from an existing Company Contact - and if those values are NULL in CiviCRM - Microsoft Edge happily populates these fields with previously seen but completely irrelevant and incorrect phone number, email and address.

We've since reproduced this on a number of sample forms.

Some illustrations - this is Chrome [Semper IT - with phone has a phone number in the CiviCRM database; Semper IT - no phone does not]. The yellow fields are the auto-fills from Chrome

And here's what Microsoft Edge does with this exact same form (apparently I live in Edmonton now). The blue fields are the auto-fills from Microsoft Edge. Thank you Laura for the screenshot!

I found the answer in a post on the Miscrosoft developer forum:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9847360/

Some of the 'highlights':

From Microsoft:
“In IE11 and Edge, we made the decision to ignore autocomplete=off”

From a developer:
WHAT !!! ???
That’s why we are receiving so many UI complaints recently. This is a terrible decision Microsoft.
Please STOP breaking Edge by NOT supporting standard HTML correctly.
Edge should honor the autocomplete="off" tag.

And from another one:
“By Design” doesn’t mean that the functionality is correct. I’m struggling with a complex web form that is auto-populating the wrong values into some text fields in Edge browser"


What is 'object_table' and 'object_id' in Acl API? I am not understanding the meaning of 'object_role' and 'object_id' in ACL API. I was trying to manage ACL using CiviCRM API 3.

Object table is the type of data the ACL is operating on.

For eg: if you want to create an ACL which grants permission for an event - object table, in this case, will be civicrm_event.

Object id is the id of the event to which the permission is applied to. An example of API which uses these two params could be -

$result = civicrm_api3('Acl', 'create', [
  'object_table' => "civicrm_event",
  'object_id' => 2, //event id, 0 for all events.
]);


Birthday block in Drupal without deceased and deleted contacts I found a piece of code to show a birthday block in Drupal.
Had to modify it a little bit to get it to work with the current versions.
But I noticed that deleted or deceased persons were still showing up in this list.
I don't know the correct code for this. Could someone please fix this code for me and others that are wanting to use this code?
My php / mysql skills are not enough but I think it must be something like:      $sql = "SELECT * FROM civicrm_contact \n"
        . "where is_deceased = false";

    <?php
// Check if CiviCRM is installed here.
if (!module_exists('civicrm')) return false;

// Initialization call is required to use CiviCRM APIs.
civicrm_initialize(true);
require_once('CRM/Core/DAO.php');

$query = "SELECT id, display_name, birth_date, CONCAT(((RIGHT(birth_date,5)
< RIGHT(CURRENT_DATE,5)) + YEAR(CURRENT_DATE)), RIGHT(birth_date,6)) AS bday,
concat(concat(month(birth_date), '/'), day(birth_date)) as displaydate,
(TO_DAYS(CONCAT(((RIGHT(birth_date,5) < RIGHT(CURRENT_DATE,5)) + YEAR(CURRENT_DATE)),
RIGHT(birth_date,6))) - TO_DAYS(CURRENT_DATE)) AS toBday FROM civicrm_contact WHERE
(TO_DAYS(CONCAT(((RIGHT(birth_date,5) < RIGHT(CURRENT_DATE,5)) + YEAR(CURRENT_DATE)),
RIGHT(birth_date,6))) - TO_DAYS(CURRENT_DATE) < 7) ORDER BY bday, RIGHT(birth_date,5);";

$params = array( );

$dao =& CRM_Core_DAO::executeQuery( $query, $params );

echo "

\n";
while ( $dao->fetch( ) ) {

echo "
id . "\">" . $dao->display_name .
", " . $dao->displaydate;

echo "
\n";

}
echo "

\n";

?>

Try this query (the only difference being the WHERE clause):

SELECT id, display_name, birth_date, CONCAT(((RIGHT(birth_date,5)
< RIGHT(CURRENT_DATE,5)) + YEAR(CURRENT_DATE)), RIGHT(birth_date,6)) AS bday,
concat(concat(month(birth_date), '/'), day(birth_date)) as displaydate,
(TO_DAYS(CONCAT(((RIGHT(birth_date,5) < RIGHT(CURRENT_DATE,5)) + YEAR(CURRENT_DATE)),
RIGHT(birth_date,6))) - TO_DAYS(CURRENT_DATE)) AS toBday FROM civicrm_contact WHERE
(TO_DAYS(CONCAT(((RIGHT(birth_date,5) < RIGHT(CURRENT_DATE,5)) + YEAR(CURRENT_DATE)),
RIGHT(birth_date,6))) - TO_DAYS(CURRENT_DATE) < 7) AND is_deceased = 0 AND is_deleted = 0 ORDER BY bday, RIGHT(birth_date,5);


CiviCRM Dashboard not working (as reported by Karl Rudnick) I am waiting for the answer to Karl Rudnick's question.  In my case I was on a clean new install of 4.7.12 and ran an automated upgrade of the "volunteer" extension.  The dashboard then shows the same as Rudnick's only with 4.7.12 as the version instead of 4.7.14.  After that I upgraded CiviCRM to version 4.7.14 hoping to solve the problem.  No luck.  I then disabled all CiviCRM extensions (volunteer, booking, and dependencies) since I was not using them.  That had no effect either.  Clicking on the "Configure Your Dashboard" has no effect.  All other functionality within CiviCRM still works and the dashboard was never important to me anyway but the future looks gloomy when something is all screwed up.

The requested page "/welcome?prot=1&ver=4.7.12&uf=WordPress&sid=c4498a5126be0e5320b4c7260613feb0&lang=en_US&co=1228" could not be found.

This problem has "gone away".  I have to assume that it was related to something in a cache somewhere, either in my browser or on the website.  I tried clearing both in the usual ways before, when there was a problem.  Now, two days after the last time I accessed the site it seems to be working correctly.


How do I edit activity forms? I find that in many case some of the default fields on activities are not relevant. what's the best approach to editing the templates so that I can control what fields appear on activity forms?

Graham, there are loads of tutorials on how to use jQuery. The CiviCRM approach would be:

Identify the ID of the field to hide using FireBug (or the inspect element function of your browser)
Add a template with the jQuery required to hide the identified id's which will be something like this:

{literal}

    cj(document).ready(function() {
      cj('#firstTestID').hide();
      cj('#secondTestID').hide();
    });

{/literal}

Add a hook in an extension to add the template with your hides to the template with something like this statement:
        CRM_Core_Region::instance('page-body')->add(array('template' => 'GroupProtect.tpl')); OR add the jQuerys to a .extra template (in the documentation https://wiki.civicrm.org/confluence/display/CRMDOC/Page+Templates)

Does this help?


help on wordpress for send mailling I want to send mailling with civcrm and it doesn t work

i resume :
i install wordpress, i install civcrm for wordpress extension and i install mosaico extension too
ok no problem

in wordpress -> i try to send a mail : Menu > contacts > New mail ... it's ok no problems the mail be sended
but when i try : menu : Mailings > New Mailing ... don't work

can you explain me the process please

thanks

You mention installing the Mosaico extension - assuming you're installing Mosaico 2.0, you also need to install the FlexMailer and Shoreditch extensions.  Please install those and try again.


Soft credits created via API/hook_civicrm_post are automatically deleted in Civi 4.6 I have a custom extension "Automatic Soft Credit", which replicates a function from Raiser's Edge - if contact A has the relationship "Automatically Soft Credits" to contact B, then any contributions for contact A will automatically be soft credited to contact B.

In Civi 4.4, this function worked fine.  In Civi 4.6, the soft credit is successfully created - and then immediately deleted!  The $result below returns success, but the soft credit isn't in the database - but the auto-increment happens, so it seems to be created then deleted.

After some experimentation, I found that if I try creating a soft credit to a DIFFERENT contribution, it works.  Confusing!

What could be happening after hook_civicrm_post that would cause a soft credit attached to the contribution to be deleted?

function automaticsoftcredit_civicrm_post( $op, $objectName, $objectId, &$objectRef ) {
  if($op == 'create' && $objectName == 'Contribution'){
    $cid = $objectRef->contact_id;

    //Look up whether this person has a relationship_type_id that's automatically soft credited
    $params = array(
     'version' => 3,
      'sequential' => 1,
      'contact_id_a' => $cid,
      'relationship_type_id' => 11, //FIXME: This relationship_type_id is currently hardcoded, we should load it from settings
    );
    $result = civicrm_api('Relationship', 'get', $params);
    //if we have the auto soft credit relationship for one or more contacts, create a soft credit for each
    if($result['count'] > 0) {
      unset($params);
      foreach ($result['values'] as $relationship) {
        $params = array(
          'sequential' => 1,
          'contribution_id' => $objectId,
          'contact_id' => $relationship['contact_id_b'],
          'amount' => $objectRef->total_amount,
        );
        $result = civicrm_api3('ContributionSoft', 'create', $params);
CRM_Core_Error::debug_var('result', $result);

      }
    }

  }

This is to do with code introduced in CRM-16804, and is specific to soft credits.  It's not a generic API issue as I'd feared.  I'll update this answer with a more complete solution once I've nailed it down.


Can CiviCRM provide a warning/error if a user submits a certain organization name as their current employer? We've had a long standing issue with our users entering in Catholic Charities as their organization name when registering for events, making donations, etc. It's caused havoc in our system as we will have many people associated with the Catholic Charities record, instead of their appropriate organization (e.g. Catholic Charities of New York). We've used the auto complete extension to show users a set list of organizations they can choose from, however we still get people simply typing in Catholic Charities, despite our best efforts (we still allow people to put other organization names, because people outside our network sometimes register for certain trainings, make donations, etc). Is there a way for the system to throw back a warning/error to the user and/or force them to change their organization name if it detects Catholic Charities was input as the value?

The exact behaviour you describe would be possible but will have to be custom development. It would be specific to your organization and website.

However I do think you will be able to achieve something like what you want with the CiviRules extension. You would be able to 'catch' the new contact as a trigger (individual is added) and use the field value comparison condition to check the value of the current employer  (or alternatively catch the new relationship Employer of). CiviRules would allow you to then create an activity for a team member, alerting him/her to the problem. It is not perfect, but sounds like an alternative without custom development.

You can find the CiviRules extension here: https://civicrm.org/extensions/civirules and documentation about CiviRules here: https://docs.civicrm.org/civirules/en/latest/


Department/Team/Franchise Setup I'm trying to figure out how to divide people up and group them organizationally.  Adding each person to an organization and creating a relationship is easy.  However, I need to break them down further than one top level organization.  I'll use the word team for generalization.  Most of my searches have ended up back in the '07 discussion on sub-organizations, and to some degree that's what I need.  However, 9 years later, it still seems unclear.  So, what am I missing?

Org has departments.  Departments have teams.  Teams can have sub-teams.  Each level also has roles, which easily fits into a relationship.  (Org has President, Department has VP, Team has Team Leader and team member, etc.) Each level has it's own set of documents, cases, workflows, etc.  (A new team has a Case with a timeline of "New Team", each team has a goal document, each department has a set of protocol documents, the org has overarching protocol documents, etc.)

Without being able to nest Orgs, or a massive amount of manual adjustment with each change, how do I show that Team Member C, on Team D, which is part of Department G, is an employee of Org?  Also, each contact needs to have a membership to the org.

Confused yet?

It sounds like departments, teams, and sub-teams could be set up as contact sub-types of the organization contact type, possibly with custom relationships between each that are intuitively named, as described here:

https://civicrm.org/blogs/mjpforsberg/using-contact-subtypes-clutter-free-life

The hiccup with that setup might be trying to reliably get memberships to attribute from the parent organization through those relationships to the individual contacts themselves.


CiviEvent multiple participant registration does not save all field values to contact I've come across a weird problem while trying out the CiviEvent participant registration that I would like to share with you and hear your thoughts.

Here is the scenario:

So, I created an event in CiviCRM and turned on the online registration option. Under the Registration tab, I enabled 'Register multiple participants' checkbox leaving the 'same email address?' checkbox unchecked. Basically, I'm allowing a participant to register one or more participants each having a different email.

I would like to save the first name, last name, and email. I do this by defining a profile and adding it into CiviEvent event registration form. Below is a screenshot of that:

The profile exposing these fields is called "Event Registration Personal Information" and is defined like this:

The problem:

When a participant registers himself and/or another participant, the contact is successfully created within CiviCRM. All fields exposed from the profile are filled with the corresponding data except for the email address. Within each contact, the email address field is therefore empty. I tried switching the email type from "Billing" to "Primary", but sadly still received the same result.

Since I use WordPress, I wanted to test the profile and see if that's the problem by adding it as a standalone form using the CiviCRM WordPress shortcode. Upon submitting the form, the contact has been created successfully and all data is saved including the email. This means that the problem does not come from the profile itself, but from the CiviEvent module.

This leads to my question: Am I using the CiviEvent module incorrectly or did I miss some option? Did any of you encounter the same issue?

I am using CiviCRM version 4.7.31

Edit:
For some reason, when disabling the 'Register multiple participants', the problem still persist.

I think I have found the solution to my problem. I'll post this here in case someone ever stumbles on the same problem.

When configuring the profile that you would like to use for the event registration form, be sure to not set the e-mail type (category) to "Billing". If set, the email will not be saved to the contact (no idea why).

All other e-mail categories seem to work fine (e.g. "Primary" or in my case "Main").


Merging only records in a Group i wanted to just merge records that are in a Group.  But the documentation seems to indicate that the records that will be flagged as duplicates will be from where at least 1 of the record is within the Group.  How can i configure to flag pairs where both records are from the designated Group?  Thanks.

CiviCRM: 5.10.4
WordPress Version: 5.0.9

A way to achieve this would be to create an ACL that limits records to that group and then assign that ACL to a user and they will only see those records to dedupe.


CiviMail not finding Recipients I am using Civi 4.7.27 on Wordpress 4.9.  Today while trying to compose a new civimail message, I noticed that the recipients field is not automatically finding recipients like it used to.  We recently upgraded to the latest version of both civi and wordpress.  Is anyone else having this problem?  See screen shot for details. I hope someone can tell me what I need to do to resolve it.

Thank you

Problem solved.   After installing the civi upgrade, I needed to flush the cache by going to Administrater/System Settings/Clean up Caches and Update Paths  then click the Clean Up caches button.  The issue was resolved immediately after doing that.


User Sync error when new user registers on behalf of a business I am using wordpress 4.9.5, CiviCRM 5.0.2 and CiviCRM WordPress Member Sync 0.3.5.
When a new user signs up, and selects register on behalf of an organization. The user role does not sync, stays at the base level.  If the user does not select this option, the sync works as configured.

I have double checked mappings, and they are all correct.

When someone contributes on behalf of an organisation, the membership is applied to the organisation, not to the individual. By default, CiviCRM WordPress Member Sync (perhaps incorrectly) creates a user for the organisation and then applies the appropriate role based on the membership in question. You can override this behaviour (i.e. cancel creating the organisation user) by using the civi_wp_member_sync_auto_create_wp_user filter:

https://github.com/christianwach/civicrm-wp-member-sync/blob/master/civi-wp-ms-users.php#L603-L612


How do I find the web root in civicrm.settings.php? I'd like to set

$civicrm_setting['Directory Preferences']['extensionsDir'] =

to a files directory relative to the web root. How do I do that?

The easiest way to set those is using Civi::settings()->set('......').

In the UI it is Administer/System Settings/Directories.

Is that what you are looking for?


CiviCRM Spark trial and pricing? Am I missing something obvious, or is there nothing in the CiviCRM Spark sign-up process that says what the billing period is? It says 'CiviCRM Spark Hosting - $ 9.50' and that it'll renew automatically, but not how often. Does anyone know? I'm guessing monthly, but would need to know before trying it. Or even better, is there a free trial somewhere that I can't see?

Looks an interesting service and will suit many and certainly a good way of getting started. I can't see a contact email for the service or a list of the extensions included. I think I've probably already grown beyond this service as I am using a few extensions, but had it been there when I started, it would probably have been quicker that getting it going on another hosting provider.

But to answer you question - it does look to be monthly - see the T&Cs linked from the signup page (direct link https://civicrm.org/spark-terms-and-conditions).


PayPal recurring payments are in pending state How do I get PayPal Express recurring payments to be recorded correctly? They are in pending mode. No error in ConfigAndLog that corresponds to the processing time. It uses PayPal Express, there is no email configured (which seems to be the most common response to this error). There is a user name + signature option.

Non-recurring payments are going through OK. No details recorded against the recurring ones.

CiviCRM 5.14.0

PxPay Recur Payment gets stuck in pending mode
Paypal payments - Pending (Incomplete Transaction)

From my experience, PayPal Express and PayPal Payments Pro have always conflicted with Civi.  PayPal Standard works fine for both recurring and one-time payments, but the other two options do not work for recurring payments.  My organization went back and forth with PayPal over this issue for months.  Then we tried to fix it on our end with zero positive results.  We finally concluded  based on what others said in this forum that other than PayPal Standard, most PayPal options are not compatible with Civi.  We now take our credit card payments with iATS, which is specifically designed to work with Civi and also have the option of using PayPal Standard if the user prefers it.


How can I find members I would like to know if it is possible to find a person on the database only with the CIVI number, and how can I do it?

You can also just click in the search bar at the left of the Civi menu and select "Contact ID".


CiviRules Issue with Smart Groups I am trying to use CiviRules to give a membership to contacts automatically when a contribution is added. I have a Membership smart group to filter members and non-members but getting an error when the rule is running when a contribution is entered. See attachments. Any help would be greatly appreciated. Drupal version 7.59, CiviCRM version 5.3 and CiviRules version 2.1

It is an error to do with the menu configuration. It should definitely not be there it will not stop CiviRules from executing your action. So the error lies somewhere else.


Different Result in Code Than API Explorer I am trying to get data out of the API and when I look at it in API explorer I find what I am looking for but the data is incomplete in my module.

For example, I am using civicrm_post($op, $objectName, $objectId, &$objectRef) and I know this is working because I have if ($objectName != "Case" || $op != "create") and my code in the if is firing.

    civicrm_initialize();
$result = civicrm_api3('Case', 'get', array(
          'sequential' => 1,
          'id' => $objectId,
          ));

Here is the result from the API call in my module:

Array

(
    [is_error] => 0
    [version] => 3
    [count] => 1
    [id] => 352
    [values] => Array
        (
            [0] => Array
                (
                    [id] => 352
                    [case_type_id] => 5
                    [subject] => Test Case Subject
                    [start_date] => 2017-07-24
                    [status_id] => 4
                    [is_deleted] => 0
                    [contact_id] => Array
                        (
                        )

                [client_id] => Array
                    (
                    )

                [contacts] => Array
                    (
                    )

                [activities] => Array
                    (
                    )

            )

    )

)

Here is the result from the API Explorer:

{

"is_error": 0,
"version": 3,
"count": 1,
"id": 352,
"values": [
    {
        "id": "352",
        "case_type_id": "5",
        "subject": "Test Case Subject",
        "start_date": "2017-07-24",
        "status_id": "4",
        "is_deleted": "0",
        "custom_70": "IL",
        "custom_72": "Peoria County",
        "custom_76": "1",
        "custom_78": "2",
        "custom_92": "Farmers",
        "custom_100": "1500943386-26151211",
        "custom_95": "Test",
        "custom_96": [
            "1"
        ],
        "custom_97": [
            "1"
        ],
        "custom_98": [
            "1"
        ],
        "custom_99": [
            "1"
        ],
        "contact_id": {
            "1": "9025"
        },
        "client_id": {
            "1": "9025"
        },
        "contacts": [
            {
                "contact_id": "9025",
                "sort_name": "Applications , Test",
                "display_name": "Test Applications",
                "email": "test@aplications.com",
                "phone": "",
                "birth_date": "1919-04-04",
                "role": "Client"
            }
        ],
        "activities": [
            "21781",
            "21782"
        ]
    }
]

}

Any help is appreciated.

Thanks,
Josh

At the point hook_post is called the timeline (activities) hasn't been created and the association with the client (CaseContact object) hasn't either.

See https://github.com/civicrm/civicrm-core/blob/master/CRM/Case/Form/Case.php and https://github.com/civicrm/civicrm-core/blob/master/CRM/Case/Form/Activity/OpenCase.php


Exporting Notes for Contacts Resulting in Incomplete Notes So I'm new to using CiviCRM and I'm having some difficulty exporting my contacts properly. More specifically, I am unable to export all of the notes from a few of the contacts. I have been using the Select Fields for Export option and have selected several fields, including the Notes field. When I open the resulting CSV file I have found that only a few of the notes were actually exported. The notes are quite extensive (the person who made them originally wrote mini-novels on each contact) and, from what I have read online, this causes a problem. From what I have gathered it looks like the notes cut off when they reach some sort of a character limit. My question is: is there a way to export all of the notes, in their entirety, without loss of information, or is there some sort of a "hidden" character limit for fields?

There are 29 more for this contact alone.

I've blurred the actual text for confidentiality.

Thanks for any help.

You should be able to do so by using API directly. cf. https://yourdomain.org/civicrm/api/explorer and use Entity = Note and Action = get

If you want to have it in a csv format, you could use the command line script provided in CiviCRM bin/csv/export.php

You will find the information about this script here : https://civicrm.org/blog/xavier/new-tools-to-automate-the-configuration-and-stagingproduction-migration

So you should be able to do what you want we a command line like :

php /full/path/to/bin/csv/export.php -u"user" -p"password" -s"yourdomain.org" Note > notes.csv


Best way to extend group functionality I have a requirement to extend change add/edit screen of static group and add some extra fields there, like default email subject.

For saving extra fields I'm thinking about adding a new table, linked to groups table.

Then to display those fields I will need to create my own version of CRM_Group_Form_Edit.

Now I'm thinking what is better way to do all this, 2 options:

put required classes and templates in custom folder and change them. Looks like this is standard way.
instead of editing CRM_Group_Form_Edit I could create my own class then
change CRM_Group_StateMachine to point to that class which would extend
CRM_Group_Form_Edit

2nd option kind of sounds a better way thinking about feature upgrades.

are there same case scenarios when to use what? or any other suggestions for this requirement?

Any reason why you cannot use a custom set that extends groups? This allows you to add various fields to civicrm_group which appear in the add/edit screen of all groups

You can select "Groups" in the "Used For" selection here:

http://d46.demo.civicrm.org/civicrm/admin/custom/group?action=add&reset=1


Any way to catch the user hitting "cancel" or close on Print/Merge form - as activity list does not refresh? The particular issue I am trying to deal with is that the print/merge form (Export Document on Manage Case) does not refresh the civiCase activities list.
This is because the user never "saves" this form, but only "cancels" it (or closes it) so there is no interaction back at the main civiCase caseView.
Any ideas for a solution to this problem?

Good question. You can turn off popups but that doesn't fully solve it since it still stays on the page, but then at least there isn't a mismatch and when you click Cancel you can go back to Manage Case and it shows the activity.
To turn off popups go to Administer - Customize - Display Preferences and there's a checkbox "Enable Popup Forms" near the bottom.


Warning: getimagesize() error profile picture Happy new years all!

I'm having problems showing images uploaded to a profile.

While editing a profile I can upload an image, but upon loading the profile page I get the following error across the top of the page (directory redacted here)

Warning: getimagesize(…photo=Mateusz_Pozar_da0ef7da9ecd68e909817e2c733e0d79.jpg):failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in …wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/View.php on line 164

The line in the php file is:

list($imageWidth, $imageHeight) = getimagesize(CRM_Utils_String::unstupifyUrl($image_URL));

Trying to open the image directly via "show image" on the profile page I get a 404

The requested URL /civicrm was not found on this server.

The specified directory for uploaded images is plugins/files/civicrm/custom/ and I can see the four images I've tried uploading and they look fine when opened directly.

Could this be caused by a too big or heavy image?

I'm running WP 4.4 and CiviCRM 4.6.6

Cheers / M

It sounds like there's a settings mismatch.  Check the values of "Image Directory" on Administer menu > System Settings > Directories and "Image Upload URL" on Administer menu > System Settings > Resource URLs.

If the two look correct, please update the original question with the values so we can see them.


Display nth payment of a recurring series? Is there any way to display "nth Payment" of a recurring series? I am looking for a way to display with a contribution and/or line item result that this is the 3rd, 4th, 5th payment in the recurring series. I can work with either a civi report or a Drupal View.

I was able to do this with a Drupal View and adding the Views Aggregator Plus module.
I created a view using Contributions. The format was Table with Aggregation Options.
I added the  Filter Criteria and Fields that I wanted to display.
In the Format:Settings--

I "grouped and compressed" the Recurring Id field
"Count" the Contribution ID field (this column is labeled # of Payments)

So my view displays the Recurring Id with the # of Payments


Civimail and Sendgrid limitations and scalability? Is anyone using Civimail with Sendgrid on a large scale? We have successfully used Civimail for newsletters and it seems to work well. However, on the Sendgrid website they say the SMTP is limited to 100 messages per connection and 1000 recipients. Does his mean Civimail needs to be setup to run a maximum of 1000 emails per cron run? More information here sendgrid docs

Thanks!

1,000 recipients max? I could see how just about any org will quickly run into that limit!

We end up using CiviSMTP:
http://www.civismtp.com/drupal/

Or SparkPost:
https://www.sparkpost.com

And that's just two examples - there are many other SMTP options.


Mailchimp extension compatibility with CiviCRM 4.7 Can I install the latest Mailchimp extension on Civi 4.7.10 (Wordpress)?
Are there any comparability issues?

In general, extensions marked as compatible with 4.6 will usually work with 4.7 as well. It may be that the extension author just hasn't had a chance to test it and tag a new release for 4.7. I recommend you:

Install the extension and try it out
Notice if it works correctly or not. Gather specific details of anything that may be amiss.
File an issue on the extension's github page noting your findings so that the maintainer can either fix the bugs or else tag a release as-is for 4.7.


How to add field for length of a specific membership type to Contact Summary page I'd like to add a custom field to the Contact Summary page that calculates and displays the time that the person being viewed has held a full membership.

In this case we have student, candidate and full memberships and a full member will have records for each in their membership tab, showing the transition dates from where their student membership ended and candidate membership started, where the candidate membership ended and their full membership started.

For the "Years as Full Member" custom field, we want to be able to glance at the summary page and see that a member has held a full membership for 9 years, 12 years, 25 years, etc... The calculation is simple enough but I don't know how to integrate it within CiviCRM/Drupal.

This requires you write an extension.  I've written similar extensions to show the "original join date" on a contact summary screen.  If you haven't written PHP, you will probably want to hire someone to do this for you.

Your case is a little trickier, because it'll need to be updated once a..day? Month?  Whereas "original join date" only needs to be filled in once.

Here's the basic approach:

Create a custom field to store the data.  Set it to view-only.
In your extension, define a new API.  When the API is called, it should make an API call to find the folks whose custom field will need updating.  If these folks are defined as a group/smart group, that will help!
Loop through each contact, using the API to query their memberships.
Take the earliest membership join date that applies and do your math, using PHP's date arithmetic functions.
Use the API to update the field that stores the data.
Define a scheduled job (Administer menu » System Settings » Scheduled Jobs) to run the scheduled job on the schedule of your choice.


Restore default "mailing footer" in civicrm WordPress 4.2.4 Is it possible to restore the default header and footer?

CiviCRM » Administer CiviCRM Headers, Footers, and Automated Messages

I edited the header and footer and now when I try to send a group email, I get this:

This message is missing a required token - {domain.address}: Domain address - displays your organization's postal address.
This message is missing a required token - {action.optOutUrl or action.unsubscribeUrl}: 'Unsubscribe via web page' - creates a link for recipients to unsubscribe from the specific mailing list used to send this message. Alternatively, you can include the 'Unsubscribe via email' token or one of the Opt-out tokens.

You don't have to reset the default to fix this problem.

In your CiviCRM mass mailing, you need to have the following piece of code (tokens) :

{domain.address} which will display the full address of your organization as defined in the menu Administer -> Communications -> Organization Address and Contact Info (https://yourwebsite.org/civicrm/admin/domain?action=update&reset=1)
{action.optOutUrl} or {action.unsubscribeUrl} to allow the contact to unsuscribe to the mailing

Both tokens are a safe-guard which facilitate compliance with the US CAN-SPAM Act.

You could put the tokens either in the footer / header but you don't have to. You could also add them in your email content.

Also, while not recommended, you could deactivate those verification by checking option Disable check for mandatory tokens in menu Administer -> CiviMail -> CiviMail Component Settings (https://yourwebsite.org/civicrm/admin/setting/preferences/mailing?reset=1)