Is it possible to apply an existing contribution to an event registration?

Self service for supplementary payments for event registrations is not yet available in CiviCRM as of version 4.6.

As you likely know, it is possible to manually edit registrations to record additional payments, and to view all payments that have been made against a registration. When doing this it is possible to record notes to help document what is being done. As a work-around perhaps you could cancel the incoming supplementary payments of $50, and then apply them to the registration.

Alternatively, or in addition, we could set up a Make It Happen fundraising effort to get this into core.


I just had to set the contact telephone to "Mobile". Thanks @Demerit.


Error uploading CiviCRM contacts. Can I revert?

To revert an import done with the import functionality at Contacts > Import Contacts, you will need to restore from your backed up database file. As far as I know, there is no automatic "undo" on imports.

To your point, it might be worthwhile to add a new warning to the import "Are you sure" verification message that pops up right before the import fires:

For example, "Are you sure you want to import now? Be sure you have backed up your database as there is no 'undo' for this." (Update: I submitted a patch so if the core team agrees this will be added in future versions)


Generating hard copy mail merge letters in Civicrm

If the printed version looks poor it is probably due to the quality of the image you used in the editor. You could simply upload one with better quality / resolution.

In general you may have to fiddle a bit to get your html templates work well. I would advise to use an external editor and backup your templates once they work.


Add/update activity date time using webform

Below please find some screenshots to show you how: note there is an Activity Date and an Activity Time checkbox


Is it possible to create a token in hook_civicrm_tokenValues that retrieves the name of the creator of a non-mass-mailing?

For the use case where the email is sent from a logged in user, one could use the function CRM_Core_Session::singleton()->getLoggedInContactID() to get the logged in contact ID.
This would fall down for those cases where the email is generated by a 'system call', e.g. an email that was triggered by a cron job, but that might not be a deal breaker for your use case..
You could always add a fallback behaviour for those situations where it has not been possible to find a contact by either your method or the above method, e.g. populate the token with 'your friendly membership officer' or provide a default contact id or similar.


Let participants confirm registration with one click?

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).


Is there Constant Contact integration for CiviCRM in WordPress?

There's an extension to sync them here: https://github.com/cividesk/com.cividesk.sync.constantcontact


CiviCRM Frontend or Public-Facing Page 404 Not Found

Since you are on wordpress 5.24 you need to have civicrm 5.26 or more. Would recommend to upgrade your CiviCRM to 5.28.4


Datepicker / CKEditor won't load unless "Access CRM" is granted

I think the best solution is to grant them "access CiviCRM" and implement a hook to remove the quicksearch bar for those users.


Use the API to loop through contacts and copy field value

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

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

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

HTH

Pradeep


How to add profile shortcode to WordPress sidebar (i.e., in widget)

Have you tried just adding the HTML form snippet to the text widget? It's not as neat as adding a shortcode, but it should work okay.

Go to Administer CiviCRM > Profiles, then HTML Form Snippet under 'more' for your chosen snippet. Copy all the code there and paste it into your text widget.


Memberships don't get updated when they elect to auto-renew

just to confirm some basics since your question doesn't specify if membership status update is happening for other situations.

For Membership Status to auto update you need to have the Scheduled Job enabled. You can see this on the demo site here. And you need to have a cron running. Neither of these may be the issue you are facing, but are fundamental to the membership status update working.

Otherwise you should confirm your Membership Status is not 'overridden'. Again this is something you have probably checked but it helps if you can confirm such things.

It may help if you can clarify the Contribution Status of the payment. Is it being set to Completed automatically?


How best to use crmApi result within angularJs controller?

I finally remembered that promises return callbacks. So, instead of
return result

in the then of the crmApi promise, using
self.user result

does exactly what I need.


Your local server probably isn't configured in a way to allow for "clean urls". See https://www.drupal.org/docs/7/configuring-clean-urls/enable-clean-urls


How to share the user profiles with other users?

You could use the custom field value as a Contextual Filter and hence only show results to B for contacts where the other contacts' custom field matches that of B. I am not quite clear on how to do this but getting the value from B and applying it as a filter on the view seems like it should be entirely feasible.

Alternatively could you consider basing this on Relationships between B and A.


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

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

HTH

Pradeep


Constraint violation when viewing Mailing Detail Report (group_id the cause)

Turned out to be a filter value in the report that was referencing a mailing group that no longer exists. It's 'id' was therefore missing from the civicrm_group table.


What causes the SMS system to stop working and throw DB errors?

This error does show up in Civi 4.7.8 on Drupal 7.x.  @PeteRoss Thanks.  Haven't had chance to upgrade to 4.7.9 yet.

Had to send scheduled event SMS to members, so modified sql in if statement in CRM/Mailing/BAO/MailingJob.php

525  if ($mailing->sms_provider_id) {
  ....
  ....
  546                         OR       contact_a.do_not_sms = 0 )
- 547                         $aclWhere}";
+ 547                         $aclWhere";
  548     }

The scheduled SMS job completed successfully after the modification.


Allow Website URL field without "http://" string

Unfortunately, there is no setting for this. You would indeed need to create an extension that pre-fills the field in teh way you need it. If you have not done so yet, you may have a look at the CiviCRM Developer Guide and/or get in contact with other developers: https://chat.civicrm.org/civicrm/channels/dev-newcomers


How to create a newsletter sign up block in Drupal

If you are using Drupal 7 I would use Drupal Webform - together with the Webform CiviCRM integration module, since the Webform module let's you set the form to show within a block.

These are pure drupal webform settings. This is done under Adv Settings, which is on the Form settings tab ie at node/xx/webform/configure "Available as block:
If enabled this webform will be available as a block."

There are then controls as to whether you show the whole node in the block or just the form, which probably isn't an issue in your case.

Then set the civicrm settings on the webform to collect the various fields you want and add them to the Group that is used for the newsletter.


There is no inbuilt way for doing this directly for Profiles with CiviCRM.

Event management is the only feature in CiviCRM that I know can do this since you can specify the Profile and the matching rule - not suggesting you have folk sign up to an event purely to achieve this but hey, you could ;-)

For Drupal users, you can build a webform_civicrm form and specify the fields and matching rules to apply and hence get very close to what you are asking for.


Unable to install CiviCRM 4.7 on Wordpress 4.4.1

First try to increase the max_execution_time of your server in php.ini file. As the post installation process may take time long enough that time out occurs.

Also you can find more about the Installation Canary here.

Hope this helps.


civicrm.org website old what/whatiscivicrm redirect to explore-civicrm

I've added this redirect, thanks for reporting it!

I think it's great you've made the effort to post it somewhere we can field it, and that the end result is more important than correct process - so don't fret about not posting it on issues.civicrm.org this time. Thanks for being part of the community! You did this to benefit others in your situation, knowing you wouldn't benefit yourself, and that's priceless.

Your next step is to finish that upgrade of your old CiviCRM to a supported release ASAP

Hop on over to https://chat.civicrm.org to discuss.


What is the best way to avoid cartesian product on specific SELECT attributes?

CiviReport has a tradeoff between having a lot of functionality and nice widgets already done for you, but you have less control over the final SQL. When I run into this problem I usually do it as a custom search instead. See http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Custom-Search+Extension .
Then you have more control over the SQL and can join with a subquery on the "many" table that reduces it to "one".

You might still be able to do it in a civireport, I just find it harder.

If you're asking instead for general SQL help, then if I bing for "select join mysql sum duplicate" I get answers like this one:
https://stackoverflow.com/questions/3345657/mysql-how-do-i-sum-non-duplicates-values-when-doing-multiples-joins


There is an "unofficial" api for pcp from Jon:
https://civicrm.stackexchange.com/a/3037/246

It would be super useful if you could contribute the needed tests and add it to the core. You know you want to ;)


CiviBuild - wp-demo install error with postdrop

Just found the fix that my postfix was not running.

I had to do a sudo postfix start which resulted in a number of warnings with final output

postfix/postfix-script: starting the Postfix mail system

After this I retried running the civibuild install

civibuild install "civiwpbuild" --url "http://localhost:4000" --admin-pass "XXXXXXXXXX"

and it worked.

More details on postdrop: http://www.postfix.org/postdrop.1.html


I'm reasonably sure that if you don't have a valid mail server, the mail will be lost.  I mitigate this by installing a mail server (Postfix) on the same server as CiviCRM, and use that to relay to the third-party server.  Not only is this more robust - Postfix will hold the e-mails that don't go through while your main mail server is down for testing - but you get much finer-grained control over e-mail.  For instance, throttling the number of e-mails per second.


Constituent (summary) report: link to contact instead of link to constituent detail?

The "No Drill Down" extension will do that for you.


Via the UI, you'll need to create reports using one of the templates available (e.g., from /civicrm/report/template/list?reset=1 ).  If you have coding experience, you can create custom reports from scratch, yes.  Here is the report reference from the Civi wiki: https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference


Consistent failure to upgrade from 5.25.0 to 5.28.x

Make sure the civicrm your civicrm plugin is 5.28.x version and you have only single civicrm folder in plugins (no backups, no renamed folders etc)


How can I get more details about a Scheduled Jobs failure?

I would recommend looking in two other places:

The CiviCRM error log. This is to be found (for Drupal) in sites/default/files/civicrm/ConfigAndLog/CiviCRM.(long number).log
The PHP error logs. This is different for each server / Control Panel so I'm afraid I can't give more specific directions than that.

Make sure you find the place in the logs which matches the time that you triggered the job, to save you trawling through many lines of text. I would suggest you trigger the job one more time, take note of when you did it, and then look up what happened in those two places at that time.


How to add email while trying to create a Household contact using civicrm api v3?

You will have to use the Email API with the contact_id of the just created contact. You can do this in a chained API call if you want to.


how to set permissions on individual CiviReports (permission options not shown!)?

So after doing some research, checking on the Drupal, Wordpress, and Joomla demos, it appears that Permissioning for individual reports indeed does NOT exist in the Joomla implementation.  Very disappointing.


Dashlets and SSL in multiple secure virtualhost environment

This problem has been assigned to a CiviCRM bug which requires funding to resolve. The suggested fix is an AJAx solution.

See:
https://issues.civicrm.org/jira/browse/CRM-17663


Install CiviCRM Buildkit on windows xampp

You can't, I'm afraid. It doesn't work on Windows.

From https://docs.civicrm.org/dev/en/latest/tools/buildkit/ :


WYSIWYG editor not appearing in CiviCRM and Drupal

Ah, I've figured out the problem after looking at the code in ./sites/all/modules/civicrm/CRM/Admin/Form/MessageTemplates.php. The WYSIWYG editor is only shown if the message template is not a system message


I don't think you can do this with one api call.

Not optimal but you could do a postprocess in place of the // do something when the result comes.

Better, you could create your own api call in a custom extension - see https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-AddanAPIfunction


For my situation, what accounting package would fit with CiviCRM?

We built some integration for Xero which is an online accounting system. The code isn't quite 'plug and play' but once set up it does the synch between contacts and transactions in both systems. Read more about Xero here https://www.xero.com/ and a blog about the integration here http://www.fuzion.co.nz/blogs/civicrm-integration-xero


Exporting Notes for Contacts Resulting in Incomplete Notes

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

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

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

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

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


How to import/create multiple events from .csv?

Yes you can use the API CSV extension to import new events. Here is a good guide to do so: https://wapix.co/importing-events-to-civicrm/.


How to display custom fields 2 fields in row, instead of new line for each field

This is an argument in favor of using a tool like Webform-CiviCRM integration (on Drupal) or Caldera Form CiviCRM integration (on WordPress).  The CMS-based form builder has additional layout flexibility, and both allow you to place fields side-by-side.

If you don't want to use those tools, you can use CSS rules to place the fields side-by-side.


Ok, I found the problem, disk space exceeded on server. That is the reason it could not write.


Does archiving mailings do anything in particular?

In my first Civi site (Joomla), I didn't archive my sent emails.  Then, when I tried to send a new email, the old, sent email would be re-sent in the same cron job as well.  CiviDesk told me the fix was to archive sent emails, and I have been doing it without fail ever since.  The problem has not recurred.


There is a Mailchimp CiviCRM Integration Extension which you can download.
Details are here at https://civicrm.org/extensions/mailchimp-civicrm-integration

Details on how to enable extensions are at https://wiki.civicrm.org/confluence/display/CRMDOC/Extensions


Fatal DB query syntax error on rules search - Civi 5.0.0 and recent Civirules

I do not know without checking on your site. I have recently tested 2.1 on an existing site and it worked there. You might want to check if the civirule_condition table is still populated? It might be that it got accidently cleaned out.

If that is the case, you will have to take note of what your conditions/actions where, run the sql scripts insertCiviRulesConditions and insertCiviRuleActions from the sql folder of the extension to re-create them. And then you have to rebuild your rules in the UI.


Dependency on php5.6-simplexml goes unchecked, is that a bug?

This is a good question!

Until very recently, this issue hadn't come up, because just about every distro packages the XML extension with PHP.  Since you're using Ubuntu 16.04 with PHP 5.6, my guess is you're using the Ondrej PPA.  For whatever reason, he packages the XML extension separately.  And of course very few people used this PPA with CiviCRM until recently, but now people want Ubuntu LTS with PHP 5.6.

So yes - in theory this check should happen at install.  In practice, it doesn't really come up except for folks using the Ondrej PPA (and, I suppose, people who compile their own binaries).  So I'd guess this would be considered a "patch welcome" situation - now that PHP7 compatibility has landed in CiviCRM, my guess is that this will bite very few people (who will probably find this page).

If you feel strongly about this and are motivated to submit a patch, feel free to hit me up on chat.civicrm.org (@junglebird) if you need help getting a CiviCRM dev environment together.


Can I easily sync/import Facebook Event attendees with a CiviCRM Event participant list?

I was using drupal to create a facebook event when a civicrm event was created and add the participants.  There was a change in the facebook API that no longer supported post types for event objects.  I'm not sure if that allows event registration though.  The idea was using The Drupal Facebook Post module.  and civicrm entity which created a rule on event creation or update and did a post to facebook.  It worked pretty well and if the API supports adding people to an event you might take that approach (shouldn't require any code.)  Please update us if you explore this approach.


How to Override System Workflow message template variables, single and batch

The short answer is that you can't change that from an extension, but you can change it by patching core. Unfortunately, this requires a change in coding-convention which isn't a trivial one-line patch -- it requires understanding some other layers/concepts and changing multiple files.

The root issue here is that the coding convention has relied too heavily on static functions. For example, if you grep the codebase for CRM_Contribute_Form_Task_Invoice, you'll find snippets like this one (from CRM/Contribute/Form/Task/Invoice.php):

CRM_Contribute_Form_Task_Invoice::printPDF($contributionIDs, $params, $contactId, CRM_Core_DAO::$_nullObject);

If you could change that line to point to your own version of printPDF(), you'd be ready to go. But it's hard-coded -- there's no way for an extension to change it. The good news: there are better patterns which are more flexible, e.g.

// Example: Use a service container
Civi::service('invoice_printer')->print($contributionIDs, $params, $contactId, CRM_Core_DAO::$_nullObject);

// Example: Use a hook
CRM_Utils_Hook::printInvoicePdf($contributionIDs, $params, $contactId, CRM_Core_DAO::$_nullObject);

Either of those formulations would make it possible for extensions to change the implementation of printPDF(). The bad news: either way, you'd to have to refactor the existing implementation to match a different coding convention.

A few links that might be interesting on the general topic of statics, services, and dependency-injection:

https://www.imarc.com/blog/dependency-injection
http://fabien.potencier.org/what-is-dependency-injection.html
https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_container
https://civicrm.org/blog/totten/the-static-is-dead-long-live-the-static


Undefined Index error whenI run SYBUNT report

that's just a notice - it's annoying - but may not be critical. You can check civicrm JIRA https://issues.civicrm.org/jira/projects/CRM/issues to see if there is an issue for it/report it (if not already).

If this is a live site then it's recommended not to display any errors. On Drupal go here:

admin/config/development/logging

and set to None.


civix generate:module org.civicrm.angularex error

You just need to set the appropriate environment variable:

close your current cmd shell/terminal;
press Win + R, type setx CV_CONFIG "%userprofile%\.cv.json" and press Enter;
reopen the shell, goto your project's directory and test with civix civicrm:ping -vvv.

I gave further explanations about the reason in this answer.


I can think of three reasons why this would happen.

"Board Members" is a smart group.  You can check this by going to Contacts menu » Manage Groups.  If it's a smart group, it either a) shouldn't be, or b) the criteria need to be changed.
The Board Member group is the parent of some other group. I did this by accident myself recently; you'll need to remove the parent-child link.
Some custom magic.  If you're the only administrator of the database, we can rule this out.  However, I perform similar tasks all the time, either using a) cron with a SQL query, b) the SQL Tasks extension, c) a custom extension.


How to get contacts in children of a parent group using the API

You can use the 'group' filter on the Contact api to get members of parent groups.

$result = civicrm_api3('Contact', 'get', array(
  'sequential' => 1,
  'group' => XX,
  'options' => array('limit' => 0),
));

where XX is the id of the parent group (A).


How to change the direction of a relationship type with existing data

I agree with ErikH, but if you don't feel comfortable updating the database, you can...

create a new relationship type with the opposite order (b_a vs a_b)
do an advanced search, selecting only individuals with that
relationship
select the action to "export" the contacts
select two    fields (1)the internal contact_id and (2) the
relationship type field    with the internal_contact_id  and export
(verify that you did this    correctly and the ids match as
expected!)
use civicrm import to    import the csv file to new relationship type
created in the first    step.

May more steps, but if you don't know how or want to mess with the database, this will work.


CiviCRM Installer Errors - Can't change DB settings

There is an issue in the installer for 4.7.   I created https://issues.civicrm.org/jira/browse/CRM-19279  to track the issue.   With Christian's help I created a PR - https://github.com/civicrm/civicrm-core/pull/9029  I have tested this locally and on one of our test sites and it works.

I'd appreciate any testing that can be done with this to make it a merge candidate.


Can my extension know when other extensions become enabled or disabled?

Looking at the Civi API Explorer, you could reference the Extension entity.

The help text for the Key parameter (API explorer uses full_name in the code) says "Fully qualified extension name". If you got the Key parameter full_name="eu.tttp.civisualize", you could load your dashlets conditionally based on whether CiviVisualize is enabled.


The PHP CLI method is one of several ways to run all scheduled jobs automatically.  If you haven't configured a cron job, the scheduled jobs will not run on their own.  Because nothing is actually happening, there will be no log entries to say that your cron isn't set up.

Select one of the methods for triggering scheduled jobs from the command line.  Since you're on Drupal, you might try the Drush method because it's fairly easy.  Regardless, if for some reason your command fails, you should get some sort of message that you can use for finding more specific help.

(A tip for testing: make sure you have at least one scheduled job enabled and set to run "Always".  If everything's hourly or daily, it's hard to test if it has executed.)

Once you find a command that works, set it up as a cron job so it runs every 5-15 minutes.  At that point, you'll be able to go back and check if the scheduled jobs are working as expected.


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


Cron Invalid username and/or password, After 4.2.9 to 4.2.20 Joomla Upgrade

This is all due to Joomla changing its password authentication methods on 2.5.18 and above, to fix (not the nicest fix but it works) you need to edit the following.

administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php

CHANGE TO THIS AROUND LINE 445

  // now check password
  if (strpos($dbPassword, ':') === FALSE) {
    if ($dbPassword != md5($password)) {
      if (!JUserHelper::verifyPassword($password, $dbPassword, $dbId)) {
        return FALSE;
      }
    }
  }
  else {
    list($hash, $salt) = explode(':', $dbPassword);
    $cryptpass = md5($password . $salt);
    if ($hash != $cryptpass) {
      if (!JUserHelper::verifyPassword($password, $dbPassword, $dbId)) {
        return FALSE;
      }
    }
  }


outbound mail smtp password gets corrupted on wordpress

I might have found the answer while browsing https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-extensions.

  PHP Mcrypt [is] required for SMTP credentials and other credentials in the database. If you add Mcrypt on after running CiviCRM for a while you will need to re-save your passwords to the database. [... php7.2] does not support mcrypt and if mcrypt is not installed the smtp password (if entered) will need to be re-saved once you update your php version to 7.2.

I'm reasonably sure that this happened to me multiple times on the same time (that has only been upgraded to php7.2 once) but it certainly feels like a pointer in the right direction.


Webform 'previous page' button gives 500 server error

Check your civicrm log file under ../files/civicrm/Configlog/.


What timezones should we use on the server and database?

As long as your PHP and MySQL settings are correctly set (CiviCRM should warn you if they are not), you can set the server time to your preference. Using UTC for the server is probably more convenient on the long term, but it's not a CiviCRM requirement. For example, lets say you are in UTC-8, but next year a new sysadmin joins your team and is in UTC+6, UTC-8 will probably be pretty annoying (CiviCRM servers were initially on PCT time, before being changed to UTC).

The biggest issue with time in CiviCRM is with CiviMail scheduled mailings and with scheduled reminders.

If you are using Drupal or WordPress, CiviCRM should use the user's timezone settings and adjust time inputs/outputs accordingly. Otherwise you will have issues with the mailings not being sent at the right time (from the point of view of the user).

Eileen and Jamie have posted a good wrap-up of this issue here:
https://issues.civicrm.org/jira/browse/CRM-9683?focusedCommentId=67732&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-67732

There is one detail with the timestamp field type that I do not really understand. i.e. if it's necessary to convert the field so that the fixes already committed work. Hopefully someone else can chime in.


How to use Amazon Simple Email Service for only verified email sender addresses

I have a similar setup, but I have solved this outside CiviCRM. In CiviCRM, I configured the mail() send option. The effect is that the mail is routed by the local Mail Transport Agent. On my system, I use postfix for this task.

Postfix can be configured to relay an email to an email service dependent on the email address. Use to do this the sender_dependent_relayhost_maps parameter. An example can be found in this answer on the Unix site.

It is a good practice to send bulk mail with Amazon SES to prevent the email to be marked as spam.


"Make Mailing Labels" not working for Bosnia language

It's because it's using Helvetica font which doesn't have unicode characters - if you can use Deja Vu Sans or another font that has unicode it should work.

IGNORE rest of answer below. As per comments Cesar found that under Administer - Communications - Label Formats you can change the font in there.

You can try to hack CRM/Utils/PDF/Label.php to hardcode the font: https://github.com/civicrm/civicrm-core/blob/5.20.3/CRM/Utils/PDF/Label.php#L180

I'm not sure the right spelling to get the font. If you look in vendor/tecnickcom/tcpdf/fonts/dejavusans.php it seems like it might be DejaVuSans, without spaces.

You can also try this instead:

Copy vendor/tecnickcom/tcpdf/config/tcpdf_config.php somewhere, e.g.
/usr/local/tcpdf/tcpdf_config.php
Edit the line inside it for PDF_FONT_NAME_MAIN so it reads define('PDF_FONT_NAME_MAIN', 'dejavusans'); (again I'm not sure of the exact spelling).
In civicrm.settings.php add these lines:

define('K_TCPDF_EXTERNAL_CONFIG', TRUE);
require_once('/usr/local/tcpdf/tcpdf_config.php');


How to insert a CiviCRM query link into Drupal main menu with Clean URLs enabled?

You can find further info here, but I'd recommend setting up a Redirect (using this module) and using that URL in the menu. For example, the redirect URL could be member/search and then it redirects to civicrm/member/search&force=1&qfKey=0&reset=1.


Error uploading an image in email wysiwyg

CiviCRM Starterkit is installed as a Drupal installation profile, so it's got the civicrm module directory inside /profiles/civicrm_starterkit/modules rather than /sites/all/modules.  CiviCRM is assuming that you can go up two levels from the folder where it's currently running and then over to the default folder to find civicrm.settings.php.  That's not the case here.

A couple of things to do, then:

To deal with this in the short run, you might copy your settings file into code/profiles/default as a short-term hack.
File a bug report because obviously something's making an inaccurate assumption.
Consider whether using Pantheon and civicrm-starterkit is giving you any benefit.  Just because something can work doesn't mean it's worth the extra effort dealing with a quirky host and an unmaintained distribution.


Combine or report on individual and household donations

hi and excuse the slight whinge but... providing links to things like the extension, makes it quicker for other busy folk (we all are) to help. And explaining 'why' you think it might not work also saves folk time looking stuff up.
AGGREGATE HOUSEHOLD CONTRIBUTIONS REPORT has its last release as 4.6. Best I can suggest is give it a spin and report back. That way if it works the maintainer of it may update the details
it can also be worth checking the git page and checking the Issues to see if anyone else is commenting about it working on more recent.
NOTE: if an extension says it is good for 4.7 then in theory it is good for 5.x
And Bingo! there is an issue about 4.7 compatability
and

so chances are good to very good. and if you report back on that issue (it is easy to do so) then every chance Allen (twomice) will take the hint and update.
Better still if you are keen (and welcome to this diy community) submit a PR on the info.xml and you will have made Allen's life at least one-click easier :-)


Can CiviCRM be managed as a group of companies, where there is a parent company of the group of child companies?

I do not think this is possible out of the box with CiviCRM, with the customized receipts and invoices being the biggest stumbling block AFAIK.

However I have built integrations with other invoicing software and you might be able to solve your issues that way, but it will require development.


Do we still need "Drupal Users Table Name" setting on CMS Database Integration screen?

There are scripts in extern/*.php (like extern/ipn.php) which fire up CiviCRM without the CMS bootstrapped. I believe the plan is to replace them with callbacks (like civicrm/payment/ipn/%id) which eliminate instances where CiviCRM is bootstrapped without the CMS. (Some links here, but don't think there's a JIRA issue on it?)

So: Perhaps in the few places where CiviCRM doesn't have Drupal bootstrapped, eg new user create during PayPal IPN on successful event rego? (I made up this case as a potential place CiviCRM might need it, and not be able to deduce from bootstrapped CMS.)


Implementing tokens and tokenValues hooks for Event custom field

The code doesn't go in functions.php, you need to create a little extension. See https://docs.civicrm.org/dev/en/latest/extensions.


Shouldn't CRM_Core_PseudoConstant::get localize parameter be setted to TRUE by default?

Case statuses are user-defined option values (configurations). If you have installed CiviCRM initially in English, then switched the language, you will have to edit/translate the case statuses manually in: Administer > Case > Case statuses (/civicrm/admin/options/case_status?reset=1).


CiviCRM Spark fees, database migration/export and cancellation

You can export your CiviCRM Spark database by going to Administer > Backups. This should be sufficient to get started on your own instance, but you may need to also download CiviCRM extensions (CiviCRM will display errors on the admin pages telling you which extensions are missing, most of which are not critical).
The monthly fees do not have any HST, since the service is run from the United-States (assuming that by HST you mean Canada's taxes?).
Once you are ready to cancel, there are links in the monthly renewal emails to allow self-serve cancellation.
Please do not hesitate to contact us at spark@civicrm.org for any billing or cancellation questions.


Perhaps you could start with the widget code from a contribution page as a base?(Widget>widget.php)

Make a new one that pulls info based on PCP id vs contribution page id...


Checking Inconsistencies between Users and Contacts Emails (via civicrm_uf_match table ?)

The civicrm_uf_match table is the correct place to look.  I can't explain why you're seeing what you're seeing!


Problem exporting due to multiple addresses of one location type (e.g. two 'home' addresses)

I would fix this either partially or wholly with SQL.  The general approach I'd use is:

Change the location_type_id on one of the two addresses for each contact to an unused location type (creating a new location type if need be).
Export the contacts with both the "Home" and the unused location type.
Reimport the data with all address fields designated as "Home" addresses.
Delete the extra addresses with a SQL statement.

The basic query you want is:

SELECT MAX(id), contact_id, COUNT(id) FROM civicrm_address WHERE location_type_id = 1 GROUP BY contact_id HAVING COUNT(contact_id) > 1;

MAX(id) is the id of the second address created; MIN(id) would return the first address id.

Due to this constraint of MySQL, you can't just use this SQL query that would meet the requirements of the first bullet point:

UPDATE civicrm_address SET location_type_id=4 WHERE id IN (SELECT MAX(id), contact_id, COUNT(id) FROM civicrm_address WHERE location_type_id = 1 GROUP BY contact_id HAVING COUNT(contact_id) > 1);

You can use of the answers on that SE question to work around that (e.g. with a temp table).


The 'Contribution status' is automatically updated when the second payment is added. For example:

Register a participant for an event that costs $800
Log the contribution as $400 and save the registration
Note that the contribution is 'Partially paid' in the registration list
View the participant record, click on 'Add payment'
Add a payment of $400
Note that the contribution status has been updated to 'Completed'

If you want to manually change the status of the entire contribution, you can do so by editing the contribution.

If you want to change the status of individual payments then that looks like a feature request! It doesn't appear to be possible to even edit individual payments at the moment.


Any way to catch the user hitting "cancel" or close on Print/Merge form - as activity list does not refresh?

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


User is logged into different account on CiviCRM than Drupal

Are your users perhaps logging into an https page and then following a link to a http page (or vice-versa) ? I have seen such issues in that case. You need to be consistent, and set the Drupal $base_url, Civi CIVICRM_UF_BASEURL, and $civicrm_setting['URL Preferences'][] values all to either http or to https, and change any links in your content to use that same scheme also.

If you are not defining all four $civicrm_setting['URL Preferences'][] values in civicrm.settings.php, then those values are instead defined at Administer | System Settings | Resource URLs. While there, verify that the value of "Force Secure URLs (SSL)" is consistent with your intended scheme.


Bcc not hidden on mail sent by SMTP - is this a bug?

Yes, it's a bug, which is now fixed: https://issues.civicrm.org/jira/browse/CRM-19173


Can't create a standalone profile for membership card information

Are some of the fields on the profile membership fields? I think the issue here is that Profiles that you can send people to via a checksum will only support Contact fields, not Membership fields, since if the person has more than one Membership there is no way to know which one to update.


SSL enabled CiviCRM with forever loading dashlets?

Check your CiviCRM base URL - the CMS configuration ($base_url in Drupal settings.php), CiviCRM (CIVICRM_UF_BASEURL in civicrm.settings.php) and webserver configuration (canonical location you rewrite to) must all match.

For the dashboard to work, the webserver needs to be able to access the website itself.

If you're hosted at https://www.example.org the CiviCRM dashboard needs to be able to retrieve https://www.example.org/civicrm/report/instance/68 and so forth.

A webserver which can't access itself directly (reverse proxy, SSL, DNS may factor in) will fail loading the dashlets.

Same question, longer answer: The dashboard does not render


CiviCRM allows you to send api params in POST by encrypting the params in json. Here is an example on how you can build api params used in REST call

http://www.domain.org/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","first_name":"test","last_name":"test","api.Address.create":{"location_type_id":"Home","street_address":"123 somewhere st"}}

You can use api explorer to build your params.

Thanks

Pradeep


My custom reports work fine, but mail_report fails

What doesn't help, is that the code for Report.php:402

https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Utils/Report.php#L402

requires

if (strstr(CRM_Utils_Array::value('name', $templateInfo), '_Form')) {

and otherwise

  $is_error = 1;
  // ...
  $messages[] = 'Did not find valid instance to execute';

The 'name' reported for my custom report is more like

com.foo.bar

.. is that a bug, or some requirement I missed ?


Mostly. See

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

AND

https://civicrm.org/blog/charlescampbell/civicrm-civicase-ehremr-crisis-response-system

The part about who views records wasn't implemented from within CiviCRM, but depending on the definition of "your personal records" in your context it could just mean page hit tracking from within drupal, since it records the logged in user.


It is the regular Drupal Views module, but if you have Drupal and CiviCRM in separate databases, you have to edit your settings file to let Views know where to find the CiviCRM data. (Coleman notes in addition: "if your drupal sql user and civicrm sql user are different then you need to grant SELECT privileges to the drupal one for the civi db.") You can find the information you need to add to settings.php at Administer > System Settings > CMS Database Integration.

The wiki page has a pretty good tutorial on how to get Views working.

Then you can use default Views functionality on CiviCRM data -- for example:

set up a View for CiviCRM Participants,
turn on Views aggregation,
add the Event Title field (Aggregation settings: Group together)
add the Participant ID field (Aggregation settings: Count)


404 css and js not found, wrong [civicrm.root]

You can configure the web resources in the screen Administer -> System Settings -> Resource URLs (That is different from file locations).

In this screen, you can set the resource URL (see (1)) as complete URL, as the relative path and with the use of URL variables. So you can avoid using the using [civicrm.root]. And it has another neat feature. If you ask help by clicking the question mark, the values of the URL variables are displayed.


Reminder for Incomplete Registration (and continue...)

You could implement this with Webform-CiviCRM integration, assuming your registration page is a webform.  If it's not, it's still doable, but would take a bit of custom code.

First, set up a "Step 1" webform that just collects email.  On submit, redirect to your "step 2" webform (where registration actually happens), passing the email address in the submit URL.  Also add the person to an "incomplete registration" group in CiviCRM.

If event registration is a webform:

Next, grab the email from the URL on the step 2 webform. See here for detailed instructions.

On submit, use the Rules module to remove the person from the "incomplete registration" group.

If event registration is a CiviEvent form

Write a small custom module to pull in the email address on to your CiviEvent form.  Details on the technique are here.  Alternatively, skip the custom code, but then the email address won't be prepopulated.

Use CiviRules to remove the person from the "incomplete registration" group.


CKEditor Multi-Site Configuration Problem

You should be able to fix this by defining the CIVICRM_CMSDIR constant.  Since you're using multi-site, you'll need to define that on a per-site basis.


Make sure you are installing this extension

https://civicrm.org/extensions/civimobileapi/


Adding tag or assigning group when user created from profile

In the the profile settings > advanced settings there is an option to "Add new contacts to a Group?". This will add contacts to the group specified when the profile form is completed.

If you are looking to give the user options on which mailing lists they wish to be part of you can create a custom field with the selections. Then create smart groups for each option to use for mailings on each area of interest.


When you search for Group(s) Not In 2021_keep, Search Builder may be interpreting it as "contacts who are in some group that's not 2021_keep". That's not what you want.
Here are two three options for finding all the contacts who are not in the group "2021_keep".
Include/Exclude Search
Go to Search > Custom Searches and click on Include/Exclude Search. Set "2021_keep" as the value for "Exclude Group(s)". Click on either one of the radio buttons next to "AND/OR" (it doesn't matter which you choose, since you're not using tags in your search.)
You should be able to delete contacts directly from the search results, or perform various other actions on them.
API v4
If for some reason the Include/Exclude search doesn't satisfy, and you are on a recent version of Civi, you can do your search using API4. You should have access to the API explorer at the url civicrm/api4.
Configure your search as follows:

Entity: Contact
Action: get
Select: id
Join: GroupContact
On: group_contact.contact_id = id
On: group_contact.group_id =
On: group_contact.status = "Added" (note the quotes)
Where: group_contact.id IS NULL
You can pre-fill these values by deleting everything in your URL bar to the right of the word "explorer", and replacing it with:
/Contact/get?join=[["GroupContact AS group_contact",false,null,["group_contact.contact_id","%3D","id"],["group_contact.group_id","%3D","1"],["group_contact.status","%3D","\"Added\""]]]&where=[["group_contact.id","IS NULL"]]&select=["id"]&debug=0&checkPermissions=0
Remember to change the Group ID to the id of your "2021_keep" group. When you're finished you can use the "Save" button at the top to save the results as a Smart Group.
Group subtraction (remove from group)

Use the basic "Find Contacts" search with empty search criteria to find all your contacts.
Above the result table, click "All 74144 records", then select the "Group - add contacts" action. On the following screen, create a new group called "NOT in 2021_keep" and click "Add to Group".
Do another "Find Contacts" search. This time, set the groups field to "2021_keep".
Above the result table, click "All 6046 records", then select the "Group - remove contacts" action. On the following screen, select the "NOT in 2021_keep" group you just created. Click "Remove From Group".

Now your "NOT in 2021_keep" group should have 74144 - 6046 = 68098 contacts in it.


How to retrieve contact image URL in CiviCRM with the API

The image_URL returned by the API is the image that is attached to the CiviCRM contact, not to the Drupal user. You can upload an image of a contact by selecting edit and upload a file with "Browse/Upload Image" in the first section.


Dead links on events, donations, pretty much anything I create

Do you have CMS integration set in your system? You need to have default page or post in WordPress and have it set in CMS integration


Displaying Custom Fields in Views Calendar

That error appears when Drupal can't recognise your CiviCRM SQL Tables.

You can find guidance on how to update your settings.php file here: https://wiki.civicrm.org/confluence/display/CRMDOC/Views3+Integration


Wordpress quick contact search render glitch

Whilst the extension page https://civicrm.org/extensions/shoreditch says that Shoreditch is CMS independent, the release notes https://github.com/civicrm/org.civicrm.shoreditch say that Drupal is a requirement, so I don't think you can expect it to work.  Much as I would love to have it on Wordpress.


How to export 'employee of' relationship that has multiple staff members?

I put a quick example of a View together which you can download from our Treasure Trove.

It is based on 'contact' and assumes that the Org is at the B end of the relationship, and uses a single 'views' relationship starting from B to then connect to Contact A, and the 'which Civi relationship to use' has been set to include several - but these will need reselecting based on which civi Relationships you are trying to pull in.

Hope it makes sense. It may not be quite where you were headed but may gave you some ideas in how to put your View together.

I think an alternative could be to build the View based on CiviCRM Relationship, rather than CiviCRM Contact.


Why is test email but not mail campaigns working with Amazon SES with CiviCRM?

Ashwin - your latest update showing the error reveals the problem.  Either a) your SES account is still in sandbox mode, or b) you skipped the steps about verifying your sender address/domain.  From my instructions:

Log onto AWS, select SES. Note that you only have sandbox access at this time.
Click on "SMTP Settings" on the left, record the server info, generate SMTP credentials and record those too.
Click on "Verified Senders: Domains". Click "Verify a new Domain". Enter the client's domain name; also click "Generate DKIM settings". Remark: the bounce address must be also verified.

If you've already done this, then request to be moved from sandbox mode into production mode:  Instructions here.


I don't believe there is a core report that allows filtering by email.  Have you checked to see if there is one in an extension?

An alternative would be to create a smart group where the criteria is, for example, "%@gmail.com".  Most reports will let you filter by group.


Why is my email stuck in "Scheduled" even thought I sent immediately?

You either need to run the job manually or have a cron that runs periodically that will execute the job that actually sends the email.

In my Drupal install, you find the place to manually execute it at http://www.yourdomain.com/civicrm/admin/job?reset=1

Or:

Civi Menu >> Administer >>  System Settings >> Scheduled Jobs

Some links with more info:

https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/

https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/


"Invalid Contact ID" displayed after merge?

Ah - if the contact id doesn't exist perhaps delete to trash is off?


How can I link to a specific tab in crm-ui-tab-set

At time of writing (circa 4.7.20), the crm-ui-tab-set directive does not support an option to manage the active tab.

I think a patch to support that would be welcome. For example, one might update crm-ui-tab-set (in ang/crmUi.js) to support an extra variable active-tab with an interface like this:

    This is Tab 1.

    This is Tab 2.

You could then initialize selectedTab from the controller, e.g.

angular...controller('MyController', function(...){
  $scope.selectedTab = "mytab1";
});

or

$routeProvider.when('/foo/{tabName}', {
   controller: 'MyController',
   resolve: {tabName: function($route){return route.current.params.tabName;}},
   ...
});

angular...controller('MyController', function(tabName, ...){
  $scope.selectedTab = tabName; // Ex: "mytab1", "mytab2"
});

Observation: crm-ui-tab-set is a thin wrapper for jQueryUI tabs. It's built with "jQuery Passhthrough" (ui-jq="tabs") from angular-ui-utils (v0.1.x). Unfortunately, the docs/examples for "jQuery Passthrough" have been scrubbed from angular-ui's website, but you can find some discussion in archive.org.

Tip: Given that ui-jq has been deprecated, we should try to limit/contain the jQuery-isms. crm-ui-tab-set would probably call some jQuery functions, but downstream extensions shouldn't.

Tip: If your UI is built on Bootstrap CSS, then consider replacing crm-ui-tab-set with uib-tabset from anguilar-ui-bootstrap.


How to do ab testing on transactional emails?

What I'm doing right now is to use the contact id to split the contacts into two buckets (if it's odd, group A, even group B).

So in the email, I use smarty:

{if $contact_id % 2}
   one of the two texts I want to test
{else}
   and the other test I want
{/if}

And measure the result:

SELECT count(id) as total, mod(id,2) as bucket FROM civicrm_contact join whatever ... group by mod(id,2);

It's a bit of a hack and needs a bit of sql massaging, but seems to work. Do you see any problem using the id % 2 as way to randomly distribute between the groups?

And I'd like to be able to measure open rate and click rate, but haven't quite figured that one yet. Any suggestion more than welcome...


How to put 'Other Amount' field in price set radio choices?

You will need to create an extension that would use JS and CSS to alter the screen as per your requirement.


Best way to add "Check Date" to a contribution?

I've always just added it as a custom field.  While I agree that it'd be preferable to not have it appear for non-check payments, I've never been asked to implement that.  That could be accomplished with one line of jQuery though, which you could drop in an extension.  If you don't have experience building extensions, you can also use an .extra.tpl file, which is less work.


How do I use cv to run database upgrades from the command line?

The cv upgrade:db command from https://github.com/civicrm/cv/pull/2 was recently merged for v0.2.3. This revision hasn't been broadly deployed or tested yet, but it provides a richer upgrade experience:

By default, there's a progress indicator.
With -vvv, you can get a detailed report/log of the upgrade steps as they execute.
With -vvv --dry-run, you can see a detailed preview of the upgrade steps.
With --retry or --skip, you can resume after an upgrade failure.
With --quiet, you can limit output to particularly interesting information.

I've found that -vvv and --dry-run are helpful when developing patches for the civicrm-core upgrade logic, and they may also be helpful with large or temperamental upgrades.

(Note: PR #2 also anticipates several more subcommands for identifying/downloading upgrades and for reporting successes and failures. However, these are not live at time of writing)


Unable to install extensions: HTTP redirection error

Try again now. I think Tim has resolved an issue that arose with the need for a new intermediate certificate for the SSL certificate replaced on C.o earlier this week: https://issues.civicrm.org/jira/browse/CRM-16191. Please comment on the issue if your error has been resolved.


All emails are sent from the same address

Ah - yes that sounds like a regression. This is working fine in 4.6.28 - I just confirmed that in 4.6.28 the From is (correct) the Email that I am selecting from the From list - and not the default From as configured in:

civicrm/admin/options/from_email_address?reset=1

Open a JIRA ticket for it to try get some attention to this issue. Label it with regression - and any detail you may have e.g. do you remember when this was last working?


Missing participant is_test field in drupal views

Thanks Jaap, I now added it by this PR: https://lab.civicrm.org/dev/drupal/issues/95 From CiviCRM 5.21 i guess this will be included.


The way I've done this is:

in preProcess, if (!empty($_GET['reset'])) { then inspect GET for the initialisation data, and if it's valid, store it using $this->set('key', $validData). I've also set some object properties in this stage, but these will only be around for one request, including a showForm one. I have called setMessage() with any initiation data validation errors.

in buildQuickForm, I've reduced this to adding just the form elements I need to display. (I was previously using hidden elements to store the authorised/parsed initiation data.) I also $this->assign('showForm', $this->_showForm);

in my .tpl file I wrap the whole thing in {if $showForm}.

in postProcess I fetch data using $this->get('contactID'); and user submitted form values from $this->exportValues(). I process that and use setStatus. I then set $this->_showForm = FALSE (might not be necessary) and do a redirect to the same path but without any query data.

on the redirect, without any GET data, my default FALSE showForm variable is not changed, and the form does not display, except for the setMessage messages.

Phew.
I'm not sure this is the right way. But it seems to work. Other answers very welcome!


Do you support SmsGatewayCenter SMS API Module?

CiviCRM is open source software, so there's no "you" to address this to.  Anyone is free to make a plugin to interface CiviCRM with this provider.

As of right now, no one has - but SMS provider plugins are relatively simple, and if you (or someone you sponsored) was able to put in a few hours, you could likely make this happen!


Why is the content of a Receipt for New Memberships different to that for a Renewed Membership

The receipt templates are at Mailings > Message Templates > System Workflow Messages

Under Memberships, there are two receipt templates for on-line and off-line.  From a quick look at those, I'm not clear how your problem arises.

What version are you on?  Templates do get changed so your problem may already have been fixed in later versions.

Are you using the default versions?  If not, it will show you a 'Revert to Default' and 'View Default' menu link as well as 'Edit'.  If changes were made to your templates a while ago then they may be very different to the current default version.  In this case, you need to compare your customised version with the default version.

If you are on the default version then you can easily experiment with some changes and use the 'Revert to Default' if you mess up.  Otherwise, you can save a copy somewhere, try changes and copy back your original saved version.

Hopefully that gives you enough to get started and narrow down the issue to a specific template and area of the file.  If you update your question with more detail someone can help you further.


Is there a price field that can be used to charge a percentage as a service fee in a priceset?

Should have looked before leaping - there's an extension named Percentage Price Field. As long as it works, that should work!


Emails sent to an outlook email address are returned with failed fraud detection

Welcome in the world of preventing spam. Your email is rejected by a Microsoft service, so Microsoft sets the rules. According to their documentation, the cause may be spoofing or, more likely in your case an incorrectly configured Sender Policy Framework (SPF) record.

You can reproduce this problem by sending a single email to an outlook address by using just the send mail action.

My assumption is that you sent your email directly from the server where CiviCRM is installed by using the mail() or the sendMail option in Settings - Outbound Mail . But your is not registered according to the SPF framework to be a legitimate email sender for your domain.

You can try to send the emails using SMTP server of your ISP (configure smtp in Outbound Mail). Another option is to add an SPF record to your DNS. More information at OpenSPF.

However, SPF is not the only countermeasure to discourage spam. The other is DKIM.

If you are sending large volumes of email you can consider using a specialised SMTP provider.


Go to Administer > Communications > Message Templates
Add New Message Template
Give your message a title
Insert the tokens needed to get the donor info needed.
Add the bottom fillable response card.

Here is a very helpful posting about this https://github.com/civicrm/civicrm-user-guide/blob/master/docs/contributions/manual-receipts-and-thank-yous.md


Design bug? "Supported recurring units" for Membership contribution. Why?

The big answer is that recurring contribution features were built with regular donations, not memberships, in mind. That memberships work is a nice bonus, but I think it would take a bit of investment to rework that the way you describe.  With most memberships being more standard durations, nobidy has stepped up to build that.

In your specific case, many payment processors won't even support biannual recurring payments--their maximum interval is one year. A potential reason for this is the proportion of cards that would expire between each renewal.


PHP Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame

As far as I can see the error signals that there is an uncompleted transaction somewhere. See https://docs.civicrm.org/dev/en/latest/framework/database/transactions/


I've found updating contribution amounts as Ramesh says is pretty weird for us, since we use price sets and offer lots of different deals and partnerships on events... the contribution status usually changes itself to partially paid or pending refund, which we don't want. I believe it's for people who want to use civicrm for financial reconciliation but since we dont, it makes things a bit complicated.

For one-offs, I usually go to the API explorer (yoursite.org/civicrm/api/explorer) and do a contribution create, including the contribution ID parameter to update the amount and the status (to completed) at the same time.


Is it possible to segment data so only users can see certain information?

Yes, you can do that. Read up on CiviCRM Access Control to get started.


Unfortunately, if you change the language after the installation, the data that has been loaded during installation in the database will not be translated.

I am not aware of an easy way of fixing that but you could use as a start the sql files in civicrm-xxx-l10n.tar.gz and do updates instead of insert.

The issue is known and hopefully will be fixed in CiviCRM 4.7


How can i add organization Legal name to search?

How are you letting the users lookup their employer?  Is that an autocomplete existing user on the webform?

If so, you can customise what information is displayed in the autocomplete, but that does not currently include legal name.  I'd guess that is a trivial enhancement.

If you want the option of the autocomplete searching on legal name, that might be a bit more effort.  For both, you could raise an issue at https://www.drupal.org/project/issues/webform_civicrm

To add an option for legal name search in the normal search would need a core change following the same pattern as nickname.

A different approach would be to provide a separate lookup facility on legal name using a view but that is not as integrated.


How to add additional action buttons in a civicrm Add Event form?

First think its not a good practice to over-ride any core files specially templates when you can use jQuery to play around.

You can use buildform() hook to add button(s) to a form and the pop up window will recognise the button based on class or attribute and append it on popup form

HTH

Pradeep


Adding defaults for custom field - dependant on encounter medium civiCase/rules

depends on what you mean by simple instructions :-) As you probably know simply is subjective.........

If you mean: without programming, you can not add a new rule in CiviRules without programming.
If you would like to program but find the instructions on the CiviRules cookbook https://docs.civicrm.org/civirules/en/latest/create-your-own-action/ too complicated I reckon you will need some training on CiviCRM customization as most of the terminology used is IMO fairly straightforward for CiviCRM developers?


If you want to record the person indicating their opting-in or opting-out then you could consider using an Activity for this purpose.


Is it possible to extend an existing custom field set to allow multiple values?

You can only edit the settings for allowing multiple records if the custom set is an empty set, i.e, the checkbox for this setting is only shown for those custom sets for which the custom table created has no rows in it.

This is checked here. variable $this->_isGroupEmpty is set to FALSE if you have any record in the custom table.


How do I allow registration for one day of a multi-day event?

I have successfully used price sets for exactly that purpose.

You can customise the event confirmation/receipt at Mailings > Message Templates > System Workflow Messages.   These are written using Smarty.

{if $event.id  eq 'XX'} will let you selectively customise the receipts for a particular event.

{if $line.label eq 'Friday only'} should let you customise at the individual line item level once you are in the line item loop.

For scheduled reminders you may be able to use Search Builder to create smart groups based on the fee label and so send different reminders depending on the day(s) of attendance using "Limit to - Group ".


Module or extension to use for tracking agreements?

You can setup CiviCase to enable multiple clients per case, by editing your xml/configuration/Settings.xml file. Set <AllowMultipleCaseClients>1</AllowMultipleCaseClients>


How do I call an SMF function from CiviCRM?

In a standalone test script, I could call the SMF createPost() function by first requiring some SMF files:

require_once('/path/to/forum/index.php');
require_once('/path/to/forum/Sources/Subs-Post.php');
createPost($msgOptions, $topicOptions, $posterOptions);

But I ran into php variable scope problems when trying to include index.php from my hooks plugin in the middle of Civi's chain of processing code.  index.php include()'s Settings.php which defines important variables, but they don't wind up in the global scope, so when index.php then calls various other functions they don't have access to the variables.

I hacked around this based on something I found somewhere.  I used this code within the postProcess hook to manually put all the variables defined in Settings.php into the global scope:

$__defined_vars = array_keys(get_defined_vars());
require_once('/path/to/forum/Settings.php');
$__newly_defined_vars = array_diff(
  array_keys(get_defined_vars()),
  $__defined_vars,
  array('__defined_vars')
);
foreach ($__newly_defined_vars as $var)
  $GLOBALS[$var] = &$$var;
$GLOBALS['smcFunc'] = array(); //also need to define this in GLOBALS
require_once('/path/to/forum/index.php'); //this and next line needed to call SMF createPost function
require_once('/path/to/forum/Sources/Subs-Post.php');
createPost($msgOptions, $topicOptions, $posterOptions);

I welcome other input on better ways to do this...but it works!


The 4.6 version of the user guide should be published in the next few days (We are waiting for one more section to be proof read.)

In the meantime here are 3 images containing that information (I can't attach a PDF.)


How to print selected/multiple Contact Profile "Print Summary"?

This might be quicker/fewer clicks than totally manual printing when you are dealing with dozens or hundreds of contacts. Still not a great option, though.

Get a list of all the ContactIDs that you want to print.
Merge each CID into the appropriate "Print Summary" URL for your CMS. For Joomla, it is [domain]/administrator/?option=com_civicrm&task=civicrm/contact/view/print&reset=1&print=1&cid=xxxx
Put the list of merged URLs into your favorite text editor that creates automatic links, and click on each one.

Not really an answer to how to print multiple at once, but it might be a useful workflow for a non-programmer until a proper solution is devised.


Yes, making use of the api you can change more or less any data. Test it by accessing the api explorer under <your_installation>/civicrm/api.

First check getting emails in question.
Then try out setting parameters like you want.
Combine the calls to either a php script or use api chaining in the api explorer.

Keep in mind that get operations are limited to 25 results by default and that update operations may harm your data – even in the api explorer.

If you have questions consider Using the API or ask here.


Queue runner must be configured before execution. When trying to upgrade in wordpress

There's some docs about queues at https://docs.civicrm.org/dev/en/latest/framework/queues/ but I don't think that helps you here.
You might try upgrading via command line instead: cv upgrade:db. See https://github.com/civicrm/cv if you don't have cv installed.


The "DB Error: no such field" bit in your error message is your key clue.

The missing field is listed as "Unknown column 'j.start_date' in 'where clause'", but it's not showing any more of the sql to know which table that comes from.

I dug through some code, and I'm pretty sure it's supposed to be coming from the civicrm_mailing_job.

So - either that table isn't getting joined properly (likely a code issue), or else that field is missing in that table in your instance.

Since 5.22.1 is fresh out the door, it could be a code issue.


Sending one copy of each CiviMail campaign to a specific email address?

CiviRules provides a good foundation for say 'if trigger X happens, then do Action Y'.

I have no idea if the option you need is there but if it isn't it might be a good place to add it.

In other words, create a rule that says, if a Group is created then add contact X to it.


After CiviCRM 4.7 upgrade, CRM.$ Not A Function Errors

Try enclosing your jquery code in:

CRM.$(function($) {
$(document).ready(function () {

});
});


how do I install an extension in wordpress

If you have CiviCRM installed on your WordPress installation as a plugin and you are inside CiviCRM trying to install a CiviCRM Extension.  This is what I do to had an extension that is not automatically available with CiviCRM Extension manager.  I go to my server manager CPanel and use the file manager to upload the extension zip file.  I place the extension zip file in to the folder;  public_html/wp-content/plugins/files/civicrm/extensions. Extract the zip file and the new CiviCRM extension will become available to install within the CiviCRM Extension Manager.


Issue field DEDUPE "0 Argument 1 passed to"

We are experiencing a similar type error on staging site running 5.21

-we have created a custom field in the civicrm profile used for site registration, e.g. that matches on a unique identifier (card Number)

-The error we are getting looks likes this :

TypeError: Argument 1 passed to civicrm_api3() must be of the type string, null given, called in /home/ibew90v2/master/sites/all/modules/civicrm/CRM/Dedupe/BAO/Rule.php on line 62 in civicrm_api3() (line 84 of /home/ibew90v2/master/sites/all/modules/civicrm/api/api.php).
ERROR
The website encountered an unexpected error. Please try again later.

The error appears to state that it is looking for null value (?) and cannot handle any input (alphanumeric or otherwise in the field)
Placing nothing in the custom field it allows the profile submission and creates the account.

The latest release notes here reference a change to the api https://github.com/civicrm/civicrm-core/blob/master/release-notes/5.21.0.md
https://github.com/civicrm/civicrm-core/pull/15817

"Fixes a formatting issue in the api explorer output where IS NULL and IS NOT NULL clauses would output invalid code due to the missing value piece of the clause."
it appears that the api did not update, somehow when doing the upgrade, that it is still referencing the apiv3 folder .

Notes :

first part of the error references line 66 in the rule.php file, e.g. /home/ibew90v2/master/sites/all/modules/civicrm/api/v3/Rule.php
"This api exposes CiviCRM (dedupe) rules."

The second part of the error references the api.php file at /home/ibew90v2/master/sites/all/modules/civicrm/api/api.php
it is breaking down here, line 84 :
 function civicrm_api3(string $entity, string $action, array $params = []) {  $params['version'] = 3;

However 5.21 per release notes is using api v4 -- are these old files ? need to be replaced or updated?

Possible fix here : https://github.com/civicrm/civicrm-core/pull/15817/files


PHP Fatal error: Smarty error: [in string: (...)]: syntax error: (secure mode) (...) not allowed in if statement (...)

There is a surprisingly simple solution:
Smarty assumes, that comparison containing a constant string is unsafe.
A remedy is, to assign the constant value to a variable, and to perform the comparison between these two variables.
The code example from above could look like:
{capture assign=gift}{contact.custom_16}{/capture}
{capture assign=Yes}Yes{/capture}
{if $gift == $Yes}
  This membership is a gift from {contact.custom_17}.
{/if}

Good luck!


Can't find Click the Continue button to proceed with the payment in translation string

The string has html in it: Click the Continue button to proceed with the payment. e.g. https://lab.civicrm.org/dev/translation/-/blob/f0d769640f51dd1fe891963e4208bffd7625da91/po/it_IT/common-base.po#L12259
If you're trying to use word replacements, you would need to include that when doing a word replacement, except there are some bugs in that when using html which are still being worked on (https://github.com/civicrm/civicrm-core/pull/15836)


How does Civimail reply tracking and forwarding work?

CiviCRM uses Variable Envelope Return Path (VERP for short) to track bounces and optionally replies.

This technique assigns a unique, coded address to two aspects of a CiviMail email. Viewing the mail headers, you might see something like

Return-Path:      <civimail+b.1234.1234567.aabbccddeeff1122@example.org>
X-Civimail-Bounce: civimail+b.1234.1234567.aabbccddeeff1122@example.org
Reply-to:          civimail+r.1234.1234567.aabbccddeeff1122@example.org

Here's a breakdown of what you're seeing -

civimail         - the mailbox name of civimail@example.org
+                - VERP separator
b                - action - (b|bounce|c|confirm|o|optout|r|reply|s|subscribe) etc
1234             - mailing job id
1234567          - mailing queue id
aabbccddeeff1122 - validation hash

SMTP systems understand these headers, so if the message is undeliverable they should return the bounce to the Return-Path address, and if the person hits reply their mail client should use the Reply-To address. This depends on correct behaviour in the MTA and MUA, both of which are outside of control of CiviCRM.

The main place this is used is in the email processor at CRM/Utils/Mail/EmailProcessor.php, where CiviCRM checks for these strings either in the message headers this bounce/reply was delivered to, or in the body of the message (some mail systems don't permit VERP delivery; expect less ideal results without full VERP support).

... That's how it works under the hood! Joe's answer explains this well from the other side of the dashboard :)


You need to add the country field to your profile. Since the country field applies to all Contacts it shows under Contacts.

Make sure you do not have any other conflicting entities in the same profile you are using to batch update orgs.

You should create a profile called 'Batch Update Organization' to be used just to batch update the organization contacts.


I am using civicrm_entity which can pretty much expose everythign in civicrm to drupal views (and more)


I can think of a way, but you need to know how to run SQL on your CiviCRM database.

Find out the ID number of the custom field.
Run the following SQL.  Change the "7" in custom_7 to the ID number of the custom field:

SELECT cug.id, cug.title
FROM civicrm_uf_field cuf
JOIN civicrm_uf_group cug ON cuf.uf_group_id = cug.id
WHERE field_name = 'custom_7';

It will give you back the title of any profiles that use the field.

Of course, if you're using Webform-CiviCRM or Caldera Forms-CiviCRM integration, this won't catch those!


Steps I followed on Demo site now to test were

confirm you have turned on address parsing by clicking on Administer > Administration Console> Configuration Checklist > Address Settings, then in the Address Editing area, check the box for Street Address Parsing.)
confirm you have Scheduled Job for Geocode and Parse Addresses running at civicrm/admin/job?reset=1
create New Campaign civicrm/campaign/add?reset=1
create new Survey
reserve some respondents
go to All Reports, find one you created above from
should see the Parsed address fields display results (in my case at this report for next few hours http://d46.demo.civicrm.org/civicrm/report/instance/38)

I suspect you might have not run your Geocode and Parse Address job.

hth


How to change or overwrite block reportlets created by ExtendedReports (reportlets)

I think you should see all reports under 'all reports' & be able to go into it & edit it from there


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


How to get a data for a perticular logged in user ( through API)?

In that case you will need to send api key of the logged in user who access is limited by ACL (also check_permission = 1 in api params).


Price Set Option still publically visible when visibility set to 'Admin'

This belongs as a comment, but I'm bending the rules because I wanted to include screenshots.
I was unable to replicate this.  See my attached screenshots from a demo site.  The first screenshot is while logged in as an admin, the second is as an anonymous user on the same page.  Since you're able to replicate this on the demo server, we must be setting up the page differently.  Could you please edit your question to detail the exact steps you took to set this up?  Or perhaps link to a video?
As admin

As anonymous


You can change the display name for a contact in 2 ways

By using CiviCRM alter display name hook you can change the Display name to a preferred name.

Update the format for Sort name and/or Display name by navigating to Administer >> Customize Data and Screens >> Display Preference (civicrm/admin/setting/preferences/display?reset=1) and then update the 'Individual Sort Name Format ' and 'Individual Display Name Format' fields as per your choice.
(Note: This change will be reflected to contact only if New Individual is added or updated)

HTH
Pradeep


Some contact information not returned by API Get call

According to the API explorer, the Contact Entity does not return the website information. To include that data, you would have to use a GET action on the Website entity. See the example at (your site)/civicrm/api#examples for the fields the Website entity can return.


MySQL Master-Master Replication on 2 servers

This is an interesting approach!

As you rightly noted, that bug report was wrong a long while ago and didn't get traction.

As you mentioned you have developers able to help, I would suggest you do a quick evaluation to identify if the install procedure (without installing sample data) breaks still with an autoincrement >1

Obviously, in a separate install that you might end up trashing.

in your install/index.php line 1007 or so alter  requireMySQLAutoIncrementIncrementOne so it's first line is

return; // bypass the test, the sky might fall, but at least we'll know how exactly.

I think the general plan for inclusion of a new feature is: if you do the work of identifying the issue and code the fix(or fund the work if needed), it's likely to be accepted ;)

Assuming that it doesn't have any impact for "normal" users that have an increment of 1, I personally would want to try (or at least master-slave for a starting point)


Hi @yobba I would suggest you look at applying this patch https://github.com/civicrm/civicrm-core/pull/16177 in one site i was associated with this fixed the error for us.


URGENT : Stripe.js token was not passed! Report this message to the site administrator. (on civicrm 4.7.20)

Please upgrade to the current github 4.7-dev version. Lots of work went into eliminating "Stripe.js token not passed!" errors that can for a variety of reasons. Jacques-Marie, you can reap the benefits of this labor by upgrading.

You already posted the url, but this is it:

https://github.com/drastik/com.drastikbydesign.stripe


Manual Contributions Showing up as 0 Against Contact

This problem arises when the default price set, or any of its fields, are inactive

It took a lot of digging to find this, but if you enter a contribution with no price set, it looks up the default price set and runs some code against that, which fails under these conditions, and causes the total price to be set to 0.

Assuming that the default price set is the one with id 1 (as it is on my system), running this sql will fix the problem:

update civicrm_price_field set is_active = 1 where price_set_id = 1;
update civicrm_price_set set is_active = 1 where id = 1;

This is the sql that runs and must return something - test it, and if it doesn't, make the required changes:

mysql> SELECT id,name,label,html_type,is_enter_qty,help_pre,help_post,weight,is_display_amounts,options_per_line,is_active,active_on,expire_on,javascript,visibility_id,is_required,is_required FROM civicrm_price_field WHERE price_set_id = 1 ORDER BY weight;

If this does not work then perhaps your default price set has a different id; I don't know how to check this except to put an error_log statement around line 1470 of CRM/Contribute/Form/Contribution.php to log the value of $priceSetId


Automatically recording electronic fund transfers for members

There would not be an automatic process.

Save a CSV spreadsheet(s) with the list of transactions. Every month, you can change the date column and import it into Civi.


Upgraded to PHP 7.2; no errors but Sparkpost doesn't receive and send CiviMail

PHP 7.2 does not have the mcrypt module, and the Sparkpost extension needs that module.   If you can install php7.2-mcrypt as a pecl module Sparkpost will work.   If not, I would move to php 7.1 for the time being.


No, there is not a shortcode available, but I'm not sure either that it isn't trivial to enable one.

But, I suspect it is not necessary for what you are trying to acomplish.

Have you enabled clean URL's for your CiviCRM install?

https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/#enabling-cleaner-urls-for-wordpress

After you do that, the sign-up page should be displayed with your wordpress front-end theme: http://example.org/civicrm/vol/#/volunteer/opportunities

Be sure to note the permissions required: https://docs.civicrm.org/volunteer/en/latest/sign-up-form/

I think this would enable your custom plugin to display its headers.

Saludos!


civiCRM tab is not showing on top right corner of content?

You will need to install and enable webform civicrm module to integrate civicrm fields with webform.

HTH

Pradeep


Wordpress CiviCRM 4.7.10 - Sorry an error occurred and your information was not saved

Have just turned off a security plug and the mail function is now working so for anyone with this issue in Wordpress you might want to check your plugins and switch some off.


problems with kcfinder image browser in Chrome

You don't mention CMS but if this is Drupal then I would recommend you upgrade to 7.71 due to

Fix for jQuery Form bug in Chromium-based browsers


Disable Inline Editing of Fields in Profile Form

It looks like this was a bug in CiviCRM. I have written a fix and submitted a pull-request for review. Your testing and feedback can help expedite the review process to get it accepted into the codebase.

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


Can Wordpress handle multi-site CiviCRM the same way Drupal 7 with domain access does?

Yes - this can be done - you will find instructions on how to integrate Civi with a WordPress Multisite installation HERE.

Hope this helps!


The event dashboard shows recent and upcoming events (where start date is 7 days ago OR later). If you want to show all events of current year than you can do it in either one of the two way given below.

Over-ride CRM/Event/BAO/Event.php and edit the where clause at line 357 and 419.
Create an extension and use pageRun() hook to over-ride $eventSummary variable in smarty and also copy paste CRM_Event_BAO_Event::getEventSummary(); into your extension and update the where clause at line 357 and 419. Below code shows how you can use the hook(not tested)

function abc_civicrm_pageRun(&$page) {
    if ($page->getVar('_name') == 'CRM_Event_Page_DashBoard') {
      // Call to your custom function which is replica of
      // CRM_Event_BAO_Event::getEventSummary(); but change in where clause.
      $eventSummary = EXTENSION_CLASS_FILE_PATH::getEventSummary();
      $enableCart = Civi::settings()->get('enable_cart');
      $eventSummary['tab'] = CRM_Event_Page_ManageEvent::tabs($enableCart);
      $page->assign('eventSummary', $eventSummary);
   }
}

PS - #1 is not recommended as it will be difficult to maintain during Incremental upgrade.


Price Set with a conditional 'Other' field

You can create an option in the event fees for 'Other' with a price value 0. Then create another price field with the type 'Text / Numeric Quantity' and a price of 1. Some other things you may want to consider with this method:

Hide prices in the field setup and put them in the line item descriptions. This avoids the user seeing the $0 amount on the 'Other' option.
In the 'Other' line item description you may want to add something like 'Enter amount below'
With some simple jQuery you can hide the other amount field unless the 'Other' option is selected.

Hope this helps...


How can I set up a two part sign up form, where first submit leads to second with more fields?

To implement this purely in CiviCRM with WordPress:

Create a standalone profile form to collect name, email, etc.
Create a second profile form to collect other information. If you want it to record an activity, you can set it up as a "Petition" form. If you want it to register the contact for an event, embed it in an event registration page.
Back to the first profile, edit and click the "Advanced Settings" tab at the bottom - set the "redirect url" to the public url of the second form.
Create a page or post in WP, and click the CiviCRM button to insert a shortcode for the first form.

Note that users must be logged in for Civi to already know who they are on the 2nd form. You have 2 options with this:

Users are already logged-in prior to filling the 1st form
On the 1st form, (also under "Advanced Settings") you can have Civi create a user account for them.


Is it posisble to stop contributions of zero?

I am afraid to say that your use case or business logic is not supported in CiviCRM ATM. You can either raise a request on https://lab.civicrm.org/dev/financial or write an extension and implement hook_civicrm_validateForm hook to throw validation error on screen and not allowing user to submit the form.

HTH

Pradeep


Autodetecting variables for URL variables

If those tokens aren't working for you, it's OK to use the absolute URL or path without the token instead. Would that solve the problem for you?

https://www.example.org/wp-content/plugins/files/civicrm/

There seem to have been a few questions about this recently. I haven't run into it myself, but got an impression this may relate to symlinks in the webserver path.

There has been a bit of work recently regarding miscalculation of [civicrm.files] values - contributing information to these linked discussions may help to get the problem resolved:

CRM-20609: File URL when CiviCRM detects Drupal doesn't match path set by [civicrm.files]
CRM-19303: CKEditor configuration can't be edited on a Drupal multisite installation
Lots of discussion of this in PR9458


Moving all contacts from CiviCRM to Kepla

One way would be to use the quick search or any other search and simply enter "%" as a search criteria. This would bring up all contacts in the database and you could export them afterwards.
If you want to include deleted contacts use the advanced search with the same criteria but tick the box "Search in Trash (deleted contacts)".
In the export dialogue, make sure to select all columns you want, including notes.


Patch or workaround for search with checkbox or multiselect field

I have fixed that under https://issues.civicrm.org/jira/browse/CRM-16927 and here's the PR https://github.com/civicrm/civicrm-core/pull/6342 (not merger yet). Can you please verify the patch if it works for ya ?


CiviContribute/CiviCRM overrides content entered into a custom field each time a donation is made

It sounds like your custom fields are on the contact record. If you create custom fields on the contribution instead then you avoid the problem.


Network error unable to reach the server - wordpress

Issue is resolved now...it was base url without www in civicrm.setting file.


It should never be a 4 step process as the contribution and membership records are created at the same time. When you sign someone up for a membership offline via Add Membership on the membership tab of their contact record you tick the "Record Membership Payment" box and enter the payment during the membership creation or, if it is a credit card payment you choose Submit Credit card membership and the details for recording the payment are visible from the beginning.

You can get it down to 2 steps if it is a credit card payment and you make use of the "not you or want to do this for another person" feature at the top of the online sign up page.(The only step to do separately would be creating the onnected Joomla user.)

If you were using Drupal and the payment was by Credit card you could do it in one step if you used CiviRules to tag the contact when it was created and then implemented the steps outlined in Creating Drupal users made easy .

However, I note that you are using Joomla.  I don't use Joomla and don't know if anyone has created a similar method for creating Joomla users by tagging civicrm contacts.


(Solved) Undefined function in webform_civicrm

Thanks for letting us know about the problem. I've just pushed a fix into the 7.x-4.x branch to ensure the function gets loaded. You can update your local copy of the module (cd /path/to/modules/webform_civicrm && git pull) and try again.


Essentially you want to display a form on your wordpress that takes in the personal details (name, email address) of your subscriber.  these details will be fed into the civicrm on your wordpress and where the civimail module will pick up to send the newsletter to.

In quicksteps:
1. Create Profile (under Admin)
2. Select the fields required for this profile, these are fields that will appear in the subscription form
3. Expose the profile in the wordpress page (refer How do I expose CiviCRM forms in WordPress?)

You can refer to this website on setting up the form on wordpress in details:
https://docs.civicrm.org/sysadmin/en/latest/integration/wordpress/forms/


I have got it sorted.  I had made the following errors:
1. The command line doesn't need the parameter "task", so only the first three.  This worked when I used that amended URL as a url in a browser but then I had to include it in the control panel of the hosting site.
2. For the cron job facility provided by the hosting site in the control panel, I had to change the url to:
home/public-html/components/com_civicrm...etc.
Then it all worked well!


I'm almost certain that such a token doesn't already exist.


The answer to this question is provided in the response to "Pay Later Online?"


I did a similar auto-complete feature on a Civicrm-based view with 'Search Autocomplete' https://www.drupal.org/project/search_autocomplete.
I liked that you can filter the data shown in the autocomplete list with a view, so you can filter to items related to the user.

I made a view 'search_name_or_email'  based on CiviCRM Contact with

among other fields

'contact ID', 'sort name', 'email address',
a custom text field named 'autocomplete text' that contains '[[id]] [sort_name] :: [email]'
a 'CiviCRM Contacts: Text Link' that points to the contact page

exposed filter Operator 'Contains'
'Choose fields to combine for filtering': 'name' and 'email address'
in 'More' the 'Filter identifier' is 'term' (this one was important)
(here add more fields and filters according to what you want to display and list, by example filter on Contact type for Organizations only)

the view format is 'Autocomplete JSON' with

group fields by: 'Contact ID'
input label: 'Contact ID'
input Link: 'Text Link'
Ouput Field: 'Autocomplete Text'

The view is limited to 10 items. Path: '/contact-id-autocomplete'

I made another display on the same view
that has input label 'Name' instead of 'Contact ID'
so when we click on the autocomplete list it fills the field with the contact name rather than the ID.
Path: '/contact-name-autocomplete'.

In the admin/config/search/search_autocomplete settings I made 3 forms

'contact in relationship with' to have in a 'relationship contact B' views exposed filter with

HOW: 'Auto Submit' unchecked and 'Auto Redirect' unchecked
WHAT: callback url: /contact-id-autocomplete
ADVANCED: 'ID selector for this form': '#edit-contact-id-b-'

'contact name' to have in a 'contact name' views exposed filter

HOW: 'Auto Submit' unchecked and 'Auto Redirect' unchecked
WHAT: callback url: /contact-name-autocomplete
ADVANCED: 'ID selector for this form': '#edit-name'

'quick search' to have in the page header with

HOW: 'Auto Submit' checked and 'Auto Redirect' checked
WHAT: callback url: '/contact-id-autocomplete'
ADVANCED: 'ID selector for this form': '#edit-search', to be set depending of your page content

For the ADVANCED: 'ID selector for this form', you have to find a unique jQuery selector for your html input field

To style the autocomplete list, and have only one line by Contact, I made a custom autocomplete style named 'atd'
with a css file in my custom theme
and chose it in the search autocomplete settings in 'Select a theme for your suggestions'

/* AUTOCOMPLETE */
input[data-sa-theme="atd"].ui-autocomplete {
  position: absolute;
  cursor: default;
}
* html input[data-sa-theme="atd"].ui-autocomplete {
  width: 1px; /* without this, the menu expands to 100% in IE6 */
}

input[data-sa-theme="atd"].ui-autocomplete.ui-menu {
  background: none;
  border-radius: 0px;
  color: #2c2c2c;
  border: 1px solid #c8c8c8;
  box-shadow: 2px 2px 2px -1px rgba(128,128,128,0.6);
  position: absolute;
  background-color: #ffffff;
}

/* AUTOCOMPLETE MENU */
ul[data-sa-theme="atd"].ui-menu {
  font-size: 1em;
}
ul[data-sa-theme="atd"].ui-menu {
  list-style: none;
  padding: 0px;
  margin: 0;
  display: block;
  float: left;
  min-width: 650px;
}
ul[data-sa-theme="atd"].ui-menu .ui-menu {
  margin-top: -3px;
}
ul[data-sa-theme="atd"].ui-menu .ui-menu-item {
  margin: 0;
  padding: 0;
  float: left;
  clear: left;
  width: 100%;
}
ul[data-sa-theme="atd"].ui-menu div.ui-autocomplete-field-group {
  display: none;
}
ul[data-sa-theme="atd"].ui-menu .ui-menu-item a {
  text-decoration: none;
  display: block;
  padding: 0;
  font-weight: normal;
  margin: -1px;
  border:none;
}

/* Interaction States */
ul[data-sa-theme="atd"].ui-menu a.ui-state-focus {
  background: none;
  background-color: #BAE4F6;
}
ul[data-sa-theme="atd"] .ui-autocomplete-fields {
  padding: 5px 6px;
  overflow: hidden;
}
ul[data-sa-theme="atd"] .ui-menu-item-first {
/*  border-top: 1px solid white;                   // <= change here */
}
ul[data-sa-theme="atd"] .ui-autocomplete-field-title {
  text-align: left;
  font-size: 1.3em;
}
ul[data-sa-theme="atd"] .ui-autocomplete-field-term {
  font-weight: bold;
}


Is there a way to use css pagination / repeating elements with dompdf?

The dompdf in civi is the latest 0.8.6. If you're asking if dompdf itself supports pagination, I don't know offhand - that would be a dompdf question.


How to change DB user password for CiviCRM 4.7.3?

Ok, I figured it out and for the benefit of anyone who might Google search this same question, here's the answer.
 1. Go to your webhost's file browser.
 2. The file should be located in /public_html/wp-content/uploads/civicrm/civicrm.settings.php
 3. Open the file with the code editor.
 4. Modify the credentials string which contains the password and save.


I used another browser (edge from chrome), I logged in to Drupal and then used the upgrade command in the same window and it worked.


What fields need to be on Gift Aid declaration form to avoid uncaught exception?

If you miss out required fields it should show you an user-freindly error, not throw an exception. It should also indicate what fields are required. So whether or not the required fields have been entered, this is a bug in the gift aid module.

You can raise it with the developers of the gift aid module. They have an active issues queue here https://github.com/compucorp/uk.co.compucorp.civicrm.giftaid/issues

Regarding scheduled jobs - did you get it working? If so, I recommend updating their documentation and issuing a pull request.


Im answering my own question and I'll probably go overboard in explaining everything exhaustively, but I sunk too much time into this to just let my understanding disappear into my own forget.

In this particular site, site admins use the custom page template 'page-civiform.php' whenever they want to create a page which will contain a CiviCRM form, inserted via shortcode, and this page template allows them to also insert additional content via a custom field which will display in a column alongside the form.  Looks nice.

End users submit the form, and then CiviCRM automatically generates each subsequent page (thank you page, event registration confirmation page, etc).

These pages will have the same body classes as the page where the shortcode was inserted.

BUT these Civi-generated pages do NOT use the same content as the page with the shortcode. And by content, I think this means everything in between get_header() and get_footer(). Instead, they use the content from another page, and there are three ways to specify which page they will use:

If there is no other method utilized to specify which page to use, CiviCRM will use the home page. Again, content, not body classes (that was the source of my confusion).
In CiviCRM > Administer > System Settings > CMS Database Integration, the WordPress Base Page can be set to a specific URL.  Then that page's content will be used.
It is also possible to specify the page via a filter which would go into functions.php or a plugin.  And here's code for that:

add_filter( 'civicrm_basepage_template', 'my_basepage_template' );

function my_basepage_template( $template ) {

return 'page.php'; //whichever template you want

}

The path of least resistance here is to have ALL of these pages (pages with shortcode inserted as well as any resultant civi-generated pages) have the same template, because then this whole situation wouldn't matter.  But on this site, we want some content in a column next to the shortcode-generated form, so that's why we have a separate page template with a custom field ('page-civiform.php').

Here is 'page-civiform.php' so you can see how the custom field is conditionally included or not.  The presence of that conditional statement would actually allow me to set this page as the WordPress Base Page, and it would yield the same result, which in this casse is two columns on page with shortcode, one column (just Civi's content) on auto-generated pages.

Basically, this all comes down to having different design/layout for pages with shortcodes vs civi-generated pages.