DeDupe errors when Individuals have Membership (by relationship) I have borrowed the title from this unanswered forum post by Laryn: DeDupe errors when Individuals have Membership (by relationship).

Just encountered the same error on a Civi 4.6.9 / Drupal 7 site. Laryn, did you get anywhere with this? Or can anyone shed any light? It appears that CRM_Member_BAO_Membership::createRelatedMemberships(), via some intermediate function calls, tried to insert a civicrm_membership record without specifying membership_type_id: our error & backtrace is very similar to Laryn's:

[debug_info] => INSERT INTO civicrm_membership (contact_id , status_id , owner_membership_id ) VALUES ( 15835 ,  2 ,  21422 )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (my_civicrm.civicrm_membership, CONSTRAINT FK_civicrm_membership_membership_type_id FOREIGN KEY (membership_type_id) REFERENCES civicrm_membership_type (id) ON DELETE CASCA)]

Excerpt from backtrace:

#10 .../civicrm/packages/DB/DataObject.php(1060): DB_DataObject->_query("INSERT INTO civicrm_membership (contact_id , status_id , owner_membership_id ...")
#11 .../civicrm/CRM/Core/DAO.php(450): DB_DataObject->insert()
#12 .../civicrm/CRM/Member/BAO/Membership.php(102): CRM_Core_DAO->save()
#13 .../civicrm/CRM/Member/BAO/Membership.php(310): CRM_Member_BAO_Membership::add((Array:6), (Array:0))
#14 .../civicrm/CRM/Member/BAO/Membership.php(1941): CRM_Member_BAO_Membership::create((Array:6), (Array:0))
#15 .../civicrm/CRM/Dedupe/Merger.php(1655): CRM_Member_BAO_Membership::createRelatedMemberships((Array:4), Object(CRM_Member_DAO_Membership))
#16 .../civicrm/CRM/Dedupe/Merger.php(512): CRM_Dedupe_Merger::addMembershipToRealtedContacts(6428)
#17 .../civicrm/CRM/Dedupe/Merger.php(1349): CRM_Dedupe_Merger::moveContactBelongings("6428", "36044")
#18 .../civicrm/CRM/Dedupe/Merger.php(660): CRM_Dedupe_Merger::moveAllBelongings("6428", "36044", (Array:6))
#19 .../civicrm/CRM/Dedupe/Merger.php(596): CRM_Dedupe_Merger::merge((Array:75), (Array:3), "safe", TRUE, TRUE)
#20 .../civicrm/CRM/Contact/Page/DedupeFind.php(97): CRM_Dedupe_Merger::batchMerge("11", "48", "safe", TRUE, TRUE)
#21 .../civicrm/CRM/Core/Invoke.php(312): CRM_Contact_Page_DedupeFind->run((Array:3), NULL)

We have had a similar problem - https://gist.githubusercontent.com/deepak-srivastava/e3a440023621cd4ecbde3904f9b27d2c/raw/7d2e854aa4ad7a8f00d87581dca729623d5ba687/bto-membership-by-relationship-error.log

Seems like method createRelatedMemberships(&$params, &$dao, $reset = FALSE) in loop sometimes resets $params.
The while loop at the end of the function seems to be the cause. Don't see why anything from queue should reset it.

Have developed a patch - https://github.com/deepak-srivastava/civicrm-core/commit/96fba9b2533b45d9baaef8b0f7ea43bc85ae0ee9

Seems to be working so far. We 'll test it a bit more, and if ok submit a PR to core.
Meanwhile would you be able to confirm if the patch works for you?


In CiviCASE how do I restore a deleted case? If I've deleted a contact and it's related cases how can I restore the data from a backup?

I've restored the records in civicrm_contact, civicrm_case, civicrm_case_contact, civicrm_activity, civicrm_case_activity and civicrm_case_activity_contact

However, it still isn't showing the activities in the case. It shows the contact and case restored fine. But in the manage cases screen the activity listing is missing with the message 'No data available in table'.

Any ideas?

CiviCase normally doesn't delete anything it just marks it deleted. You should be able to use advanced search and search for deleted contacts and restore the contact from there. Ditto Find Cases and check the box for deleted cases.

But if the records were truly deleted then you also need:

civicrm_activity_contact
civicrm_log
and then there's a couple if you want the contact details too - civicrm_email, civicrm_address, civicrm_phone, civicrm_website (might be missing one or two)

Also if you have custom fields the records in civicrm_value_XXX.


error404 on 2nd booking event page using WP 5.4.2 -  PHP 7.2 - CiviCRM 5.27.3.
I have issue with Permalink (I dont know if it is the root cause) but I can create a article using the CiviCRM button  to add the CiviCRM event form. On the website, the 1st page form is available and can be filled until the user press the "next" button that display error404 screen on the next page -

I expect this is due to changes made to accommodate WP URL changes.   If the URL has civiwp in it (and it should) Then I would:

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

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

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

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

Make sure the page is public and visiuble to all

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

Confirm that your permalinkls are set to anything EXCEPT Plain

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

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

Then retry the form.


Override CiviCRM settings I want to override my CiviCRM settings. I am new with CiviCRM and I don't know where to put the line referenced in the attached image. Thanks in advance.

You need to add this in civicrm.settings.php. Once you have added overided the settings clear CiviCRM cache so that the settings are updated correctly.

HTH

Pradeep


Use the API to loop through contacts and copy field value Been playing with the API and see how to query for a result set but not the appropriate way to get a result set and update it batch style(over 4000 contacts in this case).

My goal is to gather all contacts with an empty custom field value and copy the text value for 'current employer' into that field.

This is in php using the 'class.api.php'. If there is a more appropriate way to achieve this I am open to suggestions.

I think you can use chain api to do this. Try using below snippet

$result = civicrm_api3('Contact', 'get', [
  'sequential' => 1,
  'return' => ["current_employer_id"],
  'custom_1' => ['IS NULL' => 1],
  'employer_id' => ['IS NOT NULL' => 1],
  'api.Contact.create' => [
    'id' => "\$value.id",
    'custom_1' => "\$value.current_employer_id"
  ],
]);

(Replace custom_1 with custom field id from your system.)

HTH

Pradeep


First date of first membership? We have a system with multiple membership types - at renewal, people can switch between different membership types.

Is there a query or feature available to show the date of FIRST membership irregardless of the membership type that can be displayed within Drupal Views?

The "Create Date" doesn't work for us as people can register for events (before they become members) and therefore, this would not actually reflect first date of membership.

There may be a smarter way to do this in Views, but the short version is: I would create a View that shows memberships, then create another view that shows contacts and in the latter pull in the former using Views Field Views (ie you can say, show me the results of the first view based on a match for the contact id in the second view. and set it to show only a single result per contact sorted by oldest first, and that 'should' get you what you want. Hopefully I haven't missed out too many critical steps.


How can I enable the change log collapsible field on adding new contacts? I have seen this field before, but suddenly it disappeared and there is nowhere I can find to enable it, it's a collapsible field that allows you to select with a radio button the date created and date modified.

Even if I have it selected in display preferences, it's still not displaying. Tried to add a custom field for it to no avail...

Logging turned on/off at /civicrm/admin/setting/misc?reset=1


Expected information for iATS recurring contributions? CiviCRM 4.7.13, iATS extension 1.5.3.  Is this the information I should expect to see in the contribution record, or should a payment be referenced?    In particular, I'm wondering about the "no payments found" line.  I am aware of the issue affecting the creation of civicrm_financial_item records (Recurring iATS contributions not creating civicrm_finanical_item records ) and I would anticipate they will need to update the extension sooner rather than later, but I'm not clear on what I should be seeing here.  Thanks in advance.

Please note that 1.5.3 (see XML file) is not compatible with CiviCRM 4.7.x; you must upgrade to the 1.6.x series.

PS - the issue you're referencing is re: 4.6 (completetransaction API does not create Financial transactions); for the 4.7 version we are able to use repeattransaction API - which does create Financial transactions.

PS2 - after updating to the 1.6.x you will be seeing payment information there (CiviCRM core recently has also added last 4digits of cc - in addition to $amount, financial type(s) payment instrument id.


Credit Card Contributions entered by staff listed as complete but never made it to authorizenet recently taken over support for a very complex drupal 7/Civi 4.7.x site (which I'm happy to say was very well built by the initial team).

One of the issues that we've found reviewing things is that there are a number of contributions that were entered by the staff of the organization that are listed in civi as complete but do not show up anywhere in authorizenet. Other contributions entered by donors themselves were processed and paid but these have fallen into a void -- and these are some large donations.

As you can imagine this is causing a lot of stress. People thought they donated and never got billed; the org thinks it has money that was never processed so actually does not exist.

Has anyone seen anything like this in the past? I can't go back in time and fix the broken donations but what can I do to try to make sure this does not continue to happen?

after a lot of exploration it seems that this turns out to be user error caused by confusion about how CiviCRM multisite works.

The organization has multiple sub-groups, each having its own credit card processor account. The main www site was assumed by staff to be a master that had access to everything, but for the credit card processors it is just another subsite. So staff entering data logged into the main subsite were entering donations for other subsites. Those donations did not vanish, they just went into the wrong bank account.


how to download all contacts onto excel spreadsheet? I want to download all my contacts onto an excel spreadsheet. I also want to include what group they are in, all the invitations and literally all the information I have on there. How do I do that?

I believe you install EXPORT TO NATIVE EXCEL or EXPORT TO EXCEL extension and find contacts and select export contact from actions list and export all primary fields or the fields you want to export.

Export contact doc: https://docs.civicrm.org/user/en/latest/common-workflows/exporting-your-contacts/


CSS problems on Contact Notes View modal dialog When viewing or editing a note attached to a contact, the dialog window displays the note content shifted far to the right. This is a new problem, but I'm not sure if it's a result of installing a WP plugin, or upgrading to CiviCRM 5.27.3 or 5.28.0. The issue seems to be with the jQuery class ui-dialog-content.
Anyone else seeing this? Any suggestions for finding the cause of the problem? Thanks in advance.
Wordpress 5.5, CiviCRM 5.28.0

Turns out it was a CSS conflict with the Woocommerce Event Manager plugin in WordPress. In fact it was affecting the formatting of many different modal dialog windows in CiviCRM, not just the Contact Notes dialog.
In case anyone's interested, I tracked it down by opening the misbehaving dialog in CiviCRM, then used Chrome -> Developer Tools -> Elements to identify the div with the right-shift problem. The CSS hierarchy for this element showed (in the 'Styles' pane) that the CSS heirarchy was interrupted (Jquery UI classes were struckthrough), and it gave the CSS filename, which gave a clue to the identity of the naughty WP plugin.
Of course, I could have just deactivated each WP plugin in turn...


Are we going to switch to angular 2? Angular has a new shiny version that seems to offer several new features and a faster experience.

https://angular.io/features.html
https://medium.com/google-developer-experts/angular-2-introduction-to-redux-1cf18af27e6e#.pbxw78lb1

What is the plan for civi to migrate to angular2? The upgrade doesn't seem to be too complicated, but is there something to look at for the extensions?

I'm wondering if the switch should be done before 4.7 is stable, because changing a library in the 4.7.x seems to be a bit risky, but 4.8 is far away.

This will not be happening for 4.7, 4.8, 4.9, 5.x...

(NB I realise I may not be adding much to above comments but am trying to get some unanswered questions answered as that is currently the 'weakest' aspect of our Beta civicrm stackexchange according to these [stats][1])


Drupal not loading Civi's CSS and jQuery Drupal 7 is not loading Civi 4.4's resources: CSS & jQuery.  Clearing Drupal cache solves the problem, for a few hours, then it happens again.  I've tried the following:

custom theme? nope, it's happening in Seven or Garland
resource URLs in CiviCRM are correct
disabled and re-enabled Civi as a module, no permanent solution.
disabled other modules like jQuery Update or Admin Menu
Turning off Drupal cache, CSS and jQuery aggregation.  It has no effect, even though clearing Drupal's cache solves the problem.

Note it's not a conflict between js, the Civi resources simply aren't loading.

This started happening after an upgrade from 4.2 to 4.4.  Any ideas for help?

Check what caching you have set up in Drupal. My suspicion is that aggressive caching somewhere is taking a snapshot of the head on a non-Civi page (since that's most of your site) and presuming that it's the universal header.

You might try disabling all caching and see whether it continues to break an hour or two after you clear your caches. Alternatively, look through any cache modules or services you've got and think whether it might cause this.


what happened to saving reports as dashlets? A long while ago, you could save reports as dashlet.

On the latest version of civi (both clean installs and upgrades), the report still has the option "Available for Dashboard?" but it doesn't seem to have any effect, or any way to save as a new report/dashlet (my memory is a bit unclear on how it worked in the past)

Am I missing something obvious or has that feature gone missing?

It's working fine on 5.25.0 for me.

EDIT: You must go to Access tab > enable Available for Dashboard > select actions drop down > select Save. (Not view results).

That appears to be the misstep. Clicking View Results does not save the report. There is valid reason for having the save v. view results functionality as there is the permission save report criteria. Sometimes you may want someone to access and modify the report for one time use but not save it for everyone.

Then On CiviCRM Home, you have to click  Configure Your Dashboard and drag it into dashlet area.


Shoreditch theme breaks CKeditor Link dialog box When composing an email activity, when Shoreditch is installed (even though CiviCRM admin theme is Garland) if I want to put a link into the email, the dialog box breaks. See attached screenshot. The Link Type and Protocol dropdowns get detached from the dialog box.

Have tested on two sites both running latest versions of extension and CiviCRM.

Changing the admin theme does not fix the issue. Disabling the Shoreditch theme fixes the issue.

Would be nice to fix as the Shoreditch theme is needed for the Mosaico extension.

I just tested with Shoreditch activated as CiviCRM custom css, with seven as admin theme and CK Editor worked just fine.

I also tried to replicate your setup, using Drupal 7, Shoreditch 0.1-alpha25, Civi 5.5.3, Garland as CiviCRM admin theme, and custom CSS URL as other instead of shoreditch and I was unable to replicate your issue.

It seems that you are not actually using shoreditch as your civicrm theme. What is listed as your theme when you look at Administer - System Settings - Resource URLs - Custom CSS URL? Do you typically use Garland as an Admin theme?  I found that the most compatible theme with shoreditch (when used as Custom CSS) is Seven, as I ran into trouble with other admin themes such as adminimal.


Pre-header text for mosaico mailings shows twice When using the Pre-header Text option in a Mosaico mailing like this:

The preheader text shows twice in gmail like this:

Is there a way to stop this happening?

Basically,  from what I can see in the code ( see Mosaico github issue for details here  https://github.com/voidlabs/mosaico/issues/582 )  preheader is being conditionally shown depending on "Unsubscribe" link behaviour and display logic in template-versafix-1.html have a flow.
One possible workaround is to set Unsubscribe link value to anything but "None" (both "Unsubscribe" and "Profile" would work) and (optionally) delete Unsubscribe link & text from preheader block


For CiviCampaign - how can I enable any user to see Canvass and other Activities entered by another user via a webform? We're on Civi 4.6.9, Drupal 7.

I've installed and am using the CiviCampaign component. I like it. I've used the Canvass activity type added by CiviCampaign in a webform, created using the webform-civicrm Drupal module. Here's a screenshot of the webform CiviCRM activity field.

Now, I want to enable any user to see Canvass activities that any other user has entered using the webform.

In Civi, only the Added by: user, the Assigned To: user (if any), the "target" contact and an Admin (me) can see the Activities in the Added by: or Assigned To: user's record.

There are other users who oversee volunteer users entering Canvass activities (the Added by: user), as well as staff and volunteers conducting the canvass (the Assigned to: user) that need to be able to see all the Activities data entered in each contact's Activities list.

I can and have created Groups of the target contacts who have the relevant Canvass activity and any user can see the Contacts in the relevant Group.

I've looked here and elsewhere. I've also tweaked the CiviCampaign permissions. No luck so far.

Turned out that a user can only see Activity Types = Canvass on their Activity Tab if they are given the "administer CiviCampaign" permission.

Also it seems that perhaps because Canvass is an Activity Type related to Entity = CiviCampaign that

it is not available in a Drupal Views as an Activity Type filter
it is not available as an Activity Type filter on an Activities report.

Jamie - any thoughts on how to unlock this? anything to do with component_id being 9 in the civicrm_option_value table?


iATs in ESR version 5.21.3 for Joomla iATs in ESR version 5.21.3 for Joomla
Does the latest ESR CiviCRM 5.21.3 for Joomla support the latest iATs 1.7.2 for Joomla?
Thank you!
Jamie

The iATS extension is not CMS specific. If you’re running into issues you can post in the issue queue: https://github.com/iATSPayments/com.iatspayments.civicrm
and we can try help you out there.


How does the /civicrm/CRM/Mailing/xml/Menu/Mailing.xml file work? The file defines paths and callbacks, e.g.:

<item>
    <path>civicrm/mailing/optout</path>
    <title>Opt-out</title>
    <page_callback>CRM_Mailing_Form_Optout</page_callback>
    <access_arguments>access CiviMail subscribe/unsubscribe pages</access_arguments>
    <is_public>true</is_public>
    <weight>650</weight>
  </item>

However, changing values in the file doesn't seem to produce any result. I changed the page callback above to CRM_Mailing_Page_Optout but the content served was again coming from CRM_Mailing_Form_Optout.

So how can I make any changes to the callbacks?

If you are planning on submitting a change to CiviCRM, then modifying this file may be what you want to do to modify the existing behaviour. Clearing CiviCRM's caches (Administer → System Settings → Cleanup Caches and Update Paths) will reload those callbacks as defined in the XML. But: You probably don't want to do this :)

If you're hoping to customise your CiviCRM install and be able to keep your site upgraded in future, stop now. Instead I recommend you look into how to write a custom CiviCRM extension for your site, which packages your changes separately from the main codebase.

By writing an extension using CiviCRM's published interfaces, you can upgrade to the next release more easily. On your current path you'll soon be maintaining a modified version of the CiviCRM codebase, which will introduce more and more upgrade challenges, leaving you / your client in a more difficult position.

CiviCRM hook reference lists your entry points for modifying CiviCRM behaviour
Create a CiviCRM extension shows you how to get up and running
civix is a tool to get you there faster


Membership for Group of people. One payer I have a case where I need the ability for a user to fill out and submit a membership application for himself and other people.

Specific Requirements:

Single transaction: The user pays for himself and everyone else, but everyone gets a membership
The cost is not fixed: $75 dollars per person  (ex: Group of 5 = $375, group of 2 = $150)
Renewal reminders only sent to the originator.
Everyone gets assigned to a group with a name assigned by the user

Is this possible to do with CiviCRM? I can't seem to find an online example or documentation on this specific use case.

Edit: I'm using Joomla! 3.9.16

If you are using Drupal CMS than you can do this by using webform and webform civicrm module and probably CiviRules. You will need to create 2 membership type Member and Additional member. Setup webform to accept # of contacts with 1st contact as set to use Member membership type and rest of the contact set to Additional member membership.

Set up reminder for membership type member to send membership for primary member.

(Not sure if the same process can be done in wordpress caldera form plugin)


Do any token extensions provide a token for "age" rather than just DOB? Age is displayed on a contact record but only DOB is a token available in message templates.

Are there any extensions that make age available for use? I've not been able to locate anything.

I don't see any either, but the code to use in such an extension (as either a token or even a smarty modifier) seems pretty straightforward:

https://github.com/civicrm/civicrm-core/blob/5.19.2/CRM/Contact/BAO/Contact.php#L2677-L2684

      if ($contact->birth_date) {
        $birthDate = CRM_Utils_Date::customFormat($contact->birth_date, '%Y%m%d');
        if ($birthDate < date('Ymd')) {
          $age = CRM_Utils_Date::calculateAge($birthDate);
          $values['age']['y'] = CRM_Utils_Array::value('years', $age);
          $values['age']['m'] = CRM_Utils_Array::value('months', $age);
        }
      }


How do I change the Form Processor "Edit Action" Form? I want to change a small thing in the graphical user interface which allows to change a form processor (/civicrm/admin/automation/formprocessor/...).
Specifically, I want to change the form that appears when I create or edit an Action.
I want to add a field where users are able to write a default string. This string should be written inside a CiviCRM custom field, if there is no other value. So, this field should work similarly to the Default Subject field in the Configuration section.
The reason for this: I have an Input field of type Option Group that hands an array of products to the Actions. For each available product, I want to create an Action testing if the input array contains this product. If yes, a new Activity should be created, with the custom field product type filled with a default string (name of product).
Right now, this custom field is already part of the Create Action form, but it has a dropdown menue allowing me to auto-fill the field. But I don't want to choose anything from the dropdown menue (like Input fields, for example). Instead I want to be able to write some default string there.
I didn't find any similar question/thread, and poking around in the code at /public/sites/default/files/civicrm/ext/form-processor/ doesn't seem to bring me further.
Also, I cannot use the Retrieval of defaults tab, because I do not want any Input field filled by default. The default value will only come into the game if the Condition of one Activity (that is, Array contains...) is fulfilled.
Where is this form created? Where can I change the field type of specific (custom) fields?
Any hint is appreciated :)
Edit: It would also solve the problem to have an array-type input field, and an Explode List Action that actually takes an array, and properly and accessibly outputs all of its values (e.g. via indices). I don't really understand why Formprocessor Extension has all different types of option groups, but no simple array, and none that actually works with Explode List.

I think you're looking for the "Other: Set Value" action.  Add the condition on this field, and use that action's output to populate the custom field.
Form Processor works on objects, not strings, so it wouldn't work to have a string that isn't generated by another action or input.


Can't edit or make new Mosaico Template When I try to edit a Mosaico template in FireFox or in Chrome, it acts as if I am trying to print a "Welcome to your Home Dashboard" page. The URL looks like this:
https://yobc.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/mosaico/editor&snippet=2&ip-geo-block-auth-nonce=5234197d0a#ivfia57 .
If I cancel that "print," I get a Configure Your Dashboard message. The URL looks like this:
https://yobc.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/mosaico/editor&snippet=2&ip-geo-block-auth-nonce=5234197d0a#ivfia57

It appears that this plugin is up-to-date, and we have used it for some time. Updated CiviCrm last week with the security update.

Pictures attached.

Can you try to clean CiviCRM cache and do a menu rebuild?  You can do this by navigating to CiviCRM >> Administer >> System Settings >> Cleanup Caches and Update paths. Once you on the page click on Cleanup cache button.

HTH

Pradeep


500 Errors on CiviCRM 5.1.2 with Varnish on WordPress I'm brand-new to CiviCRM and really appreciate all the amazing work that's been done on this project!

I've been working on our implementation on a test server for a while now, but when I started implementing things on our production server, which is managed WordPress on Dreamhost (DreamPress), I'm running into issue related to modsecurity and Varnish cache I was hoping someone could help with.

For one example of the issue, I created a new contribution page and the test drive link works fine, but when I try to go to the live page () I get this error (throwing Xs in for a couple of values):

[Tue Jun 05 16:24:46 2018] [error] [client XXX.XXX.XXX.XXX] ModSecurity: Error reading request body: Partial results are valid but processing is incomplete [hostname "kptz.org"] [uri "/wp-admin/admin-ajax.php"] [unique_id "XXXXXXXXXXXXXXXXXX"]

I emailed Dreamhost support and their response was "... the plugin is using PHP sessions and setting session cookies that are conflicting with the Varnish cache. The cookies are setting 'no-cache' parameters, which are
preventing Varnish from caching the site successfully. Previously, the
plugin developers had posted in the forums regarding fixing the use of
cookies for previous versions of the civicrm plugin. You can contact the
developers and ask if the use of cookies can be adjusted for version
5.1.2 of the plugin."

They also said that they can add Varnish rules to my setup if they know what to add.

I suppose my first question is would I be better off using CiviCRM 4.6.36, i.e. is this something that is not an issue in the older version? If using the older version won't help, is there any guidance as to how to address this issue, or any sample Varnish rules available?

Thanks in advance for any assistance anyone can provide, and thanks again for CiviCRM!

You can certainly try to set up rules to bypass the reverse proxy, but at the same time, I think it will be more cost-effective to change hosting.  Varnish problems aren't going to be the only issue you have when you have managed hosting that is specially tuned for WordPress hosting.

CiviCRM and WordPress work nicely together because they rely on the same LAMP stack and it's valuable to have your CRM and website tightly integrated.  However, from another perspective, a CRM and a website have opposite performance needs.  A website needs to serve the same few dozen pages to thousands of visitors.  A CRM needs to pull from among thousands of contacts' information for a handful of users.

Managed WordPress hosting (whether through Dreamhost, WP Engine, or others) attempts to maximize website performance by caching as much as possible so that the most commonly-visited pages can be delivered whole without querying the database.  This tilts the process completely towards the handful of content, lots of visitors use case for a website.

For a CRM, there's the issue you're facing where you have to tell the reverse proxy to skip various pages and widgets that are driven by CiviCRM.  But when you fix that, at least for certain pages you've defeated the performance tricks that you're paying your host to implement.

The entire business model of this kind of hosting is to rely on these tools to get maximum performance out of minimal hardware.  Without the caching, you're just left with cheap hosting.  That's not going to serve you well as you try to use CiviCRM.

Your better bet is to host with something a little more substantial.  What my colleagues and I have recommended for years is a virtual private server (VPS or cloud server) with at least 4GB of RAM and a dual-core processor.  You can get these for around $20 per month at Linode, AWS, DigitalOcean, and elsewhere.  They require setting up the whole LAMP stack, but that's something lots of us who support CiviCRM can do.

Once you've done this, you'll have better performance, a stack that is more broadly supported and used, and the ability to set up a practically unlimited number of development sites, extra domains, and so forth.


CiviCRM and Apache Solr - Drupal 7 I have CiviCRm installed Drupal 7 and Apache Solr Api.

My search configuration says that the site is 100% indexed, however there are CiviCRM events that do not show up in a search. For example, we had an event in the past titled "Mom You're Incredible". A search for "mom" or "mom you're incredible" shows no results.

Does Apache Solr index CiviCRM data, or is there a special procedure that has to be completed. I have CiviCRM in a separate database (MySQL) as recommended on the CiviCRM site.

The apache solr module by default does not index civicrm tables. There is an integration with this module that indexes civicrm attachments:

https://github.com/civicrm/apachesolr_civiAttachments

This was work done for the New York State Senate. The next steps would be to get other civicrm tables indexed via this or other similar modules.

You might want to check the Drupal Entity  integration. This might make integrating with solr a lot easier

If you do make progress on this, please do share your work


Site calling home to civicrm.org - why? civicrm.org is currently down (no big deal in itself) but it has highlighted the fact that my site is trying to contact it and timing out.

This is causing a huge slowdown when logging in (and at other times) but what concerns me is why it is trying to contact civicrm.org at all?

The error I'm getting is that extensions could not be downloaded, but I'm not trying to download an extension. I suspect this is the stock error message you get if the site tries to contact civicrm.org for any reason and fails.

Unable to download extension from https://civicrm.org/extdir/ver=4.7.14|cms=Drupal/single. Error Message: Failed to connect to civicrm.org port 443: Connection timed out

It seems the site is calling home for some reason. I have a vague memory of clicking something like "allow site to send stats to civicrm.org" but how would I find that setting again to disable it?

I think that error message is coming from your civicrm install attempting to check for extension updates. It does this as part of its routine status checks.

There is a fixme in the code to handle failures like this more gracefully - it really should be logging the error and not bugging you about it.


Cannot install CIVICRM on Drupal 9 I am trying to install CIVICRM on Drupal 9 as per instruction found here https://docs.civicrm.org/installation/en/latest/drupal9/
When i enter "composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.29'" getting error as below .. how to resolve this issue ?
[root@srv public_html]# composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.29'
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
./composer.json has been updated
Running composer update civicrm/civicrm-core civicrm/civicrm-packages civicrm/civicrm-drupal-8
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- civicrm/civicrm-core[5.29.0, ..., 5.35.0] require pear/validate_finance_creditcard dev-master -> found pear/validate_finance_creditcard[dev-master] but it does not match your minimum-stability.
- Root composer.json requires civicrm/civicrm-core ~5.29 -> satisfiable by civicrm/civicrm-core[5.29.0, ..., 5.35.0].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Thanks
Jaiz

You should replace 5.29 in the instructions with the current version. Right now it's 5.35.
And I thought the docs were updated for this but for drupal 9 you also need to add "minimum-stability": "dev" into composer.json.
Also don't run composer as the root user.


Errors involving /wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php Whenever I try to install/uninstall CiviCRM extensions or run Cleanup Cache, I consistently receive this error:

  Warning:
  require(/home/xxxxxxxx/public_html/wp-content/uploads/civicrm/templates_c/CachedExtLoader.8fc40bba39c0b8bd10ea54175cf9a6b3.php):
  failed to open stream: No such file or directory in
  /home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 70

  Fatal error: require(): Failed opening required
  '/home/xxxxxxxx/public_html/wp-content/uploads/civicrm/templates_c/CachedExtLoader.8fc40bba39c0b8bd10ea54175cf9a6b3.php'
  (include_path='/home/xxxxxxxx/public_html/wp-content/uploads/civicrm/ext/org.civicoop.pdfapi/:/home/xxxxxxxx/public_html/wp-content/uploads/civicrm/ext/org.civicoop.civirules/:/home/xxxxxxxx/public_html/wp-content/uploads/civicrm/ext/org.civicrm.volunteer/:/home/xxxxxxxx/public_html/wp-content/uploads/civicrm/ext/org.civicrm.angularprofiles/:.:/home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm:/home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/packages:/home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:/home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear_exception:/home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/auth_sasl:/home/xxxxxxxx/public_html/wp-content
  in
  /home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 70

  There has been a critical error on your website. Please check your
  site admin email inbox for instructions.

civicrm.settings.php seems fine:

  global $civicrm_root;

  $civicrm_root =
  '/home/xxxxxxxx/public_html/wp-content/plugins/civicrm/civicrm/'; if
  (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) {   define(
  'CIVICRM_TEMPLATE_COMPILEDIR',
  '/home/xxxxxxxx/public_html/wp-content/uploads/civicrm/templates_c/');

Wordpress 5.3.2
CiviCRM 5.22.0
PHP 7.3

The email sent by the system had almost the same message:

  Error Details
  ============= An error of type E_COMPILE_ERROR was caused in line 70 of the file
  /home/nkxwvwvr/public_html/staging02/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php.
  Error message: require(): Failed opening required
  '/home/xxxxxxxx/public_html/staging02/wp-content/uploads/civicrm/templates_c/CachedExtLoader.697f143a9f2872e12a14e35583756c82.php'
  (include_path='.:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/packages:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/vendor/pear/pear_exception:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/vendor/pear/auth_sasl:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/vendor/pear/log:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/vendor/pear/console_getopt:/home/xxxxxxxx/public_html/staging02/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src:/ho

The hosting company sent me this instruction. It worked, and I'm back in business!

  "You need to add this in your .htaccess file to avoid problem, it is
  caching related:"
   php_flag opcache.enable Off


ignored import file lines I have a contacts.csv file with 4330 records.  On importing, CiviCRM reports that the file has 1866 records.  Separating the file into three files yields proportionately similar results.  Why the miscount?

This is very difficult to answer without sample data.  Your data may contain carriage returns, or not escape quotation marks properly.  However, if you can't safely share the data, here are some troubleshooting steps:

Try uploading to a demo server (demo.civicrm.org) to ensure you're seeing the same problem.
Most likely, some lines work and some don't.  Take just the first three lines.  Which import, which don't?  Is there any change from adding/removing lines?  What do the lines that don't import have in common?
Most importantly - view the data in a regular text editor, not just a spreadsheet app.  The spreadsheet app may be hiding some irregularity that's obvious when viewing the data in a text editor.


Customize basic find display to include membership status When I submit a search via the "Find contacts" menu item, I would like to add our "Membership Status" to the results page. Where do I go to configure that? I can't figure out which report the basic find command is using to display results.

This is CiviCRM 5.24.5 running under Drupal 7.

Thanks.

You can not just configure that, you will need to develop a little extension to modify the behaviour.

That would mean finding out which search is involved (I think it is BasicSearch) and probably use the buildForm hook (see https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/) to add the column and the searchColumns hook (https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_searchColumns/) to modify the result.


Tracking on Civimail suddenly stopped working Morning all

Civi 4.7.14 Wordpress 4.7.5  Using Mosaico (the original one)

All's been going fine for months and months.. suddenly the tracking has stopped working. The emails are being received..just not being reported.

I tried this suggestion: CiviMail tracking opens stopped working after upgrade to 4.7.x

ie cut and paste this link
img src="https://yoursite.org/sites/all/modules/civicrm/extern/open.php?q=91954565" width='1' height='1' alt='' border='0'

but got a black screen- no error message- which I guess is what I'm supposed to get?

thanks for any suggestions

That looks like a tracking image (it's 1x1 px and probably transparent), so you probably don't see it or get an error message.

Once after an upgrade, I somehow ended up with a space before the opening php tag in https://yoursite.org/sites/all/modules/civicrm/extern/url.php which broke tracking (can't have output before the header('Location: ' . $url);)


Different default status for different activity types? Wondering how to do this, it clearly would need an extension (or, as I have done for other things, a Drupal module) but just looking for any tips really.

I would like to be able to specify a default status when defining an activity type. When case workers are with a client they take the opportunity to do whatever they can at the time, whatever presents itself, e.g. refer the client to another organisation, or make copies of documents they brought in. These activities are normally logged at the same time that they are completed. It is annoying for the worker to have to manually set the activity to completed when they log it, they often don't, which results in "scheduled" activities lying around that are actually completed. But other types of activities are genuinely scheduled for the future, e.g. "review" meetings that are automatically generated for certain lengths of time in the future when a client is taken on.

So it would be good if, when defining an activity type, we could state whether it is default completed or default scheduled.

Not an answer but rather a kind of half temporary workaround, posting in case someone finds it useful, and beacuse you metioned you are familiar with creating an extension/module.

You can use hook_civicrm_buidForm to alter the form status id based on activity type_id/name, this soultion is not user friendly and it won't work from standalone context, ie when using Contacts -> New Activity, but it can do the trick if you can live with that and don't have a ton of Activities Types.

Hope it helps, and let me know if there's anything unclear.

// Implement myextension_civicrm_buildForm
function myextension_civicrm_buildForm( $formName, &$form ){
    if ( $formName == 'CRM_Activity_Form_Activity' ) {
        // Hook only when adding an Activity and the context is not standalone
        if ( $form->getAction() == CRM_Core_Action::ADD && $form->_context != 'standalone' ) {

            // The array that holds the Status and Activities that should have that status by default
            // and the only bit that you'll have to change/upadte when you add more activities and statuses
            $activities = array(
                'Completed' => array( 'Meeting', 'Phone Call' ),
                'No-Show' => array( 'Custom Activity' ),
                'My Custom Status' => ( 'Another Custom Activity', 'Yet Another Custom Activity' )
            );

            foreach ($activities as $status => $activity_types) {
                if ( in_array( $form->_activityTypeName, $activity_types ) ) {
                    // Get status_id by Label
                    $result = civicrm_api3('OptionValue', 'getsingle', array(
                        'sequential' => 1,
                        'option_group_id' => 'activity_status',
                        'label' => $status,
                    ));
                    // Set the default value in the form
                    $defaults['status_id'] = $result['value'];
                    $form->setDefaults($defaults);
                }
            }
        }
    }
}

EDIT
If you want to do the same thing when in standalone context you could add some jQuery/JavaScript to the form, see below updated snippet and JS snippet.

// Implement myextension_civicrm_buildForm
function myextension_civicrm_buildForm( $formName, &$form ){
    if ( $formName == 'CRM_Activity_Form_Activity' ) {
        // Hook only when adding an Activity and the context is not standalone
        if ( $form->getAction() == CRM_Core_Action::ADD ) {

            // The array that holds the Status and Activities that should have that status by default
            // and the only bit that you'll have to change/upadte when you add more activities and statuses
            $activities = array(
                'Completed' => array( 'Meeting', 'Phone Call' ),
                'No-Show' => array( 'Custom Activity' ),
                'My Custom Status' => ( 'Another Custom Activity', 'Yet Another Custom Activity' )
            );

            if( $form->_context != 'standalone' ){
                foreach ($activities as $status => $activity_types) {
                    if ( in_array( $form->_activityTypeName, $activity_types ) ) {
                        // Get status_id by Label
                        $result = civicrm_api3('OptionValue', 'getsingle', array(
                            'sequential' => 1,
                            'option_group_id' => 'activity_status',
                            'label' => $status,
                        ));
                        // Set the default value in the form
                        $defaults['status_id'] = $result['value'];
                        $form->setDefaults($defaults);
                    }
                }
            } else {
                // Make $activites available in JS
                CRM_Core_Resources::singleton()->addVars( 'myextension', array( 'defaultedActivites' => $activities ) );
                // Add JS script
                CRM_Core_Resources::singleton()->addScriptFile( 'myextension', 'defaultedActivites.js' );
            }
        }
    }
}

// in your JS script => defaultedActivites.js
// Same principle as above, there might a better way to do this JS-wise but that should do it
CRM.$(function($) {
    $( '#activity_type_id' ).change( function(){
        var defaultedActivites = CRM.vars.myextension.defaultedActivites; // Store defaultedActivites
        var activity = $( this ).select2( 'data' ); // Get the select2 Activity object, ie Activty type
        $.each( defaultedActivites, function( status, activityTypes ){
            activityTypes.map( function( currentActivity ){
                if( currentActivity == activity.text ){
                    // Get status_id by label
                    CRM.api3( 'OptionValue', 'getsingle', {
                        'sequential': 1,
                        'option_group_id': 'activity_status',
                        'label': status
                    }).done( function( statusId ) {
                        // Set default value
                        $("#status_id").val( statusId.value ).trigger("change");
                    });
                }
            })
        })
    });
});


Secondary recipient email body is blank when sent using "Find Contribution" Reproduction steps:

Click on **Find Contribution -> enter a contact name -> click search **.

Select 1 contact (contribution) from the list -> select "Email send now to 50 or less" from action menu

Email popup window opens. -> in the TO field add a second recipient -> Select a template or add text in body

Click Send

Current behaviour:

First recipient that was selected from find contribution list receives the email with body, subject & attachment (if any)

Second recipient who was added later receives a blank email with no body or subject. If any attachment were added, that gets added though.

Expected behaviour

Second recipient who was added later should also receive the same email as the first recipient.

Does anyone have a fix for this please? Thanks

To add additional 'To' in email on Find Contribution action is not supported because the html is build using contribution id, Hence manually added email will not have contribution id selected from Find contribution result. It may be little tricky to change the code to support this. Below patch should work if your email body doesn't have contribution tokens.
diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php
index 4fe6e48..ef36a12 100644
--- a/CRM/Activity/BAO/Activity.php
+++ b/CRM/Activity/BAO/Activity.php
@@ -1124,12 +1124,16 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
       $contactId = $values['contact_id'];
       $emailAddress = $values['email'];

-      if (!empty($contributionDetails)) {
+      if (!empty($contributionDetails[$contactId])) {
         $subject = $contributionDetails[$contactId]['subject'];
         $text = $contributionDetails[$contactId]['text'];
         $html = $contributionDetails[$contactId]['html'];
       }
-
+      else {
+        $subject = $subject;
+        $text = $text;
+        $html = $html;
+      }
       if (!empty($details) && is_array($details["{$contactId}"])) {
         // unset email from details since it always returns primary email address
         unset($details["{$contactId}"]['email']);

Other alternate method is to use Advance Search, Display result as Contact, add contribution filter. Select Contact and choose email action.
HTH
Pradeep


Event absences triggers an email? Given a weekly class that registers students into repeating CiviCRM events as a way to record attendance, is there a way to trigger an email to the teacher if a student is absent a set number of consecutive weeks?

I looked briefly at the new CiviRules extension, but didn't see such functionality.

In addition, something similar could be done manually by searching for contacts who are in the class, but who were not registered, for example, in the last three weekly events.

But, ideally, I'm looking for a automated solution.

I don't think there is a straight forward way to do this.

It may be possible if you register the entire class list for all the classes (events) and then set the participant status to "No-show" when a student misses a class.  Then you might be able to do something by shuffling students between a series of groups - "no-show this week", "no-show this week & last", "no-show three consecutive weeks" using CiviRules and sending a weekly "Constituent summary" report to the teacher restricted to the people in the "no-show three consecutive week" group.

However, if you have more than one class you would need three groups for each class so you could get to an unmanageable number of groups fairly quickly.

Also, I am not sure if the existing conditions and actions in CiviRules would be enough for this purpose or if you would need to create additional conditions and/or actions


What's the problem with API V4 update to 4.3? I just (rashly) installed API V4.3 extension & can no longer browse contacts!!? After a search and clicking the contact I got the following screen.  Rather fundamental!  I've raised this as an issue here   I removed the updated extension (had to disable contact layout extension first) and re-installed 4.2. OK after that.  Civi is at 5.10.4 (Drupal).

Here's a timely answer I just got from Eileen McNaughton.
"Contactlayouteditor 1.4.1 is compatabile with the latest apiv4 - so try upgrading that as well (it has been marked as needing CiviCRM 5.11 as that is the one that ships with the latest apiv4)"
So better to wait for 5.11 before upgrading this extension?


How do relationships become disabled? I don't make use of the end date in relationships. I only ever explicitly create relationships. And yet I'm aware that there are a significant number of Inactive Relationships in my system. How do these relationships become inactive? It's not a result of manual intervention, so it must be happening programmatically as a result of some other action that is being taken.

I'd love to know what's going on.

I do know there is a cron job (Disable expired relationships (Daily)) that inactivates relationships when the end date is in the past. That might be active in your environment, but you state that there are no end dates? Did you not have any in the past either? And is this scheduled job active on your installation?

Another cause might be the employer/employee relationship when you remove the employer from the contact summary?


How to get the value of a disabled form field in webform civicrm? I have 2 radio buttons whose values I can access on page 2 using $form_state['input']['submitted']['nameoffield'] when the field is not conditionally hidden. When conditionally hidden however (and pre-filled) I can't access the value, presumably because the field is disabled. What is the best way to access a pre-filled civicrm value on the second page of the webform?

Unfortunately it's a limitation of the Webform module (not specific to Civi) that hidden fields cannot be accessed as tokens or from hooks. They might be available in the $_POST superglobal, but only immediately after submitting page 1 (e.g. not after returning to page 2 from page 3, or from a saved draft, or from reloading page 2 with validation errors). Since you are writing php code, consider using the CiviCRM API to fetch this info instead.


What permissions are needed to renew memberships in back-end? Up until sometime this spring 2020, non-admin users were able to manually renew memberships in the back-end.
Now that is not the case, see below. There is no edit or renew links.

For an admin it looks like this:

I assume a Civi upgrade effected this. The site is on 5.28.3.
We are using Activity Type ACL extension but that was added well prior to this issue coming up. Related member permissions I have for non-admin user level is:

access_civimember
edit_memberships
add_activities_of_type_membership_renewal
edit_activities_of_type_membership_renewal
view_activities_of_type_membership_renewal
add_activities_of_type_membership_signup
edit_activities_of_type_membership_signup
view_activities_of_type_membership_signup

Just as you need edit_memberships to renew in the back-end out of the box, if you have Enable Access Control by Financial Type turned on you must then grant the corresponding financial types permission(s) that are used for your membership(s). e.g. edit_contributions_of_type_member_dues.


Upgrade Issues - Events links going to home page I have upgraded from version 4.7 to latest version 5.16

When I click on an event live link, even from the admin, i get taken to the home page.  The url is correct xxxx.com//?page=CiviCRM&q=civicrm%2Fevent%2Finfo&reset=1&id=111

I am having other issues, but working on them one by one.

Please helpppppp

Jennifer

Plug In AGP Font Awesome Collection was conflicting with CiviCRM, no idea why, but Disabled it and it is now working great.


Create Report Showing The Notes Created for Organisations I want to create a report that shows the most recent note that has been created for each organisation. When I looked at modifying one of the existing reports, I could not find in any of the reports, the option to include the standard notes field. Have I missed it or do I need to create a custom report?

I know I may be able to achieve this through Drupal Views but would rather create a report if necessary.

(I am using version 4.7.28)

I do think you need a custom report for that. I dont know whether you can programm such a report your self, if not you might ask someone from the community to do that for you.


Membership Expiry Date not advancing after membership payments I have a page where the membership payment and different contribution amounts are displayed through a price set to collect member dues for one month.

I was using civicrm 4.0.5 previously and now I am using civicrm 4.7.17

Everything worked perfectly fine on civicrm 4.0.5.

However, in civicrm 4.7.17, after the payments are made the Membership expiry dates do not advance.

So I wrote my own code to advance the membership expiry date to the last day of the next month. Here is the code:

//get the membership dates for the cid
  $membership_get_params = array(
    'version' => 3,
    //specify the membership type id
    'membership_type_id' => $membership_type_id,
    'contact_id' => $objectRef->contact_id,
    'filters' => array(
      'is_current' => 1,
    ),
  );
  require_once 'api/api.php';
  $membership_get_result = civicrm_api( 'membership','get',$membership_get_params);
  $membership_get_result = $membership_get_result['values'][$membership_get_result['id']];

  // Find date of next month
  $end_date = $membership_get_result['end_date'];
  $end_date_array = explode('-', $end_date);
  $year = $end_date_array[0];
  $month = $end_date_array[1];
  $day = $end_date_array[2];
  if (in_array($objectRef->contribution_page_id, $one_month_contribution_page_ids)) {
    $next_month = $month + 1;
  }

  if ($next_month > 12) {
    $year = $year + 1;
    $next_month = $next_month - 12;// Get next month if payment for member dues goes beyond the current year
  }
  $date = $year . '-' . $next_month . '-1';
  $next_month_end_date = new DateTime($date);
  $next_month_end_date = $next_month_end_date->format( 'Y-m-t' );

  $excludeIsAdmin = false;

  $calcStatus = CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate( $membership_get_result['start_date'], $membership_get_result['end_date'], $membership_get_resul\

t['join_date'], 'today', $excludeIsAdmin );

  // Save expiry date for membership for contact
  $membership_create_params = array(
    'id' => $membership_get_result['id'],
    'contact_id' => $objectRef->contact_id,
    'membership_type_id' => $membership_type_id,
    'start_date' => $membership_get_result['start_date'],
    'join_date' => $membership_get_result['join_date'],
    'end_date' => $next_month_end_date,
    'status_id' => $calcStatus['id'],
    'version' => 3,
  );

  Logger::debug_var("membership_create_params", $membership_create_params);

  require_once 'api/api.php';
  $result = civicrm_api( 'membership', 'create', $membership_create_params );

Is this the optimal solution??

If not, please suggest.

Thanks in advance.

Have you confirmed that the Scheduled Job which updates Membership Status is enabled. You have made a bit jump in civi versions and I don't think Scheduled Jobs was around in 4.0.x


Delete old civi event locations I want to condense the list of event locations to ones actually in use, and quickly update the contact details to reflect changes in our team. I only have access through the UI and was hoping to find a list, as you can for event types and templates, but am not having much luck. I'm using 5.13.4.

Looking through past questions I'm not the only one having issues, so would be good to know any fixes or if this is being addressed in the next upgrade!

This seems to cover it: Edit 'existing locations' for events

"If you are wanting to do a one-off cleanup of obsolete addresses than as a UI work around you could edit the old events that contain those obsolete locations and set the first address line to DO NOT USE or NO LONGER IN USE or similar"


Tokens missing in Webform Email Settings (and thus not populated in Emails received) (after upgrading) Running Drupal 7.69 / CiviCRM 5.25.0 / PHP 7.3
After upgrading some Modules : Webform, Views Bulk Operations, i18n, and Content Access,
Emails Tokens ([submission:completed_date:long], [submission:user], [submission:values], [submission:url]) are not populated in received mails.
And those usual tokens are not shown when browsing "available tokens" in the Webform Email Template Setting.
I have asked the question on the Drupal SackExchange, but my notation there is too low to get an answer.
Any help is welcome.

Thank you to both of you (Karin and Pete) for your suggestions : I have solved the problem.
I have disabled Token and Entity Tokens Modules (and requested associated Modules)
... then reactivated :
The probem comes from the Advanced User Management Module : when it is enabled, most of the tokens cannot be browsed (among which the default proposed ones in the mail content).
I will post this answer on the Drupal StackExchange.


Translating CiviEvent Public pages I'm busy translating user facing parts of CiviCRM to a local language.

I've changed some of the text on the Event page. I.e. Register, Event Fee Fields. But some of the reminders like when a user is already registered still shows up in English.

I've used PoEdit to edit translation files but none of these fields are included. Only back-end fields are included in the translation file.

Here are examples of fields I'd like to translate:

"It looks like you are already registered for this event. If you want
to change your registration, or you feel that you've gotten this
message in error, please contact the site administrator. You can also
register another participant."
Continue Button
"Please verify the information below. Click the Go Back button below
if you need to make changes. Otherwise, click the Continue button
below to complete your registration."
"Your registration will not be submitted until you click the Continue
button. Please click the button one time only. If you need to change
any details, click the Go Back button below to return to the previous
screen."
"An email with event details has been sent to ..."
When
Location
First Name
Last Name
Your Registration Info
Participant Info
Event Information

All those strings should be in transifex (and compiled in the .mo files).
Please keep in mind that the string might contains HTML and what you see as one big paragraph on the screen might be in fact be a concatenation of several strings.

For example, your first example is in fact 2 separate strings in transifex (and the second one contains HTML) :

    $statusMessage = ts("It looks like you are already registered for this event. If you want to change your registration, or you feel that you've gotten this message in error, please contact the site administrator.") . ' ' . ts('You can also register another participant.', array(1 => $registerUrl));

You can find those string (for fr_CA) here :

https://www.transifex.com/civicrm/civicrm/translate/#fr_CA/event?q=It looks like you are already registered for this event
https://www.transifex.com/civicrm/civicrm/translate/#fr_CA/event?q=register another participant

If after looking in transifex, you can't find the strings, it might be three different problems :

there is a missing ts (translation function) in the code, meaning there is bug that should be mentioned in the issue tracker (gitlab)
the string is a new one or has been changed and transifex is not yet up-to-date
there is bug with the string extractor

Once you have updated the string in transifex, you need to extract po files and compile them or wait for the automated process to compile them for you (once a day) -> http://download.civicrm.org/civicrm-l10n-core/mo/fr_CA/civicrm.mo (replace fr_CA by your locale)


Do you have a french version? We are looking for a French version of your app

There is a French translation of CiviCRM available here:
https://civicrm.org/download-translations

There is also a guide to 'Using CiviCRM in your own language' available.

It doesn't look like the WP demo site lets you change the language to test, but you can do it on the Drupal test site: http://dmaster.demo.civicrm.org/:  Administer > Localization > Languages


Edit Line Item error: Tax for amounts above 999.00 = NaN.N I'm using the Edit Line Item Extension ver2.1 (biz.jmaconsulting.lineitemedit) on Civi 5.13.4 and the latest Drupal 7. I have a paid event where bookings are made via webform-civicrm.

If I edit a lineitem where the cost (unit price multiplied by quantity) exceeds 999.00, the tax amount calculates to NaN.N. I can submit the change but the tax amount is zero.
If I add a new line item where the amount exceeds 999.00 the tax amount again reflects as NaN.N, and I cannot save the change.
Any ideas?
Many thanks, Davy

Fixed by https://github.com/JMAConsulting/biz.jmaconsulting.lineitemedit/pull/42
Thanks for the help of Monish Deb and Joe Murray.


Want to auto populate city and state from an entered U.S. zip code, WordPress I am a complete newbie to CiviCRM and hoping to use this platform with WordPress to replace an antiquated CRM (even has comments for displaying properly on netscape). One of the desired features is to auto populate the city and state when a user enters a U.S. zip code.

I see something similar here. https://civicrm.org/extensions/civicrm-region-lookup. However, it doesn't look like it is being maintained for recent versions of CiviCRM. Is this a red flag? Also noted that this is for Drupal and I would need a WordPress version.

I did manage to find Administer > System Settings > Extensions but I don't see anything there similar to what I need.

I also see that USPS has Web Tools API with this functionality but wouldn't know how to implement that for CiviCRM within Wordpress. https://www.usps.com/business/web-tools-apis/address-information-api.htm#_Toc410982991

All ideas, suggestions and help would be very welcome.

Thanks so much in advance!

D

I only now stumbled on this question, so will copy-paste my response from the forum:

I am the developer of civicrm-region-lookup. I use it on CiviCRM 4.6, and it would require a small fix for CiviCRM 4.7, but it should work otherwise.

Although it is probably not the most user-friendly solution. It was meant to be flexible and vendor-neutral (i.e. not rely on specific paid sites for the data, make it possible to manage your own mappings).

For the US, you would need to import a list of postcodes via phpmyadmin, then configure the correct mapping in the admin settings (i.e. to set the field names so that the postcode field sets the city, but you might need an additional custom Javascript hook to set the state as well, which is not ideal, but not very complicated either).

There may be simpler solutions out there, especially for the US. If you decide to use this extension, I will be happy to provide some support on this forum if you run into issues.

Reference: https://forum.civicrm.org/index.php?topic=37098.0

See also the comments from petednz on the forum.


Bulk email sent to group of contacts after new contact added to CiviCRM We have a couple of sites that offer volunteering directories. External organisations post opportunities and members of the public can view and apply for those opportunities (a massive tangle of webforms and drupal views essentially).

We've been asked for a functionality that if an organisation offers a new opportunity with a given field of activity (eg. buddying/ befriending), and a volunteer has registered with the site expressing an interest in opportunities of that same field of activity then the volunteer(s) get an email notifying them of the new opportunity details.

I was essentially thinking create "field of activity" as a tag list for the opportunity, and a custom data checkbox field for the volunteers. Then create smart groups for volunteers based on the custom data
All contacts, of type volunteer with type of interest "Befriending/Buddying" are added to a Befriending Buddying smart group. When a new opportunity is tagged as Befriending/ Buddying an email goes to the BB smart group.

Had a quick look at configuring a CiviRule, but CiviRules basic settings don't seem to result in Bulk Email Actions

Has anyone configured anything like this in CiviCRM before, or got suggestions of where to start?

Drup 7.69 Civi 5.19.4

Adding here as well

Maybe a scheduled reminder with the activity as the 'trigger' entity and then limit the recipients to your BB smart group would work.


CiviCRM User Summit Sept 2016 - Any last minute ideas on how to convince another 20 people to register CiviCRM User Summit - Any last minute ideas on how to convince another 20 people to register?

The Summit is September 24 & 25  See: https://civicrmusersummit.org/

What would make you want to come?

I received a somewhat clever promotion from DonorDrive yesterday to encourage behavior.

They were looking for survey respondents- anyone who filled out the survey within 25 minutes got an instant Starbucks gift certificate for $5 (printable).

I don't even like Starbucks, and I fell for it.

Maybe you could use this technique somehow?


CiviEvent: Scheduled Reminders going out late Drupal 7.69 and Civi 5.23.0

We've noticed that some of our Scheduled email reminders for events set up through CiviEvent are going out late. I've looked into email logs and it looks like scheduled reminders for events are sent out once per day at 9:16am.

This causes issues for e.g. events that begin at 5pm where we want to send a scheduled reminder 2 hours before the event to remind participants -- emails like this have ended up being delivered at 9:16am the following day.

Is there any way to fix this?

Cheers

Check the run frequency of the scheduled job called Send Scheduled Reminders at Administer > System Settings > Scheduled Jobs.

It may just be set to Daily. Change it to Every time cron job runs. Then make sure your run frequency of your cron job is set to something more often, like 15 min.


Issue creating Premium - requiring subscription When trying to add a new Premium (first one), I get the error "Please enter a Period Type" - even though the premium is a regular "product" and not a subscription.
Civi 5.31 / Drupal 7.73 / PHP 7.3

Problem identified and fixed by @eileen with commit planned for 5.32 - https://lab.civicrm.org/dev/drupal/-/issues/148


Civimail Mailings not saving or "corrupting" I very recently took over custodianship of a drupal CiviCRM, so I don't really have a clue what I'm doing. Bear with me.

I'm on civi 4.6.2 on drupal, and ever since the upgrade, the mailings have gone completely haywire on me.  back when I could upload a .html file, everything worked fine, but now, it's all wonky.

When I first paste the html in, everything looks fine in the WYSIWYG screen, but when I save it, one of several things happens:  It simply doesn't save the changes to the HTML email field (though the new subject and plaintext fields save perfectly fine).  Once, I got it to save the HTML, but it stripped out large chunks of that, and put in the HTML Special entity codes next to a bunch (but not all) of the spaces and quotation marks, but still preserved the actually spaces and quotation marks.

This seems to be an issue wherein ckeditor does not emit a standard change event when using "Source" mode. Using a work-around from StackExchange, we get this proposed fix: https://github.com/civicrm/civicrm-core/pull/5869

We're very close the 4.6.3 release. With some luck, it might get into 4.6.3 -- otherwise, it'll go out with 4.6.4.


Does webform civicrm update contribution_recur_id when creating recurring contribution and membership? I am looking more closely at the data structure and it appears that when the form is submitted we get an unlinked recurring contribution series and membership. Is this by design or user error in configuration?

the details - the civicrm_membership table field 'contribution_recur_id' does not seem to have the recurring ID updated from the recurring profile the webform created

Is this how people are gaining the functionality? https://github.com/adixon/ca.civicrm.contributionrecur

Drupal 7 / up to date webform_civicrm and civi

Yes, it does, but only when you select 0 for installments (ongoing commitment) otherwise it seems to not link the recurring properly.


How can I export an Event Income Detail report to CSV/Excel? We find the Event Income Detail report to be useful. But the Actions menu won't let me export this report into a CSV file for some reason.
How can that be enabled?

Reports that provide a simple table are more amenable to export as CSV.  The Event Income Detail has different sections to it which does not fit well for a CSV format - what column headings would you use?

Whether a report offers a CSV export option depends on the settings in the code.  The Event Income Detail report is provided by CRM/Report/Form/Event/Income.php  You will see a line there saying

$this->_csvSupported = FALSE;

If you were to change that to TRUE then the export option would be shown, but the rest of the report does not handle producing a CSV so that's not useful! ... unless you use that as the starting point to customise it to produce the output you want.

FWIW, pasting into a spreadsheet works pretty well: run the report, highlight the section of the report that you want, copy then paste into a blank LibreOffice spreadsheet, and you often end up with something usable.  That might work with Excel too.


Scheduled reminders - Email head css attributes are being stripped out I'm hoping to use email templates in Scheduled reminders that have css in a <style> tag at the start of the email. Declaring css here for html elements and classes makes MUCH more robust templates that aren't prone to disasters from click-happy admin teams deleting in-line styles.

I can use these templates effectively in CiviMail and when sending emails directly from a contact's summary screen.

However, the Scheduled reminders engine strips out all the css attributes in the initial <style> tag. So the email looks awful and the <style> declaration contains all the tags and classes - with no actual css!

I'm guessing this is perhaps something to do with the IDS? I don't see any IDS log errors though. If it is something that we can tell the IDS to ignore, I'd be grateful to know how to do this.

Or is there some other way we can tell the Scheduled reminder system not to strip those attributes?

I'm using 4.6.24 with Drupal 7.54 and CKEditor. Note that the styles aren't being stripped by CK Editor (I've adjusted the editor's config.js to make this possible), because they work perfectly well in CiviMail and from a contact's summary screen... and they are there safely inside the Scheduled reminder email CKEditor screen.

Perhaps it may be useful to add here that I'm not using a <head> tag to contain my <style> tag. In my config I haven't been able to persuade CKEDitor to retain the <head> tags. Nevertheless even so all is well for the other email scenarios.

One final point - I'm aware of how to skip IDS using the following method. So could possibly add an extra path to skip in this:
https://github.com/teamsinger/uk.teamsinger.civicrm.mailgun#user-content-skip-ids-checks

Thanks for your help.

The main issue seems to be the <style> tag defined in the templates. Schedule Reminder uses smarty engine by default which strips down the css styles defined.

This doesn't occur in CiviMail because Smarty is disabled in civicrm.settings.php. If CIVICRM_MAIL_SMARTY is set to 1, civimail will too see this error.

As Smarty processing is done, escape the  tag within {literal}. Something like:

{literal}
  <style>........</style>
{/literal}
.
.
.
(further html code)

See - http://www.smarty.net/docs/en/language.escaping.tpl.

To avoid the {literal} statements being displayed in the email's wysiwyg view you can enclose those {literal} statements in a <p> tag with class or style to make them hidden - eg <p style="display:none;">.


Permission denied in Civi\Core\AssetBuilder->build() I just upgraded CiviCRM on a test version of my Drupal 7.54 site from 4.7.15 to 4.7.23 and get the following (edited) error when going to system status in CiviCRM.

  Warning: mkdir(): Permission denied in Civi\Core\AssetBuilder->build()
  (line 167 of
  sites/all/modules/contrib/civicrm/Civi/Core/AssetBuilder.php).
  Warning:
  file_put_contents(sites/default/files/civicrm/persist/contribute/dyn/angular-modules.eef75e30334ca152b0d58bf58d4xxxxx.js):
  failed to open stream: No such file or directory in
  Civi\Core\AssetBuilder->build() (line 171 of
  sites/all/modules/contrib/civicrm/Civi/Core/AssetBuilder.php)

I made sure that I deleted templates_c and made it and all CiviCRM files writeable to the server.

This suggests a file permission issue on the relevant folder - which is sites/default/files/civicrm/persist/contribute/dyn/.

First, ensure the parent folders exist - both sites/default/files/civicrm/persist/contribute/dyn/ and sites/default/files/civicrm/persist/contribute/.  If both exist, check the permission AND owner of the dyn folder.  Is the owner the same user as the webserver user?  Likewise, if dyn doesn't exist do the same for contribute.  If you're not sure how to check owner/permissions, or how to interpret them, please either a) hop on https://chat.civicrm.org, or b) update the question with your operating system (including the distribution, if Linux) and webserver software (most likely Apache or nginx).


CiviCRM Administration areas unreachable even by direct link I am setting up and configuring a new CiviCRM/Drupal 7 installation for a local business and have installed the latest of both. I have inserted a very small amount of data and configured the event calendar (views only)
Going through the settings for localisation etc. I encountered an error were CiviCRM warned that the attachment size could not be more than php size. I altered this to the correct value, clicked save and:

I cannot access any admin link, no CiviCRM menu and the direct links are also not doing anything.
Normally okay at debugging these things but I'm at a loss. Can anyone help?

misc?reset=1:1 Refused to execute script from 'https://###/civicrm/ajax/l10n-js/en_US?cid=2&r=Tx80w' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Common.js?q73rge:1517 Error: CRM.url called before initialization
CRM.console @ Common.js?q73rge:1517
CRM.url @ crm.ajax.js?q73rge:19
initialize @ crm.menubar.js?q73rge:18
(anonymous) @ crm.menubar.js?q73rge:491
(anonymous) @ crm.menubar.js?q73rge:493

crm.ajax.js?q73rge:26 Uncaught TypeError: Cannot read property 'back' of undefined
    at Object.CRM.url (crm.ajax.js?q73rge:26)
    at Object.initialize (crm.menubar.js?q73rge:18)
    at crm.menubar.js?q73rge:491
    at crm.menubar.js?q73rge:493
CRM.url @ crm.ajax.js?q73rge:26
initialize @ crm.menubar.js?q73rge:18
(anonymous) @ crm.menubar.js?q73rge:491
(anonymous) @ crm.menubar.js?q73rge:493

misc?reset=1:1 Unchecked runtime.lastError: The message port closed before a response was received.

Feel like an idiot now:

Used an old trick by visiting /civicrm/menu/rebuild?reset=1

Appears fixed. No browser errors!


Master address - not saving choice I have been working to finalize import of approximately 2,000 contact records from our old systems. Our old db had 2 people in one record, so have been working to separate. Imported the primary contact and was using import on the second contact and utilize the "master address belongs to" field. My 2 smaller groups of the second contact worked just fine and properly "mapped" and saved the master addressee belongs to. Yesterday I was importing my last batch of about 600 names. The import took longer than normal but eventually I just went to a screen saying there was a web server error. About 94 of the last records didn't get imported. As I was working on some cleanup I realized that when I would manually go edit someone's address and tie it to a master address nothing would save. I was able to take one contact, put in an address, save, and then edit again and tie the master address. However, I haven't been able to replicate that again. I ran the system job to clean cache and that didn't help. I was on 4.6.5 and decided to go ahead and do my upgrade yesterday to see if that might clear up whatever, and it didn't. The crash of the import seems to be the point where something changed. Has anyone experienced this or recommend anything (even at the table level in phpMyAdmin -- which I am comfortable navigating in) that I can check/try?

I'm not sure this is the answer Drew is looking for or it even addresses his issue.  It sounds like it was working for him and then he had a timeout and it messed a number of them up.  The comments, which I added too many to, show that it doesn't work in some cases.

To import contact with a master address belonging to someone else, you need to include the actual address along with the address belongs to.  It is looking for the ID of master address.  How one might know that without sql is beyond me.  Whenever I've imported people with shared addresses, I've imported all the people each with an address and then wrote some sql to pull out the address id of those that would be the master and id of the contact that would use that address and id and did an import update.

I just imported a Joe Blow into Demo46 having him share an address id 3.  My cvs had first, last, street, city, state, postal, country and master address belongs to.

I'm guessing way back when for ease of implimenting shared addresses it appears it was decided not to quite do them as relational database should.  You'd expect the id to be there and for the forms, queries, etc. to follow that id for the address, but it appears it depends on the address actually being in the record.  I suspect the contact form sees that and does a copy when you share an address or the master gets changed.

So Drew you might look at your database and see if you have records in civicrm_address that have a master address id but the street, city, etc. are blank.  If so this sql should fix it.  (A caution, I wrote this sql a while ago but it think it's still fine.  In case your wondering why it is ca and pa, I was dealing parents and children.)

update civicrm_address ca,
       civicrm_address pa
set    ca.street_address = pa.street_address,
       ca.city = pa.city,
       ca.state_province_id = pa.state_province_id,
       ca.postal_code = pa.postal_code,
       ca.postal_code_suffix = pa.postal_code_suffix,
       ca.country_id = pa.country_id
where  ca.master_id = pa.id
and    ca.master_id is not null
and    ca.street_address is null

If you don't have the master_id populated but you do have the two people both having the address, you could write some sql to add the address id of the first to be the master_id of the second.


Little Bic for France Does the Little BIC extension work for France and how does it work?

I read the short documentation but couldn't figure out if I had to download BIC codes for France or not. And if so, how it should look like.

Any informations about it?

best regards,
Guillaume

There is a UI function to get/update BICs for several countries under yourdomain.org/civicrm/bicImport?reset=1

Afaik there is no source for French BICs yet. In order to add French BIC you would need to:

find a freely available list/source of French BIC
implement fetching/parsing the list in LittleBIC

If you cannot do 2. you may create an issue in Github once you found the list - maybe someone can implememt it for you.


Contact Form 7 API plugin Trying to do a contact form in WordPress, and failing on tiny little things.  A Profile using the Notes field sends an e-mail that always attaches only the first Note on a record.  Creating a custom field, the field gets overwritten every time a new form is filled out by the contact.  The Contact Form 7 API plugin seems promising as I can get it to e-mail everyone, including a CiviCRM processing account, and include it as a note.  However, then I can't get it to update/fill in other fields on the contact record.  Documentation is a little weak, as it was a custom created plugin for a specific purpose and then released with the hopes that somebody would find it useful and take off with it.  Has anyone got it working to "create or update" a contact and add an activity?  The API call seems to point only towards doing one thing from a form and not being able to handle an either/or situation.

CiviCRM 4.7, Wordpress

Yes, we did with the Contact Form 7 API (which we created for a specific customer as you mentioned :-))

The Contact Form 7 API submits the form data with an API WpCivi Submit with a form type which links to the class that is called in CiviCRM. You can find the CiviCRM part of the customer extension we created here, hope that helps you on your way!


iATS recurring payments: "mismatched contact id for the customer code" During some auditing of membership payments earlier today, we found an interesting error message on one of our members:

  iATS Payments Recurring Contribution (id=nnn) Errors: Recur id nnn
  is has a mismatched contact id for the customer code.

There's one of these messages per day for the last week or so. The original payment did go through, we can see that on both sides (Civi and iATS). The errored attempts aren't getting sent through to iATS (which is probably a good thing).

How do I go about finding the details of the recurring payment so I can compare both sides? I've found what is likely the customer record on the iATS side, but that's only showing me the customer code.
Alternately, what exactly is being compared and found wanting here, and how possibly did it get messed up?

Thanks in advance for any assistance!

Table civicrm_iats_customer_codes does not have the correct Customer id to match what iATS has on file. This is likely because you edited or merged the customer at some point and something got messed up in the process.
You can use the iATS web portal to view what customer code (I know you said you found it already--but the next person might not know where to find it) iATS has associated with that donation. You can look under reports for the donation or in the Virtual Terminal for the customer name.
You can use the API Explorer to find what civi has for the iATS customer id in the civicrm_iatscustomer_codes table. I used the settings below to find what customer ID is currently in Civi. Locate the invoice id associated with the failed transactions. Then search for that. Click the Execute button and search for "cstc": "AXXXXXXXX",in the returned data.
WARNING; you can change your data via the API so poke around in there with caution. Generally a Get action should be safe but create, edit, or replace actions will make changes.

To fix the problem you will need to change the Customer Code for that entry in your civicrm_iats_customer_code table so it matches what iATS. iATS does not let you edit the customer code at their end so you have to do it on the civi end.


Search builder: searching for Not equals or Not In with tags or groups doesn't include Null In Search Builder, if I search for contacts with a particular tag then the output returns the contacts with that tag.

If I then invert the search using 'Not In' or 'Not equals' it shows all the contacts who don't have that contact, but only from the overall set of contacts who actually have a tag. In other words, instead of searching the entire database for contacts who do not have that tag, it only searches all the contacts who have tags, and who in addition don't have that tag.

I believe the same applies to Groups.

This is very unintuitive behaviour; one would expect 'not in' or 'not equal' to apply to the entire database since everything else on all search screens does.

In fact, my SQL friends tell me that this is standard behaviour for searches across related tables; you should append an 'Or Null' query to any such searches if you want results returned from the entire database.

However, this would be too much for our non technical admin users to comprehend! Yet they regularly want to find people who don't have one particular tag or aren't in one particular group.

Is there a work around so that 'Not' searches of tags or groups can nevertheless search the entire database?

We're using 4.6.24 and Drupal 7.54. I'm hopeful of a clever work around to this! Thanks for your thoughts.

Search Builder is more 'raw' and I find end-users are best to avoid it!

Search > Custom Searches > Include / Exclude Search will do what you want.

Once you have the results you could save it as a smart group for future use.


Multiple Memberships on one contact ID, different orgs? A member has a life membership and now wants to add a second membership (a magazine subscription). I believe previously you needed to create a dummy organisation to house ("own") the second subscription. Is this still the case ?

Thanks.

Yes I believe that is still the standard workaround.


Membership reminders sending each time scheduled job runs after 4.6.2 upgrade We upgraded to 4.6.2 in our test environment and since then our membership renewal reminders are sending emails each time the cron job runs. The reminder is scheduled to send 2 days before membership expiration with no repeats. Our cron job runs every 30 minutes, so the reminder is sent every 30 minutes for the entire 24 hour period. Is there something I need to reset? This only happens with reminders that were set up prior to our 4.6.2 upgrade. All new reminders work properly.

This does seem really similar to issues.civicrm.org/jira/browse/CRM-16514. Could use some help looking into it. I can duplicate the issue.

There has been a recent JIRA ticket 18326

Scheduled reminder set to run one week before membership end date
Reminder runs once, then membership end date is changed
When the next date comes around it correctly sends a reminder but it incorrectly sends a reminder every cron until the next date has ended


Restrict users who sign up for groups from viewing all groups they have been assigned to Paul Scully

https://buildingoneamerica.org/civicrm/profile/create?gid=75&reset=1

Do you know if there is a way to offer for people to sign up for a group without all the groups they are assigned to (which are many) being visible. The link is above. I do not want them to see all the groups they are in.

I can't seem to figure this out. below is what it looks like when i sign up.

If you go to Contacts menu » Manage Groups, you should be able to click the Settings link next to a group.  Set the Visibility to User and User Admin Only (see screenshot).  This should suppress the visibility of the groups on profiles.


4.7.14 Upgrade: Custom fields missing from views' filter criteria Noticed this this morning after upgrading to 4.7.14 yesterday, so I believe there's a connection, but can't confirm 100%.

I have a view that shows how many contact records (that have a custom field 'Leader') are marked Yes. That's done by doing a distinct count on contact IDs, and then using the custom field to filter those.

This has worked absolutely fine until the upgrade, and now views does not show that custom field in the filter criteria. (FYI, I am also using CiviCRM entity and the entity field shows there)

I have experienced similar before, so have went and replaced by CMS database integration code in settings.php to no avail.

Does anyone have any ideas?

This relates to CRM-19545.  PR-417 will hopefully be released in 4.7.16 but until then, you could apply the patch to restore the previous functionality.


Invoice Monetary Format I'm not really good in any sorts of programing, haven't used smarty before. I want to change the monetary format in our Invoice.

{$amount|crmMoney:$currency}

This code displays $1000.00, but I need $1,000.00 or $1,000 , how can I achieve this?

my civicrm version is 5.1.1, joomla 3.9.4, CRM runs in Window 7

updates:
1. thanks to Joachim I notice decimal is working fine, thousand separators is not, whatever I input in Localization Currency> Thousand Separator, nothing displays.

2. upgraded Civicrm to 5.11.0, problem persist.

3. the problem is not in {$amount|crmMoney:$currency} or MONEY.php, I think something's wrong with my settings.

If you need to change the settings globally, not just for the single statement, you have the option under Administer -> Localization -> Languages, Currency, Locations. There you can define the "Thousands Separator" as well as the "Decimal Delimiter".


Display a form in a widget (footer, sidebar)? I'd like to add a form/profile in a footer or sidebar widget.

I tried the Shortcode Widget plugin recommended in a Jan'18 question and placed the widget in the left column of a footer, but the form doesn't appear. I'm WP 4.9.8 and Civi 4.7.29, and here is the shortcode I put in the widget: [civicrm component="profile" gid="17" mode="create" hijack="0"]. The test shortcode "[shortcode_widget_test]" does work, so it seems to be a Civi-related problem (?).

I also saw a question from 2016 that suggested using an HTML form snippet: "Go to Administer CiviCRM > Profiles, then HTML Form Snippet under 'more' for your chosen snippet. Copy all the code there and paste it into your text widget." but I don't have that option under "more".

Can anyone help?  Thx!

The HTML Form Snippet option will be available for profiles if the Accept profile submissions from external sites option has been set to yes –

Administer > System Settings > Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)


Misleading instructions in CiviEvent registration template for multiple participants In Civi 5.26.1, I've just had a user tell me that a registration page doesn't work because there is no 'Continue' button.
Indeed, although the on-page instructions state "If you are registering additional people, you will be able to enter their registration information after you complete this page and click Continue", the only button available says 'Review you registration'.
Suggest that the relevant string in Register.tpl is amended to 'If you are registering additional people, you will be able to enter their information after you complete this page and click Review Registration'

This is a great catch Bryan.  The wording changed in CiviCRM 5.25 (May 2020), but they missed this.  I just opened a ticket and wrote a patch to address this.  The fix is in Civi 5.29+ (September 2020).  Thanks again not just for noticing, but for reporting this.


Pulling info from Facebook into Civi I am working with an organization with a Drupal-based Civi instance that would like to have their people (members, event registrants, etc) sign into their Civi with Facebook and allow Civi to pull in specific information that they have entered on FB (e.g., email address, location, etc).

I know there are extensions to do this in Drupal (e.g., https://www.drupal.org/project/social_auth_facebook). Has anyone used this functionality to then get the info into Civi from Drupal? Does anyone have advice about the feasibility of such a project?

This is not a particularly good answer to your question, but since Erik asked :)

I've worked on a chatbot app that can be used to integrate between Facebook and CiviCRM. Chatbot interacts via the messenger platform and pulls in their first name, last name and picture (which is what the messenger app allows). You can then use it it to further populate fields via a chat interface, e.g. you could ask the question "What city do you live in?" and put the answer in the city address field. But that doesn't sound like what you want to do though.

The Drupal module you reference looks like a good start. If you were able to get the info you needed into Drupal that would be a good proof of concept and would probably be a worthwhile first step if you haven't done it already since there is point going down this road if Facebook is not willing to let you have the information that you require.

I suspect getting the info from their into CiviCRM will require some custom coding, unless there is an integration between Drupal user profiles and CiviCRM that I am not aware of.

Hopefully that is of some use - sorry I can't be of more help at the moment.


Help with PayPal IPN Sometime, I think in May, our PayPal IPN communication broke. We haven't had a lot of PayPal use since then, so I haven't discovered it until recently. I'm having a lot of trouble straightening it out.

I've gone back over the troubleshooting ideas here. But still no luck.

That did help me narrow it down. I know this:

PayPal sends the IPN.
Civi logs the IPN in the Civicrm_system_log table, and I can't see anything strange about it, but I'm not sure what it's supposed to be. Here's the text

{"reset":"1","contactID":"4280","contributionID":"8377","module":"event","eventID":"33","participantID":"851","mc_gross":"900.00","invoice":"414ae4f493f47e11619bf7efc10b9f7b","protection_eligibility":"Ineligible","payer_id":"XSJW7PJ3W2WTE","tax":"0.00","payment_date":"16:59:26 Sep 14, 2016 PDT","payment_status":"Completed","charset":"windows-1252","first_name":"Ed","mc_fee":"20.10","notify_version":"3.8","custom":"","payer_status":"unverified","business":"office@MYDOMAIN.org","quantity":"1","verify_sign":"Adbt8gdfutr1Z-T39jfFAojvxDVnASV9dlQzsWCS5U9rO.yPNTzpJ.RF","payer_email":"him@hisDOMAIN.com","contact_phone":"xxxxxxxxx","txn_id":"77F61134Y5474453P","payment_type":"instant","last_name":"xxxx","receiver_email":"xxxxxxxxx","payment_fee":"20.10","receiver_id":"VLKFZ88QB68QL","txn_type":"web_accept","item_name":"4280-8377-Wine for Water","mc_currency":"USD","item_number":"","residence_country":"US","receipt_id":"2531-4793-0283-6721","handling_amount":"0.00","transaction_subject":"","payment_gross":"900.00","shipping":"0.00","ipn_track_id":"d48d1e5a8c3da"}

the IPN doesn't update the payment from Pending to Completed. The really bad thing is that event registrants don't end up getting their proper email confirmation.

What are some next steps to get to the bottom of this?

Joomla 3.6, Civi 4.7.11

There was a pending/completed issue recently resolved in  v 4.7.12 - link to JIRA ticket is: https://issues.civicrm.org/jira/browse/CRM-18483

Hope this helps,
Tamar