Is there an area in CiviCRM (or a way) for people involved in a case to communicate privately? When a new case is set up, we need to let the parties involved with that case communicate privately and have their messages and shared docs only accessible to them? Like a shared, but private, message board. Is this possible without using an 'outside' tool?

You can add BuddyPress in and with the additional BuddyPress CiviCRM plugins it will sync users.  Think Facebook and you've got the idea.  You can make things private or not, do PM's, do groups, etc.


How to display more than 100 as a search result? When doing a search, and getting a result of more than 100, it is not possible to display all at the same page. It is only limited to 25, 50 or 100.

How can I display more than 100 search results on the same page?

In CiviCRM version 4.5+ you can control exactly how many results are shown per page. At the bottom-right corner of the search results, click the up/down arrows to increment the count by 25, or type in whatever number you wish:


Inheriting memberships through Households I have some individual contacts that are related both directly, and through Households.

When one of these contacts has a membership, I want all the household members to also get that membership.

However, it seems that only the household inherits that membership, other individual contacts don't get it.

Should this work out of the box, or do I need to do something specific?

For all individual contacts of a household to inherit a membership from another member of the household, you need to add the relationship type between the individual contacts to the membership type (e.g. Spouse of, Household Member Is, etc.) but you will not be able to modify the membership type accordingly if there are membership records associated with it:

If you want to avoid having to create a new membership type and then updating all of your existing primary membership records with that membership type, you will need a programmer who can update the membership type directly in the database and then run a query to create the related memberships.

Good luck,
Tamar


The menu bar doesn't load in Wordpress After transferring the website to a new URL, I can't get the Civi menu to appear.
I'm running the latest wordpress (5.5.1) and latest Civicrm plugin (5.28.0)
I've also noticed that there are javascript errors showing. These errors are caused by the absolute path being attached to the website path:
https://mysite.com/usr/home/xxxuser/public_html/wp-content/uploads/civicrm/persist/
Not sure if the problem has something to do with the fact that all my URL's are HTTPS?
I have tried updating my $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] in /wp-content/uploads/civicrm/civicrm.settings.php
I've read through various resources and tried many solutions including resetting my paths and clearing my caches 100's of times.
I've tried to install this plugin https://wordpress.org/plugins/civicrm-admin-utilities/ and rebuild the menu. But that didn't help.
The only way I have managed to fix this is by disabling asset caching
https://mysite.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fdebug&reset=1
Here are some of the resources I have tried:
Civi dashboard and menus won't display after install
https://forum.civicrm.org/index.php%3Ftopic=34290.0.html
Navigation Menu Gone after WordPress Site Transfer
After a CiviCRM update on WordPress the CiviCRM menu has disappeared
Menu bar is missing
Menu bar missing on fresh CiviCRM on Wordpress
I'm at my wits' end with CIVI and I haven't even started using it. If anyone can help, I'd really appreciate it!

check you wordpress directory path in your apache/nginx conf. If its different than '/usr/home/xxxuser/public_html/' either you can change in apache/nginx conf or replace $civicrm_root and template_c path in civicrm.settings.php
Below line 242 in the file civicrm.settings.php
    global $civicrm_paths;
    $civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm/';
    $civicrm_paths['civicrm.files']['url'] = CIVICRM_UF_BASEURL . 'wp-content/uploads/civicrm/';

NOTE: make sure you have '/' at the end for CIVICRM_UF_BASEURL value.


Mailings aren't sent immediately When I try to send a mailing, even if I chose to send it directly, it doesn't send and its status stays on "planned". I have to go in the schedule job menu to force the task. What can I do to just send mailings immediately?

Thank you.

s.

The normal way to do this is to automate the execution of the scheduled jobs by setting up a cron command.

You can define how often that cron command is executed. If you set it every 5 or 10 minutes, then the Mailing will be sent at maximum 5-10 min after your submit.

The reason why Mailings are not send immediately is that CiviCRM is build to send very large Mailings. An action that is started via the browser has usually a maximum execution time. It is not unlikely that for larger Mailings it takes longer to send to all of them then that time. The cron command is run on the server and has no limitations in that regard.

Much more information about cron and how to set it up: http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs


Can't accesss cv from CiviUnitTestCase::createExternalAPI in buildkit environment I'm QAing https://github.com/civicrm/civicrm-core/pull/9255 and trying to run a couple of relevant test locally:

~/src/civicrm-buildkit/build/qa/sites/all/modules/civicrm$ tools/scripts/phpunit api_v3_JobProcessMailingTest --filter testConcurrency

I'm getting the following error output from each time the test uses CiviUnitTestCase::createExternalAPI to call the API:

[is_error] => 1
[error_message] => External API returned malformed response.
[trace] => Array
    (
        [code] => 127
        [stdout] =>
        [stderr] => sh: 1: cv: not found

    )

cv api Contact.get works as expected from the same directory.

Any ideas on what to do next to debug? I get why the test wants to do things concurrently, but my eyes start glazing over (only a little!) when I start looking at civicrm/Civi/API/ExternalBatch.php and I'm hoping I might have overlooked something 'obvious'.

The error message says sh: 1: cv not found, so the symptom here is that the proc_open() call is unable to find the executable cv.

It looked like the place to check this should be cv() function in tests/phpunit/CiviTest/bootstrap.php ... but I wasn't able to get that to work.

Having investigated, I suspect that this may be an issue in \Civi\API\ExternalBatch. In that class's constructor,

$this->env = $_ENV;

At this point in the tests, $_ENV = ['CIVICRM_UF' => 'UnitTests']. There is no path here, and the call to cv fails. Manually inserting a PATH into $_ENV here does restore the ability to call cv, but then fails with a further "malformed response" error, "Failed to determine INI file path.".

This must be working on tests.civicrm.org, so perhaps it's a configuration issue that affects both our test environments?

civicrm/cv#1 is this issue?
Tim suggests it may relate to Debian's default variables_order being GPCS no EGPCS
Suggests: https://gist.github.com/totten/cf76679b4fabdae4c86e06f8c0988b23


Today's-Date token for PDF How can I automatically display today's date in a pdf or email.
I tried the "thank you date" token but the date format is 12-31-15 12:30. I need December 31, 2015...
I tried plugging in this
{$smarty.now|date_format}
Still didn't work.
Any ideas?

Thanks

I think this would be a custom token to get it in the format that you're looking for, but it wouldn't be too difficult and I am pretty sure you'll be able to find one someone has already written -

Check out the bottom two links of this page:

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

The last post April 29: "We discovered at the sprint that just about everyone has written a token for this at some point"...

I think there was a good example on coleman's blog here, too, but the main content doesn't seem to be loading for me anymore:

https://civicrm.org/blog/colemanw/create-your-own-tokens-for-fun-and-profit (corrected link)


List of mailings with public view I can't seem to find any info on this so don't know if it exists!  I would like to create a page that provides a list of all recent mailings from civiMail but with just their public view behind the link.  Is there something like that?
Running CiviCRM 4.7.29 and Wordpress 4.9.5.

Thanks
Norm

List of mailings are not directly available for anonymous or authentic user with limited permission. However you can have it available in one of the 2 ways

Using Public Mailing Archive extension(You will need to tweak code to work as per your requirements for example this extension list Mailings using Mailing subject, change the variable in tpl file to use Mailing name)
Create copy of Mailing Summary report and give access to Anonymous user. (I would create an extension that will add a special permission and use hook to alter the link of Mailing Name to use mailing view link).

HTH

Pradeep


Process Inbound Emails Failed after update from 4.6.2 to 4.6.9 i have this error in:

Entità: Job Azione: fetch_activities
Summary
Finished execution of Process Inbound Emails with result: Failure, Error message: Process Activities failed

What can i do ?
Thanks

I delete all email account and the error persiste.

Review the job log on your scheduled tasks page in the admin menu - the job results there for this task may show an error in them
Review the PHP error log or output of your cron task which failed
Review the CiviCRM logfile in files/civicrm/ConfigAndLog/CiviCRM.*.log

You can update your question here with additional details if the solution isn't clear.


Has Let's Encrypt been put into production with CiviCRM? https://letsencrypt.org/ is a new free, automated SSL certificate issuing service that simplifies SSL certificate issuance. Despite being a new CA (Certificate Authority), the certificates are recognized by all major browsers already because they are cross-signed by IdenTrust. The project is intended to facilitate much more pervasive encryption of the Internet - https://www.eff.org/deeplinks/2016/03/new-name-and-roadmap-lets-encrypt-client.

The Electronic Frontiers Foundation and others launched the service to the public in December 2015 (https://www.eff.org/deeplinks/2015/12/lets-encrypt-project-comes-fruition-2015-review), and it recently issued its 1,000,000th certificate (https://www.eff.org/deeplinks/2016/03/new-name-and-roadmap-lets-encrypt-client). Has anyone in the CiviCRM community started using Let's Encrypt in production despite the warning that it is only a beta (https://letsencrypt.readthedocs.org/en/latest/intro.html)? Any problems or gotchas?

Yes - I'm using it on one production site and one pre-production.  One has the full letsencrypt client, but it assumes root access.  The other uses an alternative client https://github.com/diafygi/letsencrypt-nosudo that doesn't need root and works on shared hosting (but you may need to tweak your .htaccess file for the verification process).

I've not needed to renew certs yet.  Although not really a problem, be aware that certs only last 3 months (though I think that's during beta).  If you have access to the webserver config, there is an auto-renewal feature but if you need to raise a support ticket on a shared hosting platform, that's less convenient.


Any issues in WordPress 5? WordPress 5 has recently come out. I've done an upgrade on a test Civi 5.8.0 site on PHP 7.1 and it went through OK and no problems are showing immediately. Is anyone seeing any issues?

It looks like my custom extension and WordPress plugin are working OK.

Thanks, Chris

It seems like the Block editor no longer breaks CiviCRM shortcodes. But you do lose the quick CiviCRM shortcode button.

The classic editor plugin with Wordpress 5.0 makes the move easier. Personally we set the Classic Editor as default and allow users to switch to block with the understanding that they will have to generate the shortcode for civi elsewhere or memorize the shortcode params. ;)


How can I customise the presentation of custom field in events? I want to have some additional data as part of my CiviCRM events, that is structured and available to Drupal Views, so I've added a couple of custom fields for Events, and I'm using those. On the public facing event information page, the default rendering of these fields is the same as in the back office, and so they look pretty out of place.

If I edit the EventInfo.tpl file it looks like it is simply pulling in the custom data with the line (line 225 in CiviCRM 4.7.24)

    {include file="CRM/Custom/Page/CustomDataView.tpl"}

I'm assuming that if I edit/override that template file it may well affect the presentation of all custom data fields right across CiviCRM.

So I guess the question is: what's the optimal way to modify the way that just these two custom fields are presented on the public facing event information page without impacting on other custom field presentation elsewhere?

As a linked supplementary question, one of these custom fields is for an event image that I can then present via a Drupal View (all my events have an image associated, and although I can of course simply include one inline through the event description field I can't subsequently access that file in Drupal Views and display itinerary a block, for example, elsewhere on the site. I'm thinking that I can't be the first person to want to re-use a CiviCRM Event image in this way. How do other people approach this?

In newer versions of CiviCRM (around 4.7.20 and higher) you can mark a custom field set as not public.  This will hide the custom field set from your event page.  Then you could use a buildForm hook to include a template of your choice; see the CiviCRM dev guide Resources Reference for details.


Even registration emails not going through - registration produces error Event registrations hang for all events and then gives error whenever "send email confirmation" is set to "yes".  While it's hanging, I can see the registration went through, then it finally shows an error with "Could not find valid value for id". I posted the full error at the end of this post.

I tried Amazon SES and sendgrid, getting the same error either way. Either way, sending test emails from outbound email settings works. It just gets stuck sending the email confirmation when registering events.

I'm currently using Drupal 7.37 and CiviCRM 4.6.3.

Full error:

#0 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Core/Error.php(359): CRM_Core_Error::backtrace()
#1 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Utils/Request.php(95): CRM_Core_Error::fatal("Could not find valid value for id")
#2 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Event/Form/Registration.php(183): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Form_Registration_Register), TRUE)
#3 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php(88): CRM_Event_Form_Registration->preProcess()
#4 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Core/Form.php(455): CRM_Event_Form_Registration_Register->preProcess()
#5 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(94): CRM_Core_Form->buildForm()
#6 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Event_Form_Registration_Register), "display")
#7 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Registration_Register), "display")
#8 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("display")
#9 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Core_Controller->run((Array:3), NULL)
#10 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
#11 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#12 /opt/bitnami/apps/drupal/htdocs/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
#13 [internal function](): civicrm_invoke("event", "register")
#14 /opt/bitnami/apps/drupal/htdocs/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
#15 /opt/bitnami/apps/drupal/htdocs/index.php(21): menu_execute_active_handler()
#16 {main}

This is a known, documented bug that does not seem to have a solution.  Please see ref: https://issues.civicrm.org/jira/browse/CRM-17161

I am happy to help a civicrm wizard debug this :)

Also noted here:

CiviEvent - Error when registering: Could not find valid value for id

Even registration emails not going through - registration produces error

Why is the event registration "Thank You" page generating an error?


Is it possible to add new target type in drupal content type? Is it possible to add new target type in drupal content type?

So it looks like you are using the Entity Reference field.  The target types, are Drupal Entity types. You can definitely create your own custom entities.

The Drupal Examples module has an entity example:
https://api.drupal.org/api/examples/entity_example%21entity_example.module/group/entity_example/7.x-1.x

Although this doesn't leverage the additional tooling provided by the Entity API module...

If you are wanting to reference CiviCRM data from Drupal node, install the CiviCRM Entity module. CiviCRM Entity exposes CiviCRM API entities as Drupal entity types

With that enabled you can reference CiviCRM memberships, contacts etc...Or create new ones, using Inline Entity Form widget


Getting active relationships using the API is returning contacts in trash I'm doing this call

$result = civicrm_api3('Relationship', 'getvalue', [
  'return' => "contact_id_b",
  'relationship_type_id' => 5,
  'contact_id_a' => "user_contact_id",
  'is_active' => 1,
]);

It is returning contact B from contacts that are in trash.

I want to filter for contacts that are not in trash but struggling to find a way of doing it.

This seems to work, using a join:

    $result = civicrm_api3('Relationship', 'get', [
      'sequential' => 1,
      'return' => ["contact_id_b"],
      'relationship_type_id' => 5,
      'contact_id_a' => "user_contact_id",
      'is_active' => 1,
      'contact_id_b.is_deleted' => 0,
    ]);


Set the Webform-CiviCRM Contribution Amount to a parameter value A client is using webform-CiviCRM for a contribution page.  Due to pro-rating and other factors, each contributor needs to pay a unique amount - and thus the webform has the exposed "Contribution Amount" element that can accept an amount from a user.

How can I pre-fill this Contribution Amount using a custom field value?  The webform Default Value can't be set to a token for a custom field that has the amount (returns "This is a CiviCRM currency field. Default value must be a number.", even if the field is an integer or a number.

It might also be possible to attach the $ amount to the URL as a parameter?

Just adding to this -> this is now possible (since today: many thanks for Fuzion for re-asking this question and helping to see it through!); we had to relax a form_error that was preventing tokens to be injected in the default field for
contribution_total_amount;

You can now do:

/webform-civicrm-example?civicrm_1_contribution_1_contribution_total_amount=120

and if you have configured your Contribution Amount -> default as:

[current-page:query:civicrm_1_contribution_1_contribution_total_amount]

Then it will fetch that $120 -> and give you:


Mailing Bounces 100% with "authentication failure" or "failed to set sender" I have some issues with sending out mailings (used to work, now it doesn't anymore). My mailing is failing 100% with a combination of the following errors:

authentication failure [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Ema
Failed to set sender: b.1139.33843.cb2d344bc94b0533@myserver.com [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Admi

Regarding the Administer CiviCRM >> Global Settings >> Outbound Ema settings, I have checked these copious times and have verified that they work using the "Save & Send Test Email" function. This for both the mail() and SMTP settings.

I have also tested the actual mailing settings by sending a test to one of my email addresses. This works 100% - which would indicate that the mailing test function uses a different approach to the actual mailing component (this does not make sense for me as it will result in inconsistent results).

Now more to the actual errors:

No idea what's wrong, as the tests pass.
I thought this was a part of the VERP option (server changes the email address) - the SMTP does not recognise the email address and does not allow sending.

When using mail(), the mailing is successfully sent, but most of the emails fall into the very dark hole of the internet - and the ones that get delivered are mostly sent to spam. This is because the reverse DNS look up for my domain is not the same as the IP of my server.

When using SMTP the SMTP server does not recognise the email address I am sending from. And yes, I have switched off the VERP function (I think).

Any ideas what else I can do to get closer to fixing this?

I experienced this problem when I was running different versions of PHP in the website and my command line interface (CLI).  You can check your PHP version for the web at Administer menu » Administration Console » System Status.  You can find your CLI PHP version by running php -v.  I was running 7.0 and 7.2 respectively.

Since PHP 7.2 has deprecated the php-mcrypt module, CiviCRM was expecting my mail password to be unencrypted when run from CLI, and encrypted when run from the web interface.  So all web-based testing works - but CLI gets authentication errors.  The solution is to match your PHP version on web and CLI.

Note that if you move from some lower version to PHP 7.2+, you'll need to re-enter your mail password for things to work.


CiviCRM Security Patch Needed warning still exists from older Civicrm Version? I've moved a CiviCRM installtation from 5.7.3 (LTS) up to 5.10.4 *latest.

However CiviCRM still gives the 'Security Patch Needed warning' which displayed when it was on 5.7.3.

Database updates, cache clear and cron have all run so bit unsure why this still displays?

Thanks in advance for any advice!

Not 100% on the outcome however it may have been a cached message. Not sure on the process for these being cleaned up after an update.

I had previously cleared caches / run cron but didn't help.


Case Details Report- Active Case Role filter Trying to run a case details report for all cases of type "x" opened between a given date range.

Noticed that not as many cases as expected show.

On further investigation found that there is a filter in the template
Active role:is equal to- options yes or no
Which effectively switches between open and closed cases

Anyone know the reason for this?

there is no option for neither, and the filter can't be removed, so I'm now left creating two reports for every case type on the system. Or creating a drupal view per case type

Craig - it's worse than that: creating two reports with 'Yes' & 'No' will still not give you all the cases if they don't have relationships.

See https://lab.civicrm.org/dev/report/issues/24 and the related PR.


Do the localisation files change between releases, as a rule? Do the files named .I10n (localisation files) change from (say) 4.6.4 to 4.6.5?
Or do they only change with major updates, say 4.5 to 4.6?

The l10n translation files (civicrm.mo files in the l10n directory, distributed in the civicrm-l10n-4.6.x.tar.gz files) should change between versions, however:

The latest translation files always support the 3 last CiviCRM versions. So currently, civicrm-l10n-4.6.5.tar.gz can be used for CiviCRM 4.4.x, 4.5.x and 4.6.x. This was done a while back to avoid having version-specific translation spaces on Transifex.com, while still supporting older versions.
Between minor versions of CiviCRM (4.6.4 to 4.6.5), there can be changes in the code that require us to send new strings to Transifex. For example, if someone fixed a typo in a string, added new strings, etc. We have not been doing that systematically for every release. While the process of pushing strings has become easier, it's still kind of messy, time consuming, because it requires validations to make sure we don't accidentally delete strings, or I find typos in new strings that need to be patched before we can update the strings, etc.


How do you update participant status without affecting contributions? I have a bunch of event attendees who were marked "pending from pay later." Due to issues with their accounting departments we didn't have cheques by the time of the event, but since they are trustworthy partners we allowed them to attend. I updated the participant statuses to "attended" so we could send thank-you letters, but now they are all marked as having paid. This is going to take a lot of manual work to confirm if anyone has yet to pay.

For the immediate concern: is there a way to check for participants with payment type "check" and "check number" blank?

Is there a way to prevent this from happening in the future? Ideally, participant status and contribution status would be independent, especially from the bulk update window, or I could be prompted with a "Would you like to mark the contribution as complete as well?"

Ben -

To your immediate question, you should be able to use the search builder (Search > Search Builder) to search for payments where the check number is empty (or null - it might be safest to search both ways).

You didn't indicate your version of Civi but it is usually possible to update participant status without recording payment - I doublechecked this quickly on the 4.5 demo site by searching for participants and selecting "Change Participant Status" from the actions menu; when I changed the status to Attended from Pending from Pay Later, no payment was recorded.  (Thinking ahead, you may want to add a different status to distinguish users who attend without paying, so you can easily find them later for collecting payment.)

Hope this helps,
Lesley


Handling Customer Card Updates with Stripe Payment Processor Does the Stripe Payment Processor handle customer credit card updates for recurring contributions? And does it depend on whether I'm using Civicrm 4.6 or 4.7?

I see this page from Stripe:
https://stripe.com/docs/recipes/updating-customer-cards

Not sure if it is implemented in the Stripe extension.

https://civicrm.org/extensions/stripe-payment-processor states

  It handles regular contributions as well as recurring through Stripe's subscription/plan feature.

and

CiviCRM Compatibility = CiviCRM 4.5, CiviCRM 4.6, CiviCRM 4.7


Incorrect Resource URL - New Install I am getting a red "Incorrect Resource URL" notice, but I can't see that anything's set incorrectly. I read elsewhere that this should result in the little arrows missing from drop-down menus, but I'm not having that problem.

WordPress install. (New - been working on it over the last week or so. Haven't gone live yet.)

I also read that this may be due to issues with symlinking, so I've used an absolute URL, not a relative one. I can access the exact location via, e.g. FTP, using the path I've put into the "CiviCRM Resource URL" field on the "Settings - Resource URLs" page.

The path I have is: /wp-content/plugins/civicrm/civicrm

Help?

We are seeing this same issue and reported it here https://issues.civicrm.org/jira/browse/CRM-21785?jql=text%20~%20%22resource%20url%22. It appears to be a false positive however.


Possible error in Contributions and Membership Details report When we run the Contributions and Membership details report for our organization, it reports 41 entries in the month:

Row(s) Listed   41
Total Amount    $ 1,320.00(44)
Average     $ 30.00

However, when the 41 rows are exported as a CSV, the amounts total to $45 less.

What is the meaning of the "(44)" beside the total amount?  I suspect it represents that the total is based on 44 rows instead of 41 which would account for why the total is erroneously high.

Is this a "feature" or a "bug"?   If a feature, how can I figure out the three extra rows since they do not show up anywhere in the report

Incidentally, if I do the same as a "Find contributions" search, it returns 41 rows and the correct total dollar amount for those 41.

This is version 4.5.8, and the organization has not been using soft credits in its operations.

You don't specify the version of CiviCRM you're using? Depending on CiviCRM version, you might be seeing one of these issues -

CRM-16636 Duplicate primary addresses causes error in report (issue opened as a result of this response, see comments)
CRM-16338 Incorrect Contribution Summary Report when a contributions has multiple soft credits (<= 4.6.3)
CRM-15374 Contribution FEES are affecting Balance and Total Paid incorrectly (<= 4.5.1)
CRM-11703 Contribution and Membership Details report showing incorrect contribution amounts (<= 4.2.8)

You could search https://issues.civicrm.org/ for other issues if none of those seems like your case (you'll know if you're using soft credits, contribution fees etc).

If you are seeing the issue on a version of CiviCRM that is marked fixed above, post a message on that issue URL - you may be able to assist by providing some (anonymised) example DB data for the core team.


Personal contacts displaying in business members directory A website for a client runs CiviCRM on Wordpress.

Part of their membership site contains a membership directory so the public can see their registered/active members.

The members are essentially businesses. In CiviCRM we have people setup as individuals and businesses as organisations, with a relationship between them. Those relationships may be staff, directors or owners.

The issue we have is the membership directory is also showing people who have relationships with those organisations (in the list) instead of just the business.

Question is, what setting do we need to change to fix this?

Check the settings for this particular membership type to see if the membership is extended to related contacts.


webform event registration - no receipts from contribution page? I have a webform that registers one participant for multiple events. payment is handled through one specific contribution page, that is set to send receipts.

But it sends nothing. Other webforms (like member fees) do send receipts.

could it be a problem that there are multiple items on the webform ?
am i supposed to enable 'online registration' for one, or all, of the events, and send receipts from there instead ?

I would prefer a single receipt for the whole transaction, but sending 10 receipts is better than sending none ...

To issue civicrm native event participant receipts when using webform civicrm module you must enable receipting for both the Contribution page as well as the Event page (in your CiviCRM) - for all Events; And yes that will be a number of receipts.

If multiple receipts is a problem - you can  use webform native receipting + use CiviRules and custom (last) contribution tokens - to send a transaction rceipt;

If you’d like to try that - Register for CiviCamp Calgary - it's a form where orgs can sign up 3 participants for up to 4 events/each in on one page;

Added: webform civicrm works with CiviCRM via it's API: from adding donations to memberships and sign up for multiple events all in one form and using sendConfirmation api to send out the native CiviCRM event receipts; CiviCRM gets a little confused we're able to get all that in one payment [natively that's not possible] - reason why I tend to dispatch my own receipts with Rules/Message templates and some custom tokens;


CiviMail WYSIWYG not working *****UPDATE ADDED 1/22/18-Additonal Settings from Civicrm.settings.php

// Additional settings generated by installer:

$civicrm_paths['wp.frontend.base']['url'] = 'https://secure.blank.org/';
$civicrm_paths['wp.backend.base']['url'] = 'https://secure.blank.org/wp-admin/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://secure.blank.org/wp-content/plugins/civicrm/civicrm';

*****UPDATE ADDED 1/22/18-
Please see the screenshot below.  Could this be the problem? There is not a /secure/ subdirectory.
The paths should be:
https://secure.blank.org/wp-content/plugins/civicrm/civicrm/
not
https://secure.blank.org/secure/wp-content/plugins/civicrm/civicrm/
and
https://secure.blank.org/wp-content/uploads/civicrm/
not
https://secure.blank.org/secure/wp-content/uploads/civicrm/

I am not seeing where to change this in civicrm.settings.php. Is there another file where this is set?

****END UPDATE****

We are using Civi 4.7.29 on WordPress 4.9.1

When creating a new mailing in CiviMail, I will select the template and it will be displayed differently in the HTML editor than it should be.  The preview show it correctly. Please see the screen shots below.  I am thinking it is either a paths issue or a permissions issue.  Has this happened to anyone else?  Does anyone have any idea where I can start with resolving it?

These are the ERRORs being shown
Failed to load resource: the server responded with a status of 404 (Not Found)
/wp-content/plugins/civicrm/civicrm/extern/open.php?q=
/secure/wp-content/uploads/civicrm/persist/crm-ckeditor-default.js?t=G87D Failed to load resource: the server responded with a status of 404 (Not Found)

What should the permissions be for these two files?
My open.php is 664
My crm-ckeditor-default.js is 644.

Based on the screenshots it looks like you've installed WP in it's own directory as opposed to the web root.

Starting in Version 4.7.27 CiviCRM will detect if WP is installed in it's own directory

So on new installs we will see a new section in civicrm.settings.php:

// Additional settings generated by installer:
$civicrm_paths['wp.frontend.base']['url'] = 'https://wpsub.test/';
$civicrm_paths['wp.backend.base']['url'] = 'https://wpsub.test/wordpress/wp-admin/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'https://wpsub.test/wordpress/wp-content/plugins/civicrm/civicrm/';

Does you civicrm.settings.php have the above lines?   If this was an upgrade it would not.   The reason for these settings is that the baseurl is different for the front end and back end of a WP site if it's installed in it's own directory.


Why is Civimail sending exactly 30 emails every cron run through Office365 SMTP Relay? I'm having an issue with CiviMail.  When the cron runs to send the scheduled mail it only sends 30 emails at a time.  I have it set up to send through Office365 SMTP Relay, so its not the 30 messages a minute limit that Office365 has.  I have the batch limit set to unlimited, so its not that either.

I can't find anything in the files that would be limiting it to only 30 messages per cron run.

My mailing list has about 5000 people in it, and I need to be able to send them all quickly.  At 30 a minute it takes 3 hours, which isn't going to work.  I even set up my cron to run every 20 secs to speed it up to an hour for all the messages. I can speed it up even more if I lower the time between runs, but I shouldn't have to.  I should be able to either send them all to Office365 or in large batches and have them send quicker than it is allowing me too.

Any ideas?

I'm not familiar with Office365 Relay, a quick search indicates it's for devices to send emails via Office365. It was a quick search so I may be wrong.

Given that you are only able to send 30 emails at a time and that Office365 has a 30 emails/minute limit sounds like it is something to do with Office365 not a CiviCRM setting issue.

You may want to look at a SMTP service, here's a blog post that compares some services that work with CiviCRM.


LoadForm Popup - Uncaught TypeError: Cannot read property 'split' of undefined In all of my custom extensions, when I use the loadForm function to load a form (generated with Civix) as a popup, I get the following error:

Uncaught TypeError: Cannot read property 'split' of undefined
at $.(anonymous function).(anonymous function).isOriginalUrl (http://dev.civicrmdev/sites/all/modules/civicrm/js/crm.ajax.js?pd7a7l:167:34)
at $.(anonymous function).(anonymous function).isOriginalUrl (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery-ui/jquery-ui.js?pd7a7l:144:25)
at HTMLDivElement.<anonymous> (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery-ui/jquery-ui.js?pd7a7l:256:40)
at Function.each (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.js?pd7a7l:370:19)
at jQuery.fn.init.each (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.js?pd7a7l:137:17)
at jQuery.fn.init.$.fn.(anonymous function) [as crmSnippet] (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery-ui/jquery-ui.js?pd7a7l:236:10)
at HTMLDivElement.<anonymous> (http://dev.civicrmdev/sites/all/modules/civicrm/js/crm.ajax.js?pd7a7l:441:34)
at HTMLDivElement.dispatch (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.js?pd7a7l:5226:27)
at HTMLDivElement.elemData.handle (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.js?pd7a7l:4878:28)
at Object.trigger (http://dev.civicrmdev/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.js?pd7a7l:5130:12)

Apparently Civi replaces the default buttons with some other buttons. This error breaks that process. I noticed this when trying to use the Shoreditch theme (my buttons disappeared).

I'm unsure how to approach debugging this. Any ideas on what would cause this with my forms loaded in popups? The standalone page loads just fine with the buttons.

I just figured it out.

When using the loadForm function you have to include at least 1 parameter in the URL. If you do not include a parameter then you will get the error.

Is this a bug?


Is it possible to install CiviCase without all the sample data? When I enable CiviCase I get a whole load of sample configuration added in that I didn't want. Is there a way to (a) get rid of it easily and (b) install CiviCase without that happening in the first place?

e.g.

two case types are created. I can disable these but I don't seem to be able to delete them.
several relationship types are created, I can delete them one by one...
several case statuses are created (minor, only "urgent" needs to go)
various other bits, I think.

The short answer is no. But it's a good point. I think this is mostly just left over from the original implementation when setting up civicase was difficult, and it was hard to know what it would look like without an example. There didn't used to be a UI - just hand-coded xml files.

You might have to delete some of a case type's definition parts first before deleting the actual type, since it might consider it "in use". But you are going to need at least one case type, so as a workaround for now instead of deleting you can edit the case type.

The relationship that is defined within the case type as the case manager has to exist.

The Open Case activity type does need to exist since it has some semantics associated with it, along with some other activity types, e.g. "Link Cases".

The Urgent status is used for hiliting on the Case Dashboard, but it will function fine if you delete it.


Enable multiple event registration for same purchaser/participant Currently if a participant purchases a ticket online and then returns at a later date to purchase another ticket, CiviCRM won't allow the same individual to purchase the 2nd ticket under their name. The purchase could register another participant and complete the purchase, but for individuals that want to purchase more than one time under their name, it doesn't seem possible. I am not positive, but I believe this is due to the unsupervised dedupe rule used by CiviEvent. Is there a way to allow the same purchaser to purchase more than one ticket at more than one time under their name online?

In 'manage event' you may be able to check "register multiple participants" and "same email address" if you have a pretty simple event setup. It's a bit clunky but if the same name is used with the default dedupe rule, civiCRM should create another participant for the same contact record. Note that i've only tested this with free events.

The registrant will be forced to go through a page that says "you're already registered, click register to sign up again", by default.

If you need someone to "edit" the same participant record by adding quantity for a paid event, I don't believe that is possible. Doing paid edits to the same participant record is something that even administrators cannot do elegantly at this point (4.6.4 for us) with basically any level of complexity involved, such as changing price sets and/or discount codes.


How to browse available payment extensions? The extensions directory lists various extensions, but I don't see a way to filter by purpose. I'm looking for payment extension options.

https://civicrm.org/extensions/index lists 208 extensions, but gives no indication or easy way to filter by purpose.

https://civicrm.org/extensions and some of the other URLs show no extensions at all, even if I hit submit on a blank form or put a single vowel into the "name" field (which I'd expect to see some results for). (This might just be a bug so isn't really part of my question!)

This seems like an obvious feature for a directory - what am I missing?

When it comes to selecting a suiting payment processors I would recommend having a look at this page.

Also, make sure to read any documentation you can find on those payment processors intersting to you, such as:

Developers Website
Extension's Githup Page
CiviCRM Wiki
...

Make sure it is compatible with your version of CiviCRM and does not have major bugs that prevent you from using it.


Can I update/requery a custom field that got changed via another field on the same page? I created some database triggers that update a read only custom field that is displayed on the main contacts page.  You change the value in another field and the db triggers update the custom field.

So how do I get that read only field to be refreshed with the new value or, at the very least, just refresh the entire page?

The civicrm ajax wiki page suggests CRM.refreshParent so I tried to put that in a post processing hook

function ccas_hooks_civicrm_postProcess($formName, &$form){
    if ( $formName == 'CRM_Contact_Form_Contact' or  $formName ==
             'CRM_Contact_Form_Inline_CustomData') {
        CRM.refreshParent;}
}

Of course, that didn't work.  I ended up with following two error messages

Notice: Use of undefined constant CRM - assumed 'CRM' in ccas_hooks_civicrm_postProcess() (line 300 of ...

Notice: Use of undefined constant refreshParent - assumed 'refreshParent' in ccas_hooks_civicrm_postProcess() (line 300...

The contact summary screen is divided into different panes, and they are each refreshed separately. If a popup form needs to refresh one or more panes, it can specify them by jQuery selector. For example, the relationship form has this in its post-process function:

$this->ajaxResponse['reloadBlocks'] = array('#crm-contactinfo-content');

Which has the effect of refreshing the pane that contains, among other things, the current employer (which the relationship form may affect).

When you implement this in your form hook it will look like:

function ccas_hooks_civicrm_postProcess($formName, &$form){
  if ($formName == 'CRM_Contact_Form_Inline_CustomData') {
    $form->ajaxResponse['reloadBlocks'][] = '#crm-contactinfo-content';
  }
}

Or substitute/add the jQuery selectors of whichever other blocks you'd like to see refreshed. Note that this code uses the array append syntax rather than overwriting the entire array.


Updating fields in existing records from csv file Hopefully the title is self explanitory. I have uploaded contact data but forgot to include one field. I now need to update the relevant field on all the records with with the data held on the csv. I did upload a custom unique key field for each record when originally uploaded the data.

Any help would be appreciated.

John

Its possible to update the contact using the same csv if you have unique identifier for each row and the same is stored in CiviCRM database either as CiviCRM Contact ID or contact external identifier for each contact.

During import select 'Update' for duplicate contacts and then in mapping make sure you use either external identifier or contact id. If this 2 fields are used during import than the contact's are directly updated into the system without performing any dedupe checks like firstname-lastname or email which is again unique way of avoiding duplicate contact into system.

If you have stored custom unique key field for each record in contact's custom field then probably you will need to run a query which will update the external identifier for a contact and make it easy for you to import again using same sheet.

The sql would be something like:

UPDATE civicrm_contact cc
INNER JOIN civicrm_value_custom_table cv ON cv.entity_id = cc.id
SET cc.external_identifier = cv.custom_unique_id_field;

  Note: Backup your database before performing contact import or running
  any  Insert/Update/Delete sql.

HTH

Pradeep


Duplicated membership options after updated to 5.15.1 After updating to 5.15.1 I find that our membership contribution page has duplicated a couple of membership types and added "-old" to the type name. This is ridiculous confusing to the users. I don't find a way to fix this using the contributions forms, the "-old" options do not appear so I can delete, and I don't know which database table holds this information. I would just delete rows from the database to fix this so the duplicated membership types are deleted.

Edit: okay I found the civicrm_membership_type table. There are no types with a "-old" extension! What is going on? Perhaps I should delete and recreate the contribution page. What then happens to the financial ledgers? Will I destroy data? You can see the problem on this page
https://idahonativeplants.org/?page=CiviCRM&q=civicrm%2Fcontribute%2Ftransact&reset=1&id=7

It might not be a membership type but just a price list - if you go to Contributions - Manage Contribution Pages and then on the far right of the table click on Configure, one of the choices is Contribution Amounts. You might see these "-old" ones listed in there. Or if it is a real membership, it might be a price set which you'd see in the same place but on the Membership Settings instead of Contribution Amounts.


Custom membership status is not being updated We always used a customized 'Membership Status', named 'geldig lid' (means: valid member). I don't know why this was done in the past, cause it actually corresponds to the built in status 'Current', but since we have quite some mailing lists connected to 'geldig lid', I'd like to continue using that one.
Now, for some reason, the customized status 'geldig' lid, doesn't work as it should. And  In order to investigate what goes wrong, I changed the order of the assigned statuses to 'Current' first and 'geldig lid' second. But the settings for both statuses are exactly the same. See attachment:

When I look for the members with status 'geldig lid', I find 19527 contacts, which is not correct cause in a lot of cases 'membership end date' is already in the past. Doing the same with 'current', I find 5824 contacts (which is correct). See attachment:

Can somebody explain what is happening here?

A membership has a single status determined by the status rules.  If the date rules mean that more than one status applies, the ordering of the rules determines the result.

From the user guide :

  To decide on which status should be applied, CiviCRM looks to see if the membership has a status override. If it does, it applies that status. If not, it looks at each status in turn starting at the top of the Status Rules page until it finds one that is valid. That is to say, it looks to see if today's date is between the start and end date for the membership status at the top of the list. If it is, it applies that status, if not it moves to the next status and repeats this process until it finds a status that matches.

Since you have changed the order, 'Current' will be used in preference to 'geldig lid' although the rules for both are the same.

When you say that the status "doesn't work as it should", I think you mean that memberships past their end date are still showing as 'geldig lid'.  Membership statuses are updated either by saving a change to the membership or by the scheduled job "Update Membership Statuses".  From your screenshots it seems the scheduled job is not running / not working.

You can have a Label for the Membership Status that is different to its Name, so you could use the standard Current but change the label to 'geldig lid'.

However, if you want to continue with the current setup, change the ordering back so that 'geldig lid' appears before 'Current'. Before running the scheduled job, you might want to see how many are past their end date and how far past they are as to whether you want to notify anyone or take action etc.  Then enable/fix the scheduled job - that should change Current memberships to 'geldig lid' and change those past their end date to Grace or Expired.


Event management problems My events will not appear on the website calendar
Unable to upload images to the event description page
When doing a test registration, I do not receive a confirmation email

Could you please review?

Link to registration for Leadership Givers Reception:
https://www.unitedwaydgco.org/civicrm/event/info?reset=1&id=74

Link to registration for Campaign Celebration Dinner:

https://www.unitedwaydgco.org/civicrm/event/info?reset=1&id=75

Thank you,
Colleen

The calendar is not part of core CiviCRM, so I can't be 100% sure without looking at it, but the first issue may be that you didn't mark the event as "public".  If I were setting up a calendar like that, I'd want to limit it to events marked "public" in case I wanted to record other events that shouldn't go on the calendar.

Your other two issues could be so many different things that it isn't worth hazarding a guess without more information or access to your site.  If you are in touch with the company who built your site, you should contact them, or you might contact a CiviCRM Partner.


Error Upgrading DB to 5.15.alpha1 on Drupal 7: SQL error When I am trying to Upgrade the DB to 5.15.alpha1, some SQL error is occurring.
How can I fix the error as given below:

  $Fatal Error Details = Array ( [callback] => Array ( [0] =>
  CRM_Core_Error [1] => exceptionHandler ) [code] => -1 [message] => DB
  Error: unknown error [mode] => 16 [debug_info] => INSERT INTO
  civicrm_option_value (option_group_id, label, value, name,
  weight, is_reserved, is_active, is_default) SELECT
  @option_group_id_ps as option_group_id, label, value, ov.name, weight,
  ov.is_reserved, ov.is_active, is_default FROM civicrm_option_value ov
  INNER JOIN civicrm_option_group og ON og.id = ov.option_group_id AND
  og.name = 'contribution_status' [nativecode=1052 * Column 'label' in
  field list is ambiguous] [type] => DB_Error [user_info] => INSERT INTO
  civicrm_option_value (option_group_id, label, value, name,
  weight, is_reserved, is_active, is_default) SELECT
  @option_group_id_ps as option_group_id, label, value, ov.name, weight,
  ov.is_reserved, ov.is_active, is_default FROM civicrm_option_value ov
  INNER JOIN civicrm_option_group og ON og.id = ov.option_group_id AND
  og.name = 'contribution_status' [nativecode=1052 * Column 'label' in
  field list is ambiguous] [to_string] => [db_error: message="DB Error:
  unknown error" code=-1 mode=callback
  callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO
  civicrm_option_value (option_group_id, label, value, name,
  weight, is_reserved, is_active, is_default) SELECT
  @option_group_id_ps as option_group_id, label, value, ov.name, weight,
  ov.is_reserved, ov.is_active, is_default FROM civicrm_option_value ov
  INNER JOIN civicrm_option_group og ON og.id = ov.option_group_id AND
  og.name = 'contribution_status' [nativecode=1052 ** Column 'label' in
  field list is ambiguous]"] )

Please advice.

What you can try is in line 8 in CRM/Upgrade/Incremental/sql/5.15.alpha1.mysql.tpl you can change it from

SELECT @option_group_id_ps as option_group_id, {localize field='label'}`label`{/localize}, value, ov.name, weight, ov.is_reserved, ov.is_active, is_default

to

SELECT @option_group_id_ps as option_group_id, ov.{localize field='label'}`label`{/localize}, ov.value, ov.name, ov.weight, ov.is_reserved, ov.is_active, ov.is_default


Invalid currency "$" when sending confirmation and receipt Running CiviCRM 5.22.0 with WordPress 5.3.2

Whenever a user attempts to create a membership AND record membership payment AND send confirmation and receipt, an Invalid currency "$" error is generated. The membership and contribution are recorded in the database, but no e-mail is generated. CiviMail is working in all other contexts.

If a user creates a membership AND records membership payment but does NOT check "Send Confirmation and Receipt?," the transaction completes without error. Editing the membership and selecting "Send Confirmation and Receipt?" will generate the invalid currency error.

I enabled debugging and backtrace and the error displayed with the exception trace is:

CRM_Core_Exception: Invalid currency "$" in <docroot>/wp-content/plugins/civicrm/civicrm/CRM/Core/Smarty/plugins/modifier.crmMoney.php on line 35

Any thoughts?

We had the same issue. The cause of the membership creation issue is with the email template syntax. Look in your system-generated messages and change the receipt templates you are using with, any instance of:

{$line.unit_price|crmMoney:$currency}
{$line.line_total|crmMoney:$currency}
{$formValues.total_amount|crmMoney:$currency}

Needs to be changed to:

{$line.unit_price|crmMoney}
{$line.line_total|crmMoney}
{$formValues.total_amount|crmMoney}


Recaptcha not showing on contribution form I have registered my recaptcha with Google as instructed in the documentation.  I have then created a profile and set the advanced setting to include recaptcha.  Added that profile to a contribution form and nothing is showing.  So as a test, I added a field in the profile and the field is showing on the form but no recaptcha.  Thought maybe something is wrong with my install so I went to the Civi Sandbox and tried it, but still it is not showing.  So I must be doing something wrong, but cannot figure out what that is.
Thx
John

OK, I found the problem and it was my idiocy.  I was trying to get it to show as a logged in user, and it was not.  When I went as an anonymous user, it shows up just fine.  It totally makes sense, just was not immediately obvious to me.

John


Can anyone tell how SMS Api Extension (v1.3) working in civicrm? Can anyone tell how SMS Api Extension (v1.3) working in civicrm ?

You can try the SMS API with the API explorer. Basically all it does is enable the sending of an SMS (which is in CiviCRM) using an API. But it is hard to answer such a generic question.


Duplicate additional participant created during online payment(event) In online event registration, duplicate additional  participant created  when user click continue button on review page after come back from Payment gateway(PG like Paypal Standard, Monerise) by clicking browser back button.

Civicrm version: 4.6.2

Any fix?

Thanks,
Siv

If the payment was successfully then the user has to be redirected to thank you page -

I guess you are speaking about -
user manually clicking the back button or cancel button before successful payment - in that case you need to redirect the page to the event start page or just refresh the page again

This is an cache issue

I guess this helps !!!


What are the implications of changing the SITE_KEY? See also Generating a new SITE_KEY

If I change the SITE_KEY in civicrm.settings.php, what might stop working as a result?

Eg:

Will checksums emailed to contacts last week still be valid?

(you're welcome to to edit question or comment to add to this)

Change all cron jobs and scripts that use the site key for authentication
Reenter any passwords, specifically payment processors and mail/sms passwords
All prior checksums sent in the last 7 days (if that value has not been changed), will no longer work

A grep for SITE_KEY in the code base will uncover a few more things :)


CiviContribute Disappeared We were on version 5.12 of Civi with WP 5.1.2 when I noticed our Donate page didn't work.  After digging I noticed the CiviContribute was missing from the Components page.  We upgraded to civi 5.18 and still no CiviContribute:

Any way to fix this?
Thanks

What is civisubmit? It looks like contribute has been renamed.


Error: Refund amount must equal refund due amount Has anyone else had this issue where its not possible to get the refund page to save even though the amount is correct?

Drupal Error Log

Notice: Undefined index: event in CRM_Core_Payment_ProcessorForm::preProcess() (line 78 of /****/public_html/sites/all/modules/civicrm/CRM/Core/Payment/ProcessorForm.php).

Can you try to replicate on dmaster.demo.civicrm.org and if you can replicate it there please create an issue at https://issues.civicrm.org/ and assign it to me (Joe Murray)? Thanks!


Awaiting approval participant status message template When requiring participant approval, it sends this email message. I would have thought it would have been in the system workflow messages under message templates. It is not. So where do I find this in core?

Also while configuring the online registration, it let's you customize the approval message, but I do not see where this is actually showing to end users.

It is within the Events - Registration Confirmation and Receipt (on-line) template.


cli.php can only be run from command line Using WordPress 5.4 and CiviCRM Version 5.18.4.  Hosting with InmotionDirect, managing via Cpanel.

Trying to follow the instructions to set up our cron job.  I got the command line to work, finally, as:
php public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s [site] -u [user] -p [password] -e Job -a execute

It worked, and I thought I was done.  Plugged it into the Crom job list in Cpanel and sat back.

Error via email: "cli.php can only be run from command line."

Well, nobody mentioned that in the instructions.  Is that a universal rule, or is just my hosting service being fussy?

Based on an answer here (Setting up cron jobs on cPanel) I tried putting the command line in a file and having the cron job command be just sh thatfile.  Same error.

Is there a workaround?  Or do I have to manually install yet another program like wp-cli just to run my jobs?

Well, I seem to have resolved it by replacing cli.php with cron.php in the command line.  Of course it didn't do anything when I ran the command from the terminal, but I plugged it into the cron jobs list and it seems to be executing the jobs now.  I am just lucky I spotted the "cron.php" file in the bin folder, and took a chance on it being what I needed.

My sympathies to any novice like me who has to set up Cron Jobs for CiviCRM -- the instructions may make sense to a Linux expert or php programmer, but to complete this simple and essential task, it has taken me months.

Thanks for your help, folks!


Including pictures in our Newsletter How can I include pictures in the Newsletter created with Civicrm ?
Using the "Image" Button in Civicrm's HTML editor, the pictures appear in the newsletter template as well as in the "preview as HTML" window, but in both test e-mail and the actual e-mail they only appear as a frame with a torn sheet of paper in the top left corner. How can I solve this problem ?

edit:
https://civicrm.lesewelt-ortenau.org/sites/default/files/civicrm/persist/contribute/images/IMG_2143%282%29.JPG

I tried opening the URL to one of the pictures at home yesterday but could not open itwhereas it works from the pcs in our office. I assume the problem is one of the two mentioned by user Fabian. However i don't know how to proceed now, having close to no experience with servers etc.

Civicrm ver.4.6.21 // Drupal

Hi Felix and welcome to CiviCRM Stack Exchange.

Your problem could have a number of reasons, e.g. the following:

your server does not allow access via http for anonymous users (could
be protected by htaccess, a vpn...)
you do not have a ssl certificate or it is self-signed

If that is not the reason please try to provide some more information such as:

are images not displayed for all recipients or only certain ones?
does it happen with all mail clients/services or only certain ones
...


finding people with activities added by a certain user we add activities and at times contacts using the BCC function (i.e. BCCing the CRM). How can I do an advanced search that gives me the contacts that have been added or are associated with an activity that I have added?

Thanks. Michael

You could use the search "Find activities" as in the screenshot. However this will only give you a list of activities as a result and not of the contacts (you can only see them in the results column). Maybe this helps anyway?


Blocking Registration of other participant Using on line registration in CiviEvent, I can check the box 'Register multiple participants'. For an specific event I don't want that so I don't check that box.

when I log in before registration, I get the notice above the registration fields:

Welcome Betty Dolfing. (Not Betty Dolfing, or want to register a different person?)

and then I can click on the link to register a different person.

Question: I don't want this option that participants can register others as well and even have the opportunity to 'look up' people in CiviCMR. How can I get rid of that? It seems a default thing for logged in accounts. I'm using Drupal 7 with CiviCRM 4.6.22. I tried to switch on and off several permissions in Drupal but haven't found the solution yet.

To do the same, I use 2 Webforms :

one public (authenticated users) which is limited to their own registration (existing contact hidden)
one, almost identical, reserved to an administrative role which enables different persons registration.

You may need the permission per webform Module (https://www.drupal.org/project/permissions_per_webform)


Adding Teacher Bio to Events Working on a site that does regular classes with different teachers. The teacher bios are stored as pages in WordPress (could be moved to posts). We are looking for a way drop the bios into the event descriptions so when a new event is setup the bios can be part of the description. The site is in WordPress 4.7 & CiviCRM 4.6.

I have looked at a couple plugins (Insert Pages, Display-Posts) that allow you to drop content into other pages in WordPress but they don't seem to work in the CiviEvent Description field.

Thanks in advance for any ideas.

You're not going to be able to inject a WordPress page/post into a CiviCRM event without some custom code.

If your event pages are dropped into WordPress pages/posts via a shortcode, you could add the bios above or below the shortcode.  This is the simplest approach, and if you wanted to reposition the bios to be within the "Description", that would be doable with 3-4 lines of jQuery.


CiviCRM Webform : Select field used to use autofill I want to use 3 fields (name, surname, phone number) to search existing contact and then autofill other fields.
I don't find how to specify how to map the CiviCRM field to search, nor how to define 3 fields used to search.

Is it possible? And how ?

Thank you for your help.

Regards.

Olivier.

This is not exactly what you describe but may suit your purposes or at least give you something to go on.

In the CiviCRM tab of the webform builder, enable CiviCRM processing. For Contact 1, tick Existing Contact and a few other fields (try including some address fields for example).
Go to the Webform tab and click Edit next to the Existing Contact component. Set it to Autocomplete and then in the Contact Display Fields box, use Cntrl-Click to add a bunch of fields that match the ones you picked on the CiviCRM tab.

Go to View and now you should find that it works kind of like you describe. Start typing in the box and contacts should appear with First Name, Last name and email all in the box and when you pick one the other fields should populate.


Using Wordpress for installing Civi got these errors! Notice: Use of undefined constant DIR - assumed 'DIR' in /home/yonatony/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ClassLoader.php on line 127

Notice: Use of undefined constant DIR - assumed 'DIR' in /home/yonatony/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ClassLoader.php on line 104

Notice: Use of undefined constant DIR - assumed 'DIR' in /home/yonatony/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ClassLoader.php on line 105

Notice: Use of undefined constant DIR - assumed 'DIR' in /home/yonatony/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ClassLoader.php on line 104

Notice: Use of undefined constant DIR - assumed 'DIR' in /home/yonatony/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ClassLoader.php on line 105

Fatal error: Class 'CRM_Core_Config' not found in /home/yonatony/public_html/wp-content/plugins/civicrm/civicrm/install/index.php on line 138

Please make sure all files of civicrm were uploaded in your site files and file wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php is present there.

Also make sure your database credentials are correct and following lines are present in the end of file civicrm.settings.php

require_once 'CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();


Why is CiviCRM not seeing the timezone correctly? I have been unable to get the CiviCRM warning about timezone settings corrected after this just past daylight savings transition. Usually I would correct it by changing the timezone setting of the Drupal user ID's. In the past, the user's timezone setting would be an hour off to the real time, so adjusting the timezone setting in Drupal back to current time always corrected the issue. However this time the user timezone setting already was correct.

I have written up the following PHP tester:

<?php

$db = new mysqli('localhost', 'dbuserid', 'blablablapassword', 'db');

if($db->connect_errno > 0){
  die('Unable to connect to database [' . $db->connect_error . ']');
}

$sql = <<<SQL
    SELECT NOW() AS `NOW`
SQL;

if(!$result = $db->query($sql)){
  die('There was an error running the query [' . $db->error . ']');
}

while($row = $result->fetch_assoc()){
  echo 'MySQLi date: ' . $row['NOW'] . '<br />';
}

$result->free();

echo 'PHP date: ' . date('Y-m-d H:i:s');

?>

Which outputs:

MySQLi date: 2015-05-26 21:32:56
PHP date: 2015-05-26 21:32:56

Looks like they match to me.

I have also hard coded set the timezone into the Apache virtual site's configuration by adding to the site's .htaccess file:

  #Added PHP Timezone information to match Linux configuration
  php_value date.timezone "America/New_York"

Where else could be causing CiviCRM to complain thusly:

Environment Settings
Timestamps reported by MySQL (eg "2015-05-26 21:28") and PHP (eg "2015-05-26 20:28" ) are mismatched.
Read more about this warning

I am thankful,
Michael

I know you said you checked the user's timezone but did you check the sitewide time zone in Drupal at /admin/config/regional/settings?


How do you update the contact information of someone in CiviCRM? According to CiviCRM API documentation, the .create() function with a specified contact ID should modify the records within CiviCRM; however, even after trying that, I still can't seem to properly push changes to CiviCRM.

In the code below, I'm trying to change Jane Doe's gender from "1" to "2", and when I change that by setting val.gender_id="2", it prints out the right result. However, when I try to "get" Jane Doe's information afterwards, it prints her gender_id as "1". So, it doesn't actually update the CiviCRM database.

Is there a way to fix this?

//TESTING FOR UPDATING CONTACT INFORMATION OF 'JANE DOE' in CIVICRM DATABASE

crmAPI.create('contact', {id:'12966'},
  function (result) {
      console.log(result);
      val=result.values[0];
      val.gender_id='2';
      console.log('UPDATED CONTACT: '+ val.display_name + " " + val.gender_id + " " + val.country_id);

crmAPI.get('contact', {id:'12966'},
  function(result) {
    console.log(result);
    for (var i in result.values) {
      val=result.values[i];
      console.log(val.display_name + " " + val.gender_id + " " + val.country_id);
    }
  }
);

});

EDIT: I figured out what went wrong. The gender_id change must be specified as a parameter in the .create() function. It shouldn't be changed in the callback.

The correct code is:

crmAPI.create('contact', {id:'12966', gender_id:'2'},
   function (result) {
       console.log(result);
       val=result.values[0];
       console.log('UPDATED CONTACT: '+ val.display_name + " " + val.gender_id + " " + val.country_id);
});


Customise Contacts Relationships Tab I want to customise the contacts relationships tab screen to show if the listed contacts (Individuals) belong to a specific group or not. I'm not sure where to start and would appreciate any pointers. I wasn't sure whether I needed to customise a template or create an extension that uses a hook...

You can achieve this through following ways:

Create ACL rule through UI to View Contact of specific group.
Create an extension and use pageRun hook to alter the $rows send to smarty template.
Create an extension and use aclWhereClause hook to restrict contacts to show.
Probably not sure apiWrappers or selectWhereClause might also be used.

Note: Using #1 and #3 will be affected on all pages/forms/reports.

HTH

Pradeep


How to handle conditions in API I have created a API. In this a simple select query is running and data is displaying as JSON format

But I don't how to handle / pass all the conditions to the select query

Parameter = 1 or
Parameter <= 1 or
Parameter => 1 or
Parameter != 1 or,...

Currently my query is as below

Select col1,col2,col3 from civicrm_table

I want to build my select query as

Select col1,col2,col3 from civicrm_table where condition

Here condition may be any one from the list

Is there a simplest way to handle this in Civi API

My API code

<?php

/**
 * Membershipperiod.Get API specification (optional)
 * This is used for documentation and validation.
 *
 * @param array $spec description of fields supported by this API call
 * @return void
 * @see http://wiki.civicrm.org/confluence/display/CRMDOC/API+Architecture+Standards
 */
function _civicrm_api3_membershipperiod_Get_spec(&$spec) {
//  $spec['magicword2']['api.required'] = 1;
  $spec['membership_id']['api.required'] = 1;
}

/**
 * Membershipperiod.Get API
 *
 * @param array $params
 * @return array API result descriptor
 * @see civicrm_api3_create_success
 * @see civicrm_api3_create_error
 * @throws API_Exception
 */
function civicrm_api3_membershipperiod_Get($params) {

$condition="";
if($params['membership_id'])
{
  if(is_array($params['membership_id']))
    {
    foreach($params['membership_id'] as  $key=>$val)
         $val="p.membership_id $key $val";
    }
else
$val="p.membership_id=".$params['membership_id'];
$condition=" and $val";
}

  $query = "SELECT c1.display_name, m.contact_id, c.total_amount,p.membership_id
FROM civicrm_membership m
RIGHT JOIN civicrm_membership_payment p ON m.id = p.membership_id
INNER JOIN civicrm_contribution c ON c.id = p.contribution_id
INNER JOIN civicrm_contact c1 ON c1.id = m.contact_id $condition";

  $result_array=array();
//    $result_array[]=$params['membership_id'];
  $dao = CRM_Core_DAO::executeQuery($query);
  while ($dao->fetch()) {
    $display_name=$dao->display_name;
    $contact_id=$dao->contact_id;
    $total_amount=$dao->total_amount;
    $membership_id=$dao->membership_id;

    $result_array[]=array("contact_id" => $contact_id,"membership_id" =>$membership_id, "name" => $display_name, "amount_paid" => $total_amount);
   }

$returnValues=$result_array;
    // Spec: civicrm_api3_create_success($values = 1, $params = array(), $entity = NULL, $action = NULL)
    return civicrm_api3_create_success($returnValues, $params, 'NewEntity', 'NewAction');

}
?>

BAO

class CRM_History_BAO_MembershipPeriod extends CRM_History_DAO_MembershipPeriod {

  /**
   * Create a new MembershipPeriod based on array-data
   *
   * @param array $params key-value pairs
   * @return CRM_History_DAO_MembershipPeriod|NULL
   *
  public static function create($params) {
    $className = 'CRM_History_DAO_MembershipPeriod';
    $entityName = 'MembershipPeriod';
    $hook = empty($params['id']) ? 'create' : 'edit';

    CRM_Utils_Hook::pre($hook, $entityName, CRM_Utils_Array::value('id', $params), $params);
    $instance = new $className();
    $instance->copyValues($params);
    $instance->save();
    CRM_Utils_Hook::post($hook, $entityName, $instance->id, $instance);

    return $instance;
  } */

}

It looks like you pretty much have it almost done from your screenshot. The where conditions are in the parameters, you have membership_id selected, and you can choose an operator and value for each of the parameters.

Regarding the SELECT col1, col2, col3, if you want to limit to only certain fields you can do that with the "Fields to return" box.


Is there an extension to allow members voted into certain roles (e.g. director, communication director...)? Is it possible to have an election of a group within CiviCRM.

Goal:
elect users to hold certain roles within a group (e.g. editor, communication director...) and thusly:

allow members to vote
use certain rules to promote a user to a certain role (e.g. absolute majority...)
Roles are effective on the Drupal side, where the user now holds (or holds no longer) a certain role within a group

I don't believe such an extension exists for CiviCRM.  However, there IS an Election module for Drupal, along with Voting API, which I haven't used.  You could use CiviMember-Role sync to grant a role to members that allows them to vote, satisfying your first question.

You may be able to use Drupal Rules based on the outcome of the election - it appears Voting API supports this, not sure about Election module.  This would satisfy parts 2 and 3 of your question.


Does CiviVolunteer expose fields to webforms? Currently working with CiviVolunteer, and some of the functionality is very useful for our project.  We are going to sign volunteers in to our events using a webform.  But no CiviVolunteer fields seem to be exposed to webforms - for example, volunteer role.  I am beginning to realise this extension is rather 'stand alone' and not really integrated with Civi - or have I missed something? I know that I can add custom fields to the Volunteer contact type, but I want to access the basic volunteer fields (like role) in a webform.  Can I do this?

Sorry - the answer is 'no' there is indeed no CiviVolunteer - Webform Civicrm integration yet and much of our current efforts on the Webform CiviCRM project are directed towards a prototype version for D8;


Is there a way to allow one user to register many participants for an event and to send separate invoices to each participant? All of our client's members are either other associations or business "associate members." Many of the associations are managed by association management firms. The association managers need to track payment for each event registrant but they want the convenience of multiple registrations for the online registration. Similarly, Associate members may have satellite offices which need to receive individual invoice but they want one person in the organization to do all the registrations.

We just realized that partial payments from all the business/management entities apparently can't be applied to each registered user. So if  "Jo Bob" pays his fee, for example, they don't want that payment to be applied to "Mary Jane."

I don't see a clear path to resolve these competing needs. Does someone out there have a similar need or know of a solution to this user dilemma?

I have my Alt Invoice extension, which sends an additional invoice to someone based on their relationship.  I'd say that a developer could start from there to make an extension and be more than halfway there.


Let participants confirm registration with one click? We frequently have trouble with participants not finishing the confirmation process (after being allowed to participate --> pending from approval), because offering them all data input fields again is confusing them.

So I'd like to make the link sent within the "Please confirm your registration" mail directly confirm the registration without having to go through all registration pages again (directly link to the Thank you-page).

Is that possible? (Very limited php/html skills available...)

Thank you in advance!

Drupal 7.43 with CiviCRM 4.6.4

One way to do that would be:

Create a drupal webform where you show the CiviCRM user and the Event and a Submit button that registrates the visitor to the Event.

If you use a checksum token in the link then the person you mail will be shown on that page.

With a second parameter in the URL, for example "&action=register", you can use Javascript to auto-submit that form.

(Simirarly you can also create a cancel webform + email to send to people who already registered, so you make it easy for them to let you know that they will not be there).


CiviVolunteer: need link for Joomla I am using CiviVolunteer with Joomla and I am trying to enable the volunteer Opportunity Listing. I tried the following link the http://address-to-your-site/civicrm/vol/#/volunteer/opportunities link with my domain and I am not able to see it. I have angular profiles enabled, and I granted access to AJAX API and CiviVolunteer: register to volunteer to anonymous users, but I am still not able to see this list publicly.
I have found the link for wordpress, but there is no documentation for Joomla. Can anyone help?

I don’t have a Joomla instance with CiviVolunteer but try this -

/index.php?option=com_civicrm&task=civicrm/vol/#/volunteer/opportunities


Authorize.net E-checks? I need to be able to add the ability to do e-checks via Authorize.net. But it appears the only extension that was available for this says it shouldn't be used because it messed with a core CiviCRM file. So how are people doing this?

Edit: The previous answer is not an option. That page is from 2016 and the information is apparently from back when there was an extension. Without an extension connecting CiviCRM and Authorize.net, the solution there won't work. It's just an Authorize.net reseller. They don't provide extensions and such. So we're still looking for a solution. Or an estimate as to the cost to get the old extension working so that we can crowd fund it?

The current Authnet extension supports e-checks and doesn't override core files, and hasn't since April 2019 (version 1.3).


Civi is Requiring "On Behalf of Organization" fields when that's not even checked On our contribution form, we allow people to contribute "On Behalf of an Organization" however it's not required.

The problem is even when that box is left unchecked, they get to the confirmation page without error, but when they actually click to submit the form, it says that the organization fields are all required.

It looks like this person had a similar problem.
https://forum.civicrm.org/index.php?topic=35137.0

Here's our form:
http://rivertreesingers.org/support

If you test it, just check the mail a check option to go through, but it shouldn't let you complete.

If it seems like a bug, where should that be reported? I'm on CiviCRM 4.7.3 in a WordPress environment.

Thanks!

Never did find a good solution. We ended up just removing the option from the form. At the time, I think we misunderstood how CivicCRM works and what the purpose of "on behalf of an organization" was. One thing we learned though, that might help you. The organization in question has to already exist in the database. I think that is still true for the latest versions of CiviCRM.

Anyway, we just tell donors that if they want to contribute "as an organization" (note the wording: not "on behalf of an organization" but rather, "as an organization"), then they need to use a corporate credit card or a corporate bank account. That way, the organization entity gets the tax credit, not the individual. Civi assumes that the donor is an individual. Always, so far as I know. So, if the donor in filling out the online form is "representing" a corporate entity, that's fine. Can do that. But the payer, usually as indicated by the payer address (the billing address associated with the credit card), is the one that the IRS will look for if they ever audit. Of course, you can set it up so that the person filling out the form gets a "soft credit" whereas the actual payer (the organization) gets the hard credit. Hope this helps.


How to manage a scholarship fund? I'm on a project where the organization receives corporate donations to offer scholarships for their summer arts camps. When eligible students are found, their event registrations are paid via scholarship. For the donation side, it will come in as a Check or other pay type, and we'll use a "Scholarship" Financial Type. For distributing that money, I think a Payment Instrument of "Scholarship" is best, as the scholarships could be full or partial, with the remainder paid by other means.

So doing this means I can track how the money comes in and is allocated, and I'm guessing the bookkeeper will be keeping an eye on the balance. However I'm a bit stuck accounting-wise for how to present it to her. What kind of Financial Account Type makes sense to go with my new Financial Type and Payment Instrument?

Does this method even make sense, or should I consider using CiviDiscount instead?

At Administer > CiviContribute > Financial Types create a financial type of 'Scholarship grant revenue' to record the check. This will also create a revenue financial account with the same name that should be edited to have the correct account code etc.
Create a financial account of 'Scholarships disbursed' to record the scholarship payments sent out at Administer > CiviContribute Financial Accounts, make it an Expense account, and make other relevant changes such as entering the Account Code.

Ensure the existing Accounts Payable account or another new one is correctly configured with the appropriate account code and other details. Also optionally ensure the bank account from which checks to the scholarship winners will be drawn is correctly configured with its account code, etc.

Go to Financial Types and create a Financial Type also with the name of Scholarships disbursed. Assign the similarly named Financial Account to it as an Expense Account, and the Accounts Payable and optionally the Checking Account as the asset account.

Use CiviGrant to create Grants for the Scholarship recipients.

If desired, install and use the Grant Applicaton Pages extension to accept applications from students.

If desired, install and use the Grant Programs extension to assist in evaluating applications and communicating with applicants, and optionally printing checks.

Export all financial transactions associated with recieving the original check, allocating the grants, and paying the grants at Contributions > Financial Batches.


greater-than-or-equal-to value in search builder is not displaying When creating a smart group I am no longer able to select the greater-than-or-equal-to value in the operator field. I tested it several times and the only time I can choose the greater-than-or-equal-to value is when it is the first search in my search builder. In the image you can see that I can not choose the value I want to modify the date accordingly. I am using CiviCRM 5.3.1

I was able to replicate this bug on Civi 5.3.1 but not on the latest version (5.6.1).  An upgrade should take care of this for you.


SOLVED - CiviCRM Cron Configuration on Drupal 7 throws unable to find key error with duplicate root folder in error message I tried to find the answer here, in the old forum, and many searches on the Googoracle to avail. Here is my problem

The requested page "/cm_starterkit_moderate-7.x-2.0-beta7/cm_starterkit_moderate-7.x-2.0-beta7/civicrm-cron/passthrough?key=*******(masked)" could not be found.

Obviously, it's not duplicated.  And I wanted to change the directory structure, but ran into problems with that. :/

Any ideas on how to fix this? This seems to only be a problem with the CiviCRM Cron config screen.

I am on Drupal 7.4.3 and CiviCRM 4.7.6.

Thanks Chris!

welcome to the Stack,

You need to update your directories!

Head on to "Administer" then "System Settings" and then directories. Point the locations to the right place and save. Don't forget to "clear cache and update paths" afterwards!


Fundraising event - can I sell tickets AND collect donations? My organization is hosting a fundraising event at which the tickets are not expensive and participants can contribute an additional amount as well. How would you set this up? Currently I have a price list for the tickets, but I'm unsure how to do the write-in additional contribution. Linking to the donate page could be done, but isn't ideal. Thoughts?

one way you could do this is to create one field in your priceset for the ticket (probably making it required to ensure that they actually purchase tickets), and then another field (not required) that's a text field with a value set to 1 (which will multiply by the amount they enter), e.g., https://www.screencast.com/t/Db1nHAWfA (You can also set the financial type to something besides Event Fee for the additional contribution, if desired.)

Lesley


Add supplemental address field 1 to BillingBlock.tpl I'm using CiviCRM 4.6 with Drupal 7 and have added the Supplemental Address Field 1 in CiviCRM but I can figure out how to get it to show in my custom BillingBlock.tpl

You have created a new template or customized one, right? Do you already have the address data available in your template? You can check this by making sure debugging is switched on in your environment and then access your BillingBlock.tpl but add &smartyDebug=1 at the end of the url.
If not, you can use the API to retrieve the address data, assuming you know the contact id. In Smarty you can do:

{crmAPI var='result' entity='Address' action='get' q='civicrm/ajax/rest'}
{foreach from=$result.values item=Address}
  <li>{$Address.some_field}</li>
{/foreach}

This will allow you to retrieve the supplemental address.


How to use API chaining to create a contact and a relationship I've read all the docs I could find, the code examples, the 4.6 explorer, but I'm not grasping one piece. Below is code to create a new adult contact (via profile submit, to get some extra validation for free), and multiple student contacts, each with a relationship to the adult. When chaining the relationship piece, what goes into contact_id_a and contact_id_b?

Here is the error result, calling code is at the bottom of this post:

Array
(
    [error] => Error in call to Profile_submit : Error in call to Relationship_create : contact_id_b is not a valid integer
    [error_code] => 2001
    [error_data] => Array
        (
            [error_field] => contact_id_b
            [type] => integer
            [error_code] => 2001
            [entity] => Profile
            [action] => submit
            [is_error] => 1
            [error_message] => Error in call to Profile_submit : Error in call to Relationship_create : contact_id_b is not a valid integer
        )

)

Edit: updated the code to better reflect what I'm trying to do, please see the comments on the innermost calls to create relationships:

  //build array of student details
  $student_profiles = array();
  foreach ($_POST['student_details'] AS $student_record){

    $student_profiles[] = array(
          'sequential'  => 1,
          'profile_id'  => 14,
          'first_name'  => $student_record['student_first_name'],
          'last_name'   => $student_record['student_last_name'],
          'gender_id'   =>  $student_record['gender_id'],
          'birth_date'  => $student_record['birth_date'],
          'allergies'   => $student_record['allergies'],
          'api.Relationship.create' => array (
                  'sequential' => 1,
                  'contact_id_a' => '$value.id',  //is this the valid contact ID of the student profile we just submitted?
                  'contact_id_b' => '$value.api.Profile.submit',  //how do i fix this to get the Profile.submit id from the parent's record?
                  'relationship_type_id' => 1,
                  'is_permission_a_b' => 0,
                  'is_permission_b_a' => 1,
                ),
         );
  }

    //build parent details and attach student detail array
    $parent_profile = array(
      'sequential' => 1,
      'profile_id' => 14,
      'first_name' => $'first_name',
      'last_name' => $'last_name',
      'api.Profile.submit' => $student_profiles,
    );

    //submit the main profile with all chained items
    try {
        $parent_result = civicrm_api3('Profile', 'submit', $parent_profile);
    }
    catch (CiviCRM_API3_Exception $e) {
      // handle error here
      $errorMessage = $e->getMessage();
      $errorCode = $e->getErrorCode();
      $errorData = $e->getExtraParams();
      return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
    }

I believe it would be '$value.id' (ex. https://github.com/civicrm/civicrm-core/blob/master/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php). Basically, '$value' can be used to reference any values added by the parent api call.

Also, to your question about sanitization, the values should be sanitized. However, I would recommend using CRM_Utils_Request::retrieve() to get the submitted values from the request rather than $_POST as it does some extra sanitization work.


How to create a new group? How do I add a new group to the drop down menu for groups?

I want to add a "Former Board Member" category.

Thanks!

Menu option Contacts/Manage Groups then 'Add group'


Why don't contributions (for membership) paid using PayPal, complete and send receipts? Using Joomla 3.8.5 and CiviCRM 4.7.29.
a membership transaction is entered in CiviCRM and paid via PayPal. The transaction completes in PayPal and an IPN is sent to CiviCRM. CiviCRM displays the thank-you page with transaction details, but in CiviCRM the payment remains in Pending status. The user gets a PayPal payment message, but no CiviCRM receipt.
Note Paypal IPN log shows 200.

Checking the CiviCRM log file in the ConfigAndLog folder shows this sequence of events (identifying elements overwritten with XXX):

/home/XXX/public_html/libraries/src/Application/CMSApplication.php(303): Joomla\CMS\Application\SiteApplication->doExecute()
#16 /home/XXX/public_html/index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#17 {main}

Feb 25 10:51:54  [info] $IDS Detector Details = Array
(
    [0] => Array
        (
            [name] => cm
            [value] => {"module":"contribute","contactID":"321","contributionID":70,"membershipID":"10","contributionPageID":"1"}
            [page] => /index.php?option=com_civicrm&task=civicrm/contribute/transact&Itemid=527&_qf_ThankYou_display=1&qfKey=ec4624b8d9deeeba55b37c86128bc24d_9754&amt=497.32&cc=CAD&cm=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22321%22%2C%22contributionID%22%3A70%2C%22membershipID%22%3A%2210%22%2C%22contributionPageID%22%3A%221%22%7D&item_name=321-70-Individual%20Adult%20Registration&st=Completed&tx=4VC971156C5483419
            [userid] => XXX
            [session] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX            [ip] => XX.XX.XXX.48
            [reaction] => 0
            [impact] => 43
        )

    [1] => Array
        (
            [name] => IDS_request_uri
            [value] => /index.php?option=com_civicrm&task=civicrm/contribute/transact&Itemid=527&_qf_ThankYou_display=1&qfKey=ec4624b8d9deeeba55b37c86128bc24d_9754&amt=497.32&cc=CAD&cm=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22321%22%2C%22contributionID%22%3A70%2C%22membershipID%22%3A%2210%22%2C%22contributionPageID%22%3A%221%22%7D&item_name=321-70-Individual%20Adult%20Registration&st=Completed&tx=4VC971156C5483419
            [page] => /index.php?option=com_civicrm&task=civicrm/contribute/transact&Itemid=527&_qf_ThankYou_display=1&qfKey=ec4624b8d9deeeba55b37c86128bc24d_9754&amt=497.32&cc=CAD&cm=%7B%22module%22%3A%22contribute%22%2C%22contactID%22%3A%22321%22%2C%22contributionID%22%3A70%2C%22membershipID%22%3A%2210%22%2C%22contributionPageID%22%3A%221%22%7D&item_name=321-70-Individual%20Adult%20Registration&st=Completed&tx=4VC971156C5483419
            [userid] => XXX
            [session] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
            [ip] => XX.XX.XXX.48
            [reaction] => 0
            [impact] => 43
        )

)

I feel like this one might be fixed in the latest rc (4.7.31) https://download.civicrm.org/latest


How to find and/or fix missing indices? After upgrading to 4.7.19, I'm now getting a warning:
You have missing indices on some tables. This may cause poor performance.

How can I find which indices are missing and then, how can I create them?

Disclaimer, as with other answers, this is aimed at a fairly technical person who kinda understands what they're doing and has made lots of backups :-)

As Sophie points out you can find the exact problem looking at the latest log in the ConfigAndLog directory.

For several of us the problem has been that there's a key defined incorrectly and the script's current response is to try a CREATE INDEX... statement, but it already exists, so it fails. Furthermore dropping this index with a simple DROP KEY <keyname> ON <table> .... cannot be done where a foreign key (FK) depends on having an index on those columns, as pointed out by Aidan

Temporarily disabling FKs can be problematic. The way I got it up and running was as follows:

Run the fixer, either from the status page or (for drupal users) with

drush cvapi System.updateindexes

If it didn't work, read on.
Inspect the latest file in ConfigAndLog to find the table where it died. In my case this looked like

CREATE UNIQUE INDEX UI_case_contact_id ON civicrm_case_contact
(case_id, contact_id) [nativecode=1061 ** Duplicate key name
'UI_case_contact_id'

So it's the UI_case_contact_id key that's the problem here.
Attempt to delete that key, if this works you can go back to step 1.

drush civicrm-sql-cli
MariaDB [your_db]> DROP INDEX UI_case_contact_id ON civicrm_case_contact;

If deleting the key fails due to a FK constraint, e.g. like this:

ERROR 1553 (HY000): Cannot drop index 'UI_case_contact_id': needed
in a foreign key constraint.

Then create the same key with a different name - copy the definition from the error message in (2), e.g.

CREATE UNIQUE INDEX my_temp_key ON civicrm_case_contact
(case_id, contact_id);

You should now be able to go back to step 3 and successfully delete the original key since now the FK can depend on your new key called my_temp_key.
Re-run the updater, hopefully it's ok  (on that table/key at least) now. If so you can then delete your my_temp_key with

DROP INDEX my_temp_key ON civicrm_case_contact;

Nb. Several of us have had this part fail. This means the update script has not created the index for some reason. If this happens I'd advise it would probably be best practise to reissue the original CREATE INDEX command from the log (step 2 above), then you should be able to drop your temporary key ok. This way you leave the schema exactly as CiviCRM expects it to be, which is definitely going to be helpful in the long term.

I put this solution together standing on the observations shared by others credited above, just thought it might be useful for me to spell out a step by step process. :-)


How can I allow multiple memberships for a single contact under one organisation? There are two scenarios
First
a. I create contribution page with membership types A, B, C, D and then user goes to the contribution page and purchases membership type A
b. I again go to the contribution page and this time purchase membership type B
Result -->  Membership Type - B
i.e. At first my membership type was A but after purchased membership type B, I have Membership Type B
Second
a. I go to contact dashboard , open membership tab and click on + Add Membership --> select membership type A
b. I again to contact dashboard open membership tab and click on + Add membership --> select membership type B
Result --> ** Membership Type A and Membership Type B both
i.e. I have two memberships A and B
I know since all membership type belongs to one organisation , we maybe getting the above issue, is there any chance we can implement scenario second with  contribution pages ?
is there any better solution than as provided in the old post here : https://forum.civicrm.org/index.php%3Ftopic=31251.0.html

The logic behind the behaviour you're observing is that most of the time when a contact is paying for a different membership type than their existing one, they are upgrading or changing that membership. Whereas an administrator is doing it, they can be trusted to differentiate between an update/change vs. a new one.
The link you provided suggests that if you create membership type A and B associated with different organizations, then the system knows not to change a membership, but to create a new one. That seems like a good idea, but it depends on your own details - the membership model in civicrm has trouble capturing all the possible nuances of memberships in real life.
Here's a link to one of my recent projects that provides support for multiple memberships:
https://socius.cpha.ca/civicrm/contribute/transact?reset=1&id=2