'View in browser' link on mailing gives 'Access denied' error If I click on the 'view in browser' link on a mailing sent via CiviMail I get to a page on the website that says 'Access denied'.

Why is this not working?

You need to change the permissions to allow the public to view the mailing.

This permission is called: 'CiviMail: view public CiviMail content'.  This should be assigned to the anonymous role (or all user roles).

You also need to ensure that the mailing visibility is set to 'Public pages' for each mailing that you want to be available to view.  This setting is found under 'Publication'.


Downstream Git/Composer Issues I am trying to use the Drupal 8 Project on GitLab and I am having an issue with a downstream CiviCRM requirement. I am not sure where to post this issue, so I hope it is okay if I post it here.

The Composer files download civicrm/civicrm-asset-plugin. This asset includes pear/net_smtp. There is also a patch CiviCRM custom error message for CRM-8744.

When Composer attempts to apply the patch, I get the error " Cannot apply patch Add in CiviCRM custom error message for CRM-8744 (https://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f
  96/tools/scripts/composer/patches/net-smtp-patch.patch)!".

I am not sure how to change what files are included in civicrm/civicrm-asset-plugin if there should be another patch or how to try and skip the patch in Composer.

Any help is greatly appreciated.

Thanks,
Steve

Roundearth just recently switched to using civicrm-asset-plugin and it may not be fully integrated yet.

CiviCRM can be installed on drupal 8 without roundearth now - it's still not "official" but is being used by some.

composer create-project drupal/recommended-project some-folder

cd some-folder

# replace the 'x' below with a proper version number

composer require civicrm/civicrm-core:5.x.x civicrm/civicrm-packages:5.x.x civicrm/civicrm-drupal-8:5.x.x civicrm/civicrm-asset-plugin:~1.0.1

Install Drupal as usual

Then to install CiviCRM - make sure the civicrm.settings.php file can be created -> by making the web/sites/default directory writeable:

chmod +w web/sites/default

Then you can either go to Extend and enable CiviCRM Core
or you can do this from the command line:

drush en -y civicrm


Should I disable extensions prior to upgrading CiviCRM? I couldn't spot anything on this in the upgrade instructions, and as it's something that could affect lots of people, I thought I'd ask the question here.

When upgrading CiviCRM, what is considered best practice regarding extensions? Should they be disabled prior to the upgrade?

If, as a result of upgrading Civi, one or more of my installed extensions is no longer compatible, what's the best procedure to follow? Should I attempt to update/upgrade extensions to a compatible version before or after upgrading CiviCRM?

In general, I'd recommend no.

Some extensions - literally - may not be reinstallable if they aren't qualified for that version of Civi.

My recommendation: TAKE BACKUPS!!! Then don't disable extensions and just go ahead with the upgrade.


How do we preprocess CSV columns when using CiviCRM builtin import functionality? We use CiviCRM's import data functionality (and api-csv-import-gui) to import partner's contributions from CSV files. This is working great because the CSV columns can be mapped to CiviCRM fields via a graphical user interface.

However, we've recently had the need to preprocess one of these fields and transform their data on import. This process can't be done outside CiviCRM for security reasons.

Can I still use CiviCRM's point-and-click mapping functionality while being able to preprocess a specific CSV column in PHP? Unfortunately I can't just map the columns-fields in code because the CSV columns change.

One possibility could be importing the data as it is (maybe using a temporary field for that column) and use
hook_civicrm_post() to manipulate the contribution just after creation:

function example_civicrm_post($op, $objectName, $objectId, &$objectRef) {

  if ($objectName == 'Contribution' && $op == 'create') {

    if (!empty($objectRef->temporary_field)) {

      // Preprocess field. FIXME: do some validation first.
      $objectRef->real_field = do_awesome_stuff($objectRef->temporary_field);

      // Clear temporary field.
      $objectRef->temporary_field = '';
    }
  }
}


Can't create mailings if imageUploadDir and imageUploadURL don't match I upgraded CiviCRM from 4.7.19 to 4.7.22. In the new version there is obviously a check implemented that compares imageUploadDir and imageUploadURL. Probably if they don't match after exchanging the cms.root (path and URL) it warns.

In our configuration we want to have different values here, because we provide the images from a different domain to save bandwidth to our CiviCRM server.

The problem is, that if we configure it like we want to (namely that imageUploadURL points to a different domain than CiviCRM is provided from) the form to create new bulk mails doesn't load anymore. The system status page behaves the same (it doesn't load as well as long as the two values don't match in the sense explained above).

Does anyone else observe this behaviour?

This is a bug, related to Status page angular load error. Since your "Image Upload URL" and "Image Directory" are in different places, try disabling Asset Caching at Administer > System Settings > Debugging and Error Handling, at least until this bug is fixed.

Please also see civimail - screen for composing a mail is blank


How do use upload function for mail merge with Word After many researchs on Internet, I have not found an answer to how to use the upload function, in order to do a mail merge based on an existing Word document.

Print/Merge document has an option to upload a .docx word file. But I have not figured out how to use it.

Is is possible to create a Word document and somehow add the tokens directly in this document? And then do the merge via the upload?
Thanks for your help.
(Drupal 7.67 & Civi 5.7.0)

There's two different things:

Mail Merge, which is a native feature of word.
Print/Merge document, with output as a word document, which is a feature of CiviCRM. (I'm not sure it has the ability to "upload" a word document. If it does I'm not familiar with it, but see below.)

For the first one, you would want to do a contact export in csv format, and then from within MS Word do your mail merge as you would with any excel data source.

For the second one, inside CiviCRM:

Go to Administer - CiviMail - Message Templates and create a new template.
In the HTML section, copy/paste from MS Word into the box using the Paste-From-Word icon.
Then you will need to replace your tokens with the civicrm versions of the tokens, using the dropdown.

Then when you do a contact search you can choose Print/Merge document from the actions dropdown on the search results page and choose your template and MS Word as the output format.


Unable to use discount codes when registering in admin area For an upcoming paid event, we need to register speakers, guests, etc. for free. In attempting to register those people in the admin area, we are unable to use a comp discount code that is for 100% off. Each time we enter the code, it accepts it and changes the total to $0, but upon save we get the error message "Please select at least one option from price set," even though an option was selected prior to submitting.

The discount codes work fine when used on the front-end, but these are courtesy registrations and we want to bypass the confirmation message, since those details have been handled separately.

I was able to work around the issue by creating a new price set for the event that makes use of admin-only options to remove the cost for speakers, however; the issue still remains that the discount codes don't work on the back-end. This has happened on other events in the past, which we by-passed by logging-in as the member and registering via the website front-end. Has anyone else experienced this, and are there troubleshooting steps I can take to find a resolution?

We are running CiviCRM 5.6.0 on Joomla 3.8.13

Updated to add a screenshot of the discount code.

As the error states, if you use the built-in fees section or a price set with a required price field option (of which you should always have at least one), you will not be able to submit the registration without selecting an option, even if it is a $0 option after applying a discount.

That said, no need to create a separate price set (especially when you are offering only one fee option) - all you need to do is select the $0 option after applying the discount code (or save yourself a click by making the fee option the default), then click the Save button - this will record the registration with a $0 contribution.

If you add a click and remove the "Record payment?" flag that is checkmarked by default when registering someone from the back-office, that will still result in a registration with a status of "Registered" but without the $0 contribution.

Hope this helps,
Tamar


Why can Search results not be removed from mailing recipients? When doing a contact search and using the action "Send email", a new draft mailing is created and a hidden group is assigned as recipients to the draft mailing. It is is displayed as "Search results" and has a different color.

If I click on the cross to remove it from the recipients, I get a message "This mailing was generated based on search results. The search results cannot be removed.". Why is that? I looked at the code where this restriction is enforced, but couldn't see anything that would suggest why search results cannot be deleted.

I suspect this was an intended outcome ie, you do a search, you find your contacts, you use "Email - send/schedule via civimail" and that locks in the recipients.

If at that point you decide your search was incorrect, then you need to start over.


Tokens not evaluated in Activities I have used tokens in a template for sending out as emails and as a mail merge documents.  It seemed that while the emails sent and the documents downloaded have their tokens correctly evaluated, the respective activities are not recording the actual documents/email with the tokens evaluated.  Is this correct?

Separately i have a CiviRule sent out the emails via the same template and the corresponding email activity recorded do have their tokens correctly evaluated.   I thought the correct behaviour should be like this, rather than recording a template within the Activities.   So i thought this is an anomaly, but applies to only if you do the sending/printing directly on the record.  Is that the right understanding ?  Thanks.

Clement

I'm not sure I can answer whether it's the 'correct' behavior. But I can verify that when you email or 'print/merge a document' with tokens, the activity detail records the literal tokens, not the generated content. (Just for clarity of anyone reading and not familiar - i.e. it will show the token {contact.addressee} in the details for the activity versus "John Doe".)

For the 'print/merge document' side - if you turn on record generated letter (System Settings > Misc), the pdf that attaches to the activity will showcase the generated tokens.

My guess is that it's easier to record the tokens rather than the generated content especially when you consider you can store the same activity on multiple contacts i.e. you email a group of 15 people, they all get the same activity stored but it contains multiple 'with' contacts.

Strangely enough, if you send through CiviMail and then view the activity details it does show the generated token. Although this is also probably not the ideal behavior because it shows the evaluated token at the moment you view the activity - not from when it was sent.

In summary, what you have described (I can't vouch for CiviRules) is the current 'standard' behavior.


Creating new wordpress user using civicrm memberships.? I am new to civicrm and trying to integrating it with wordpress . Can anyone tell me how can i create user using civicrm .
or when somebody sign up for a membership (trough civicrm) a new gets created in wp.

also once 'CONFIRM CONTRIBUTION' IS CLICKED(membership signup). page goes no where .
it was suppose to goto to 'thankyou ' page which was set in 'contribution page'

To create a WordPress user with membership signup can be achieved with the below workflow -

Create a profile with fields that you wish to collect during your membership signup process (Primary email address is mandetory) -

In the advanced settings section of your profile you have an option called "WordPress user account registration option?"

CiviCRM help text for this option -

If you are using this profile as a contact signup form, using it in an online contribution page OR an event registration page, anonymous users will be given the option to create a WordPress User Account as part of completing the form. In addition, you must include a Primary Email Address field in the profile.

Once you have created a profile you need to create a CiviCRM contribution page that offers membership and attach the new profile that you created.

For WordPress you will also need to check the box "Anyone can register" in the WordPress general settings.

The contribution page will now offer the account creation option when a user is not logged in -


Event Template HELP HE An hour ago I was able to create an event template. Now I have tried to go back and create a new event template and the button to create a template has vanished and I am struggling to locate it. Please could you guide me on how to access it again?

Many thanks,

Laura

It's under Events menu >  Event Templates.  You'll see the "Add Event Template" button there.  You can also edit existing templates from there.  See screenshot below.


How can I get Civimail to deliver emails instead of bouncing them? I have two separate sites. One is an upgrade from 4.4 to Civicrm 4.7.13 and the second is a new installation of 4.7.15. Both on Drupal 7.53.

Both the same problem in Civimail of not being able to deliver any emails.

(Sending directly to individuals or groups not using Civimail works fine)

When I try to send through Civimail I receive 100% bounces in the Civimail report and all the email addresses are then set to ‘on hold’.

In the Drupal logs, for each email address I get the following 3 errors:

Strict warning: Only variables should be passed by reference in CRM_Mailing_BAO_MailingJob->deliverGroup() (line 759 of /[mysite]/sites/all/modules/civicrm/CRM/Mailing/BAO/MailingJob.php).
$backTrace = #0 /[mysite]/public_html/ministry/sites/all/modules/civicrm/CRM/Core/Error.php(946): CRM_Core_Error::backtrace("backTrace", TRUE) #1…[through to #29. I can supply the full details here if necessary]
Ignoring exception thrown by nullHandler: , mail() returned failure

Also, when I try and send a test email from Civimail I receive the error message: "Could not identify any recipients. Perhaps the group is empty?" I'm not sure if the two problems are related.

Can anyone help with what may be wrong with my configurations?

Issue solved!

Somehow I had changed the setting in the (one) mail account in Civimail (Administer -> Mail accounts).

The "Used For" field had been set to "Email to activity processing" instead of "Bounce Processing".

So there was no bounce email assigned so the the send was being rejected. Setting the "Used For" to "Bounce processing" fixed the issue.


Does Drupal's read-only mode module work for Civicrm too? Drupal 7 has a module, Read Only Mode, which allows your site to be viewed while in maintenance mode. No changes can take place to the database, but viewers can still see your site. This allows you to make your maintenance mode changes while not inconveniencing users who simply want to view your site.

Does this work with Civicrm as well? ie, does it prevent civicrm from changing its database while in maintenance mode?

We'd be very happy to be able to use Read Only Mode during Civicrm upgrades, which can take a while. Thanks for any thoughts!

In short - no.  Moreover, if it did, it would be dangerous, because the Drupal module can't know which database writes are part of the legitimate upgrade and which aren't.

In my experience, only upgrades that add/remove indices take any appreciable amount of time.  Is it possible that more frequent upgrades will result in shorter downtimes for your use case?


How do I allow custom date field over 10 years ago? Civi 4.7.3 and Wordpress 4.4.2

Since upgrade from 4.7 to 4.7.3 I cannot seem to add a custom date field and allow the user to select a date older than 10 years ago. Recreated on Demo site:
 Click here to view demo field.

I set the options to allow 90 years before previous date,  but still I only get last 10 years in the list from the calendar.

Shall I raise this on Jira?

Also posting my answer to How do I override the default date range of JQuery date widget? here - for those following this Question:

I think the answer may be that this is working in 4.7.7 - set your date range in the Custom Field - Edit screen [I want to go back 30 years]:

Custom Date SE field:

And this is indeed giving me a dropdown going back 30 years (I can select 1986):


Paypal payment processor not working This is our form http://manningmedia.net/glos/test/ , built under contribution page by loading user profile on it, it must be redirecting to standard paypal website after submitting, but it is redirecting to thankyou page only. We have already set payment processor as "standard  paypal" and enabled contribute component also, but stil it is not working, please help.

Check your contribution page configuration for amount tab. May be you have unchecked the Execute real- real time monetary transaction.


non-asci characters ending up in database Today we spent about 2 hours bashing our heads trying to get a string compare to work so we could run a query against contact sub type while setting up a new participant public listing.

We started realizing what was going on when the string length getting returned was 7. When it should have been 5, for Child. Took a look at it in the command line and saw this:

Anyone know why they might have ended up in the database? And how to avoid them showing up again?

Thanks!

I think this was also the problem behind another question I asked here previously.

drupal 7
civicrm 4.6.11

CiviCRM historically uses the CRM_Core_DAO::VALUE_SEPARATOR character as a serialization technique for storing multiple values in a field. Best practice is use the API for accessing values, or if you really want to do direct database access then you need to treat that value as a multiple value separator.


Several contributions generated after paypal payment I have just update to civicrm 4.7.8
But now i have a weird problem on contribution when order are made with paypal.
Several contribution are created and one are refunded.
This issue is for all new contribution payed by paypal.
You can see that the total of the contribution is 0.
Could you please help me ?

This may not be specific to PayPal - I think it may be related to a bug that has been resolved in the latest release candidate:

http://dist.civicrm.org/by-date/2016-06-26/4.7.9-rc/

Should not be long before it's out.

Here's the JIRA issue on that:
https://issues.civicrm.org/jira/plugins/servlet/mobile#issue/CRM-18661


How can I create a Drupal page with an automated feed for all the events? I would like to create an automated feed for all the event we create in CiviEvent, and want to show that on a themed drupal page. I want to feed all info, image that we create during event craetion and a button to register.

Is that something easily achievable?

Thanks in advance.

Have you looked at the existing Event feeds?  Go to Events > Manage Events and you'll see icons and help for iCalendar, HTML & RSS feeds. You'll need to look at how you display those feeds but the data about events is there.


Autoresponder for filling out profile I have a volunteer profile set up and it's working just fine. I need to send an email response with additional info to users who sign up.

I can't find any info on how to do this. Any help appreciated.

Thank you!

PS: Running Joomla 3.4 and the latest version of Civi
Edit: The profile in question was created by >>> Administer>>> Customize Data and Screens >>> Profile. It's run as a mailing list and stand-alone form on the site.

I did not use CiviVolunteer Extension although I do have it installed.

I've managed to solve problems like this by generating custom activities, and then creating scheduled reminders which trigger on these activities.  This is better than using sendmail directly, because the email more easily managed from the front end.  For more information on automated reminders, see the docs.

For generating activities on forms submits, you could use hook_civicrm_postProcess to trap the form submit.  For generating activities on new contact creation, you could use hook_civicrm_post.  For more information on hooks, see the docs.

From within the hooks, you can create new activities like so:

civicrm_api3('Activity', 'create', array(
    'source_contact_id' => $id,
    'activity_type_id' => $activity_type_id,
    'subject' => "Participant $id Status Changed to $pstatus",
    'status_id' => 2,
    'assignee_id' => $member_org_poc_id,
    'details' => "Participant #{$id} Status Changed to $pstatus",
));


Contact created from relationship tab is automatically tagged When I create a new user from another contact's profile, in the relationship tab, the new contact automatically gets one of my tags...
I have no idea where to look to solve this one.
Any clues?

Using civicrm 4.6.25

If you haven't found the cause by looking around, you can write an extension that uses hook_civicrm_pre on the Tag entity to call CRM_Core_Error::backtrace().  That should show you what's calling the tag creation code.


Mass Deleting Scheduled and Sent Mailings, Drafts, etc DB has grown so huge and it started to cause problems with sending mass mailings. I want to delete old mass mailings, the sent ones and the drafts, etc. Is there away to do it in one click instead of deleting each and everyone individually?

This does not exist in the UI currently. However, it does seem like a good idea to have a script that deletes OR archives mailings that are greater than N months / years old. So i'd recommend writing a api job that does the needful.

Approx steps would be:

a. Create a new delete/archive mailing job taking parameters like list of ids or mailing delivered before date XXX

b. Check and ensure that the mailing delete api deletes all the right tables. Most of the deletion is done by mysql via cascaded relationships. At a quick glance, the api delete does not seem to handle file attachments

c. Use the API from item b to implement the scheduled job

Please do share your extension so others can benefit


In 4.7 the activity 'Assign Case Role' is assigned to the client: is this a bug? I can reproduce this on the 4.7 demo.

I create a case of type 'Adult Day Care Referral' for client Rebekah Adams.

Using the civicrm/contact/view/case screen, I assign the role 'Health Services Coordinator' to Junko Adams. I use the 'pencil' icon to do this.

The role is assigned to Junko Adams, but the 'Assign Case Role' activity is assigned to Rebekah Adams (the client) and the subject is 'Health Services Coordinator is : Dr. Rebekah Adams'.

That's confusing, and if an email is sent to the client, that could be nasty.

It's a bug. On line 1804 of CRM/Case/BAO/Case.php there is the following test ...

   if (isset($dao->caseId) || $dao->rel_contact_id != $contactId) {

Observing how the function is called, the Case Id will always be set, so the condition is always true and the else part is never executed.

Changing the condition to ...

   if ($dao->rel_contact_id != $contactId) {

fixes the behaviour.


Prorating Memberships and Cividiscount CiviCRM is prorating memberships and I do not think I have setup any feature for prorating the cost of the membership. It appears to show up when I apply a discount code. For example this outrageous example.  See:

I checked and there are no CiviCRM errors, Apache error, and JS logs. Any ideas are appreciated.
Thanks,
Josh

The issue was the Membership Extra module. I have not dug into a specific component. We had not configured it but turned it on. Turning it off fixed the problem.


Is resource_url from civicrm_settings.php saved in the civicrm_setting table, under what name? Where in civicrm_settings table is resource_url saved? I cannot use the System Settings/Resource URLs to set it, but can access the database.

Instead of editing the database why not just override the value in the civicrm.settings.php file?

Check you have

global $civicrm_setting;

Then add
    $civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://example.com/example-resource-url/';

More information here on this
https://docs.civicrm.org/sysadmin/en/latest/customize/settings/

If you do want to update this directly in the database try the civicrm_setting table you want to search for a name of "userFrameworkResourceURL" and update the value column.

Best to make a back up of the database - or at the very least the table before changing it.

Alternatively you might also be able to set this via the api:

cv api Setting.create userFrameworkResourceURL="resource url here"

or

drush cvapi Setting.create userFrameworkResourceURL="resource url here"

depending on how broken your install is. Perhaps use Setting.get on dmaster via the api explorer to confirm what the appropriate format is:

https://dmaster.demo.civicrm.org/civicrm/api3#explorer


After upgrade to 4.7.13, I get 500 Internal Server Error when creating new mailing After upgrading from 4.7.11 to 4.7.13 (with Drupal 7.51), I get à 500 error (Internal Server Error) on an ajax call when attempting to create a new mailing. The screen stucks at "Initializing..."

The message in the console is :  GET XHR
http://dev.lists.sciences-po.fr/fr/civicrm/ajax/rest    [HTTP/1.1 500
Internal Server Error 381 ms]
Parameters are : action=get&entity=MailingGroup&json={"mailing_id":"6"}
There are some similar ajax call before
and after the faulty one, without any problem.
There are no javascript error except this one.
There are no group in the civicrm_mailing_group table

Have you got an idea of debug tests I could run to understand more about this error ? I know, I definitely need to read the server logs, but I don't have access.

Thanks for your help.

Philippe

After investigations :

The issue is due to i18n : if multilingual is on, then the bug raises. When it's off, there are no bug.
CRM_Core_DAO_AllCoreTables::registerEntityType returns only table names without language code. In my case, the function returns civicrm_group instead of civicrm_group_fr_FR. Then, the function CRM_Core_DAO_AllCoreTables::getClassForTable($table) returns nothing, which ends with the following error : PHP Fatal error:  Class name must be a valid object or a string in /store/www/dev.lists.sciences-po.fr/html/sites/all/modules/civicrm/CRM/Utils/SQL.php on line 53

Guess some hook in the i18n module is missing or not working properly.


How does CiviCRM handle multiple users editing the same record simultaneously? I'm assuming that the record is locked so that only one user - presumably the first - can edit, whilst others are locked out until the record has been saved. But I don't know, and a client has just raised the issue, so I'd like to provide a definitive answer.

Tested on CiviCRM 4.7: two users can edit the same contact record, however, at the moment of saving the contact record, the second user to save the contact record will get a warning that the contact record has been modified by someone else. The user will then have an option to save anyway or reload the page.

It also works with inline edit:


Is it possible to do an IPN replay? From CiviCRM 4.5 on, IPNs (recurring payment notifications from the payment processor) are recorded in civicrm_system_log.  Is there a way to replay these IPNs to CiviCRM?

Jon G, for Authorize, the answer is Yes, using Eileen's extension - see:

What should drush cvapi NotificationLog.retry sequential=1 system_log_id=XXX do?

and get the extension at:

https://github.com/eileenmcnaughton/nz.co.fuzion.notificationlog


Scheduled Reminders for 'on behalf of' Memberships As far as my testing shows, setting up Scheduled Reminder for an Organisational membership is not resulting in a Reminder also going to the 'permissioned employee'.
Can anyone confirm steps that do result in the Reminder going to both the Org and their 'contact person'.
As I understand it, it is really the latter - getting the Reminder to the 'contact person' - that matters if we want to send out checksums.

It seems that the Memberships must be INHERITED by the permissioned employee as well.


Target emails based on contacts near a postal code I am moving over to CiviCRM from The Action Network and am wondering if email blasts can be targeted by inputting a location (postal code or city) and choosing a set number of kilometers surrounding it to include. Thank you.

See https://docs.civicrm.org/user/en/latest/the-user-interface/searching/#proximity-search then from the actions dropdown create a group or smart group out of the results and use the group in your mailing.


Contributions: Error Cancelling Contribution The recurring contribution could not be cancelled When our users go to the cancel contribution link in their confirmation email and select "Cancel Contribution" they get the following error: Error Cancelling Contribution The recurring contribution could not be cancelled.

Furthermore, if I am logged in and try the same link, I am able to cancel to contribution, but only if I deselect "Send cancellation request to PayPal Pro ?". Otherwise I get the same error.

Any ideas?

CiviCRM 4.7.14 / Drupal 7.53

The problem you're describing is a known bug, which is documented at CRM-20800.  A patch was submitted yesterday; by testing this patch, you can speed its inclusion into an upcoming version of CiviCRM.


Why are Username and Password are no longer accepted for Outbound GMail? We use GMail (G-Suite) for outbound mail. Three days ago, we started getting:

authentication failure [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 535, response: 5.7.8 Username and Password not accepted. Learn more at 5.7.8 https://support.google.com/mail/?p=BadCredentials n3sm11135782pff.102 - gsmtp)]

We've verified (ad nauseam) that the Username and Password are correct. We can use them to send and receive through GMail just fine. However, we can no longer send with Outlook, either.

How can I find out why the Username and Password are no longer accepted?

This link seems to fix things, if only temporarily: https://accounts.google.com/DisplayUnlockCaptcha


Importing Custom Field Checkbox Data I have setup a custom field with 4 options. In my spreadsheet I've tried various combinations of columns which would allow me to import data and select required options. But nothing is working!

Custom Data - Checkbox Options - Red, Blue, Green, Black

In my CSV file I've tried combinations such as

"Red,Blue"

'Red,Blue'

Red,Blue

Is it possible to import data for check box custom data?

Thanks

Alan

The correct answer is to put the text

Red,Blue

without quotes in a single cell of the CSV that you're trying to import.

You also need to make sure that the field you're importing into allows multiple values to be set, not just a single value.


Setting Different Fees For Sign Up and Renewal In Civicrm The organization am configuring Civicrm for has different fees for Membership Sign up and renewal.

How can i configure Civicrm such that when Members are signing up they pay a particular fee but when they have to renew they pay a diffferent fee.

I have experimented with  price sets but this merely shows price sets on both signup and renewal pages as options. But this is not how i want it to work.

We have a similar situation and use a separate contribution page for renewals.

The menu link for renewals takes them to an intermediate Drupal page that is only visible if they are logged in, and only members (or ex-members) have a login. On that intermediate page is the link to the renewing CiviCRM contribution form.

This isn't perfect but works for our case where new memberships include a book, renewing memberships don't and the difference in the fee is only $5.  If a lapsed member renews rather than rejoins we aren't fussed, we just don't send them the book.


Approach to dynamically filled custom field using member since date I've been thinking about how to best approach this and I'm stumped as to how to best go about it.

I want to add a custom field to a profile that is rendered on the Contact Summary page. I would like to fill it dynamically with the value of the individual's earliest Member Since value.

NOTE: I say the earliest Member Since value because a bug in Civi has changed all Member Since values of currently active membership records to the date of the start of that membership record when they are renewed which ignores the concept that the individual may have had an earlier membership of a different type. The solution is to loop through all memberships and grab the oldest value to populate the custom field with it.

I'm well versed in building custom extensions and working in custom code. This is for a Drupal 7 / CiviCRM site. Any ideas or direction?

How immediately do you need this field's value to be set? If it can be delayed, I'd probably do this as a cron script that loops through all that aren't set yet and then sets its value.

I'm assuming also you're familiar with the "View only" checkbox at the bottom of the custom field definition form - that would be how I'd create this field.


Do mass SMS work in 4.7.11 using Clickatell? I can send a single SMS in 4.7.11 using Clickatell.  But a mass SMS fails with the following message from the cron task 'finished execution of Send Scheduled SMS with result: Failure, Error message: DB Error: syntax error'.  I have installed version 3.0 of the Clickatell extension from Veda Consulting. Anyone know if this extension is supported in 4.7? Any comments?

Looks like fix is not present in v4.7.11. But there is a ticket already - https://issues.civicrm.org/jira/browse/CRM-19327. Might be available in v4.7.12.

Anyway seems like a minor patch to apply?


Unable to create or edit a contribution record I'm on Drupal 7 and CiviCRM 4.6.25.
Suddenly, I am no longer able to create or edit a contribution record.
If I try to create a contribution record from a contact profile, the triangle spins eternally.
If I try to create a contribution record from the menu Contributions > new Contributions, Once I submit the contribution I get a blank page.
All I can think of is that I tried to setup the CiviXero extension last week but never got around to finishing the setup. I tried disabling/uninstalling it but that did not help with the problem.
The Drupal watchdog is not showing any errors.

civixero extension is build to use for CiviCRM version >= 4.7 so there might be compatibility issue when installing for 4.6.25 as some function may not be present.


SMS not showing up in the actions menu I have installed and set up the SMS Clickatell extensions and activated the provider on CiviCRM, but SMS doesn't show up in the actions menu of a contact and the batch SMS isn't working.
Do you have any ideas?
Thanks in advance.

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


Upgrade froze at 4.7.8, Can't find valid value for qrid My upgrade has been running for about 8 hours, but it stalled after completing 4.7.7, from 4.3.8 at. I checked top to see if Drupal or CiviCRM were running, and there was no indication of the process. I decided to refresh my browser and my cookie must have expired, because Drupal asked me to log in again. Then I pulled up the queue runner in the browser (https://dev.example.com/civicrm/upgrade/queue/runner) it spit out the error:

  Sorry but we are not able to provide this at the moment.
  Could not find valid value for qrid

The log shows that it could not find valid value for qrid. Below is the log from /sites/files/civicrm/ConfigAndLog, starting after completing upgrade to 4.7.6:

Dec 21 12:18:17  [info] Running task: Begin Upgrade to 4.7.7
Dec 21 12:18:19  [info] Running task: Upgrade DB to 4.7.7
Dec 21 12:18:21  [info] Running task: Upgrade DB to 4.7.7: SQL
Dec 21 12:18:29  [info] Running task: Finish Upgrade DB to 4.7.7
Dec 21 12:20:15  [info] Running task: Begin Upgrade to 4.7.8
Dec 21 12:20:17  [info] Running task: Upgrade DB to 4.7.8
Dec 21 12:20:23  [info] Running task: Upgrade DB to 4.7.8: SQL
Dec 21 12:20:56  [info] Running task: Upgrade mailing foreign key constraints
Dec 21 13:26:27  [info] $Fatal Error Details = Array

(
    [message] => Could not find valid value for qrid
    [code] =>
)

Dec 21 13:26:27  [info] $backTrace = #0 /var/www/html/drupal/docroot/sites/all/modules/civicrm/CRM/Core/Error.php(373): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/html/drupal/docroot/sites/all/modules/civicrm/CRM/Utils/Request.php(120): CRM_Core_Error::fatal("Could not find valid value for qrid")
#2 /var/www/html/drupal/docroot/sites/all/modules/civicrm/CRM/Queue/Page/Runner.php(52): CRM_Utils_Request::retrieve("qrid", "String", Object(CRM_Queue_Page_Runner), TRUE)
#3 /var/www/html/drupal/docroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(312): CRM_Queue_Page_Runner->run((Array:4), NULL)
#4 /var/www/html/drupal/docroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#5 /var/www/html/drupal/docroot/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#6 /var/www/html/drupal/docroot/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#7 [internal function](): civicrm_invoke("upgrade", "queue", "runner")
#8 /var/www/html/drupal/docroot/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#9 /var/www/html/drupal/docroot/index.php(21): menu_execute_active_handler()
#10 {main}

I suspect that the qrid is the queue runner ID and that the queue was lost when Drupal asked me to log in again. The log doesn't show that there was any other issues before the qrid problem. I'm not certain if something was wrong before I was forced to log in again or if that is what did it it.

Furthermore, the file permissions for the civicrm directory in sites/all/modules was somehow changed to an owner I am not familiar with on our server (test2?):

    drwxr-xr-x 19 test2 csf      4096 Nov  2 19:32 civicrm
drwxr-sr-- 80 fclub www-data 4096 Oct 16  2015 contrib
drwxr-sr-- 15 fclub www-data 4096 Oct 16  2015 custom
-rw-r--r--  1 fclub www-data  952 Aug  5  2015 README.txt
drwxr-sr-x  2 fclub www-data 4096 Nov  3 22:40 timeago

I tried loading this URL to see if that would help:

civicrm/upgrade/queue/runner?reset=1&qrid=CRM_Upgrade

but then received the error:

  Queue runner must be configured before execution.

I should have used Drush to run the upgrade so I wouldn't have to deal with Browser issues.

Question 1: Is there anyway to salvage the progress and continue from 4.7.7, repair the database or reinstate the queue runner?

Question 2: How can I figure out what went wrong so that I can try running the upgrade again without this happening?

The error message comes from refreshing the browser rather than the upgrade process.
The last entry before the error is:

Dec 21 12:20:56  [info] Running task: Upgrade mailing foreign key constraints

You can find the detail in CRM/Upgrade/Incremental/php/FourSeven.php
Adding foreign key constraints creates an index which can take a while on a big table.  How many rows (count(*)) do your civicrm_mailing_event_queue and civicrm_mailing_recipients tables have?

Once the upgrade has started, I don't know how dependent it is on the browser, so it would be worth checking the log later to see if you have any further messages from the upgrade.

If you need to start again, then I'd try this:

Restore your database and files back to your starting point at 4.3.8 (you did take full backups didn't you??)
Upgrade to 4.7.7
Check all is working as expected
Take new backups
Try upgrading to 4.7.8

If your mailing tables are large you'll need to be patient. If it fails, you can easily go back to 4.7.7 and then work out what to do next.


How to search the change log? The docs on synchronizing users to contacts say:

You can then search your contact records to view or edit the new
contact records. Go to Advanced Search , >>Change Log section and
enter dates that include the date when the synchronization was
performed.

But on my Advanced Search page, there is no Change Log section. Has this changed? How do you search the change log?

It's under Administer - Customize Data and Screens - Display Preferences where it says "Contact Search". It has probably been unchecked.


Removing empty fields from event registration templates We have some custom event fields that were set up before our time and are set to apply to all types of events, even though they are rarely used anymore. However, when a registration is entered from the administration end of things, the receipt includes all of these fields so there is a long list of empty (and irrelevant) fields in the email that is sent.

What is the best way to hide those fields (ideally only if they are empty)?

If you want to remove them when they are empty you will have to create a customization using the CiviCRM hooks. If you want to remove them from the email and do not really care about the data in them, you could contemplate disabling the custom fields?


Missing mailing list subscription check box in Chrome, and Edge The mailing list subscription check box missing form subscription page when I open the page in Chrome or Edge under win10, same with android tablet and mobile phone Chrome browser.
Works correctly in Firefox 47.0

Civi 4.7.9 under WordPress 4.5.3. with Hungarian settings.

Consequently no one can subcribe to the mailing list, and get "Please select one or more mailing lists." error message!

This sounds like a JavaScript issue.  Please see the Javascript Troubleshooting Guide for CiviCRM.  If that doesn't solve your problem, edit your question to indicate what you've tried and what information you gathered from following the steps in the guide.

You may also want to try one of the default WordPress themes and see if the problem persists.  If you try this, please update the question to indicate what the results were.


Default values for Preferred language, email format, email greeting, postal greeting and addressee we are in the process of setting up CiviCRM and we are importing a lot of records from a previous CRM. when we do the import, the preferred language defaults to english.  how do we get this to be a null value unless we import a value?

Same question for email format, email greeting, postal greeting and addressee.  All are showing a default value. Null would be more accurate.

How do you import? Via csv upload?

If your import scenario is complex by any means I would strongly recommend to make use of the api. This approach helps you to get control over all aspects of field mapping.

Yours // nielo


Attaching Email reply to a contact in Civi First off, i am not a developer and had no training in Civicrm. After 50 hours of getting contact into civi up to date. And creating contacts within orgs to mail (just seems insane civi isn't set up to email orgs to me) we finally sent out our first emailing to all our trust and foundation supporters.
Question is, how do i add reply's. We don't (for some UNKNOWN REASON) have civi connected to our outlook. Can i manually add these emails to a contact?

See https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/#autofiling-email-activities-via-emailprocessor where you can set up either a mailbox you can bcc that will add email replies to contacts, or you can set it up to pull from a specific folder in your own mailbox after-the-fact to do the same thing.
In terms of the earlier part of your question, when you say "contacts within orgs", Civi won't send to contacts who are employees of orgs, but if you set up Groups, then you can mass email to the group. See https://docs.civicrm.org/user/en/latest/email/mass-mailings-using-civimail/


why does dashboard membership number not match list of members? my membership dashboard shows 901 current members.

when i click the clickable '901'  I get a list of 902 members!

i cannot figure out why :/

what is the difference please between the query that generates the total membership number in the dashboard and the query that runs when you click on the number?!

The dashboard is programmed to show memberships that have a start date, whereas the search is not including that filter. If you are getting a different number in the search than in the dashboard, click on the Start date column to sort in descending order to find the record that is missing a start date - once you update that record, the numbers should be one and the same on the dashboard and on the search.

Hope this helps!

Editing to include screenshot regarding my last comment:


Does CiviCRM support LDAP? Does CiviCRM supporting LDAP? Can we have a connection between LDAP and CiviCRM on a WordPress website?

CiviCRM's authentication is through the CMS - so you wouldn't connect CiviCRM to LDAP, you would use LDAP to authenticate to the CMS.  All CMSes that support CiviCRM support LDAP authentication.

If you would like to use CiviCRM as your LDAP source (e.g. to populate an address book in your email client with CiviCRM contacts) you can use ldapcivi.


Is there a way to schedule mails depending on whether or not a contact has opened a previous email? We are planning to take a lead capture action where we want to take two automated actions by email:

(1) Send an email the day after the contact is created in the CRM. This is possible through the Schedule Reminders tool.

(2) Send an email one week after the contact is created in the CRM only for those contacts who have not opened the first mail.

Is there any mechanism or functionality that will allow this second action to be performed?

I've investigated this before.  The answer is "no, not without an extension", but we decided that email open rates were never reliable (because most email clients don't download the images by default).  It can give you an aggregate sense of engagement but isn't accurate down to the individual level.


How to create an event with relationship to participant? We would like to run kids club every month. During Registration we use main participant profile as Child's details. But we also need to have contact details of parents in case of emergency.

I was thinking to create a custom data/profile with relationship but I was not able to find any option to do that.

What is the best way to capture the details of parent so a report can be easily retrieved with child & parent details?

Thanks

You can do this using webform for drupal or caldera for wordpress. The CiviCRM webform/caldera provides ability to add multiple contacts and relationship (and also events) on a single form.


Where is CiviCRM installed? I have CiviCRM installed on my web site, and some answers on Stack Exchange tell me to change a file in CiviCRM, or to find my "civicrmroot".  I know how to access the files on my server, using FTP or SSH or my control panel's "File Explorer".  However, I don't know where to look for CiviCRM.  Where is it?

If you're using CiviCRM 4.7 or higher, you can find this location by going to Administer menu » System Settings » Directories.  Click the blue circle with the question mark, and note the value for [civicrm.root].  See screenshot:


child groups do not display in manage groups list I just installed 4.7.6 and have imported contacts into groups. When I go to manage groups, child groups do not display. When I go to send a new mailing, child groups are listed but don't seem to be connected to parent groups.

My experience on 4.4 and 4.6 is that when I first go to Manage Groups the child groups are hidden under the parent group.  I need to click on the arrow to the left of the parent group name to see the child groups.

Is it different on 4.7.6?


Establishing Group Based Permissions to Limit Display of Content to Logged In User I have a Drupal / Civi application running which uses ACL to restrict contact data to the Drupal user whom is a member of the Group (the Group Admin).

Currently I have 5 Groups. However, each Group Admin is able to see administrative content of all other Groups.

I'm struggling to understand permissions and restricting the administrative contents of one group from another group.

Group contacts are properly restricted. However, even in Search > Find Contacts all Group Admins are able to see all other Groups in the Group Drop Down Selector. Search results produce no contacts, however Group Admin 1 should not be able to view Group 2 in the selector.

For another Example Mailings > Message Templates shows the templates for all groups to all users. The requirement is to limit the display of templates to those CREATED by the Group Admin whom is also a Drupal Logged In User.

What is needed is a permission Like View / Edit / Delete Own Templates

Similarly, Campaigns > Dashboard > Campaigns will show all campaigns to all users. The requirement is to limit the display of campaigns to those CREATED by the Group Admin whom is also the Drupal Logged In User.

View / Edit / Delete own Campaigns

There are other locations where permissions need to be managed but they are in the same context.

Is it recommended to do this with menu based permissions? What other approach should be considered? Any extensions that will help?

There is no such way to do this in Civi that I know of. There is no connection/ownership between a Campaign and a Group.

If you have a small number of groups, then yes i could see you doing this via some Views and Webforms whereby each 'group' has its own set of forms/lists and these show only the Campaigns etc which they should see.

I think I get what you are after but not aware of a simple method to do this.


How to Pay Later by Credit Card We have some events which require very early registration, that the participants would like to pay later by Credit Card (easier than cheque)

Being given the contact_id and the contribution_id, the user can open the Credit Card Payment Form (e.g. via a small php program which fetches those 2 ids and then opens the form) :

/civicrm/payment/add?reset=1&id=1275&cid=5289&action=add&component=contribution&mode=live

where : id=contribution_id  and cid=contact_id :

But then the user still has to select the payment processor (sorry for being in french : Passerelle de paiement), which may be confusing and source of errors.

Why is this necessary, since the payment is attached to a Contribution Page, which is itself attached to a Payment Processor ?

Is there a way to have the payment_processor_id parameterized in the URL (e.g. ...&ppid=xx) ? ... or smth equivalent ?

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


Civicrm Development (Coding) Environment Virtual Machine Is there a VM available for quickly and painlessly getting started with CiviCRM extension development (Wordpress) on Windows? Something that has buildkit installed. I just want to be able to get into learning extension development, on an existing environment that is read-to-go.

There's docker, there's vagrant but there isn't a pre-built VM setup.

I can probably knock something up next week if there's a demand for it (we have a local Ubuntu 18.04 BuildKit VM which we have templated for re-use.

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

We're also continually testing BuildKit on Windows Subsystem for Linux and this is so close to working with one issue remaining on the WSL platform which is preventing full functionality.


How to import notes? This might be a silly question - how do I import notes into existing contacts? I tried importing data to the Note field with the related Contact ID, which results in the following warnings - with no visible alterations to the records I'm trying to update. I can import memberships and activities but can't find the option for Notes anywhere.

    Warning: Illegal string offset 'code' in /wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php on line 969

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php:969) in /wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895*

The issue was due to unexpected multiple contact types in the same import file. Resolved by splitting import files by contact type.


Cautionary Tale: Drupal 8.7.0 upgrade Don't do it yet. We had an issue where the drush updb failed.

A fresh install then drush updb did work but simply updating drupal and civicrm with composer then running drush updb left database in a state where it could no longer be updated by drush.

I have no idea where the source of the issue is but the updb was complaining about null values in the database.

We ran the drupal8/civicrm install from scratch then updated the db and it worked fine.

Here's a link to the relevant drupal upgrade complaint thread:
https://www.drupal.org/project/drupal/issues/3052464

Luckily we try all of these things out in a mint copy of production vm first, before we actually do upgrades. This issue may or may not occur for you. Be careful!!!

-Neil

Found solution. It's at the drupal complaint thread above :-) cheers!

Here's a link to the relevant drupal upgrade complaint thread: https://www.drupal.org/project/drupal/issues/3052464


Cant find a way to access the CiviCRM $form object in Drupal I'm having trouble accessing the CiviCRM $form object on a Drupal site running CiviCRM.

In Drupal, I can use hook_form_alter() anywhere in code and make changes to any form object in Drupal. I'm trying to do the same thing for a CiviCRM form, but none of the functions or hooks seem to give me access to the $form object.

Also, I'm attempting to do this from a custom script with Drupal and CiviCRM  bootstrapped.  If someone could point me in the right direction, I would be most grateful.

[EDIT:] I've tried this, but can't get any data back for anything...

define('DRUPAL_ROOT', $_SERVER['DOCUMENT_ROOT']);
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

eval(`cv php:boot`); // to bootstrap CiviCRM according to their documentation

function mycustomhook_civicrm_buildForm($formName, &$form) {
    dpm($form);
    dpr($form);
    kpr($form);
    var_dump($form);
    print_r($form);
}

What am I missing?

@soupmagnet Welcome to CiviCRM world!

You can alter the form elements or add your own form element to any CiviCRM forms using CiviCRM buildForm hook. The documentation provided good example on how to do it. Please implement this hook either in CiviCRM extension or Drupal module.

HTH

Pradeep


Custom Fields not emailing Using CiviCRM 4.7.22 on Wordpress 4.8.22
We are having a problem with our contribution form submissions.  We have a Custom field.  When the member submits the form, the information from the custom field is added to the profile in the dashboard, but it shows up as blank in the email receipts to both the member and to the Admins. We need this data to show in the email receipts also.
Please see screenshots below for more details.

*******ADDITIONAL INFORMATION BELOW******

I noticed that when I add the custom field to the profile it says it is a "Primary" field, but when I go to edit it after adding it, it is no longer a primary field.  Why does it change?  Could that be what is preventing it from being included in the emails?

This is a "Contact" field, because we need it to appear below the Address area in the member's profile page on civi. It is just a simple membership, not multiple records.  I noticed that if I use an "Individual" field instead, it will work properly with the email, but the problem is it puts that field way on the bottom of the member's profile page in civi.  This really needs to be close to the address area.  So I guess the question is, why does an "Individual" custom field show the data in email receipts, but a "Contact" custom field won't, and how to do we fix that?

*****NEW IMAGE*****

The fact that you are seeing Primary suggests this has been added as an Address custom field, and it seems that these new-ish field types have not been fully integrated to receipting.

You have some options

1/ change your field to a standard Contact field and then edit your tpls to have the field show where you want it (this seems the 'right' way to fix this since otherwise you are using an Address field, with its options of Location Types, for a field that should not be offering Location Types)

2/ get the code improved so these fields do show in the receipts either by contributing a patch or funding a Partner to do this on your behalf and help grow this open source project.


Donor set recurring start date on a Drupal Webform Contribution Integration Drupal 7.67
Civi 5.13.4
iATSPayments

I have a webform for our contribution page. I just realized that with a civi Contribution Page I can allow donors to set the start date for their recurring donation. But that does not seem to be an option in the Webform settings.

Can I create a form component that uses the proper key to allow me to set this up in my webform?

The short answer is:

No.

Unfortunately Webform CiviCRM integration does not currently support selecting the start date for a recurring contribution.

The longer answer is that it would not be impossible nor incredibly complex to add this field as a supported option for the CiviCRM integration to allow you to expose this option via Webform & CiviCRM.


french Installation of civicrm 5.27.2 on drupal 8 i want to install civicrm in french in my drupal 8.9.2 website. after following the instruction in this website https://lab.civicrm.org/dev/translation/-/wikis/Administrator-Guide. it's not work for me. please show me the best method install
cheers

If you've already installed civi and you're able to get to the administer - localization - languages page, then the following is probably the simplest at this point:
In civicrm.settings.php (in web/sites/default), add this line to point to the l10n folder:
define('CIVICRM_L10N_BASEDIR', '/full/path/to/l10n');
OR
Move your l10n folder into vendor/civicrm/civicrm-core.
The first is slightly better because you can put l10n somewhere that won't get deleted when you upgrade, so then I'd also move l10n somewhere completely outside civi.


Upgrade fails with Row size too large error Upgrading CiviCRM from 4.6.26 to 4.7.16 is failing at step Upgrade DB to 4.7.beta6: SQL with the following error:

  ALTER TABLE civicrm_event ADD COLUMN max_additional_participants
  int(10) unsigned DEFAULT 0 COMMENT 'Maximum number of additional
  participants that can be registered on a single booking' AFTER
  is_multiple_registrations [nativecode=1118 ** Row size too large (>
  8126). Changing some columns to TEXT or BLOB or using
  ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row
  format, BLOB prefix of 768 bytes is stored inline.]

Everything I can find says that this is a fairly fundamental MySQL restriction but I can't find any much trace of people hitting it with CiviCRM at all.

The MySQL server version is 5.5.54 which should be supported, and I have tried increasing the InnoDB log file size from 5Mb to 48Mb as some things say that will help but it made no difference.

Ok so the problem is Multi Lingual with CiviCRM adds a per language column to the tables where its needed. In the case of the civi_event table this is one of the most troublesome as it has quite a lot of columns that are needed in the different languages.

What I've done to get round this in the past is clear out the relevant data from the fields i.e. create a copy of civi_event as it stands, delete the data in the multilingual description and then try the upgrade again. This was in the earlier versions of MySQL where the rowsize wasn't really controllable.

More recent versions of MySQL have some config options to allow you to setup your MySQL a little differently, I haven't tried the file format options in this thread but we do run table per file regularly.

https://stackoverflow.com/questions/15585602/change-limit-for-mysql-row-size-too-large

Please do let us know how you get on, its a common problem for multi language CiviCRM installs.


Household member last name shows twice When we look at the household member is and pull up a record, it shows the household member last name twice, eg Bartlett,Bartlett. However when you click on this it shows the proper name, eg Peter Barlett.

Any ideas

Fixed this after looking at the import of data. Remedy was to highlit the double name and click edit then save. it reset the data correctly. Did this via a bulk update


How to display remaining available spots for an event on the public page We need to display how many spots are left for registration on the public event registration page. Is there a way to do this?

If you haven't done this already - I recommend customising the template. I have experience of doing this. You'll want to create a templates override file, and then embed some PHP that accesses the remaining places. It's fairly straightforward. If you want me to go into more details then please message me!


How do I make street address not a required field? When creating a contributions page for member dues, street address, city, country are all required fields. I do not want them to be. How can I make them not-required fields?

First, find which profile is being used in your contribution page by going to Contributions/Manage Contribution Pages/Choose relevant Page and select Configure over on right hand side of screen/Include Profiles.  This page will show which Profile is being used.

Second go to Administer/Customize date and Screens/Profiles.  Find the relevant Profile title and select Fields on the right hand side. This page shows all the fields in use and whether they are required or not. In each field, hover over Yes or No and change them as you wish.

Hope this helps.


Email Redirect to Database setting for civicrm-settings.php? ola, i just stumbled upon the https://github.com/ixiam/com.ixiam.modules.mailreader extension and would love to use it on our dev/stage environment.

It enables a ui to read email that were redirected to the database. now my question is: is it possible to enable DB email redirect with a line of code in civicrm.settings.php?

When copying production databases to dev & stage it would be great to be able to override the mail setting to redirect to the database.

So far I only found
define('CIVICRM_MAIL_LOG', 1); and
define('CIVICRM_MAIL_LOG', '/dev/null');
as available settings in https://docs.civicrm.org/dev/en/latest/tools/debugging/

Yes its possible to set Outbound email to 'Redirect to Database' by simply adding 2 lines in your civicrm.settings.php

global $civicrm_setting;
$civicrm_setting['Mailing Preferences']['mailing_backend']['outBound_option'] = 5;

Note: If global $civicrm_setting; is already present then no need to add it.


How do I add a new settings page for my extension? I am trying to develop a module extension which needs to store some settings, I went through the documentation and found this to be the way to create settings.

Now when I put default as NULL the setting is not reflected in the table, if I put any value as default the setting is added to civicrm_setting table.

Also, though the settings have option to specify attributes for admin form, I couldn't figure out a way to present a new settings form for my module.

Is there anything else which I need to do apart from adding the setting folder and the following code to extension.php

function multisite_civicrm_alterSettingsFolders(&$metaDataFolders = NULL){
     _multisite_civix_civicrm_alterSettingsFolders($metaDataFolders);
}

You'll want to start with the civix generate:form command. Alter the generated code to have your form class extend CRM_Admin_Form_Setting instead of CRM_Core_Form and then follow the example of other such forms by declaring the settings that form is supposed to manage.

You may also wish to insert a link to this form into the navigation menu.


What is the easiest way to set up cron for CiviCRM on a Drupal 7 installation? I have created a test instance of CiviCRM that uses Drupal 7 as the CMS. It's running inside a Ubuntu Desktop virtual machine that has a LAMP stack installed on it (Apache2, php7.2 and mySQL).

I am very new to Linux and would like to set up a cron job to run CiviCRM's scheduled tasks. I have looked at https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/, but I confess that I find it confusing. I haven't set up any cron jobs for Drupal, either. Can anyone help me, please?

Many thanks in advance,

Daniel

Welcome to SE!  Setting up cron can be confusing since there are many variations and it touches several aspects: OS users & permissions, CMS users & permissions, other tools, cron - and the details depend on your hosting environment.

I've just re-read the page you linked to.  It has the information you need, but it also has other options that you don't need, so work through that step by step.  (I've also submitted a few clarifications.)

So, following the 'Preparing' section and assuming a typical Ubuntu installation:

Choose a command:  I prefer the cv method
OS User: Ubuntu typically uses 'www-data' to run Apache. (Adjust below if different.)
CMS User: Create a Drupal user (eg 'cronuser') with the listed permissions

If you don't have cv installed already, go ahead and install it.

Check that you can run the command manually:

$ sudo -u www-data cv api job.execute --user=cronuser --cwd=/var/www/html

(If your installation is not under /var/www/html adjust accordingly)

Then add it to the crontab for www-data:

$ sudo crontab -e -u www-data


time taken for smart group updating How quickly should I expect my smart group to update?

I use smart groups to do calling from and data usually gets altered as a result of the call. However in order to get the the smart group contacts to update I have to clean the cache (or wait for the job to run).

Is this correct?

there is also a link at civicrm/group?reset=1 where you can 'update smart group counts' which uses this path /civicrm/group?reset=1&update_smart_groups=1 so you could probably put a Menu item in with that destination if it is something that you need to do frequently.

There is also a setting at civicrm/admin/setting/search?reset=1 where you can reduce the "Smart group cache timeout" (The number of minutes to cache smart group contacts. We strongly recommend that this value be greater than zero, since a value of zero means no caching at all. If your contact data changes frequently, you should set this value to at least 5 minutes.)


CiviEvent: Could not find valid value for id (Drupal 7.6.1) Using CiviCRM 5.7.2, using Drupal 7.61.

I thought I had fixed this error but it looks like my fix has created another problem... or at least another error has decided to appear.

This is an intermittent error, have not been able to replicate yet but had it reported by a member of our staff.

Upon registering for an event with event registration turned on, and confirmation screen / emails turned on, and payment turned off, the user receives this error message.

Could not find valid value for id

This error seems different to other similar reported errors in that the registration does not go through. The user does not see the confirmation screen, they do not receive the confirmation email, and their registration does not feed into CiviCRM.

Went into the drupal error logs and saw the following errors:

$Fatal Error Details = Array ( [message] => Could not find valid value for id [code] => )

and

$backTrace = #0 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(381): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Utils/Request.php(121): CRM_Core_Error::fatal("Could not find valid value for id") #2 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Event/StateMachine/Registration.php(52): CRM_Utils_Request::retrieve("id", "Positive", Object(CRM_Event_Controller_Registration), TRUE) #3 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Event/Controller/Registration.php(47): CRM_Event_StateMachine_Registration->__construct(Object(CRM_Event_Controller_Registration), TRUE) #4 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Event_Controller_Registration->__construct("Event Registration", TRUE, "null", NULL, "false") #5 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15)) #6 /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3)) #7 /home2/ppe/public_html/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3)) #8 /home2/ppe/public_html/includes/menu.inc(527): civicrm_invoke("event", "register") #9 /home2/ppe/public_html/index.php(21): menu_execute_active_handler() #10 {main}

(sorry, not sure how to put that code as a block rather than a massive horizontal scrolling box)

Another user has also reported receiving a 500 error, I'm not sure if it's related. This is what Drupal error log says about their 500 error:

Warning: in_array() expects parameter 2 to be array, null given in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2128 of /home2/ppe/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php).

Anyone encountered anything similar? For now I've just disabled confirmation emails altogether until I work this out.

Cheers,

After doing a lot of trial and error and closely analyzing the complaints we have received, I'm fairly sure that the cause of the problem is: you register one person, then click back on your browser and try to register a second. Your browser doesn't properly refresh the page and somehow the id of the event is lost in the process.

I'm not sure what the best fix is - but I'm fairly certain that is the cause.


Javascript MIME type mismatch error after server move I have moved the installed civicrm with Drupal from windows PC to Linux PC and changed the civicrm settings file. Everything working fine but only the javascript files are not loading.

  The resource from
  “http://localhost/drupal/sites/all/modules/civicrm/modules/templates/CRM/Member/Form/MembershipStandalone.js?os8oog”
  was blocked due to MIME type mismatch (X-Content-Type-Options:
  nosniff).

I went to the folder paths files are exist. How to overcome this issue

The X-Content-Type-Options: nosniff header is a security measure that prevents the browser from attempting to detect the MIME type of a download automatically, as this behavior can be exploited for certain kinds of attacks. The browser will block requests for stylesheets and scripts which are not delivered with a CSS or Javascript MIME type, respectively.

In practice, this means the web server is unable to load the resource for any of several reasons:

The resource is missing
The file permissions on the resource prevent it from being loaded by the web server
The web server is not configured to deliver .js files using a Javascript MIME type

Please confirm that the file exists, that you have followed all the instructions for moving an existing installation, and that your server is configured correctly, including file permissions and Javascript MIME types. In particular, since this file is loaded in a custom template, you should confirm that the path has not changed.


How to set user permission for a particular user? I have two accounts. One is admin and another is observer.
I want only read-only permission for demo account.
Please help.
If I logged in by observer account then that CiviCRM option not showing on dashboard.

Dipak,

You will need to add permission for roles to access certain CiviCRM functionality. You can do this by navigating to CiviCRM >> Administer >> Users and permisions >>Permissions (Access Control). And then click on Drupal Access Control. Give permission to specific role and save the form.

HTH

Pradeep


Mosaico email template extension or Mailchimp email integration? As a small NGO we are about to Upgrade CiviCRM from 4.1.3 to current version 5.9 (as at 18/01/19) and  Migrate CiviCRM from Drupal 6.35 to WordPress CMS.

The two quotes we have offer Mosaico email template extension or Mailchimp email integration. Which woudl work best for an organisation sending out about 10-12 emails a year to 2-3,000 people? What are the pros and  cons of each?

Many thanks
Margaret

We recommend Mosaico so that all the data stays in CiviCRM. Has it been explained to you that Mosaico works as 'part' of civicrm not as a third party service and hence no 'integration' or 'charges'?


Personal Campaign Pages don't have a donate button We are using version 4.6.3 on Drupal. Our Personal Campaign pages aren't displaying a donate button on them: it just has a link to have people make their own PCPs, and the honor roll and thermometer.

Does anyone know why this might be the case?

Thanks!

Looking at the code, I can see that the donation button only appears if $validDate is TRUE and $contributeURL is TRUE.

Enable debugging (Administer menu > System Settings > Debugging and Error Handling, select "Yes" to "Enable Debugging"), then reload your PCP page, adding this to the end of the URL: &smartyDebug=1.  You'll get a pop-up showing all your Smarty variables.  Make sure that there's a value for both $validDate and $contributeURL.

My guess is either:

You're before the PCP begin date;
You're after the PCP end date;
Your server has the wrong time set.

PS - also make sure there's a value set for $contributionText.  You can set this by editing the PCP and filling in the value for "Donation Button".


Civicrm SagePay takes the primary address as billing address I just came across this error in Civicrm. We have sage pay payment intergration with our site.

The issue is that even when someone enters the billing address civicrm passes primary address to sagepay . This is a general issue and is happening with all the module ie - civiEven, Contribution,

My assumption is an error in the payment processor that passes the values to sage pay

Any thoughts are highly appreciated.

ex :

apparently its something to do with the circle interactive sagepay payment plugin


How can I configure the automated messages such that when someone sings up to list A they get message A, and for list B, they get message B? When someone signs up to a Civi mailing list group through a profile or webform, they get sent the default automated subscription confirmation message.

Is there any way of customising that message such that different messages can be sent based on the group/s that are being signed up to?

This looks like it might be a useful way to get around the limitations of CiviCRM in this respect? How to create custom opt-in email for webforms

Perhaps turn off the automated sub and then use CiviRules to fire out an email based on which Group you added them to.


Does CiviMail have an upper limit for total recipients in an email blast? I have a client that would like to create an email blast to 50,000 or so constituents, and we are currently evaluating CiviCRM to handle this. I've noticed the documentation says that CiviMail is good for email blasts sent to over 50 constituents, but I can't find any mention of whether or not there is an upper limit.

Absolutely - that can be done - the 50 is just a reference to the Search -> Find Contact screen -> Search -> Select -> Actions -> EMail send now (to 50 or less) option.

When sending out lots of CiviMail to lots of CiviContacts best to use an external SMTP service to help you with the Email delivery - and to minimize the risk that your webserver will be blacklisted.

UPDATE an actual number from one of my clients' civicrm tables -> intended recipients: 89419 And I'm sure there were larger mailings.


cron jobs stopped working under Joomla 3.9.13 and CiviCRM 5.18.4 I am involved with three CiviCRM instances, a live one under LAMP, Joomla 3.9.13 and CiviCRM 5.18.2, a test one under LAMP, the same Joomla version and CiviCRM 5.18.4 and a development environment running under Windows 10, IIS, the same Joomla version and CiviCRM 5.18.4.  The live environment is OK, the development environment is OK, but cron jobs are not running in the test environment.  The PHP log file gives these two errors:

[07-Nov-2019 19:05:30 Europe/London] PHP Warning:  ini_set(): A session is active. You cannot change the session module's ini settings at this time in <joomla_root>/libraries/joomla/session/handler/joomla.php on line 48
[07-Nov-2019 19:05:30 Europe/London] PHP Warning:  session_cache_limiter(): Cannot change cache limiter when headers already sent in <joomla_root>/libraries/joomla/session/handler/native.php on line 235

The command line is:

wget -q -t 1 'https://<example.com>/administrator/components/com_civicrm/civicrm/bin/cron.php?name=<user>&pass=<password>&key=<key>'

I've tried clearing the session table, but it hasn't helped.  Debugging is difficult - I've tried the error_log() function to track what is happening, but not very successfully; PHP doesn't always write to the log file.

Can anyone suggest where I should look?  I hesitate to update the live environment until the test environment is working properly.

I had difficulties getting cron.php to log progress and, as the issue was on a remote server would have difficulties debugging.  As a consequence, I rolled the CiviCRM installation and database back to backups taken before the issue occurred, and then reinstalled the CiviCRM upgrades.  The cron job now appears to be working.  Fortunately, the problem was on a test system so it didn't matter about any recent work.  Had it been on a live system, it the issue would have been much more serious.


Should civicrm_participant.registered_by_id be an FK to civicrm_contact? While troubleshooting for a different question, I noticed that civicrm_participant.registered_by_id is an FK back to civicrm_participant.id. Since it's a common use case for one contact to register others and not him/herself (e.g. buying event tickets as gifts for friends), should this be an FK to civicrm_contact.id?

I think there is some of the code related to payment processing that assumes the registered_by_id is the participant under whom payment has been made. Any changes to the schema would need to account for that. Thats probably the primary reason the FK is to civicrm_participant


Check last login of CiviCRM users I am using CiviCRM in WordPress. I just need to know how to check last logged in CiviCRM's user details.

Any helpful response will be very grateful.

Thanks

That's more a CMS question - for Wordpress check this: http://www.wpbeginner.com/plugins/how-to-show-users-last-login-date-in-wordpress/

Users log in using the CMS that is attached to CiviCRM: Drupal, Wordpress, Joomla, Backdrop (not CiviCRM itself).


Export to csv/xls with a template I have a customer who is an old-aged volunteer and is not so familiar to spreadsheets but still needs to use them until the whole database is imported and I want to make the export from CiviCRM easier to use for her.

I know this is a weird question because the first answer is: "don't use spreadsheet or at least learn how to use them" but I was wondering if there is a way / extension to help doing this:

export to excel with the possibility of choosing and arranging columns

Any Idea?

regards,

Guilllaume

To address the export to excel part of the question, you can use this (well-written and maintained) extension:

https://civicrm.org/extensions/export-native-excel

But the field ordering is harder - by default, you can't change that.


Dog as sub-contact type of individual but they have no last name We've seen references to use a individual sub-contact type (CiviCRM for animal rescue charity) but the issue is dogs do not have last names. Atleast, not always ;)

So how have people handled this? Adding in a placeholder for last name is a workaround I want to avoid. I think the best situation is to disable last name only for a certain sub-contact type or add in the CID to the last name field.

Depends what you want to do with the dog contacts, but another option for your last name question would be to use a sub-type of Organization rather than Individual since that only requires a single name.


Upper case in address format Addresses are printing in upper case even though the data in the table is in title case: i.e. NEW YORK vs. New York

I can't seem to find a setting that will allow labels and address blocks in message templates to be all title case. What am I missing?

thanks

If you use the address standardization functionality with the USPS, it will return all addresses in upper case. This likely isn't your problem as you state the data appears in title, but I think it's worth flagging for those with similar issues.


Date confusion with relationships - start date can be later than end date When adding relationships, I have found that the start date entered can be a later date than the end date of the relationship without any error being indicated.

Is this intentional or can I "fix" it so that a user cannot enter a relationship with this error as displayed below

This is almost certainly not intentional.  You can fix it if you're a programmer or have access to one!


How do I load javascript only on pages with CiviCRM loaded on them? I'm trying to load a civicrm function. What is the recommended way to load 'CRM' checking that it is available on the page first?
CRM.$(function ($) {
  'use strict';

   ...

  addObserverFormErrors();
})

I've wrapped it with try / catch
try {
  CRM.$(function ($) {
  )(CRM);
} catch (e) {}


Updating CiviCRM Module in Drupal 7 Here is what happened...
I was doing an update to CiviCRM (through the recommended process) from .10 to .15.
After I copied the files over, I was getting a 500.
So I checked the log and I was getting an error message:
Notice: Constant CIVICRM_MEMCACHE_PREFIX already defined in include_once() (line 310 of /home3/isrcus/public_html/sites/default/civicrm.settings.php).
and the next one:
Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; backup_file has a deprecated constructor in require_once() (line 279 of /home3/isrcus/public_html/sites/all/modules/backup_migrate/backup_migrate.module).
Why am I getting those error messages?
Thanks!
Kevin

Check what settings you have for CIVICRM_MEMCACHE_PREFIX in your civicrm.settings.php file. You can't define a constant more than once.  Maybe copy/paste the relevant sections into your question.  Don't include the whole file.
The 'Deprecated function' relates to the Drupal backup_migrate module - nothing to to do with CiviCRM.  Have you just changed php version?  That message relates to a changes introduced in php 7  Make sure your Drupal modules are updated.


CiviCRM Integration with SMS Gateway custom API How to send SMS using the API when the CRM user will open a new case.

The SMS gateway has it's own API and I know how to integrate with it. I tried to edit in the code but it's very big what's usually we should do in these cases.

If I will edit in the code which editor should I use and how??

You'll need to write an extension that implements a CRM_SMS_Provider interface.  The Twilio extension is a good example of this.


How to add a profile with a fieldset that accepts one or more entries for event registrations I'm not sure that this is possible but here goes:
I have a requirement to collect data from Event Registrants of University Programs that they have undertaken and the years of study they have undertaken. This is not limited to a single entry for the program and each program entry can have 1 or more years of study.
So an Entry could look as follows:
Program of Study: Basket Weaving
Years of Study:

1972
1973
1974

Ideally I would want to have multiple fieldsets of the Program of Study and Years so the registrant could list one or more programs they undertook and the years they undertook for it.
In that case it would look like:
Program of Study: Basket Weaving
Years of Study:

1972
1973
1974

Program of Study: Advance Basket Weaving
Years of Study:

1982
1983
1984

One approach would be to use Activities. Set up a custom Activity with the required fields for Program, Year etc
Another approach might be Multiple Record custom field


How to use Campaign ID (as a token) in Contribution Invoice/Email Receipt Template We use Campaign ID (renamed using Word Replacer to "Project ID") to categorize different kinds of contributions. Some come in through online contribution pages, and some are entered manually on CiviCRM after we receive cash or checks.  I am customizing the "Contribution Invoice Receipt" system workflow message, and I tried to show the Campaign ID by using:

{$contribution.campaign_ID}
{capture assign=project_id1}{contribution.campaign_id}{/capture}{$project_id1}

None of these pull up the Campaign ID. And how come there are already contribution related fields in place in the template, such as $contribution_status_id or $amount? Is there a full list of fields available somewhere?

Once I identify the campaign id, I'm hoping to run something like

{if $campaignid==15}
Thanks for donating to Project 15! Bla bla (custom text)
{elseif $campaignid=17}
Thanks for becoming a member! Bla bla! (custom text)
{else}
Thanks for your donation! Bla bal (generic text)
{/if}

So after searching further into the StackExchange I found this, which shows you can get the full list by inserting {debug} into the template, then the template outcome will show it as an email Javascript when viewing the source.
Here is the cleaned up debug results, which indicates that the token to use may be $formValues.campaign_id. I then tested it, and turns out that it works on Contributions - Receipt (offline) and online, but not in Print Invoice.

Here is the list of formats that didn't work. (It seemed that on some paratemers CiviCRM was case sensitive)

{$contribution.campaign_ID}
{$contribution.campaign_id}
{$contribution.campaign_Id}
{$contribution.project_ID}
{$contribution.project_id}
{$contribution.project_Id}
{$contribution_campaign_id}
{$contribution_campaign_ID}
{$formValues.campaign_id}
{$formvalues.campaign_id}
{$formTpl.campaign_id}
{$campaign_id}
{$contributionProjectId}
{$projectId}
{$ProjectId}
{$contribution_Project_Id}
{$contributionCammpaignId}
{$campaignId}
{$CampaignId}
{$campaignid}
{$contribution_campaign_id}
{capture assign=project_id1}{contribution.campaign_id}{/capture}
{capture assign=project_id2}{contribution.Campaign_Id}{/capture}
{capture assign=project_id3}{contribution.campaign_Id}{/capture}
{capture assign=project_id4}{formvalues.campaign_id}{/capture}
{capture assign=project_id5}{formValues.campaign_id}{/capture}
{$project_id1} {$project_id2}  {$project_id3}{$project_id4}{$project_id5}
{$contributioncampaignID}
{$value.campaign_id}
{$formValues.33}
{formValues.campaign_id}

First off, I realize I am extremely late to the party - but I just read this question in the midst of trying to resolve a similar issue where I needed to know what template variables are available to a PDF template.

What I did to find template variables when {debug} isn't working for a direct download etc was:

In /CRM/Core/Smarty.php, Line 192 temporarily change

$this->security = TRUE;

to

$this->security = FALSE;

Let me emphasize that this is for a development environment ONLY. Please please please under no circumstances do this on a production site (you are turning off very important security features, I cannot emphasize that enough).

Now we can call protected functions in our smarty templates to print out all template variables in several ways. I did it this way:

<pre>
{php}print_r(CRM_Core_Smarty::get_template_vars());{/php}
</pre>

From a quick glance at that, it didn't look to me like campaign information is available to this template already, and it looked like contribution_id  is only available under 'line_item'... so I would put something like this in the message template (check out /civicrm/api/explorer for more examples):

{foreach from=$lineItem item=value key=priceset}
  {crmAPI var='result' entity='Contribution' action='getsingle' sequential=0 return='campaign_id' id=`$value.contribution_id`}
    {foreach from=$result item=youritem}
      {$youritem.campaign_id}
      {$youritem.contribution_campaign_title}
  {/foreach}
{/foreach}


What's the best way to import memberships and their associated contributions? I have a load of Memberships to import. Each has a linked Contribution.

While I can import Memberships and Contributions separately, I cannot find a way to import the two together - in other words there does not seem to be an import routine in any version of CiviCRM which can create an entry in the member_payment table.

In the past I have done this through SQL, which is a bit fragile as a solution. I have been thinking of an API-based approach. But it seems strange if this has not come up before. I haven't even seen any code for this. Is there something out there which I am missing?

This is doable using the API, and I've accomplished it using Pentaho Kettle.  It has a CiviCRM Input and CiviCRM Output step, which use the REST API.  You're right to be concerned about the SQL-based approach, since there's been discussion of deprecating that table in favor of a line item-based approach to connecting contributions and memberships.

If you use Kettle, you can see my example code here: https://github.com/PalanteJon/aceware_civicrm_kettle/

If you decide to go with the CSV CLI tool, you'll run into trouble, because your output won't contain the ID of the created memberships and payments to create the MembershipPayment record.  So you can either a) use API chaining, or b) do what I did in Kettle, parse the JSON that the API outputs and use that to create your MembershipPayment record.


CiviEvent Widget: Event Title Not Showing on Event Info Page I am using the CiviEvent Widget in the sidebar of my website.  Normally, clicking on an event's title in the sidebar brings up the event's info page just fine; same with clicking on the Register button for that event.  However, if I happen to be sitting on a page with a Civi form on it (like an email list signup or donation page), when I click on that same event's title in the sidebar it brings up the event's info page but without the title!

I'm using Wordpress 4.9.9  and Civi 4.7.29.  I use the CiviCRM Admin Utilities plugin to disable the Default CiviCRM stylesheet and the CiviCRM Menu stylesheet, and style ourselves the civi-generated pages.  But when I Inspect that event page missing the title, I don't even see it there in the html to display.  This in-development website is at test.californianational.party

Does anyone have any ideas on how to go about solving this, especially from AGH Strategies or Christian Wach?  Thanks!

This is a bug in CiviEvent Widget - though an understandable one.

The widget uses CRM_Utils_System::url() to construct URLs to the CiviEvents but -- when the widget is viewed on a page/post where there is a CiviCRM shortcode present -- the url() method returns public-facing URLs using the permalink of the page/post instead of the WordPress "basepage". FWIW, the reason for this is that the CiviCRM forms treat the post where the shortcode is embedded "as if" it were the basepage.

The solution would be for CiviEvent Widget to construct URLs that always point to the WordPress basepage, whose "slug" (which is its $post->post_name) is available via $config->wpBasePage. Something like this in its code:

$config = CRM_Core_Config::singleton();
$slug = $config->wpBasePage;
$post = get_page_by_path( $slug );
$basepage_url = get_permalink( $post->ID );

Indeed, I see that the plugin already accesses the basepage slug so it's almost there.


Wrong return URLs in PayPal Standard I'm using the api to process contributions from some custom pages I have created, specifically the call to civicrm_api3('Contribution', 'transact', $params).

When I use PayPal Standard as my payment gateway how do I get the Cancel URL and Success URL to point back to the pages I have created? I can't see a way to override the default urls.

The Success url is http://example.com/administrator/?option=com_civicrm&task=civicrm/contribute/transact&_qf_ThankYou_display=1&qfKey= However I would like to redirect to http://example.com/index.php?option=com_xxx&task=payments.success

The Cancel url is http://example.com/administrator/?option=com_civicrm&task=civicrm/contribute/transact&_qf_Main_display=1&cancel=1&qfKey= However I would like to redirect to http://example.com/index.php?option=com_xxx&task=payments.cancel

Do I need to create my own Payment Gateway that inherits from the PayPal Payement Gateway?
Or can I redirect the CiviCRM Tranact pages to point to the pages I need?

I used the alterPaymentProcessorParams Hook to override the parameters 'return' and 'cancel_return'.

The code looks like this:

function civicrm_alterPaymentProcessorParams($paymentObj,  &$rawParams,  &$cookedParams)
{
    if ($paymentObj->_processorName == "PayPal Standard")
    {
        if (!empty($rawParams['successUrl'])) {
            $cookedParams['return'] = $rawParams['successUrl'];
        }
        if (!empty($rawParams['cancelUrl'])) {
            $cookedParams['cancel_return'] = $rawParams['cancelUrl'];
        }
    }
}

$rawParams is the parameters that you passed to the payment processor in CiviCRM and cookedParams is what is passed from CiviCRM on to the Payment Site.


Bounce processing using oath-client with GSuite: Required parameter not passed: "refresh_token" Using CiviCRM 5.37.2.
I'm trying to use the oath-client extension to do OAuth authentication of a Google Workspace (GSuite) account for bounce processing. The credentials are created on the Google side of things, and when I set up the Mail Account in CiviCRM and assign it to bounce processing, it works; "Save and Test" responds positively. And if I then go to the Scheduled Jobs and immediately execute the Bounces Fetcher job, it completes successfully.
However, after a little while, it fails to run, with this error:
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Bounces fetcher with result: Failure, Error message: Could not connect to MailStore for [the email address used for bounce processing]
Error message:

Required parameter not passed: "refresh_token"

Is this a problem with the oauth-client extension, or have I mis-set a setting somewhere in CiviCRM?

It's a known issue with using google + civi oauth. See https://lab.civicrm.org/dev/core/-/issues/2184


Cannot Find Civicrm.settings.php file I'm relatively new to CiviCRM so this might sound like a question with an obvious answer.

I have set up my cron for my drupal CiviCRM site with easycron.com and have found that it always reports back the same error:

Could not load the settings file at: /home/content/06/10588406/html/sites/all/modules/civicrm/../../../default/civicrm.settings.php

Now, I have gone through and verified that I have followed the instructions (I even created a new site with absolutely no purpose other than to test this issue with civicrm) and it come up with this error too. All of the requirements are met, permissions checked, everything...

So what can I do to change this? Is there anything I can hardcode into the civicrm config file? Or does anyone know where I might find the directory that it's currently looking in to paste a copy of the civicrm settings file (currently located in /sites/default) into it?

Thank you!

Matt

the path suggests a problem which i can't suggest the fix for, but if it helps I would expect to have the civicrm module at

/sites/all/modules/civicrm

which it looks like you have but the settings file would be at

/sites/default

not at

sites/all/modules/civicrm/../../../default/civicrm.settings.php


Using an External (custom) Table in a Custom Report I have several custom tables that I have created for use with extensions that I have built.

I would like to use those tables in a custom report. What is the best approach for this? I checked the documentation and did not see anything clear.

I appreciate any direction for this!

Check out an example here - this is a report that joins tables the extension creates/maintains with other civicrm core tables to produce this report:

https://github.com/jake-mw/CDNTaxReceipts/blob/master/CRM/Cdntaxreceipts/Form/Report/ReceiptsIssued.php


How to create a new contact type other than "Individual", "Household", or "Organization"? Sorry if this is not the best place to ask or if I sound vague, I am very new to CiviCRM and would be grateful for any advice I can get.

I am using CiviCRM for a local nonprofit animal shelter. Currently I have the pets stored as an "Individual" subtype, and added a custom field group for Pet Details that I basically would want to replace the "Contact Details" section, since none of that information is relevant to a pet. I'm starting to think that a better course of action would be to somehow create an entire new contact type just for pets.

My options are to either try to hide the "Contact Details" section of the pet subtype, or create a whole new Contact Type just for pets. I'm not sure how to go about doing this or if there is even a way to do this without editing the core code of Civi.

Thanks in advance, any advice is greatly appreciated.

it may be also worth familiarising yourself with what https://github.com/civicrm/org.civicrm.contactlayout can do in terms of changing the configuration of the Summary Screen. It allows you option of creating multiple layouts but i don't recall if they can be contact sub-type specific but am pretty sure it does

ah yes

  Managing Multiple Layouts
  The "Show" option can specify a contact type, e.g. if a layout is specifically designed for Organization contacts rather than Individuals.