Error when printing PDF letter or mailing label from search results list Ran a filtered search for all "regular" members and search returned 379 records. I then wanted to create printable letters for all 379 members. I selected our New Member Welcome Letter as the template and pressed "Make PDFs". Result:

Notice: Undefined index: metric in /home/sherida1/public_html/rabbit/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/PdfFormat.php on line 309

Notice: Undefined index: metric in /home/sherida1/public_html/rabbit/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/PdfFormat.php on line 309

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /home/sherida1/public_html/rabbit/administrator/components/com_civicrm/civicrm/vendor/dompdf/dompdf/include/frame.cls.php on line 180

After seeing the memory size error, I tried something simpler. Selected the first 10 names from the search result and tried "Make Mailing Label" Results:

Strict Standards: Non-static method CRM_Contact_Form_Task_Label::buildQuickForm() should not be called statically, assuming $this from incompatible context in /home/sherida1/public_html/rabbit/administrator/components/com_civicrm/civicrm/CRM/Member/Form/Task/Label.php on line 60

TCPDF ERROR: Some data has already been output, can't send PDF file

I will examine the lines of code mentioned, but I hope that someone can quickly identify the issues.

Thanks,
Kate

With your first error, the issue is with TCPDF, the standard PDF library that CiviCRM ships with.  TCPDF isn't very efficient, and takes a lot of memory when you try to generate a large PDF.  Unfortunately, the other two PDF options have issues: DomPDF doesn't support all of the features TCPDF does.  wkhtmltopdf is great, but is written in C, which means that unlike PHP applications, you need a version specific to your environment.  If you install wkhtmltopdf on your server though, you can tell CiviCRM to use that instead.  I think this is the best solution for you.

You can either a) install wkhtmltopdf and tell CiviCRM to find it (Administer menu > System Settings > Misc), or b) increase the amount of memory available to PHP in your php.ini.  I recommend the first option!


How to Change Price Set Field Type without deleting and re-adding I have some price set fields created as Radio currently, but they need to be Checkbox type. Is there any way to safely change (even in backend) without having to recreate the entire field (there are a lot of choices)

CiviCRM 4.6.x Drupal 7.x

Thanks!

My first answer is: yes you can do this in the backend! I just confirmed it: in the civicrm_price_field table find your Price Field ID (row) and then change the html_type from: Radio to: CheckBox I just did this on a dev site and my price/field?action=preview looks just fine - no errors/notices.

My responsible answer is: first make an extra backup - next make a clone of your project and make the edit to the html_type - check your contribution page(s) where you offer this price_set - run any report you would normally run to check to see that everything still adds up [IF you've already had users selecting these price_set fields so you have data in them already].


Autofilling a new custom field I've just created a new field with a 'yes/no' answer.  Can I auto-fill all records with a specific answer?

Once you set the default value, you have to somehow trigger an update for your contact records so the default value gets populated. One way to do this might be to export a minimum of contact fields and re-import them (careful with this technique, unless you do it properly you'll create a lot of duplicate contacts in your db!).


Issue with custom report that shows all users registered for event in last 2 years but not this year I am using Drupal 7 and CiviCRM 4.6.28.

I am trying to create a report that will display all of the users who registered for an event in 2015 and 2016, but not yet in 2017.  I have the report working to the point of displaying all who registered in 2015, 16, and 17.  I am not sure how to go about removing those who have not registered in 2017.  The idea I've been trying is to create an array of contact_ids that are registered in 2017, and then use that array in the WHERE clause, to only select rows that do not contain that contact_id.  It is still displaying users who have registered in 2017, though.

I am running this query in the where() function in the report php file.

Here are the contents of the where() function:

$sql = "SELECT {$this->_aliases['civicrm_participant']}.contact_id,
{$this->_aliases['civicrm_participant']}.register_date
FROM civicrm_participant {$this->_aliases['civicrm_participant']}";

$dao = CRM_Core_DAO::executeQuery($sql);
$i = 0;
$registered = array();

while($dao->fetch()) {
    if (strpos($dao->civicrm_participant_register_date, '2017') !== false )
    {
        $registered[$i] = $dao->civicrm_participant_contact_id;
        $i++;
    }
 }

$this->_where = "WHERE ({$this->_aliases['civicrm_event']}.title = 'SF Open
Studios 2017'
OR {$this->_aliases['civicrm_event']}.title = 'SF Open Studios 2016'
OR {$this->_aliases['civicrm_event']}.title = 'SF Open Studios 2015')
AND {$this->_aliases['civicrm_participant']}.contact_id
NOT IN ( '" . implode($registered, "', '") . "' )";
}

I have accomplished similar results to what you are looking for by doing the following.

I created a smart group for all those who have registered for the current event (2017)
I then used the participant report filters to include all registrants from the previous events (2015 & 2016)
I then added a filter to exclude any members of the smart group for the current event.

I do all this using the report filters on the standard participant report but you could probably apply similar filters to a custom report. I also use the current event registrant smart group to exclude folks who have already registered from promotional mailings. It comes in handy.

Hope this helps.


Install CiviCRM Buildkit on windows xampp how to install buildkit cvcrm on windows?
I've set up xampp, drupal 7.x and civicrm 5.2.x

i just have no clue what to do with the buildkit zip file which I've downloaded from here https://github.com/civicrm/civicrm-buildkit

please advice

thanks

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

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


Has anyone tried Stripe payments through OmniPay? The Stripe payment processor extension works okay for the most part, but when there is an issue, it seems hard to get any answers or feedback. I am curious if anyone has tried integrating Stripe payments through the OmniPay extension, and if so how that went?

I think Stripe through the Omnipay extension is not working at the moment. We are looking into Stripe as well and will wait for the regular extension to be updated like Parvez mentioned.


Troubleshooting SELECT Privileges Issue with Drupal 9 Views Integration I'm having an almost identical problem to this person (https://www.drupal.org/project/civicrm_entity/issues/3198146) so I'm hoping to get an answer for both of us.
It looks like this may also be the same issue.
I have a Drupal 9/CiviCRM install set up on a shared hosting account on A2Hosting. Everything has gone smoothly so far, and I was able to follow the Views integration instructions exactly.  However, when I try to set up a simple View to test, I get the following error:
SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user '<USER>'@'localhost' for table 'civicrm_contact': SELECT "civicrm_contact"."id" AS "id" FROM {civicrm_contact} "civicrm_contact" LIMIT 11 OFFSET 0; Array ( )

The error seems pretty self-explanatory - I need to assign SELECT privileges to the  in question - but I've tried everything I can think of, namely:

I've given the USER in question ALL PRIVILEGES on the CiviCRM database in cPanel. I can't access the User list via phpMyAdmin, which I guess is common on shared hosting.

I've tried to use the command line to check the status of the USER's privileges, but I apparently need root access, which is not possible on the shared hosting plan.

I've contacted A2Hosting directly to see if they can help check (or correctly assign) the
privileges for the USER in question. They say they can't.

So, I have a few questions that I'd love help answering (I'm a relative beginner at all of this):

Is this a known issue? There are at least two of us now who've been stumped by it. Is there a quick fix I'm not seeing?

Are the USER in cPanel and USER@localhost different entities? Is it possible that they would have different privileges?

If Views integration is somehow not possible in a shared hosting environment, what is the preferred set up?  Am I on the wrong hosting service?

For me and a few other users, with Civi & Drupal in separate databases, this was solved by comment #4 on Views integration error on D9:

Try removing the back ticks ... '`' from the prefix information in the settings.local.php

(or settings.php in my case.)
If it's not working for you with Civi & Drupal in the same database, assuming you've removed the code that you pasted into the settings file, maybe try Jon G's solution at How to get CiviCRM Views to work in Drupal 8 with separate CiviCRM database.


How to change or overwrite block reportlets created by ExtendedReports (reportlets) I can't work out how to change the block/extended report once created, that I then use in the Contact Layout Editor, as overwriting it with the same name just made another block appear with the same name.

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


Change MailStore from Gmail to Outlook on cloud Civicrm/Joomla/AWS.

Just changed our email from GSuite to Outlook.

I see from Fetch Bounces error log "could not connect to mailstore @imap.gmail.com.

Where is the file to update this?

See https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/#adding-an-incoming-email-account-for-processing-bounces-andor-email-to-activities. Go to admin - civimail - mail accounts.


Empty token default values -- core or extension support? I want to provide a default value for tokens when the value is empty, on a per-use basis -- e.g., something like {contact.first_name?Friend} would print the contact's First Name if it's not empty, otherwise print "Friend".

Rationale update: This would allow non-programmers to easily specify a default value without needing to clutter up the tokens UI.

Existing workarounds for this functionality are more cumbersome than that:

Dave's blog from version 2.2 uses hooks in an extension to hard-code defaults for specific tokens in all cases.
This SE answer points out that this can be achieved by enabling Smarty processing and then inserting a few lines -- per token -- of Smarty code into the content.

To avoid double-work and/or undertaking the impossible, I ask:

Has any attempt been made to put such per-use-default-value functionality into CiviCRM core or an extension?

Technical challenges update: Tokens are limited to \w characters, so any plan to use a non-word delimiter like ? will have to involve changes in core, as far as I can see.

First - no need to enable Smarty system-wide to do this.  Greetings are always parsed by Smarty - see https://civicrm.org/blog/antrik/getting-started-with-new-name-and-greetings-features-in-45.

Besides that, I think you're one of the leading experts on complex token extensions, since you're the primary author of reltoken.  But I don't see why you couldn't do this.  hook_civicrm_tokenValues gives you access to the token name for parsing, and there's no requirement that the token be listed with hook_civicrm_tokens.  So I'd say go for it.

Note that this is similar but not identical to the free-form relative date work Eileen did: https://github.com/civicrm/civicrm-core/pull/12682.


CiviMail - Next/Send test disabled - Cannot send mass email Working on this a while, hope you can help. Version: 4.7.10 + Drupal 7.50 on Debian 8 w/ Apache 2.x + Postfix

The problem (the following steps are taken in CiviCRM)

Mailings -> New Mailing
Mailing Name: Some Name Goes here
Template: Sample Responsive Design Newsletter - Single Column Template List item
From: TestingAndWorking@Mydomain
Recipients: MyTestGroup
Subject: This is a test

HTML: A-Ok unsubscribe, opt-out & domain address are there - no errors flagged

Text: A-ok unsubscribe, opt-out & domain address are there - no errors flagged

Result

Preview HTML/Plain Text: Ok.
Next and Send test (for both single email and Group) are disabled

Steps taken to resolve

Ensure all required tokens are in place. Check
Test email settings. TestingAndWorking@Mydomain: Check
Check Headers, Footers, and Automated Messages: All but Resubscribe are set as default and enabled.
Is the bounce email address setup: Yep. What about an outgoing mail account? Yep - Set as Email-to-Activity
smartyDebug=1 -- Results in Authorization Failed on (Mailing,22&smartyDebug=1)
Check table civicrm_mailing : reply_id = 8
Outbound Mailer: mail()
Was an A/B Test tried. Yes. Result: Next works right until step 3 (Compose). Send test works for both individuals and group BUT Next is still disabled. Does smartDebug show anything? No.

Is there a way I can hack some piece of code to allow Civi to move on? What did I miss?

As weird as this sounds, if one forgets to enable the resubscribe message and set that for the mailing, it won't work. After setting this, all buttons 'lit up' and mail could be sent. Is it a bug? No. But a little more help within the interface could save a lot of time. A help message like "Did you forget to choose an Opt-out, Resubscribe, and Unsubscribe message? You need all three" They are marked as defaults but guess which one is disabled by default? Resubscribe. Arrgggghhh


Translation report field "Primary address?" When you choose a report, i.e. Constituent Summary you have the Column "Primary Address?"
That can not be translated because is it not in any po-file.
There is "Primary Address".
In CRM/Report/Form.php : ts('Primary Address?')

UPDATE: This should be available for translating in transifex now as per the recent announcement in the chat translation channel. This was updated today: https://lab.civicrm.org/dev/translation/blob/bb10330a29b701e898dd41ff062e6dd53075f512/po/pot/report.pot#L2162

It looks like that was only fixed in the code about 5 months ago (see here) so may not have moved into transifex yet. I'm not sure what the schedule is.

Probably the best place to ask language questions is at https://chat.civicrm.org in the Translation channel.


Relationships Search other than via Advanced Search? Is there an option to find the related contacts (e.g. employee of) of an organization other than with the advanced search?

We seem to have an error/bug in our advanced search. It shows the correct results on the initial search, but when creating and saving the smart group, the settings for the advanced search seem to reset.

The search builder doesn’t allow to search for relationships. The relationship report doesn’t allow to save the results in a smart group.

Is there any other option I can’t think of right now?

What are trying to do is to get all related contacts (employee of) of our organization members in one smart group.

I just had a go on Demo

"This smart group will stay up-to-date with all contacts who meet the search criteria.

Employee of

Relationship - Active and Current"

I don't know if it will still be there by the time you get to look at it. http://d46.demo.civicrm.org/civicrm/contact/search/advanced?reset=1&force=1&ssID=1


How to Create webform_civicrm Registrations with: single Ticket vs Table options and Create Contact Records for all Participants I'm working on setting up an event there are 2 ticket types:
individual tickets are $20 each
Table of 8 is $130

So a person might purchase 1 ticket at 20 or 2 at 40 or a table of 8 for 130. However many tickets they purchase I need to collect the names.

I'm using Drupal 7 and have webform so that's an option. I've never set up an event like this in Civi so struggling a little bit to make it work.

Definitively a good use case for webform_civicrm! I've drafted an example for you - here's the screenshots:

I always use webform, webform_civicrm, webform_validation modules
In CiviCRM: create Event - it really needs nothing other than a Type, Role, Title - (if needed) a limit on the number of participants; mine is a Public Event (not sure that's needed - but 99% of my Events are public so I made that default); Leave everything else blank (Fees, Online registration tabs - not needed). This is what it looks like:

3. In CiviCRM: make sure you have a Contribution Page that has a Payment Processor installed that you'd like to use. It can be a page completely not related to the Fundraising Event.

In Webform: View (see below) - for Transparency I'm showing a lot of fields here that you could hide if you like:

If you toggle to Five Tickets: (a Table is $40 -> so $8/each Participant):

Conditionals are the key thing in making this happen:

Here's the checkout for a Table:

And in CiviCRM: 5 Contact Records -> all Contacts registered as Participants in the Event:

Things to keep an eye on: Guest Contacts -> duplicate records; First Name + Last Name + Email address would be good if using unsupervised rule (no logged in user); You can make your own rule and use that for your Guest Contacts too. What duplicate rules work best for you really depends on your specific CiviCRM;
I typically add relationships - easy with webform_civicrm to give all Guests a Relationship to Primary Contact.
UPDATE: adding in conditionals to show the number of Guests fields:
This properly toggles the fields from Primary Contact + Guest 1 (in case two tickets is selected) to Primary Contact + Guest 1 + 2 + 3 + 4 (in case five tickets are selected) - I find it easier to go about it with isn't shown.


Civimember Add Membership Type drop down list not available From Administer, Civimember got to Membership Types screen, then click on 'Add Membership Type'.
Click any field with a drop down and the drop down list does not show. Close the screen and the contents of the drop down list, from the 'Add Membership Types' screen, is visible.
It aseems that the drop down list may be appearing in a lower layer.
What do I have to do to get them upfront and available for selection?
The drop down lists are populated, were available and functioned correctly when system was installed and three types were added. Since then the lists have not been available for selection.
I am not sure but I suspect the original 'Add Memberships Types' screen was different to the current screen that is avaiable. At the top of the Memberships Types screen is the guide ' CiviCRM » Administer CiviCRM '. I am sure the first time it was used that guide had a third title such as ' CiviCRM » Administer CiviCRM >> Add'. That third title does not appear anymore when the Add screen is opened.
Using Firefox 55.0.3 on Windows 10
Many thanks in advance

Sometimes there can be issues that are 'hidden' due to using pop ups.

use right click so it loads as a page, not a pop up.

if that makes a difference then try using your browser inspector for any js errors


Localisation settings not saving I'm running civicrm on a joomla 2.5 site and recently tried to update my localisation settings which at first appear to save but the new settings are not saved, it reverts to the default settings each time. I then clicked on enable multiple languages and since then I can no longer access CiviCRM at all in my admin panel - I just get the message: "Sorry but we are unable to provide for this at the moment. DB error: no such field. Return to home page"

Help!

If you interrupt the process while CiviCRM is creating the multilingual mode, you could have a corrupted database.

If you don't have access to civicrm anymore, the best way is to reload a backup of the database as mentionned by Laryn.

If you don't have any backup, i guess you could try reset the database to a monolingual by calling the function :

CRM_Core_I18n_Schema::makeSinglelingual($locale_to_keep)

with $locale_to_keep = 'en_US' or 'fr_CA'...

You need to build a standalone script for this.


How can I tell if Remote Profiles are in use? Remote profiles are difficult to configure safely, so they're turned off by default on modern CiviCRM installs.  However, if I have an old CiviCRM installation, how can I tell if this feature is in use before I turn it off?

It's not 100% but you can identify submissions that are local origin by referer in the web logs.

Additionally, any POST that is not from an external form will have a preceding GET for the same form path, while a POST that is a profile submission from remote origin will not. Good opportunity to practice a little awk


Broken Image Link (Menu) I have a fresh install of CiviCRM. Some of the menus show a broken image file. Can this be removed?

There should be a small arrow there:

If I had to hazard a guess, I'd say your "CiviCRM Resource URL" may not be set correctly. Check in Administer > System Settings > Resource URLs.

If that URL is correct, check to see if this file exists on your server:
/sites/all/modules/civicrm/packages/jquery/css/images/arrow.png


Civi Event scheduled reminders error - missing date causes DB syntax error Event scheduled reminder is not executing.  The error log for scheduled jobs shows failure DB syntax error.

Problem a result of a reminder that has no sending date.  (see attached image) This error results in a syntax error that prevents all subsequent reminders from being sent.  Solution is to add date or disable reminder with no date.   (ConfigAndLog error messages show the ID for the reminder that has the error.)

Will report as a bug with recommendation that reminder cannot be saved without a date.


Limit the groups exposed in Group profile field I'd like to use the Group field in a profile so people can sign up for our mailing lists. However, the Group field exposes ALL of our public groups, and I want it to to expose only the public MAILING list groups. Is there a way to do that?

Using CiviCRM 5.3.1 with WordPress 4.9.6.

One way is to change the visibility of the groups to User and User Admin Only to hide the group display from all the public pages or profile.

If you don't want to do that, you might want a developer to add a js file on the profile rendering page and hide extra group values using javascript.


Mailing appears to have sent, but still "Running" after several hours I have a mailing that's went out at 10:00am to about 1300 people.

My CiviCRM Mailer Settings say to batch every 100, and the cron job is set to run every 5 minutes. Under these conditions, I'd expect it to take no more than a couple hours to send all the emails.

When I look at the Report for the mailing, I can see a high percentage of successful deliveries, and a number of bounces that take us very close to 100%.

So I think the mailing has sent, but has not been marked Completed yet.

After talking with josephmurray in IRC, he told me to (a) look for "stuck processes" and (b) to try and manually "Execute Now" the job from the CiviCRM cron page.

The latter didn't do anything more than my cron job which was set to run every 5 minutes.

As it turns out, the stuck process was the cron job itself. A "ps ax | grep php" showed the CiviCRM cron job running.

I wanted to know how long it was running so I ran 'ps -p 29753 -o etime=' (where 29753 was the pid of the process from the ps ax command above). It showed that that one cron job had been running for a number of hours. I deduced it was clearly "stuck."

So, the thing to note is that even if your cron job is set to run frequently, the log will show it running and finishing... but if your CiviCRM Mailer settings only allow 1 cron job to run (as mine do), then you're basically only seeing the cron job start, detect that another is already running, then shut down.

For me, the solution was to "kill 29753" - then the next time cron ran normally, it marked the mailing job Completed.


Default registration status for on-line registrations We are trying to use CiviCRM for a registration process that has multiple levels of behind the scenes checks required which we were hoping to track by additional types of 'Registration Status' but seem to have hit a buffer in that there doesn't appear to be any way to specify the starting status for an on-line registration; am I correct in thinking you can't change this somewhere from "Registered" to something else?

We looked at the 'participant approval' option but found the full logic of that doesn't quite work for us as we need information from the corresponding price set at the point of initial submission rather than after the completion of the approval.

I believe you're correct that the default participant status can't be changed when using the standard event registration process. See discussion at Default participant status doesn't recognize 'order' value of status.


Scheduled Jobs not running I can only get scheduled jobs to run manually, with the "Execute now" button.   Hourly won't work let alone with an external method like php.cli method.    Is there a way to troubleshoot this?   I just started logging civi errors to drupal watchdog....so hopefully I'll have more info soon.

Thank you

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.


What does it mean to "configure your MySQL server for utf8mb4 support" when my database charset and collation are already utf8mb4? I am about to run the CiviCRM installer, but I get the following warning:
CiviCRM MySQL utf8mb4 Support: It is recommended, though not yet required, to configure your MySQL server for utf8mb4 support. You will need the following MySQL server configuration: innodb_large_prefix=true innodb_file_format=barracuda innodb_file_per_table=true
However, my database configurations are already as follows:

So what exactly is "MySQL utf8mb4 Support" and what are the steps to configure it properly? (e.g. what do I do with this exactly? "innodb_large_prefix=true innodb_file_format=barracuda innodb_file_per_table=true")

You need to put those in your mysql configuration file (e.g. sometimes located at /etc/my.ini, depends on your host) as described at https://docs.civicrm.org/installation/en/latest/general/requirements/#mysql-configuration
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=true

If you don't have access to that you'll need to ask your hosting company.
At the time of writing (civi v5.30), all this does is make it possible to use utf8mb4, but civi will still install as utf8. After install, you can manually convert by choosing the menu option Support - Developer - Api explorer v3, and choosing Entity: System and Action: utf8conversion and then clicking the Execute button.


DB Error: unknown error when sending CiviMail I recently upgraded my WordPress CiviCRM from 5.25 to 5.28 and in doing so needed to migrate the SQL old 5.5 database to 5.7.  The upgrades went fine, but I now have an error when trying to send group emails through CiviMail:
Error in call to Mailing_send_test : DB Error: unknown error
Aug 27 15:28:58  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => CREATE TEMPORARY TABLE `civicrm_tmp_e_gccache_5999aedd9eade6251afdc6974a96b5b1` (contact_id int, group_id int, UNIQUE UI_contact_group (contact_id,group_id)) ENGINE=MEMORY DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1787 ** Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context.  These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions.]
    [type] => DB_Error
    [user_info] => CREATE TEMPORARY TABLE `civicrm_tmp_e_gccache_5999aedd9eade6251afdc6974a96b5b1` (contact_id int, group_id int, UNIQUE UI_contact_group (contact_id,group_id)) ENGINE=MEMORY DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1787 ** Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context.  These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions.]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="CREATE TEMPORARY TABLE `civicrm_tmp_e_gccache_5999aedd9eade6251afdc6974a96b5b1` (contact_id int, group_id int, UNIQUE UI_contact_group (contact_id,group_id)) ENGINE=MEMORY DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1787 ** Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context.  These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions.]"]
)

I've tried cleaning up caches but stumped for any other ideas.  Please help.
Kind regards,
Alex

Alex, Welcome to Civi stackexchange.
If the server is running with global transaction identifiers (GTIDs) enabled (gtid_mode=ON), do not enable binary logging. Try turning it off


Track membership fee belated I have a question regarding membership fees for the following scenario:

Let's say I have a member who joined in January 2018. He payed for 6 months until June 2018. As we are in October now, he is overdue for 4 months. When i try to extend the membership, i click on "renew" button on his overdue membership. I record a new payment and I assumed to extend the membership from the end of the previous membership. Unfortunatly the membership is extended based on "today" and not fromend of June.

Here the screen from the renew form:

Thanks for your help!

Best regards,
Said

You can make use of the "Date Renewal Entered" field for this purpose - e.g. if you enter a date of July 1, 2018, then a 6 month membership will be extended through December 31, 2018 - the date the payment was recorded can be left as the current date - when you click to view the membership, it will appear as displayed in the screenshot below:

Hope this helps!


Where do I find Apache error logs for sites that I installed with buildkit? I installed a site with buildkit. Now I'm doing some dev work which is producing WSOD / 500 / "Internal Server Error" errors, but I can't find any logs about these errors.

I've looked in /var/log/apache2/ and don't see any recent logs there. Is there somewhere else that the log messages are going?

Buildkit uses amp to install sites which means you have to look in ~/.amp. Log files are in ~/.amp/log and separated by site.


Gift aid uploaded declarations are only showing the first image for each entry I have a gift aid issue - basically when you upload scanned declarations against a contact, they don't show each scanned image but only the first one repeadly (for each gift aid declaration entry). The rest of the text data remains the same for each entry.

The uploaded image I have added should make things clear - the red circles indicate a scanned declaration. The issue is that they are all the same image even though in the database I see different images referenced.

Also, when I click on 'Edit Gift Aid Declaration', clicking on the images for each entry shows the different uploaded images properly. So that is a workaround but not good as a HMRC officer won't be happy if someone doesn't know of that workaround!

Any help or guidance would be much appreciated. I had a stab at trying to see where in the codebase this bug is happening but its still a puzzle.

Cheers.

If anyone still has this problem, I can confirm that upgrading to at least 4.7.31 fixes it.


The CiviCRM debug log should not be downloadable - generated .htaccess seems ok On the civicrm/a/#/status the security message The CiviCRM debug log should not be downloadable is displayed. And the complaint is correct, I am able to download the log file. But CiviCRM does generate the correct .htaccess file in de log directory in the following format

<Files "*">
  Order allow,deny
  Deny from all
</Files>

The used configuration is CiviCRM 5.3.1, Drupal 7.0 and Apache/2.2.15.

The .htaccess file is seen by apache. I tested this by making a syntax error in the file. That is reported by the webserver.

Does someone has a hint to get it working again.

It's possible that the config for the virtual host/Directory does not allow .htaccess override for the Limit directive type, and so is ignoring the Order commands.

See https://httpd.apache.org/docs/2.2/mod/core.html#allowoverride


Individual contact type select is missing in custom field group setting When I look in CiviCRM 4.6.8 at the custom field group settings associated with organization contact, then I see a select box where I can choose the type of organization type (as defined in Customize data and screens >> Contact types).

When I compare that with the custom field group setting associated with an individual, then I don't see this select box and I can therefore not restrict the field group to a custom individual contact type.

Is this to be considered by design or is this a bug being fixed in 4.6.9? To me it seems at least inconsistent. Please note that I have both custom individual and organization contact types defined.

I now understand why the individual subtype select was not appearing. It was simply because one of the fields was being used. The As soon as you fill in one of the custom fields of a field group then the option to change type and sub-type is removed.

I was misled by a cosmetic bug that it does not display the sub-type "any" when beside the default "individual" there were added subtypes afterwards. I will try to reproduce and report this, to prevent that others are misled by this.


Existing organization getting updated instead a new organization Hi We have a situation where we would need one member to be a part of many organizations.

So when a Joomla user login to their account for the first time and apply for an membership on behalf of an organization it works fine.

However if the user select Enter a new organization when they want to register another organization and submit the form No new account will be created instead the existing organization gets updated even though they are different organization names.

I have tried by disabling the membership section just to see if the issue when creating the relationship but it doesn't do any changes. Has anyone experienced this before ?

Any advice would be highly appriciated

This appears to be a bug and you should report it in GitLab.

Steps to replicate.

Set up Contribution page using 'on behalf of'

Submit the form a first time, create your 'on behalf of' Org

Submit the form a second time for New Org, using new name/email.

Outcome the original Org now has the new email but the old name. Both contributions are on their record.

Testing was done via http://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=4 (which will soon disappear)

Update - There is now a patch submitted and an issue filed in GitLab - https://lab.civicrm.org/dev/core/issues/26


How to use civiprofile for contact form I want to use a civi profile for our contact form, so that all inquiries and new contacts are stored in civi. I created the custom fields and have them on a new tab and table, so multiple submissions will be stored.   I am having two problems.

When the profile form is submitted it arrives in email with our organization's email address as the From address.  Can I set this so the person who submitted it is the From address?
We would like to show the date it was submitted on in the table, but the only option I can find is for the user to select the date manually before submitting it.  Is there a way to have the current date already pre-selected in view only mode on the profile?

Civi 5.3 on wordpress 4.9

Neither of those are doable with a profile without writing an extension.  However, both should be quite doable using Caldera Forms with the CiviCRM integration plugin.  I suspect you could also use Contact Form 7 with the Form Processor plugin to get similar results.


I modified a template file and now can't remember how Yes I know - very foolish but hoping someone will take pity on me!

This is the my screen when entering a contribution or registering for an event while logged in.
I customised it to include the text 'PLEASE PAUSE FOR A MOMENT AND READ THIS - If you are entering a session record, please click on "WANT TO DO THIS FOR A DIFFERENT PERSON"
Now I want to revert the default but can't remember the file I edited
I've searched all the files in my custom templates directory - heaven forfend I edited core! (although then I guess an upgrade could fix my problem)
Thanks all

This could potentially be done via Word Replacement - so check there too.


Find contacts who haven't donated We are an organization that has donors ("constituents") and potential donors (also referred to as "constituents").  We would like to run a query that identifies potential donors--i.e. "constituents" who have never made a donation.  How would we do this?

Create a group of your donors, and then run a Custom Search of Include/Exclude.

One option is to create a group (preferably a smart group) using "Advanced Search" or "Find Contributions": the only search condition is a Contribution Status of Completed.  This will put all of your donors into a group (if you use a smart group, the group will continually be updated).

Then use a Custom Search that comes with CiviCRM - Include/Exclude.  Do a search that EXCLUDES the group of donors you just created.  You now have your constituents who have not yet donated.

Additional: From that Excludes custom search, you could then create another smart group -- this time, it would be a smart group of those people who haven't donated.


How to access Financial Items through API? In my organization, we have local chapters who sometimes get part of the national membership dues.  The BOD doesn't want the breakdown to show up on the email receipt, and the calculation has to be done whether the dues are posted online or offline, so I do my breakdown during the posting of the line item for the membership dues.

I access the chapter share and reduce the line item by the chapter's share and create a new line item for the chapters share, since it's a different financial type.  Everything works well, except the chapter's share doesn't show up on the bookkeeping report.  That's when I noticed that the Financial Item record isn't created for the chapter's share line item record.

So I looked at the API explorer and I can't figure out which API entity and which API call creates the Financial Item records.

I don't think their is a separate API for creating Financial Item records - this gets created whenever an contribution and line_item is been created

so, you can write an API for creating financial_item also make sure you make an entry in entity_financial_item

or you can create these records manual using CRM_Financial_BAO_FinancialItem::add() which will create new financial item


Is Vanco stable in civiCRM 4.4? I saw this thread: Is Vanco a supported payment processor?

However the phrase is "will work through 4.4". Does this mean this is a stable, PCI compliant version of Vanco's processor for 4.4? Or should I revert back to 4.1 of civiCRM in order to be stable and PCI Compliant? I was a little worried since the 4.4 version was not publicly available.

Thanks for the feedback.

Becca, the Vanco processor has been upgraded to 4.4 and is being utilized by several organizations.  It is publicly available in git hub.

Hope this helps!


Entering fulfilled Premiums manually Is there a way to manually record fulfilled premiums for a contact?

We are giving out t-shirts to our donors a bit flexibly - when they have donated a particular sum to the cause or when they have donated volunteer time.

We handle the offering and distribution part ourselves and would just like to track info on actually delivered premiums and calculate when the person is entitled to one (e.g. next premium t-shirt after 1 year of membership).

If you want to track fulfilled premiums by type, fulfillment date and next eligible date without tracking inventory and expense within Civi, you can do so through the use of custom data fields designated for use with contacts and a profile that can be displayed as an additional tab of a contact record. To facilitate reporting, I would suggest using a select input field type for premiums and a date input field type for the date fields.

If you want to track fulfilled premiums awarded with a $0 contribution, the only way I can think of doing this is to create premiums for internal use only with a $0 minimum donation amount that can then be added to a contribution page for internal use only, use the built-in fee section in the amounts tab and include a $0 option, then masquerade as the user to whom the premium is being awarded and then create a $0 contribution with the selected premium.

You might also want to play around with subscription/service premium to see if that would help with managing eligibility for the next premium, include a custom data field for next eligible date, or perhaps make use of a specific membership type to do so.

Hope this helps!
Tamar


mySQL 5.1 to 5.5 upgrade - radio button data error We have upgraded MySQL from 5.1 to 5.5 and now when we extract the data what was previously showing as yes/no is now showing as 1/null, in addition the first row of data is showing the correct yes/no values.

This seems only to be affecting custom fields which used the inbuilt yes/no radio field type.

Where we had custom alphanumeric fields, type radio, yes/no value options - the data is fine. So a fix could be to reset up all the fields affected as alphanumeric, re-import the data and then delete the old fields  -  but this will no resolve the underlying issue. Concerned if we do this it might come back to bite us later.

Any pointers appreciated.

I did made a test against Civicrm 4.6.10 against Mysql version 5.6.30

where I did created two custom field with option as below

custom alphanumeric fields, type radio, yes/no value options
custom Integer fields, type radio, 1/2 value options

Both gets saved against database as excepted first one with alphanumeric got saved as yes/no and other one got saved as 1/2

So I would recommend you to create a new custom field with alphanumeric and try importing the records again which should import correctly.

I guess this helps!!!


database error when finishing update to 5.32 I'm running CiviCRM in Wordpress 5.6
I tried upgrading from CiviCRM 5.21 to 5.32 following this process: https://docs.civicrm.org/sysadmin/en/latest/upgrade/wordpress/
Now, the last step is visiting the update page, but there I get this error message:
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: unknown error
 Fehlerbeschreibung
Datenbank-Errorcode: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable), 1419
Zusätzliche Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]
    [type] => DB_Error
    [user_info] => CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_domain_trigger BEFORE INSERT ON civicrm_domain FOR EACH ROW BEGIN END [nativecode=1419 ** You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)]"]
)

What could I do next? System Status says
Database Upgrade Required
New codebase version detected. You must visit upgrade screen to upgrade the database.

thanks, geb

Mysql has a feature called binary logging. You have it turned on, so either:
(a) turn it off, OR
(b) the mysql user needs to have the SUPER privilege, OR
(c) you need to set the mysql configuration variable log_bin_trust_function_creators.
See https://docs.civicrm.org/installation/en/latest/general/requirements/#binary-logging
You may need to ask your hosting provider what they will allow.


Large Text Fields Not Writing in Database We've discovered what seems to be a bug creating large text fields from CiviCRM Custom Fields. I hope I'm able to explain this well enough.

Relevant environment information:
- Drupal 7.59
- CiviCRM 5.1.0 and then 5.1.2
- PHP 5.5.9 (not recommended but supported)
- Webform and Webform CiviCRM modules for Drupal enabled

And the steps we took:
1. Create custom fields of type text associated with a contact. Give it a very large database size, something like 6000. I haven't confirmed exactly at what point is too large, but 6000 definitely was.

Create a webform on the Drupal side with CiviCRM processing enabled. Make contact 1 for CiviCRM processing able to show the large field and also accepting existing contacts. Edit the webform field for the existing contact so it is a dropdown select (just for easier testing).
Fill out the form once to create a contact, filling in that field.
Go back to the form and select the existing contact to be the one you created. The field does not auto-populate.
Alternate way to test this is to go to the form with the parameter ?cid=[id] added to the URL, which will show errors on the screen about the field not existing.

====
After investigation, we discovered that the root of the problem seemed to be that the field was not being created in the database table for the custom value. For example, if the custom field group was called constituent and it was the 3rd custom group, the table I believe would be civicrm_value_constituent_3. Each custom field of that field group normally gets a column in this table, but if the large text size is too big, it doesn't create the column and it doesn't give any warnings either. Manually creating the columns into the table fixed the problem, reinforcing that conclusion.

It does still add to the civicrm_custom_field table, so no problem there. It's just the values table.

Did you create a large text field or a memo field? And if so did you inspect the logs?

If it is a text field. I assume that mysql has a limit on the column size so probably it is failing because of that error.


Cases - Send Copy of an Activity, Add Individual Phone and Email When a person is assigned any activity, the information goes as a form. However, I would also like to include the phone number and email address of the person from whom the event was created. How can I do that.

  administrator/?option=com_civicrm&task=civicrm/admin/messageTemplates/add&action=update&id=1&reset=1

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title></title>

{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}

       {ts}Activity Summary{/ts} - {$activityTypeName}

     {if $isCaseActivity}

        {ts}Your Case Role(s){/ts}

        {$contact.role}

      {if $manageCaseURL}

     {ts}Manage Case{/ts}

      {/if}
     {/if}
     {if $editActURL}

   {ts}Edit activity{/ts}

     {/if}
     {if $viewActURL}

   {ts}View activity{/ts}

     {/if}
     {foreach from=$activity.fields item=field}

        {$field.label}{if $field.category}({$field.category}){/if}

        {if $field.type eq 'Date'}
         {$field.value|crmDate:$config->dateformatDatetime}
        {else}
         {$field.value}
        {/if}

     {/foreach}

     {foreach from=$activity.customGroups key=customGroupName item=customGroup}

        {$customGroupName}

      {foreach from=$customGroup item=field}

         {$field.label}

         {if $field.type eq 'Date'}
          {$field.value|crmDate:$config->dateformatDatetime}
         {else}
          {$field.value}
         {/if}

      {/foreach}
     {/foreach}

Fatith, As per your requirement this is not straight forward and needs some custom coding or need good knowledge about using smarty api since the created id is stored as source contact id for an activity and data of source contact id is directly not available in smarty or as a token.

Here is possible solution for this

Create token and token values using CiviCRM hooks, then add tokens in message template
Like @demerit said use smarty to get contact details of the person who created the activity. Below snippet should work in your case. You need to add the below code in desired place in message template.

snippet:

{if $contact.activity_id}
  {crmAPI var='activityResult' entity='Activity' action='getsingle' return="source_contact_id" id=$contact.activity_id}
  {crmAPI var='contactResult' entity='Contact' action='getsingle' return="phone,email" id=$activityResult.source_contact_id}

    Phone Number
    {$contactResult.phone}

    Email
    {$contactResult.email}

{/if}

HTH

Pradeep


Event confirmation e-mail is showing empty values for the mandatory profile fields I'm using the Events - Registration Confirmation and Receipt (on-line) under the workflow messages in the e-mail templates.

My event is using a custom Profile for the form fields.

The confirmation page in de event form flow is correctly showing ALL entered values.

The confirmation e-mail however, is showing empty values for all fields that were made mandatory in the profile. Screenshot added:

The code from the e-mail template (from: civicrm/admin/messageTemplates?reset=1 => Events - Registration Confirmation and Receipt (on-line) ) I could work with is:

{if $customPre}
{foreach from=$customPre item=customPr key=i}
    {$customPre_grouptitle.$i}
   {foreach from=$customPr item=customValue key=customName}
   {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}

         {$customName}
         {$customValue}

   {/if}
   {/foreach}
{/foreach}
{/if}

This isn't telling me much, though.

Any thoughts?

Mandatory was not the trigger of this.
Fields of type: "Money" don't get printed in the e-mails.

Another nice one!


Sending SMS on event registration We'd like to send an SMS with the event title, start time and info page to contacts who've been registered to attend an event.

Theoretically, we should be able to do this with scheduled reminders, but haven't been able to get that working. It is setup is as follows:

We've also looked at using CiviRules to send that out, but as that relies on setting up a message template, we weren't able to add in the event tokens that we'd need.

Is anyone able to give any insight on how to make this happen?

Definitely use CiviRules. Why can't it use event tokens? If there's a specific shortcoming, why not log it with the team? I've a feeling some work may be done on it in the UK CiviSprint next week... ;)


Custom data field - problem with import I have to import small quantity of contacts with custom date field. Field is set as rrrr (which should be filled with 4-digits year - 2017). Every single time, when this year is added in csv file I've got error 'Invalid value for field(s)'.

Value is set as 2015.

What may be the cause of that?

petednz - fuzion was right. Type of data that can be selected during custom field setup is related to data. display, not to data type. Database needs full date (even if field was setup as yyyy). Adding 01-01 helped.


How can I show only Cases that have no Case Manager? I asked a similar question recently, but I wanted an answer specifically for Drupal Views. I'm broadening my scope now.

I thought I had an answer to my question via Case Reports. I can show only those cases without managers by implementing the "Case Role(s)" filter and setting it to "Is not one of" "Case Manager". This gives me the results I expect. However, I can't actually navigate to individual cases from the report. Instead when I click on the case subject, a modal window pops up that shows very little information about the case.

I would like to have a list of cases without managers with links to manage the case.

I'd prefer a built-in civi solution, but I'm fair with PHP and not averse to some custom coding if need be.

If you set up the page view as mentioned in your other post here, you can add a global text field with a rewrite to civicrm/contact/view/case?id=[id]&cid=[id_1]&action=view.

If you need to set it up for folks that may have multiple case types then filter this page by a single case type.

After you have this view behaving as desired, add an attachment and on the attachment, change the case type filter to your next case type.

Add an attachment for each additional case type.


Changing the price of a Membership in a Price Set does not transfer to a Webform I am using CiviCRM 5.13.4 and Drupal Webform 7.x-4.20.

I am using the Webform to collect payments for Membership.  The price of the available Membership Types is set up using a Price Set, which is called up by a Contribution Page, which itself is called up by the Webform.

When I change the price in the Price Set the amount charged by the Webform does not alter.  If I open the Contribution Page directly in CiviCRM (as a test) it shows the new price, but the Webform still shows the old one.

I wish to retain the price setting in a single place, to avoid possible operational problems and inconsistencies, and the Price Set seems to logical way to do this.  It there some other action needed to make it take effect, or is this a bug?

With thanks.

Have you added the 'Membership Fee' field to the webform under the memberships section?

Believe this will stop prices from being pulled from Civi.

Otherwise should pull across automatically as far as I am aware.


Create invoices in CiviCase We are still evaluating CiviCRM 5.4.1 and CiviCase on Wordpress 4.9.8

Most of our requirements can be filled by CiviCRM and CiviCase.

But one requirement is to have invoices listed and followed up in case summaries.

I found that we can generate invoices in Contributions and Events which would suit our need to generate invoices.

But I can't get them listed in a case summary/activities.

Does anybody know how I could get this to work?

I have two comments:

CiviCRM is not really good in invoicing. So my advice would be to do the invoicing part in a seperate system, usually an accounting software might do the job
I have made an extension to link Contributions to a case, check it out at: https://github.com/CiviCooP/org.civicoop.casecontribution

May I ask what exactly you want to invoice from the case?


How do I use the CiviCRM "spinner" in an extension? My extension places a field on a page that loads data via AJAX from the database.  The field appears blank until the data is loaded.  How can I show the CiviCRM spinning logo if my data isn't loaded yet?

You can add the class "crm-loading-element" to the element, and then in your ajax success handler remove the class.

If you want the actual CiviCRM logo, you can add both the classes "blockUI blockOverlay" instead, but depending on the field size it may look off. The other one seems to fit better.

If you want the screen to gray out the way some of the popups do, you can do:

CRM.$.blockUI(CRM.$('div.something').addClass('blockUI').addClass('blockOverlay'));

where div.something is just some larger div surrounding your form, but somewhere within div#crm-container, then your ajax success handler remove it with:

CRM.$.unblockUI(CRM.$('div.something').removeClass('blockUI').removeClass('blockOverlay'));


Reply-to e-mail address using CiviMail in 4.6.3 defaults to system default We recently upgraded to 4.6.3, and now the reply-to email address in CiviMail e-mails defaults to the system e-mail, not the From sender e-mail address, as previously. I could not duplicate on the demo site (at http://d46.demo.civicrm.org ), perhaps because the demo site is running 4.6.5.

A real bummer, any help fixing appreciated. Was this a 4.6.3 bug that has now been fixed in 4.6.5?

Thanks.

This does indeed appear to be a bug in 4.6.3.  Upgrading to 4.6.4 will fix the problem.

Note that additional functionality in CiviMail can affect the from: address: Using VERP or the custom reply-to header.


Enabling extensions - directory not found I am attempting to enable extensions on civiCRM 4.6.8 via WordPress 4.3.

When I go to administer - system settings - manage extensions I am told I need to set my Extensions Directory. I do so via my file manager at public_html/iowafarmersunion/wp-content/plugins/files/civicrm/custom_ext, paste this file location into Civi, but them an told that the CiviCRM extension directory does not exist.

Am I skipping a step? I was following directly on this page: http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions#Extensions-WordPress

Thank you!

edit:
I have made sure the directory's permissions are set to 777 for the time being and still no dice.

You need an absolute path from the server's root (/), and I doubt that there's a directory /public_html in your setup.  More common situations are:

/var/www/public_html
/srv/www/yoursite/public_html
/home/someuser/public_html

or something similar.

You can tell by looking in your civicrm.settings.php file that's in wp-content/plugins/civicrm and scrolling down to the file paths.  One of them will be to the templates_c folder, which should normally be in wp-content/plugins/files/civicrm.  That path will be all the way to the root of your server, so you can just copy that and replace templates_c with custom_ext.

Of course, you could also look at the Temporary Files and Custom Files fields in your Directories admin page.  Under normal circumstances, those should also be pointing to sibling folders of your custom_ext folder.

While you're at it, make sure you set the Extension Resource URL under Administer - System Settings - Resource URLs.  You can probably use the Image Upload URL as an example, replacing persist/contribute with custom_ext.

Now, why CiviCRM doesn't just create the extensions folder and record its location when installing is totally beyond me.


How do I delete the "Recent Items"? The "Recent Items" list covers some of the buttons in CiviCRM.  How can I empty the list of "Recent Items"?

Eric, if you are using Drupal, "Recent Items" are contained in a block.  You can disable the block and it will no longer display.


How can I fix the error message "Could not find contribution record" from PayPal? We have a new recurring contribution that isn't being entered into Civi.  In the ConfigAndLog log I see "Could not find contribution record 20874".  In the nginx logs I see that that number is being passed from PayPal as contributionID.

POST /sites/all/modules/civicrm/extern/ipn.php?reset=1&contactID=10132&contributionID=20874&module=contribute&contributionRecurID=25&contributionPageID=2 HTTP/1.1

Of course, that id is not in the contribution table.  After looking at ones that worked it looks like the contributionID sent from PayPal is that of the first contribution of the recurring contributions.

Unfortunately, this error wasn't noticed right away so I can't see if there were any other errors when it was first created.

So can I just manually create a record in contributions with that id and have it work?  What is it looking for in that record?  (Well, I'd enter a payment for that person and change the id and anything else it is looking for.)

We don't want to have the person cancel the recurring and do it again.  It's bad form to ask a donor to redo their payments.  They might just cancel and not redo it.

You can create a fake initial payment on a recurring contribution and CiviCRM will handle the IPN properly.  Unfortunately, this is a bit of a tedious process.

Fortunately, it's all documented on my PayPal and CiviCRM page.  See the section called Modifying an IPN to reflect an updated CiviCRM contact ID.  The scenario is a little different but the techniques are applicable here.


CiviVolunteer Commitment box control On the search for volunteer opportunities page the commitment box with the signup button floats on the screen. I'd like to prevent this as it obscures the list of opportunities. Does anyone have a recommendation on the best way to achieve this?

It is quite annoying isn't it? I am not sure if this was the only change I did but I edited the core file https://github.com/civicrm/org.civicrm.volunteer/blob/22eb7ca6dbf99cddb6c43405a88f2cdf83ae7609/ang/volunteer/VolOppsCtrl.js#L224

and changed from 'scroll' to 'click'. Might not be the best way but it worked.


Suppress default CRM.alert in hook_postProcess Trying to figure out an answer to this question, have tried to just disable a default CRM.alert using CRM_Core_Session::setStatus(null, false);  in hook_postProcess (defined in a drupal module), but alert still pops up (not a problem generally, it pops up in a default style, would like to use  CRM.status  instead, which works perfectly even outside of CiviCRM, while CRM.alert doesn't).
Any advice, please!

To clear all status messages and prevent them from being shown to the user, you can do:

CRM_Core_Session::getStatus(TRUE);


Is it possible to export a newsletter to PDF I have a newsletter that I have sent out to our contacts. I would like to export or save it as a PDF to post on our blog. I tried to copy the the HTML code into the blog, but the tables were not blog friendly. I am looking for 2 options
1) a way to remove the table formatting of the html code to then copy into a blog post
2) a way to export the newsletter that will preserve hyperlinks so that the PDF can be embedded in the web page.

Thank you

If you using CiviMail for sending newsletter than you can view the html snippet that was sent as a email body. To view the html you can go navigate to Mailings >> Scheduled and Send Mailing.

Find the mailing/newsletter name you want to convert into PDF and then click on report link besides the name. You will be redirected to CiviMail Report: [Name of Mailing] page.

Under Content / Components section you will see View Complete Message link. Open the link in new tab to see the content that was sent.

You can print this page using any one of the following method:

Use browser print option to Print as PDF
Use wkhtmltopdf to print the page using the url

// example for drupal 7.
// http://yoursite.com/civicrm/mailing/view?reset=1&id=1
$ wkhtmltopdf content-url newsletter.pdf

Use online tool to print pdf using url.
Use php to convert content of page into pdf.

Note: For #2 and #3 you will need to set CiviMail: view public CiviMail content permission for Anonymous user.

HTH

Pradeep


Default Value for Custom Field I have a created a custom group and a custom field within that group.

One of the Custom fields is Date.

Is there any way to autoload 'current date' (today) in the default value field Using a hook or something?

I have been googling but i am not getting any results.

Thanks

I did this by using CiviCRM hooks (BuildForm).

($form == CRM_Core_Action::ADD) {
        $currentDate = date('d/m/Y');
        for ($i = 1; $i < 10000; $i++) {
            $defaults['custom_197_-' . $i] = $currentDate;
            $form->updateElementAttr('custom_197_-'. $i,array('readonly'));
        }
        $form->setDefaults($defaults);
       }

This is working


Allow Duplicate External IDs for later merge? I have a large number of contacts across different contact sub-types, imported via CiviMigrate.

The particulars:

I am pulling multiple contact types from the same, flat master table. This means that for example:

Pass 1 : Grabs all students
Pass 2: Grabs all teachers
Pass 3: Grabs all volunteers

There are naturally some students which became teachers, and were volunteers at some point, so there can be any combination of contact sub-types.

In the "worst" case, I'd end up with 3 contacts, one of each sub-type, that would need to be flattened into a single contact.

I have been matching on first and last name with some success, but there are multiple cases in which this causes the need for manual merge work (people with the same name).

Is there any way to temporarily allow dupe external ID's for the purpose of a later merge?

Now, this all stems from the fact that I can't find any documentation on how to pass multiple contact sub-types at once via CiviMigrate, perhaps there's an angle there?

Thanks!
-d

I do not think there is a (good) way to use duplictae external IDs in CiviCRM - if you want to use the external ID field to do so. You could however create a custom field, import your external ID in that one and then adapt your matching rules to find duplicates (/civicrm/contact/deduperules?reset=1).


Activities don't show on the profile page This child has three activities linked to his profile, however they don't show up. The do show up if we navigate to cases, but we would like to see them from this profile view. Is there any way I can get this working?

Case activities usually don't show on the "non-case" side of things, like on their user record. As to why it shows "3" on the tab there that might be the theme since I don't see it counting them on dmaster.demo.civicrm.org. Looks like maybe shoreditch theme?


Is there a hook for on user sign in? Is there a good hook for on CiviCRM sign in?

[This is to display a message upon login in a cms-independent extension.]

Thanks,

Login is a CMS event, not a CiviCRM event. This means you can access it readily from a CMS plugin/extension/module ... but not from a CiviCRM extension.

Drupal: hook_user_login() hook
Backdrop: hook_user_login() hook
WordPress: wp_login event
Joomla: onUserAuthentication event (?)

If you wanted to access this from a CiviCRM extension, you'd need to use some event which fires at the time of login. You might be able to identify one using the contrib.showallthehooks extension to reveal which hooks get fired at the point of login. Might need to check it was going to fire for each of the CMS platforms, since behaviour could vary.


Civicrm menu lost for admin When I'm logged in as Admin, I can't access anymore to CiviCRM menu from Drupal 7

I still access through navigation to https://domain.net/civicrm/admin/ but no main menu anymore. Our users that have another profile can see it.

I've tried with different administration themes but the issue remains the same.

I'm using Drupal extension "Administration menu" but until now it worked fine.

Any idea to help me work again :-( ?

Found. It came from the overlay module in Drupal :-(
I needed to deactivate it.


Wordpress shortcodes do not display 'insert' button In Wordpress, it is possible to insert CiviCRM shortcodes for, eg, profiles, directly in the Page/Post editor.

However, when I do this, the 'Insert CiviCRM content' screen displays, but there is no visible button available to insert the code and return to the Wordpress editor.

See screenshot of what I see.

Is this a bug, or is something else preventing the button from appearing?

Probably a typical WP plugin/theme conflict. Try to disable all your plugins except CiviRM and see if you can see the button.  If you can see it, then turn them on in small groups, once you find a group, then do those one-by-one to narrow down which one is causing the problem. If you still cannot see it, turn all your plugins back on and change your theme to one of the WP twenty-themes and see if you can see it.

If it is the theme, you can make your shortcode edits and then switch back to the theme you normally use.


How to show paidby and check_number on Contribution - Receipt (on-line) CiviCRM 5.16.3 on Drupal 7.
I would like to show payment menthods of contribution in template Contribution - Receipt (on-line). I tried to insert $formValues.paidby or $paidby but they show nothing.
(I saw those variables at off-line version of receipt and copied the them without even knowing if they are populated in the on-line workflow.)

How can I show payment methods and check numbers like those in off-line version?

Thank you.

I figured out myself.

Put this API call somewhere upfront in the template. This retrieve contribution payment method by ID. (Get the whole record if removing "return" parameter.)

     {crmAPI var='apiResult' entity='Contribution' action='get' return="payment_instrument_id" contribution_id=$contributionID}

At where it should be displayed:

     {foreach from=$apiResult.values item=contribution}

         {$contribution.payment_instrument}

     {/foreach}


What's the difference between a pledge and a recurring donation? What's the difference if I set up a recurring payment for $100/month versus a pledge for $100/month?

Why should I use one method versus the other?

CiviCRM allows pledges to be recorded for promises of future payments. This is commonly done for future expected donations for capital campaigns. In most cases, 'pledges' are not things that people are obligated to pay, and so they should not be recorded as accounts receivable for bookkeeping purposes. The courts in some US states are starting to recognize pledges as contracts that can be enforced, but this is not case in Canada or most states (see http://drache.ca/articles/unpaid-pledges/). Only when a payment is received against a pledge is the amount recorded as revenue to the appropriate account (eg Donations or Campaign Contributions) and as having been deposited into the appropriate asset account (eg bank account or payment processor account or cash and cheques on hand).

By contrast, when a recurring payment is set up, the contact authorizes the organization using CiviCRM to be paid those future payments, eg from a credit card, a bank account associated with a debit card, or some other payment instrument. This makes it reasonable to record the future income from recurring payments as accounts receivable immediately, which will be the case starting in 4.7. When those payments are received, accounts receivable will be reduced by the payment amount and the appropriate asset account will have the funds credited to it.

Simplifying a bit, if you have an automated method of receiving payments, then you should set this up as a recurring payment. But if you may or may not receive the payments (for example, you are dependent on the donor to send in a cheque each year), then you should setup a pledge.

While it is true that a donor can cancel a recurring payment (whether setup through ARB, ACH, etc.), this doesn't change the fact that they have made a legal agreement to pay the monies. If they do ask to cancelling a recurring payment, then CiviCRM will reverse the accounts receivable at that point in 4.7. (If the recurrence does not have an end date, then the system keeps the accounts receivable accurate for the coming 12 months, and those 12 months will be reversed at the time of a cancellation.)


How can I use CiviCRM's cache table? When developing an extension, I'd like to cache some data to avoid the expense of re-calculating it. Is there a civicrm version of the Drupal's caching interface for developers?

I found the corresponding reference page here:

https://docs.civicrm.org/dev/en/latest/framework/cache/

Looks straightforward:

Set a cache value with Civi::cache()->set('mykey', 'myvalue');
Get a cached value with Civi::cache()->get('mykey');
Delete a cached value with Civi::cache()->delete('mykey');
Flush the entire cache with Civi::cache()->flush();

As far as I know, the civicrm caching schema is pretty simple, there's just one key/value table.

As an aside - I just discovered that Herb @ freeform has contributed a recent patch for using Redis as the cache backend. I'm a Redis fan also, so thanks Herb!


Custom mailing report I am using civicrm 4.7.7 on Drupal 7. How can I create a report of all mailings sent with CiviMail reporting the data of contacts that opened/clicked/replied the mailing?
Thanks in advance

This extension should do it ...

https://github.com/mc0e/civicrm-extendedmailingstats


Restrict access to CiviCRM home I am running CiviCRM 4.6.8 on Drupal 7.

I am using the "Event Calendar" extension to expose a calendar view. The extension works well, with one problem: it only displays the calendar to users with the "Access CiviCRM" permission.

I have had to enable this for anonymous users, which isn't ideal to begin with, but I can manage it by restricting their access to everything else. However, as a result, they can access the CiviCRM Home and Dashboard (despite not having permission to it in Drupal permissions). The Dashboard shows every available dashlet with a bit old "ACCESS DENIED" under it. I'd rather avoid this altogether, and get them to an Access Denied page if they try to access CiviCRM home. Is this possible?

I would take a closer look at the event calendar extension and check which permission exactly it needs (something more specific like "CiviEvent: view event info" might work) - if that's not the case, I would file an issue with that extension as it's probably a bug. Ask the extension author to change the permission check to "CiviEvent: view event info".


Is it possible to update the mosaico versafix template to the 1.1.16 version? Mosaico has an updated version of the versafix template -

Mosaico Versafix 1.1.16

What is required to add/replace the current versafix with this updated version?

You can check out the version from github repo and place the template in your installation. I have just cloned https://github.com/voidlabs/versafix-template/tree/v1.1.19/dist/template folder to my Mosaico templates folder and it works.

You can copy the folder as versafix-new and rename html file as template-versafix-new.html so your legacy copy wouldn't get overrided.

p.s. The blog post was about 1.5 years old so my answer is about 1.1.19 instead of 1.1.16.


CiviRules not triggering event reached date The user wants to send a recurring email - twice a week on successive days. So I set up a recurring event and then added a CiviRule with the trigger 'Event date reached'.  The event didn't trigger because of the following crash - it doesn't have any participants, could this be the problem?
SELECT `p`.*
        FROM `civicrm_participant` `p`
        INNER JOIN `civicrm_event` `e` ON `e`.`id` = `p`.`event_id`
        LEFT JOIN `civirule_rule_log` `rule_log` ON `rule_log`.entity_table = 'civicrm_participant' AND `rule_log`.entity_id = p.id AND `rule_log`.`contact_id` = `p`.`contact_id` AND DATE(`rule_log`.`log_date`) = DATE(NOW())  AND `rule_log`.`rule_id` = %3
        WHERE DATE(`e`.`start_date`) = CURDATE()
        AND `rule_log`.`id` IS NULL
        AND `e`.`event_type_id` = 12
        AND `p`.`contact_id` NOT IN (
          SELECT `rule_log2`.`contact_id`
          FROM `civirule_rule_log` `rule_log2`
          WHERE `rule_log2`.`rule_id` = %3 AND DATE(`rule_log2`.`log_date`) = DATE(NOW()) and `rule_log2`.`entity_table` IS NULL AND `rule_log2`.`entity_id` IS NULL
        ) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%3
        WHERE DATE(`e`.`start_date`) = CURDATE()
        AND `rule...' at line 4]

I'd like to understand how to get this working, and also if anyone has a suggestion of an alternative way of achieving this?

I think the issue would indeed be that there are no participants, so therefore no events joined and an empty start_date. Can you try with a participant?
If the issue persists can you please report it as a bug on the Civirules extension page (https://lab.civicrm.org/extensions?utf8=%E2%9C%93&filter=civirules)? Would fixing it be possible for you?


The action Remove contact from group not working in Civirules I'm using CiviCRM 4.7.23 version.Using civirules, For the trigger-"Contact of any type is restored" , Action -"Remove contact from group" .If any contact is restored from trash, it should be removed from the group.This is not working for me. The contact is not removed from the group.
Any help?

Updating the latest version of CiviRules will fix this. This bug has been fixed two weeks ago.


How to troubleshoot Scheduled Reminders A bit of background:
I have several scheduled reminders triggered by activity types, which started to work unexpectedly after installing the CiviRules extensions. Once the extension is installed and enabled, after a scheduled reminder is triggered, it sends the message every time the cron job runs (every minute, as the activities are created on form submission from the frontend) and on top of that it doesn't log any activities to the targeted contact. Checking the job log I get this:

Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Send Scheduled Reminders with result:
Failure, Error message: API (ActionLog, get) does not exist (join the API team and implement it!)

This was reported twice already, here and here, there was also a open issue, see CRM-17128, which was marked as closed, Cannot Reproduce, for obvious reasons if the issue has to do with CiviRules, which I believe it is, I've tested it on a fresh and clean install with CiviCRM 4.6.4/4.6.8/4.6.10 and Wordpress 4.3.1 and I can confirm that the issues only appears after installing/enabling CiviRules and it reverts back after uninstalling it.
I've opened an issue in the CiviRules github project and I'm waiting for a reply but menawhile, my question:

Where to start debugging scheduled reminders?

Any help would be appreciated.

PS: no errors in Civi logs (debug and backtrace enabled) and no errors neither in apache/mysql logs.

Thanks to @jaapjansma from CiviCoop for all his help and support. The issue has now been solved and merged into the main CiviRules development, if anyone is facing this issue, check out the fix and PR here.

As an answer (kind of) to the question:

I couldn't find a straightforward way to debug so, in this case the Reminder Sent or Membership Reminder sent  activity that Civi creates when a Schedule reminder is triggered wasn't created, that was the lead to investigate, using CiviCRM's debugging documentation (in a test environment, of course), turned out that the activity was created but with improper values, therefore the Schedule Reminder cron job would keep sending messages until the activity was completed.

Posting this as an answer just for the record.


Batch update Primary Address I made the mistake of importing work addresses before home addresses.
How can I update home addresses to all be primary?

The only option i feel is running a query that will switch the primary address from work to home for a set of contacts in a group.

Add imported address contact in a group X.
Update is_primary to NULL for all address for contacts in a group X.
Update is_primary to TRUE for home address for contacts in a group X.

HTH

Pradeep


Unable to create a contribution from back-office (Civi 5.21.2) Configuration:
- Civi 5.21.2
- Wordpress

What am I trying to do : Create a contribution manualy trhough the back-office :http://localhost/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcontribute%2Fadd&reset=1&action=add&context=standalone

here is my filled form:

When submitting the form I get this error:

CRM_Core_Exception: One of parameters (value: ) is not of the type Integer in /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php on line 1524

Exception trace:

#   Function    Location
0   CRM_Utils_Type::validate('', 'Integer') /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1524
1   CRM_Core_DAO::composeQuery('SELECT id,name,l…', Array, true)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1402
2   CRM_Core_DAO::executeQuery('SELECT id,name,l…', Array)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Price/BAO/PriceSet.php:475
3   CRM_Price_BAO_PriceSet::getSetDetail(null)  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:1371
4   CRM_Contribute_Form_Contribution->submit(Array, 1, null)    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:944
5   CRM_Contribute_Form_Contribution->postProcess() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:479
6   CRM_Core_Form->mainProcess()    /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:153
7   CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Upload.php:120
8   CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
9   HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution), 'upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
10  HTML_QuickForm_Page->handle('upload')   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:335
11  CRM_Core_Controller->run()  /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:316
12  CRM_Contribute_Page_Tab->edit() /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:372
13  CRM_Contribute_Page_Tab->run(Array, null)   /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:268
14  CRM_Core_Invoke::runItem(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:68
15  CRM_Core_Invoke::_invoke(Array) /var/www/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
16  CRM_Core_Invoke::invoke(Array)  /var/www/html/wp-content/plugins/civicrm/civicrm.php:1449
17  CiviCRM_For_WordPress->invoke('')   /var/www/html/wp-includes/class-wp-hook.php:288
18  WP_Hook->apply_filters('', Array)   /var/www/html/wp-includes/class-wp-hook.php:312
19  WP_Hook->do_action(Array)   /var/www/html/wp-includes/plugin.php:478
20  do_action('toplevel_page_Ci…')  /var/www/html/wp-admin/admin.php:254
21  {main}

I'm sure this issue is due to some misconfiguration of some kind.
Could someone help with that?
What Am I missing.

I also have a 500 error when viewing an existing contribution.

Any help appreciated, we are stuck in this situation.

According to the trace and to your comments, this SQL query can help find if there is data missing from the database:

SELECT * FROM civicrm_price_set WHERE name = 'default_contribution_amount'


Free registrations still asking for payment info We are using CiviDiscount and when a discount is 100%, either with a code or automatic discount, and the submissions cannot be completed with a "Payment Info Missing" error.    Using civi 5.2.2 and Stripe payment plugin.  Any ideas?

I found out there is a fork of the Stripe payment plugin for Civi 5.X.  This fixed my issue.  Can be found here:

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


Impossible to add a relationship between contacts / organisations When I add a Relationship to a Contact or an Organisation, the list of Relationship Types is displayed in background and I cannot select one of them. See screenshot:

Any idea ?
I use CiviCRM 15.7.0 under WP (last version)

This case has been solved. We found that there is an incompatibility with the popular Divi Theme we are using between WP and CiviCRM. We can provide details if needed.


Set up for a Scheduled Reminder using case activity Using Civi 4.7.8 (about to go 4.7.10) I want to create a scheduled reminder such that when the status of a custom activity type (which I've called 'Decision') changes to 'Completed', the case coordinator gets an email notification. I'm just struggling a little with some of the settings and naming conventions being used, so I thought by posting a question here I could:

a) get some useful clarity,
b) perhaps help make things clearer for others in a similar state of confusion, and
c) maybe help move towards a more consistent naming/labelling regime for activity contacts.

(I'll also be happy to improve the documentation based on what I learn.)

So the first thing that got me confused is - that in my activity - the involved parties look to be:

the person who reported the activity, as in the name that appears against "Reported by:". I believe this is the same as the creator of the activity, or as the documentation also calls it, the "Activity Source". Creating a new activity elsewhere in Civi, e.g. selecting 'New Activity' from the Contacts menu this field is labelled as "Added by:", so there's yet another name option.
The client of the case. In my activity this contact is called the 'Client', probably because the activity type that I'm interested in is used within the context of a case. In the scenario where we are selecting "New activity" from the "Contacts" menu this field is labelled as "With Contact". By process of elimination I reckon this contact is what's called in the documentation the 'Activity Target/s'.
The third type of contact is the activity assignee/s, which unlike the others looks to be unambiguously named both in the UI and in the documentation.

So I think I know which contact is which:
Reported by = Added by = Activity Source
Client = With Contact = Activity Target
Assigned to = Activity Assignee/s

In the reminder set-up I can specify my activity type and the status for that activity. I'm assuming here that these are essentially conditions for the reminder, i.e. a reminder can be be sent when an activity of the specified type and status exists.

Then I get confused again, because I now need to set a time, and for activities the options I have are to either set a specific date, or I can set a date/time relative to the "Activity Date Time". Assuming the "Activity Date Time" is the date and time set in the activity record, I can see that this date and time does not change if the activity gets edited (unless it is explicitly changed by editing the activity record).

Let's say I set the time for the reminder to be 1 hour after the Activity Date Time.

So, let's say a I create the activity, and it has a status when created that doesn't match the criteria for my reminder. Some time later, let's say two hours later, the activity is edited and the status is changed to match what my reminder is looking for, but the date and time of the activity are not edited. I now have a situation where my activity should trigger a reminder, and my target date/time is in the past.

Is it the case that because the criteria are met, and the target date/time is in the past, that the reminder will be sent? And is it the case that if I had instead set the time for the reminder to be three hours after the Activity Date Time, then the reminder would not be sent in this case because although the activity criteria are met, the time is in the future?

Is this how it works, or have I got it horribly wrong?

I would use CiviRules for this? We have one client that uses CiviRUles to send a survey email once a case gets to a certain status.


How to alter Event Dropdown values from Register Participant or New Event Registration Page? On Register Particpant Page, I see list of all Events under Event dropdown
As per the requirement, I am using Recurring Entity to have repeat events,so I need to hide repeat events and display only parent events
How can we alter the results in the Event dropdown

The Event dropdown has this form structure (from hook_buildForm)
When I add a condition and try to print variables inside it on New Participant Registration it does not show up.(probably since its entering )

 $apiRequest['entity'] == 'event'

/**
 * Implements hook_civicrm_apiWrappers
 */
function custom_changes_civicrm_apiWrappers(&$wrappers, $apiRequest) {

  if ($apiRequest['entity'] == 'event' ) {
    print_r('<pre>');
    print_r($apiRequest);
    print_r($wrappers);
    die('ed');
 }
}

On adding the code answered below

if ('CRM_Event_Form_Participant' == $formName) {
    $elementIndex = $form->_elementIndex['event_id'];
    $element = & $form->_elements[$elementIndex];
    $dataApiParams = json_decode($element->_attributes['data-api-params'], TRUE);
    $dataApiParams['params'] = ['parent_event_id' => ['IS NULL' => 1]];
    $element->_attributes['data-api-params'] = json_encode($dataApiParams);   }

I get an error (when I comment I don't get the error).

  Error: Call to undefined method stdClass::getName() in
  HTML_QuickForm->accept() (line 1686 of
  csites\all\modules\civicrm\packages\HTML\QuickForm.php).

To fix that I actually went to QuickForm.php and added an if condition as seen below

if(method_exists($element,'getName')

Is that a correct method and if not , how can I debug that further based on the error log.

 function accept(&$renderer)
    {
        $renderer->startForm($this);
        foreach (array_keys($this->_elements) as $key) {
            $element =& $this->_elements[$key];
            if (method_exists($element,'getName')){
            $elementName = $element->getName();
            $required    = ($this->isElementRequired($elementName) && !$element->isFrozen());
            $error       = $this->getElementError($elementName);
            $element->accept($renderer, $required, $error);
            }
        }
        $renderer->finishForm($this);
    } // end func accept

The event field on participant form uses event api to retrieve events. You can easily alter the list by implementing hook_civicrm_apiWrappers hook by adding additional parameter to exclude recurring event in $params of api probably 'parent_event_id' => ['IS NULL' => 1].

Or using buildform hook try adding parent_event_id condition in data-api-params of the field(element).

if ('CRM_Event_Form_Participant' == $formName) {
    $elementIndex = CRM_Utils_Array::value('event_id', $form->_elementIndex);
    if (empty($elementIndex)) {
      return;
    }
    $element = & $form->_elements[$elementIndex];
    $dataApiParams = json_decode($element->_attributes['data-api-params'], TRUE);
    $dataApiParams['params'] = ['parent_event_id' => ['IS NULL' => 1]];
    $element->_attributes['data-api-params'] = json_encode($dataApiParams);
  }

Cheers

Pradeep


What should I do about Deprecated Functions? My log is largely full of various warnings about deprecated function calls, from both CiviCRM core and extensions.  They do not seem to cause direct problems, but finding genuine problem messages among all the noise is difficult, and there is a worry that the support for the deprecated version will be withdrawn before the calling code is fixed.
I have raised a PR on GitHub with a fix for one simple case (so far without response), but in general I don't know enough about the problem to be confident trying to alter the code correctly.

All you can really do is log an issue or PR. You're right they don't hurt anything but yes they'll need to be fixed by the extension/core eventually.
If you want to turn them off temporarily you can hack CRM/Core/Error/Log.php to just return instead of logging them, but of course they'll come back when you upgrade if they aren't fixed yet.
I'll note though that the logging is also there in the situation where it was marked deprecated but it's not known fully if anyone has a configuration where it's used, and so the hope is they'll report it.


CiviRules action only after completed payment for new membership I need to trigger an action after membership is added, but only after the payment has been made (or registered by admin, because I have the option for online payment as well as "offline" money transfer).

If I use "membership is added" trigger, the action is fired even if the user chose the deferred option. I tried to limit it with "membership status" condition, but then it didn't fire at all (I guess the status isn't ready yet at that point).

Is there a way to achive that in CiviRules?

Edit:

A word about my wokflow, which is rather simple:
I have different levels of membership (including a free one) and an option to pay online or offline.
After a valid membership has been recorded (free, paid online or checked as paid by admin) I use a CiviRules action to create an account in an external (for CRM) system. And that's why I want only valid (active) memberships to trigger that action. I thought it would be a common and simple case :)

I'm not quite sure what your workflow is, but I think you will need to use the "Membership is changed" trigger for when the payment is made and the conditions for status changes. If the status goes straight to "new" for the offline route you probably need to use the "Membership is added" trigger with appropriate conditions. You need to map out the logic of it all and it can be a bit complex.


Was there a ContributionType.php file in a earlier version Attempting to get the Vanco Payment Processor working with Drupal 7.37 & CiviCRM 4.4.15.

Currently it reports a Fatal error: require_once()
[function.require]: Failed opening required 'CRM/Contribute/DAO/ContributionType.php'(include_path='/home/honduras/www/www/sites/default/files/civicrm/custom/php/:.:/home/honduras/www/www/sites/all/modules/civicrm:/home/honduras/www/www/sites/all/modules/civicrm/packages:.:/usr/local/php53/lib/php') in /home/honduras/www/www/sites/default/files/civicrm/custom/php/CRM/Contribute/BAO/Contribution/Utils.php on line 66

As a new user/developer working with CiviCRM I am unaware of the changes that occurred between version CiviCRM 4.1.x and CiviCRM 4.4.15.

Can someone shed light on the file ContributionType.php?

To answer your exact question - in CiviCRM 4.3+ ContributionType became FinancialType.  You might be able to just change the file name.

That said, Xavier is correct - there's likely a newer version of the payment processor.  You might want to ask J.C. Grogan.  Xavier is also correct that in Civi 4.4+ this code is probably supplanted because of pseudoconstant lookups.


Consistent failure to upgrade from 5.25.0 to 5.28.x I try to follow  https://docs.civicrm.org/sysadmin/en/latest/upgrade/wordpress/ to upgrade from 5.25 to 5.28.n as 5.25 is broken in WP5.5
After the step    Point your web browser to the following URL
http://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1
I consistently get this error despite following the instructions to the letter. I have no extra extensions, on the face of it, this would seem a fairly straightforward process.
#0 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(337): CRM_Core_Error::backtrace()
#1 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php(82): CRM_Core_Error::fatal("Your database has already been upgraded to CiviCRM 5.25.0")
#2 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Page/Upgrade.php(57): CRM_Upgrade_Page_Upgrade->runIntro()
#3 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(311): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#4 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:13))
#5 /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:2))
#6 /home/customer/www/staging21.example.org/public_html/wp-content/plugins/civicrm/civicrm.php(1601): CRM_Core_Invoke::invoke((Array:2))
#7 /home/customer/www/staging21.example.org/public_html/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress->invoke("")
#8 /home/customer/www/staging21.example.org/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters("", (Array:1))
#9 /home/customer/www/staging21.example.org/public_html/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
#10 /home/customer/www/staging21.example.org/public_html/wp-admin/admin.php(254): do_action("toplevel_page_CiviCRM")
#11 {main}

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/example.org/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php:478) in /home/customer/www/staging21.example.org/public_html/wp-admin/admin-header.php on line 9

WordPress 5.5 is available! Please update now.
 Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Your database has already been upgraded to CiviCRM 5.25.0 ```

 Any hints welcome...  I get this with 5.28.0 and 5.28.3 over past couple of days.

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)