How can I limit the participant role choice? I've been using CiviCRM for a few years now, mostly for basic functions (small NPO organizing events).

I'm trying to use a function that seems common to me but I feel that I'm missing something because I can't find any information about it.

I've tried almost everything within the interface. I have no knowledge or experience in coding script or stuff like this. But I can try following instructions.

Here is my case:

Our NPO set up LARP events for everybody.
-Anyone can register and choose a participant role.
-We mostly have these possibilities: Player, NPC, Volunteers, Artist, Organizers.
-Every participant might have custom field related to his (participant) role
-We'd like to let people choose their role properly instead of batch changing it based on the selected price in the set.

BUT:
As we also organize other types of event like conferences, where participant roles are not the same.

We would to like to be able to allow registering participants to select a role within a limited list which does not include every role set in CiviEvent
(How) can we do this?

PS I can give you any details you might find useful.

I don't know if this feature will be released one day but I would find it pretty useful.
You could select a role list base on an event type or template.

However this extension just came out a few days after my question, and it could help if anyone is in the same situation.


Membership Types vs Groups vs Organizational Types vs Relationships Still new to CiviCRM and grateful for opinions and advice. We have several types of relationship with organizations. We do not charge anything for any type of relationship.  Relationships are managed in the backend only, hence controlled by staff members who login to backend.  Relation types include endorsers, partners, affliates, council, past council, volunteers, etc.

Some groups will be listed and published on the website, so I know to manage them as "groups" since that is the only way to have a public list on a website.

What is the best way to handle the rest? Membership doesn't seem to fit since it requires some financial relationship, although 'zero' is possible.  Perhaps this is just a multiselect custom field?

These are not the easiest of questions and we may take different approaches. EG we tend to use Custom Fields a lot more than Tags, others do the reverse.

Sometimes it only becomes clear after you have set things up and used them one way, and therefore it can make sense when trying civi out to try multiple approaches.

As you have spotted, Groups are the solution if people are signing up for eg Mailing lists, but even then it could be that the Group is a Smart Group built off a custom field.

To take a stab at your list examples like Endorsers sound like a Tag.

But a Relationship (civi term) is good when you want to keep track of start/end dates, eg if someone was a Partner in 2012-2014 since the history is recorded.

Similarly when you say 'Council', if you mean eg John was on the Council in 2012, then creating a 'contact' for 'council' and giving John a relationship of eg 'council member' means you can both see current council members, and former ones.

Also which CMS you use can make a difference, for example in Drupal you can use Views to publish members of a council, by constructing a View based on Civi Contacts that uses the drupal and civi concept of a Relationship to show all the contacts who have a current Relationship to the contact that is your council.

Hope that helps a bit


How to create a custom filter in CiviCRM manage event page? How can I add a custom field (stored as a field in Drupal db) under Manage Events page ,which will be displayed as dropdown.
Event Status with values Pending or Approved.

How can I alter the filters added as seen in the image?

I would create replica of Manage event using Drupal views with same columns and filters as of Manage event screen.

If you still want to use the same screen then use pageRun hook to manipulate results by generating query and creating results and assigning to template

$page->assign('rows', $manageEvent);

Cheers

Pradeep


installation de CiviCrm "Parse error: syntax error, unexpected '$this' (T_VARIABLE) in C:\Program Files (x86)\EasyPHP-14.1VC9\data\localweb\wordpress\wp-content\plugins\civicrm\civicrm\CRM\Core\DAO.php on line 1124"

Résultat de (installation copier dossier civicrm dans répertoire plugins.)

ou

" le lien est expiré" résultat de (installation à partir de téléverser une extension, fichier zip.)

j'y comprends rien.

merci

Philippe, Welcome to CiviCRM SE.

It looks like your server is using older version of php. Can you please check here if your server is using any one of the ones that are incompatible? If so you will need to upgrade your php.

Cheers

Pradeep


How to remove contacts without affecting events attendance data Is there a safe way to remove/delete/deactivate CiviCRM contacts who have attended events, without affecting the events attendance data?

First of all: there is NO way in which you can delete contacts without affecting events attendance data.

I would try in a test environment to trash CiviCRM contacts that have attended events and check if you still see what you want to see.
(And also it will help if you explain what you mean by attendance data)


Why is the entity.action permission sparse? I've recently been exploring the $permissions array that drives API actions and extracted the metadata from the logic to allow displaying as a nice table.

The CRM_Utils_Hook::alterAPIPermissions($entity, $action, $params, $permissions) hook further modifies this permission matrix before it gets passed to function check($permissions)

The grid is sparse in some places and references:

DynamicFKAuthorization
_civicrm_api3_check_edit_permissions($bao_name, $params)
addSelectWhereClause()
CRM_Case_BAO_Case::addSelectWhereClause

What is the over-arching strategic architecture behind this? (to the extent that one exists at least)

Or what should it be?

I like the table.

It would be really cool if that information were available inline as part of the "API Explorer" -- eg when you inspect the Activity.create API, you'd be able to further review the required permissions.

The permissions in the table you describe are generally coarse-grained, entity-oriented permissions. Quintessential examples are "edit all contacts" or "delete mailings". These depend only on the entity name and action name.

The other items that you're asking about could be categorized as fine-grained authorizations. These depend on the specific data involved. However, they slice-and-dice differently (applying different rules to different data in different use-cases).

DynamicFKAuthorization is applied to Attachment API. Every attachment is subordinate to another record (like Mailing #123 or Contact #456 or Activity #789). Your permission to CRUD an Attachment depends on your permission to CRUD the targeted record. The basic idea is delegation. For example, the permissions for Attachment.create(entity_type=mailing,entity_id=123) are determined by delegating to the authorization logic of Mailing.create(id=123).
_civicrm_api3_check_edit_permissions() is nominally applied to many API entities, but in reality only applies to Phone, Email, Address, IM, OpenID, and Website records. All of these are subordinate to Contact. Your permission to CRUD a Phone depends on your permission to CRUD the contact record.
BAO::addSelectWhereClause is nominally applied to most API entities. On its own, it doesn't do much, but it can be adapted via subclass or hook. It allows to limit visibility into entities based on their data. For example, a listener might define a rule that "the current user can only query activities of type Meeting".

These three examples have some similarities (e.g. they're all fine-grained), and they have some arbitrary differences (e.g. procedural style vs OOP style), but they also address qualitatively different scenarios. I don't think their original authors intended/expected them to be compared in this way, so it wouldn't be accurate to describe them with an "over-arching strategic architecture". However, if someone finds an elegant way to make these more-similar, that would be great.

(Edit) Returning to your original question -- "Why is the matrix sparse?" The matrix only addresses cases where we expect coarse-grained/entity-oriented access-control to serve the business-needs of typical organizations. In cases where we expect the business needs to be more fine-grained/data-oriented, you need to reference more nuanced logic.


CiviMail Deadlock Issue I am facing deadlock on civicrm_acl_cache.
I am sending email to 400,000 users.
Many times, deadlock occur and due to system lock website goes down.

Need help from team

Consider installing CiviCRM 5.13.1 and enabling multiple MySQL locks. See https://github.com/civicrm/civicrm-core/pull/13854 for details.


How can I create mosaico block with 2 button? I would need a mosaico block with 2 button, is it possible to create? Thanks

This is not an answer for how to create a new block, but if you need something quick and dirty with two buttons side-by-side, hold your nose for this horrible hack...

Drag over a "Two-Columns Block".
Change to Block Level Style so you don't mess up other blocks.
Change the Paragraph Size to the smallest (or use the instructions in the next section).
Disable "Show Title" and "Show Image".
Remove the text from both columns.

If you want to minimize the blank text areas:

Select one of the text areas.
Choose the Source Code option ("<>").
Substitute a placeholder:
&thinsp;

Repeat for the other text area.

Unfortunately, there are no options for aligning the buttons or making them different colors, but at least you'll have a two button block to butt up against other blocks.

Notes:

I'm assuming you are using the Versafix-1 template.
I found that I had to use something other than an actual space character (or &nbsp;) for the text areas. Otherwise, the source code block wasn't saved the next time I tried to edit it. I could leave some transparent text, but I don't want to impact someone using a screen reader.
You might be able to use "font-size:0" to completely eliminate the text area but I doubt you'll be able to select it again since there is no substance left for the editor to represent.


Is there a size limit on attachments in CiviMail? I am trying to attach a PDF of just 5024KB to a mailing in CiviMail. The attachment is failing, with no explanation as to why. Is there a file size limit or could anyone suggest another reason a file would not attach?
Many thanks.

The maximum file size attachment can be set under  Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.). Navigate to CiviCRM >> Administer >> System Settings >>  Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.). Try after updating the maximum file size.

HTH

Pradeep


How can I help review/test a Webform CiviCRM PR Please describe the exact steps and requirements - of what I can do if I see a PR in https://github.com/colemanw/webform_civicrm/pulls - that I think would be useful to our organization.

You will need ssh access to the code base (on your server):

First: when working on latest code edits you may need to pull in the latest edits (that may not have been released yet) -> for example:

karins-macbook-pro-2:webform_civicrm sysadmin$ git pull origin 8.x-5.x
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 9 (delta 7), reused 9 (delta 7), pack-reused 0
Unpacking objects: 100% (9/9), done.
From https://github.com/colemanw/webform_civicrm
 * branch            8.x-5.x    -> FETCH_HEAD
Updating 823e673..3f7294a
Fast-forward
 includes/wf_crm_webform_preprocess.inc |    5 +----
 js/webform_civicrm_forms.js            |    6 +++---
 js/webform_civicrm_payment.js          |    2 +-
 webform_civicrm.libraries.yml          |    8 +++++++-
 4 files changed, 12 insertions(+), 9 deletions(-)

Here are the PR specific steps:

navigate to your modules/webfrom_civicrm directory and pull in the PR you would like to review/test - for example:

[karin@louise webform_civicrm]$ wget https://patch-diff.githubusercontent.com/raw/colemanw/webform_civicrm/pull/128.diff

patch it. Use a dry-run first - so see if there are any conflicts - the output will look something like this:

[karin@louise webform_civicrm]$ cat 128.diff |patch -p1 --dry-run

patching file includes/wf_crm_webform_postprocess.inc
Hunk #2 succeeded at 1772 (offset 9 lines).
Hunk #3 succeeded at 1793 (offset 9 lines).
Hunk #4 succeeded at 1810 (offset 9 lines).
Hunk #5 succeeded at 1835 (offset 9 lines).
Hunk #6 succeeded at 1862 (offset 9 lines).

If no issues - then for real:

[karin@louise webform_civicrm]$ cat 128.diff |patch -p1

patching file includes/wf_crm_webform_postprocess.inc
Hunk #2 succeeded at 1772 (offset 9 lines).
Hunk #3 succeeded at 1793 (offset 9 lines).
Hunk #4 succeeded at 1810 (offset 9 lines).
Hunk #5 succeeded at 1835 (offset 9 lines).
Hunk #6 succeeded at 1862 (offset 9 lines).

Check if there are any database updates to be executed (if you miss this step - you could get white screens of death). I use drush - and here's an example output:

[karin@louise bin]$ drush updatedb

Webform_civicrm  7403  Add field to create new relationship for duplicate records(expiredinactive).
Do you wish to run all pending updates? (y/n): y

Ok all done -> navigate to a webform on your website and check out the new functionality! Take screenshots and note in the PR what exact steps you took - and what you compared/evaluated;
Bonus points for doing this on 4.7.x as well as 4.6.x

Thank you!


"Failed to execute rule" - Civirules error, How to solve? I have a set of civirules in places, when a contact is tagged it should send a welcome email. But I am keep receiving the following error message in log and welcome email is not sent. It happens for new & existing contacts. Anyone has a clue what is it? How to fix it please? Thanks.

Log in Drupal:

Civirules api action exception: Mandatory key(s) missing from params array: source_contact_id. API call: Email.send with params: from_name="Email from", from_email="abc@example.com", template_id="108", location_type_id="1", alternative_receiver_address="test@me.com", cc="", bcc="", file_on_case="", contact_id="8949", extra_data="Array"

Log in Civirules Logger:

    Array
(
    [line] => 77
    [file] => /home/webadmin/public_html/cmm/sites/default/files/civicrm/ext/org.civicoop.civirules-master/CRM/CivirulesActions/Generic/Api.php
    [exception_message] => Civirules api action exception: Error sending e-mail to Katie Lost  . API call: Email.send with params: from_name="from name", from_email="abc@example.com", template_id="108", location_type_id="", alternative_receiver_address="", cc="", bcc="", file_on_case="", contact_id="9688", extra_data="Array"
    [rule_title] => Welcome Emails Workflow
    [original_error] => Error on {file} (Line {line})

{exception_message}
    [reason] => Failed to execute rule
)

Can you try after applying patch from here may or may not be related!


CiviCRM admin menu not visible in Wordpress Hi I am running CiviCRM 5.29.0 on Wordpress 5.5.1. Recently the admin menu for CiviCRM has disappeared which prevents me from managing the CiviCRM database. Any suggestions how to fix it.
I am running CiviCRM Admin Utilities v .0.7.3.
I tired clearing caches, rebuilding menu, clearing URL's but nothing appears to work.
Any ideas greatly appreciated.

Turns out the problem is related to the latest install of the UK Gift Aid extension v 3.4.4. Disabling the extension brings back the menus.


Is there a way to show second country at top of list of countries (after the default country) in CiviEvent? I have United States set as the default country for the country field for CiviEvent registrations.

Is there a way to show Canada first on the list of the rest of the countries?

We have the most people registering for events from United States, but a fair number of people from Canada as well.  At least one person told me it is doable but didn't have any pointers to where to make the changes.

The site uses WordPress, and CiviCRM 4.6 but hopefully within a month or so up to the latest version (waiting for OK to proceed).

Do you have participants from anywhere other than US/Canada? If it's just US/Canada you can restrict the country list to just those two (or some handful) under Admin - Localization - Languages, near the bottom of the page.

If you really do want all 200+ countries in the list, you can do a hack like this if you have access to mysql:

update civicrm_country set name=' Canada' where name='Canada';

(note the blank space in front - this will make it float to the top)

This might get overwritten on a future upgrade if Canada changes its name, but that seems unlikely. Still, this isn't a recommended hack, just if you're desperate.


Unable to view profile instructions or see profile drop down menu in Contribution page I am using WP and just upgraded to 4.7.7, and changed theme to Alone. The profile instructions to fill out are now not visible on the public contribution pages. On back end of Civi, the drop-down menu to choose a profile is no longer visible.

I think it's same problem as here https://forum.civicrm.org/index.php?topic=35782.0 I don't have jetpack, but I did change my theme.

On the upside the bug in not being able to include all countries in localization has resolved.

Any ideas on how to fix this? I paid money for this theme and I wouldn't know how to hack it anyway.

Thank you in advance.

The labels/profile instructions look like a CSS issue, try adding the next style in your theme's CSS/Style editor:

.label {
  color: #000;
}

Regarding the back-end Contribution page not displaying correctly, please see this troubleshooting guide.

Also have a look at:

Backbone isn't loading on Civi 4.6.11 WP 4.4.1

Dequeue Backbone from theme load and load CiviCRM Backbone

It could be perhaps related to the a conflict between Civi's Backbonejs version and your theme's Backbonejs if it has one.


How can I add conditional profile fields (WordPress) I would like to have conditional fields, that will be visible when certain conditions are met, for example:

New Customer, IF group is business, show business address field, IF group is individual, show home address, etc..

I am using WordPress 5.2.1 and CiviCRM 5.4.0

Welcome Ashok, you could explore using this extension https://civicrm.org/extensions/profile-conditionals

The other option would be to use the caldera webforms plugin which has an integration with civicrm. Caldera has support for conditionals.
https://github.com/mecachisenros/caldera-forms-civicrm


civicrm/upgrade?reset=1 to 5.3.1 from 4.7.30 Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Your database is marked with an unexpected version number: 5.2.2. The automated upgrade to version 4.7.30 can not be run - and the 4.7.30 codebase may not be compatible with your database state. You will need to determine the correct version corresponding to your current database state. You may want to revert to the codebase you were using prior to beginning this upgrade until you resolve this problem.

Problem solved by putting back the right version and doing reset. The doing the upgrade to 5.3.1.


Manual Event Registration problems I'm trying to manually register a participant for a specific event, but the registration form is showing custom profiles that I've created for completely unrelated events. I'm unable to complete the manual registration until I've made a selection for all these required fields. This particular event does not use the profiles being show or show these profile questions on the public registration page, they only appear in the manual event registration page, below the Registration Confirmation and Receipt section. I don't see any mention of this in the manual (https://docs.civicrm.org/user/en/latest/events/manual-event-registration/), which makes me wonder if it's a bug.

How are these profiles getting here and how can I get rid of them without completely deleting them from my database?

I'm running CiviCRM 5.8.2 on Drupal.

just wondering - you are saying Profiles - are you absolutely certain you aren't referring to a 'group of custom fields'. This would make sense if you have added lots of groups of custom fields and set them to apply for 'all' events. they would then show for a back end registration.

If so there are two steps to consider

a/ do not make custom fields 'required' - only set them to required in the profile

b/ set the 'group of custom fields' so they only apply to certain Event Types


Can donors store their card details on dashboard? I would like to give access to our donors to the contact dashboard and also let them donate from that page to different campaign or events signup,  so they would not have to enter their details over and over again.

I was also thinking, what if it would be possible to give option to store their credit card details like modern checkout does, for them to avoid entering them every time?

What are possibilities of achieving this? What can go wrong along the way? Thanks

It is possible to achieve this with a modern token based payment processor like the iATS Payments extension which we wrote the code for. One example of such card-on-file feature already exist:

A process button in the recurring series screen -> this lets admins charge a one time amount to a card-on-file. This could be for e.g. a catch up transaction, an additional year end donation (phone bank calls donor and gets ok to use the card on file) or for a purchase at a silent auction (where to speed up checkout credit cards or bank accounts (ACH EFT or e-cheque) were processed and tokenized ahead of the event).

So a use my card on file does not yet exist for a donor to select as a payment method - it’s definitively possible to put that together.


Import Contacts from CSV I am attempting to import a csv file that is both regular comma delimited and I have also tried one saved as CSV UTF-8 (Comma delimited).  Each time I go through the steps, I get through the match fields correctly.  When I get to Step 3 Preview, I am told that my total number rows have errors and won't be imported:

Without seeing some of the actual file that is being imported, it is hard to say for sure. But my guess is that birth date field is an actual date field? And if so, it needs to be formatted as a date and on the first import screen you have to tell Civi how it is imported.

The error file that you can click and download will give you more information, as it will tell you what field(s) are the problem.


Why does the Preview as HTML in civimail not apply the html that has been applied to the footer Thought I was going round in circles here. Set html eg
 to the Footer including both the Unsub token and the Domain Address token.

Preview mailing as HMTL in CiviMail. The Unsub text shows as intended, but the Domain Address shows as Times New Roman.

When I actually send a test mail, the domain address does show as sans serif. confusing.

Check this out: https://issues.civicrm.org/jira/browse/CRM-17726

Contents in the body tag get deleted on load. When you resave they get nuked.


Custom field saves, for all entries, instead of wanted data a number that is not in original data I'm having an odd problem with a custom field within a custom data set.
The field is made for personal identification number, data type is integer and it's a single line input field.
Every time I enter the data either manually or through import (careful about choosing corresponding fields) upon clicking the save button instead of saving the wanted number it saves a completely different number that's not in my data (it's always the same number).
I even tried to delete the custom field (with corresponding data), then create it again and manually add it back but nothing.
Using WP

Well it seems that I had to delete the set and re-create it again in order for it to work like it should. Why, I've no idea.


CiviMail: Send to Individual Contacts (not just Groups)? Is there an option in CiviMail to allow us to add individuals (not groups) in the Recipients field when creating a new Mailing? (we're using Mosaico/FlexMailer, if that helps).
We're trying to avoid having to put people into temporary groups each time we want to send a mass mailing. Sometimes new individuals come in after we've sent the mail mailing, and we want to resend only to those individuals, without having to add them into a temp group and then delete the group.
If there isn't an out-of-the-box option for this, any pointers to where we might be able to customize the new mailing screen to add this?

Not exactly what you want to do, but if you install the Resend Mailing extension, you can select one or more contacts from search results and use the action drop down menu to resend a mailing to those specific contacts.
Alternatively, you could just add the new recipients to the original group you used for the mailing and resend the mailing, subtracting the recipients of the original mailing and thus only sending it to the new group members.


Attachment too large for mailing - should there have been a warning? Recently had a user attach a .docx file that was 14 MB to a mailing.  (Probably a single picture in the document was to blame.)  As one would expect, the messages bounced rather than being delivered.  However, the mailing reports just showed a bounce type of Syntax.  As you can imagine, this is rather unhelpful.  Digging around, I finally turned to the system's logging for maillog where I found the report of the attachment too large.  Should I have found this information somewhere in CiviCRM itself?  Perhaps in the mailing report that I overlooked?

There's an administrative setting that controls that limit here:

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

The "syntax error" you are seeing is likely what the Civi mailer is getting back from the smtp server. I've seen that as a kind of catchall error message from mailers (e.g. it's what sparkpost will report when not configured). I don't think that Civi can do anything other than pass it on - i.e. the reporting error is from the system that's trying/failing to send out the mail.

Personally, I think there should be a message in the CiviMail system strongly discouraging attachments and encouraging attachments to be uploaded and linked to instead. That will increase deliverability.

The only really good use-case for attachments is if the document is private.

So the answer to your question is: "no".


How can I bulk update the contact employer based on the employee relationship? I want to bulk update the Employer field for the Individual contacts who have an active relationship of "employee of".

Even though we have many active employee relationships for individuals, the Employer field is blank.

You can do this directly in the database by running the following update query:
UPDATE civicrm_contact,
  (civicrm_relationship r
    LEFT JOIN civicrm_contact c ON c.id = r.contact_id_a)
  LEFT JOIN civicrm_contact c1 ON c1.id = r.contact_id_b
  SET c.employer_id = r.contact_id_b,
      c.organization_name = c1.organization_name
  WHERE r.relationship_type_id = 5
    AND c.contact_type = 'individual'
    AND c.employer_id IS NULL
    AND r.is_active = 1;

This will update the employer field for all individual contacts who have an active employee relationship and do not have an employer already set.


How can I set up a BCC option for automated messages? Our administrator wants to receive a copy of the expiration email Civi sends when an event registration has automatically expires (Message templates -> System workflow messages -> Events - Pending Registration Expiration Notice).

I am trying to figure out how to do this as a Civi user - not as a developer! I came across this discussion but can't quite understand what the status of this feature is at the moment:

http://forum.civicrm.org/index.php?topic=17872.0

Could someone help? (We are running CiviCRM 4.5.3 on Joomla! 3.3.3)

You could set up a second scheduled reminder for the membership and have it go to the administrator only.  You could even customize the message to be more concise and provide information that he or she needs (like the contact's full name and a link to the contact record on the backend) but wouldn't naturally go in the email to the member.

Although this wouldn't be the precise email that the member receives, it'll be driven by the same process, and you can set the same timing for it.


How can I completely remove previous improperly uninstalled CiviVolunteer? I'm trying to install the CiviVolunteer extension (Drupal 7, Civi 5), but am getting this error message in response:

Field: name must be unique. An conflicting entity already exists - id: 186

It looks like the developer had previously installed and enabled the extension, but then manually deleted it, without also removing the CiviVolunteer data from the database.

Any suggestions for how to clean up the leftover CiviVolunteer data, or another way that I can reinstall the extension?

UPDATE -

No luck with executing the mysql commands (cannot find tables), and unable to reinstall the CiviVolunteer extension (which is ultimately what I'm after). Receiving the same error message as above, and this screen when I return to the extensions page:

You could try having a look at the volunteer_uninstall.sql file?

https://github.com/civicrm/org.civicrm.volunteer/blob/master/sql/volunteer_uninstall.sql


How to solve this error database looks to have been partially upgraded in CiviCRM I Upgraded CiviCRM 4.6 to 4.7 latest version but when I try Import database using drush $ drush civicrm-upgrade-db this command that time showing this error. when I going to this path http://example.org/civicrm/upgrade?reset=1 if anyone knows the solution of this issue please tell me. thank you in advance

You would be able to successfully upgrade following these steps:

Empty the civicrm database
Restore civicrm database from the backup that you had created before performing upgrade
Temporarily remove the paths for custom PHP/template files if you have through: Administer->System settings->Directories
Try upgrading to version 4.7 again
Restore the custom files paths if point 3 was applied

Hope this fixes the issue.


Payment Processor for UK Which UK payment processors are most recommended to use with CiviCRM? (aside from PayPal)?

Sage Pay is a tried and tested UK payment processor that works well with CiviCRM -

https://github.com/circleinteractive/uk.co.circleinteractive.payment.sagepay


Displaying Custom Field When Using the New Organization In Contact Menu How Can i configure CiviCRM such that the Custom field i created will be displayed when adding New Organization using the Contacts New Organization Menu. Already i have created the Custom field and added it to the New Organization Form in Reserved Profile but the Custne fields dont show up when adding new record.

Am using Civicrm 4.6.15 with Wordpress.

As you noted. the New Organisation is a civi Profile - and at Administer > Customise > Profiles (http://d46.demo.civicrm.org/civicrm/admin/uf/group?reset=1) you will see it on the Reserved Profiles and can therefore add your new field here and it would show assuming the 'field' is set either for organisations or 'all contact types'.


How to fix a blank update my details link in the recurring payments receipt? I am providing a recurring payments option through the eway credit card gateway and the agileware recurring payments extension.

eWay_Recurring (au.com.agileware.ewayrecurring) 1.5.2

The template looks like it is loaded from here web/sites/all/modules/civicrm/CRM/Upgrade/4.6.10.msg_template/message_templates/contribution_online_receipt_html.tpl

The %1 link is blank in

You can update billing details for this recurring contribution by visiting this web page

How do we fix this?

Fuzion did some work to improve eWay recurring using their RapidDirect, Rapid & Shared solutions. The code is now available in the Omnipay Extension.

AgileWare helped fund the development of this but can't comment on whether that implies it is their preferred solution now.


Validating options in API4? Is there a way to make APIv4 validate options when creating/updating?
For example, using the demo data I can run:
$ cv api4 Contact.update '{"where":[["id","=",202]],"values":{"constituent_information.Marital_Status":"Junk"}}'

and then verify the update took place with:
$ cv api4 Contact.get '{"select":["constituent_information.Marital_Status"],"where":[["id","=",202]]}'

producing:
[
    {
        "id": 202,
        "constituent_information.Marital_Status": "Junk"
    }
]

So Marital_Status is set to Junk - even though that is not a valid option. When viewing this in the UI the field now shows as blank.
I could use getfields to get the valid options and check them before doing the API call but an option (or default behaviour) on the API call to produce some sort of error or warning would be useful.

APIv3 does option-matching by default. APIv4 only does option-matching if you ask it to. The way to do that is by specifying what property of the option you are passing in. Typically :name for the machine name or :label for the localized label.
Try this api call:
$ cv api4 Contact.update '{"where":[["id","=",202]],"values":{"constituent_information.Marital_Status:label":"Married"}}'

Passing in an invalid option should fail.


session problem causes white screen I have a website with paid events. Earlier, I mentioned that doing a payment for an event results in a white screen.
The cause of the white screen is the session variables: they do not survive the payment. The payment processor sets some session parameters just before the payment is done (like the return urls). As soon as the payment is done, the session parameters are not accessible anymore.
Uptil now, this session problem only occurs during/after the payment of event.
I find it difficult to find the cause of this session hickups, they are clearly related to the 'cannot modify header information' in the php_errorlog (see below). But I use not the right strategy to find the cause of that message. I surely can use  advice on tracking that down.
thanks!

wordpress install 5.26.2
php 7.3
omnipay extension 3.9

the php_errorlog file adds an extra warning:
[05-Jul-2020 19:25:16 Europe/Amsterdam] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/civicrm-nw/wp-content/plugins/files/civicrm/custom_extensions/nz.co.fuzion.omnipaymultiprocessor-master/vendor/symfony/http-foundation/Response.php:1290) in /home/mysite/public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 949
[05-Jul-2020 17:25:38 UTC] PHP Warning:  Class __PHP_Incomplete_Class has no unserializer in /home/mysite/public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm.php on line 369
[05-Jul-2020 17:25:38 UTC] PHP Warning:  session_start(): Failed to decode session object. Session has been destroyed in /home/mysite/public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm.php on line 369

From the time stamps I can see that first these warnings are written to php_errorlog and after that, all session variable print statements show empty values in the civicrm log file.
current status: I have put debugging statements in the code to find the point where the 'Cannot modify header information' message is caused. When that message appears in php_errorlog, from that moment on all session parameters are lost.
I found out that it  occurs right after the user presses 'continue' on the event confirmation screen and before actions are taken in the next payment screen.
The  code runs fine up til doPayment() in OmnipayMultiProcessor.php, where it does a redirect to url https://civicrm-nw.mysite.nl/civicrm/?civiwp=CiviCRM&q=civicrm%2Fevent%2Fregister&_qf_ThankYou_display=true&qfKey=58.... I followed the code and after  the setHttpHeader() in System.php, the session variables are still there and the warning is not printed yet. That happens soon thereafter.
But here I lose the code flow. I need to know which code is executed after this redirect and before the mollie payscreen is rendered in order to pick up further debugging . Any ideas what class/ routine would be a good starting point?

this issue is resolved since upgrading from civicrm 5.26 to civicrm 5.28 AND upgrading the omnipay multiprocessor plugin to 3.13. Without upgrading the plugin, the white screen still showed up. Now it is all perfect again.


Can distmaker be run off a specific branch I was using distmaker.sh (https://github.com/civicrm/civicrm-core/blob/master/distmaker/distmaker.sh) to generate tarballs for testing.

I had my local branches all set to 4.6 (core, drupal, joomla and wordpress) however, distmaker switched to the master branch when building the files.  I had created a buildkit drupal install and then cloned the joomla and wordpress repos into /sites/all/modules/civicrm/

Is there a setting to build the tarballs off a specific branch?

Check the settings in distmaker.conf, the ones at the end. They specify the git branch to pull from:

## Git branch/tag name
DM_REF_CORE=master
DM_REF_DRUPAL=7.x-${DM_REF_CORE}
DM_REF_DRUPAL6=6.x-${DM_REF_CORE}
DM_REF_JOOMLA=${DM_REF_CORE}
DM_REF_WORDPRESS=${DM_REF_CORE}
DM_REF_PACKAGES=${DM_REF_CORE}


Drupal View Not Rendering HTML From Activity Email Details Field I am trying to display in a Drupal (8) view the content of emails that have been sent to contacts using the contact Send Email action. I am using the details field from the activity to show the content. The problem is that the view is outputting the HTML from the email and not rendering it. So it is showing for example
Some text here A link
.
Is there any way I can get it to render the HTML instead of outputting it? The formatter options for the field are only "Default" or "Trimmed". I did try overidding the individual field twig template but couldn't get this to work. I wasn't sure whether it would be possible using this method.

Drupal is very secure/paranoid when it comes to outputting html/text. I suspect that the views/field integration for the entity (i.e the activity civicrm entity) might need to be updated to allow the html through without any filtering.


How to get subsidiary membership to work? For our purposes, memberships are organization-based, with individuals receiving membership benefits by being designated as an employee. This works great.

However, I have the use case where there is a subsidiary company that is part of the larger member company, but has a different name. This matters because if a person registers for an event under the subsidiary company name, they are not recognized as a member and fall out of the member smart group, which we use for mailing list, access, and other purposes.

I created a new membership type called Subsidiary Members and set the relationship as "Partner of," then applied relationship that to a subsidiary of a member company. My hope was that this organization would gain membership via their parent organization, which would then pass down to employees. However, the subsidiary company is still showing as a non-member.

Is there another way I can make this work?

Running CiviCRM 4.7.29 on Joomla 3.8.3

If I understand you correctly, you have a Main Member type inherited by 'employee' relationship.  The primary members are companies.  You also have a Subsid Member type inherited by 'employee' where there the primary members are subsid companies connected to the parent company with a 'Partner of' relationship.  You have tried changing the Main Member type to be inheritable by both 'employee' and 'partner' but the subdid employees are not inheriting Main Member.

That should result in your subsid companies (the orgs) inheriting Main Member type. ... but that is not related to the Subsid Member type that is inheritable by your subsid company employees.

What I think you would like is for the Main Member type to be inheritable by both 'employees' and 'employees' of 'partners' - but so far as I know Membership is only inheritable by one level of relationship.  In other situations you might use a smart group, but that is not applicable to membership inheritance.

So, some possibilities:

1) You could write an extension (or maybe use CiviRules) so that employees of subsid companies are also given a direct relationship (eg 'subsid-employee') to the parent company.  You would need to check for changes on the 'employee' and 'partner' relationships to add and remove the 'subsid-employee' relationship.  Main Member then becomes inheritable by 'employee' and 'subsid-employee'.

2) You could write a different extension (or CiviRules) to maintain the status of Subsid Member type based on the Main Member status and 'partner' relationship but I don't think the Subsid Member type particularly helps you.

3) Alternatively you could enhance Membership inheritance to be inheritable based on group membership as well as relationship.

4) Taking things further, some kind of 'smart relationship' feature could be useful in other situations. The existing features for second-degree relationships and smart groups could provide starting points - but that might be a larger project than you wanted :-)


Multi-part Join Form I want to collect a lot of information from members, but I don't want it to have 30 fields on the same page, it'll be too intimidating.  I want to break it up across multiple pages.  "Join - Page 1 of 3"  etc

How do I do that?

I know how to link one form to another, so that upon completing a form the user is directed to the next form.  But how do I get CiviCRM to recognize that they are the same person?  So the entered information goes to the same record?

I don't want them to have to create a login on the site.  I'm using Wordpress.

I would suggest you try out Caldera Forms CiviCRM WordPress plugin: https://github.com/mecachisenros/caldera-forms-civicrm

You need to firstly install the Caldera Forms plug-in for WordPress and then install the Caldera Forms CiviCRM plug-in (also for WordPress). Caldera Forms out of the box, allows for the creation of multiple pages for a single form. The Caldera Forms CiviCRM plug-in, adds the integration with Caldera Forms and CiviCRM. I currently have both plug-ins installed in our WordPress site and I'm busy exploring the creating of a contact capture form with custom CiviCRM fields. The form is pretty large, so I am busy splitting it into multiple pages. I have not tested any form submission yet, but hope to complete the form and test it within the next week.


Disabling Stripe extension breaks database After clicking "disable" on the Stripe extension, visiting civi gave me an error 500 and does not make an entry in the error log. But going to Drupal home kicks out the following error message:

Warning: require_once(CRM/Core/Payment/Stripe.php): failed to open stream: No such file or directory in Civi\Payment\System::getByProcessor() (line 59 of /home/ourbase/public_html/prbrc/sites/all/modules/civicrm/Civi/Payment/System.php).

The file it's looking for does exist, BTW.

I've fixed this before (see answer), but I just want to uninstall the extension -- it never for us worked anyway.

Getting your site back online, in phpmyadmin:

In table civicrm_extension, enable stripe (change 0 to 1)
In table payment_processor, disable any using stripe (change 1 to 0)

This should allow your site to load.

Deleting stripe (warning: stripe may be related to some transactions, check before doing this):

Make sure none of your donation pages are using stripe
Delete any payment methods using stripe
Delete the payment processor "stripe"
Disable extension "stripe"
Uninstall extension "stripe"

You'll still see it on the list of extensions with an install link. To get rid of it, you'll have to remove the com.drastikbydesign.stripe folder in /sites/default/files/civicrm/extension (or whatever your extensions directory is).


Fatal error when accessing Civicrm administrator page I am unable to access the Civi administrator section on a website using Joomla 3.7.5, Civi 4.7.23 and running on PhP 7.0.
Joomla portion works fine, but when I access Components/Civicrm from the Joomla backend, I get a blank page with no error messages (although Joomla debugging is turned on).  Using Firefox Developer edition's debugger the response is "Page has no sources".

I then created a new Joomla user with superuser privileges. Logged in and got the following message (screenshot attached).

Since I can't login to change settings to display all errors and turn on backtrace, how do I troubleshoot? Any help would be appreciated.

Thanks,
Kate

Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame thrown in /home/sherida1/public_html/jgs-live/administrator/components/com_civicrm/civicrm/Civi/Core/Transaction/Manager.php on line 107

You have two options for troubleshooting:

Debug and backtrace info should also be in your CiviCRM logs, stored in the ConfigAndLog directory.
You can enable debug and backtrace by adding these three lines to civicrm.settings.php:

global $civicrm_settings;
$civicrm_setting['Developer Preferences']['debug_enabled'] = TRUE;
$civicrm_setting['Developer Preferences']['backtrace'] = TRUE;


Can't upgrade from 5.26.* to 5.28.* We got 2 demo websites that we are using publicly to show translations. When I tried to update them, they returned from drush command the following:
Drush bootstrap phase : bootstrap_drupal_database() [0.19 sec, 7.5 MB]                                                                                [bootstrap]
Successfully connected to the Drupal database. [0.19 sec, 7.93 MB]                                                                                [bootstrap]
Find command files for phase 4 (max=5) [0.19 sec, 7.93 MB]                                                                                [debug]
Drush bootstrap phase : bootstrap_drupal_full() [0.19 sec, 7.93 MB]                                                                                [bootstrap]
Cache HIT cid: 8.1.16-install_profile-66ecfeb9791a023150773849f1550c5d [0.39 sec, 24.5 MB]                                                                       [debug]
Find command files for phase 5 (max=5) [0.39 sec, 24.5 MB]                                                                                [debug]
Cache HIT cid: 8.1.16-install_profile-66ecfeb9791a023150773849f1550c5d [0.39 sec, 24.5 MB]                                                                       [debug]
Cache HIT cid: 8.1.16-commandfiles-5-98c00c316acff50d31c7b21c6455733c [0.39 sec, 24.52 MB]                                                                       [debug]
Cache HIT cid: 8.1.16-annotationfiles-5-fc9c7995bc64309247ba8dcb0f2a811a [0.4 sec, 25.24 MB]                                                                     [debug]
Bootstrap to phase 6. [0.43 sec, 26.98 MB]                                                                                [bootstrap]
Drush bootstrap phase : bootstrap_drupal_login() [0.43 sec, 26.98 MB]                                                                                [bootstrap]
Find command files for phase 6 (max=6) [0.44 sec, 25.69 MB]                                                                                [debug]
Found command: civicrm-upgrade-db (commandfile=civicrm) [0.44 sec, 25.69 MB]                                                                                [bootstrap]
Cache MISS cid: 8.1.16-alias-path--cae21634989c45f52c3c725c39d2002e [0.46 sec, 27.45 MB]                                                                         [debug]
Calling hook drush_civicrm_upgrade_db_validate [0.76 sec, 29.52 MB]                                                                                [debug]
Drush command terminated abnormally due to an unrecoverable error. [1.01 sec, 37.66 MB]                                                                      [error]

CV command returns as if its not working. Tested on few websites it is working. Latest version is installed. Output is bellow:
 cv upgrade:db

  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Call to undefined method Symfony\Component\DependencyInjection\Definition::setFactoryClass()

upgrade:db [--out OUT] [--dry-run] [--retry] [--skip] [--level LEVEL] [-t|--test] [-U|--user USER]

On another website that has CRM 5.20 version, CV runs smoothly. I've been trying to install to newest one, 5.28.3 but sadly it didn't work. So I did backtracking, managed to install up to 5.26.3 version. After trying to install 5.27.0 it returned same kind of errors as for 5.28.3 , website is not responsive, cant access database or Drupal front end. Drush isn't working, CV as well.
CiviCRM log is empty, PHP showed something... and got to resolution of my issues. Mikey told me to keep it as proof for others if they encounter issues so there is that. Answer for my trick question in comments!

Issue causing this:
Extensions.
In PHP logs I found out Symphony was mentioned along with Flexmailer. We had alpha outdated version of Flexmailer causing issues. Disabling it/ updating it seems to work as solution.
After that I could update CiviCRM smoothly and works!
Hopefully someone will need this in the future!


Add relationship on profile submission Currently there is no a way to add relationship to a profile on submission. Meaning when someone submits a new profile that a relationship be attached to that contact.

This question outlines how it can be done via API How to use API chaining to create a contact and a relationship

In the case I currently need it for WP is the CMS, so I would be seeking something that is CMS independent, the Drupal modules wouldn't work.

What is needed to be done so that there is an option in the settings of the profile to create a relationship. Has anyone done any work like this or have any ideas on what makes sense to look at for something be developed?

There is a scenario where a relationship can be created via a profile. If you add a "Current Employer" field to a profile, the employer gets created or matched by name and an "Employee of" relationship is created between the individual and the employer.

If you need more flexibility, the CiviRelate extension may help.

If this doesn't meet you needs, I would consider using the Webform CiviCRM Integration module, if that's feasible in your case.


How can we give Admins more control on what is shown for non-existent pages such as contribution pages What happens when an Event is deleted, or a contribution page is disabled, or a profile no longer exists?

Links i am thinking of include

CONTRIBUTION PAGE

http://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=14
You get a yellow page saying

  Sorry but we are not able to provide this at the moment.
  The page you requested is currently unavailable.

EVENT PAGE

http://dmaster.demo.civicrm.org/civicrm/event/register?reset=1&id=18

If you are logged out you end up at the home page

PROFILE

http://dmaster.demo.civicrm.org/civicrm/profile/create?gid=19&reset=1

You get a yellow page saying

  Sorry but we are not able to provide this at the moment.
  The requested profile (gid=19) is inactive or does not exist.

This same issue bothers me because I see so many fatal errors in logfiles across multiple servers when all that is happening is that a contribution page has been disabled / removed. I'd love to see it addressed in core if possible; CiviCRM should be capable of handling invalid inputs without showing the end user an unthemed, unhelpful error message.

One extension does already address this - ca.bidon.reporterror. It includes an option to detect those fatal errors (a user hitting a contribution page with invalid ID, or a disabled contribution page, or with an expired session) and redirect them to a default contribution page. This is a big improvement on the default behaviour! However, it's not included in core, and it comes bundled with other behaviours which might not be what all sites want.

Ideally, I'd like to make progress on tickets like CRM-19157: Replace CRM_Core_Error::fatal() with CRM_Utils_System::permissionDenied() so that we can drop the ugly (to users) and noisy (to sysadmins) "fatal" approach to handling invalid inputs in favour of a more "controlled landing" when things go wrong - which can both deliver a helpful and on-brand experience to the user seeing it, and reduce the level of log noise which results from the use of CRM_Core_Error::fatal() as a technique to bail out.

Instead we should deliver be delivering a nuanced experience to both users and admins: where we currently have CRM_Core_Error::fatal() we should throw an exception with information about what went wrong, and then CiviCRM can handle those exceptions appropriately. Broken contribute URL? Direct viewer to a default contribute page! User triggered IDS / DDOS / flood control? Maybe we can dispense with the pretty theme ...


How to create a Drupal View of CiviCRM Activities with an edit link to the corresponding Webform? Goal is to have a filterable and sortable Drupal View of CiviCRM Activities (not a view of Webform Submissions) created with a Webfom with a link to edit the webform submission.

I can painstakingly do it through the Views UI if I create the View as a view of Webform Submissions, but the inability to filter/sort on fields is a deal breaker.

If I create a View of CiviCRM Activities, I get all of the filter and sort options but no nice link to edit the webform.

There is no straight forward way to get the 'Edit Submission' link in the View of CiviCRM Activities. Below is a workaround where we extract the 'Edit Submission' link from activity details.

Prerequisites:

Views PHP module is installed
In your webform, you have enabled/ticked 'Include link to edit webform submission in activity details'

Steps:

In the View of CiviCRM Activities, add 'CiviCRM Activities: Details' as a field to the view and tick 'Exclude from display'
Add a new field 'Global: PHP' to the view, and paste the below content in Output code

<?php
preg_match_all('/<a href=\"([^\"]*)\">Edit Submission<\/a>/iU', $row->details, $match);
echo $match[0][0];
?>

The above code will get the edit submission link from the activity details using regular expression and will display the link in the view.

View Final Output:

Hope this helps.


Organization Membership Payment page not recording memberships As background information, all of our client's members are organizations. I see that if I select "on behalf of organization" and "membership section enabled" I get two copies of the profile on my page. So we won't do that.

However, neither option by itself records a membership in the membership dashboard when the profile is filled out in our tests. I have all the key fields; organization name, email, contact address and phone. I get no errors when saving the contribution page. I have no errors when submitting a live form. What am I missing?

After much frustration and subsequent soul searching, contemplating the abyss of total consumption by the digital realm, a singular epiphany presented itself to me at the gates of Valhalla. It whispered in my ear, "you're using the wrong damn profile, you dimwit!"

I had built a custom profile where I should have used the default "on behalf of organization" profile. Much confusion ensued, until I figured out, what is now obvious.

Many thanks for all the help offered and time invested by those who guided this spirit quest.


What are field options? Searching in book.civicrm.org shows result titles without "field options". Also don't see anything for "option groups".

I may not quite understand the question. When you create a Field, if you set it to eg Select or Radio, then you get to create, or choose an existing set of field options, eg apple, banana, carrot.

Once created, you can access these to modify them either via the field itself, or via Admin > System Settings > Option Groups, or at civicrm/admin/options?reset=1

Documentation: best page i can see in book is this one, search for 'multiple choice options' on that page. Maybe documentation needs to be improved so Search for 'Option Groups' offers this page - something you could offer to do as an active member of this open source community?

GENERAL NOTE: these options belong to the Custom Group, which can then be 'used' in a Profile. You do not create or modify them in the Profile directly. Newcomers to civicrm often find it confusing as 'fields' are used in Profiles, and some aspects of them, eg title, pre-help, can be changed in the profile. But the Fields itself is created/modified via Custom Fields.


Allow list subscribers to update their email addresses? We have a list of people who work at many different companies with company email addresses. When someone moves to a new job at a new company their email address changes. How can we make it simple for someone who changes jobs to come to a CiviCRM Webform and change the email address we have for them? This would relieve our tiny staff of a major burden!

Creating such a profile is fairly straightforward.  The (potentially) hard part is for CiviCRM to know who the person is.  You have three options:

If your users can log into your site, then the site will know who they are.
If you can trust your users to enter their data correctly, you can give them a blank form to fill out and configure your Unsupervised Dedupe Rule to identify the record that needs updating.
You can create an email linking users to the profile using a URL with a checksum token.  These can be a bit confusing to add to your emails for non-technical folk, in which case you may want to install the Fancy Tokens extension, which gives a nicer user experience.

As for the form itself, you can use a profile, or if you need something fancier you can use Webform with CiviCRM integration (if you use Drupal or Backdrop) or Caldera Forms CiviCRM (if WordPress).

If you haven't created a form like this before, and you aren't a documentation learner, you can find videos on YouTube covering CiviCRM profiles.

It often helps to include first and last name as read-only fields, it helps folks understand that the system knows who they are.


Allow only existing CiviCRM contacts to create own Drupal account We're building a site which will have certain content pages accessible only to logged in Drupal users.

I'd like users to be able to create their own Drupal accounts with access to those pages, but only those who have been pre-approved, who exist as contacts in CiviCRM, and are part of a 'web site users' group.

What's the best way to do this?

A couple of thoughts.

If you want this to be a response to an action - eg you folk send out a mailing - then you can do this via a webform - send out a link with checksum to a webform and upon submitting the webform you can trigger Drupal Rules (we usually do this by giving them a civicrm Tag) and this can also instantly log them in

If you want to do this as a self-service then I would probably be adding a wee form for folk to say 'send me a login link', they enter their email, it sends them a checksum and then you do the above approach of another webform.


Issue with MySQL support Attempting to install CiviCRM 4.6.38 in Wordpress 4.9.8, PHP 7.2.5, MariaDB 10.3.8, Nginx 1.14.0, Amazon Linux 2. Getting "MySQL support not included in PHP". PHPinfo shows mysqli and mysqlnd enabled.

CiviCRM 4.6 is not compatible with PHP7.2 - you'll either need to upgrade CiviCRM, or downgrade PHP. (CiviCRM 4.6 is quite an old release to install in 2018.)

CiviCRM runs this check when installing (here's the same check in 4.6).

If the server's PHP does not have the appropriate function (mysqli_connect() in recent CiviCRM, compatible with your PHP7.2, and mysql_connect() in CiviCRM 4.6 - suitable for older PHP releases only as it was deprecated in PHP5.5 and removed in PHP7.0), then the installer will bail out saying that you "lack MySQL support in your PHP".

If you want to use CiviCRM 4.6, you'll need to run it with an older version of PHP.

I recommend using a current and supported version of both CiviCRM and PHP instead.

CiviCRM: What version should I get?
PHP: Supported versions
2016 SE question that's similar
2016 CiviCRM blog post about the switch from mysql to mysqli


Why does my CSV export use semi-colons? A simple search and then use the export option from the drop down generates me a csv file that isn't - i.e. it's a semi-colon separated values file, not commas. There doesn't seem to be any setting that does that, and it seems to be specific to one site.
CiviCRM 5.28.4, Drupal 7.73

Thanks to @samuelsolv for his answer to Export contact info from MailChimp
Apparently, the separator for import/export of csv files is a "localization" setting, at this path:
/civicrm/admin/setting/localization?reset=1


Is there a way of removing 'View' from event reports Event reports have the word 'View' to the right of the contact name - it's a link to the participant record.  It's not a selectable column in the report and the problem is that when the report is converted to a pdf the word 'View' gets merged into the contact name which can make this unreadable.  Is there any way of removing this 'View' column from event reports? Or making the pdf format better?

This is a bug.  In replicating it I saw it was easy to fix, so I did.

See the bug report here: https://issues.civicrm.org/jira/browse/CRM-19782

If you don't want to wait for this to be incorporated, you can patch your CiviCRM using the fix here: https://github.com/civicrm/civicrm-core/pull/9546/files


Out of country addresses How do I add another country to the address field on CiviCRM 5.13.5? I cannot find a way under settings to alter my options. Only "United States" appears.

It's under Administer -> Localization -> Languages, Currency, Locations. Closer to the bottom of the page.


Word limit on Case Details After updating to CiviCRM 5.27.0 on Drupal, a user reports that pasting large text content in the "Details" box in CiviCase activities cutoff the text. Is anyone else seeing this issue?

The emoji part sounds familiar. If the db tables are not utf8mb4 then emojis get cut off (or fatal error depending on mysql/mariadb/version).
You can convert your db tables to utf8mb4.
In addition you may also want to apply this patch https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/17716.patch


Adding contacts to memberships The standard contribution form for signing up for household memberships doesn't allow the person signing up to add additional people to the membership. It would be nice if the form had a page (or other affordance) after the initial information form to allow them to add additional names and email addresses. This page would fit between the initial page and the verify page. How is this typically handled? Right now the workflow forces an admin to manually edit the relationships tab for a household contact. I could add custom fields (name, email) to the member sign up for this, but how would you pass this data along to the database as relationship contacts?

If you are in Drupal, Webform with Webform Civicrm Integration could do this. It allows you to have users create any number of contacts, along with relationships between contacts.


Contribution Amounts Section does not work On Civi 4.7.27 and Wordpress 4.9.1

On the contribution pages, if I have Membership section enabled AND Contribution Amounts section enabled, everything works fine. If I have just Membership section enabled, everything work fine. However, if I have just the Contribution Amounts section enabled, after submitting the contribution, users will land on an error 500 page. The contribution will be completed and the record will be stored in civi, but the confirmation email will not be sent.

After hours of trouble shooting I have narrowed it down to: this only happens when the Contribution Amounts section is enabled by itself. Everything was working fine, until the recent upgrades. The error logs I can find are not giving me any useful information.

Also I just installed the same version of Civi on another server and everything works fine, including the Contribution Amounts section.  All the settings are the same on both pages.  Both Servers are on the same host, so I don't think it is a hosting problem.  I think there is something broken is civi, but I don't know how to find out where to look.
Does anyone have any ideas?

Thank you.

Errors from Logs

1 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Mail/EmailProcessor.php(104): CRM_Core_Error::fatal("No mailboxes have been configured for Email to Activity Processing")

2 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(401): CRM_Utils_Mail_EmailProcessor::processActivities()

3 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_fetch_activities((Array:1))

4 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))

5 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:7))

6 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("job", "fetch_activities", (Array:1), NULL)

7 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(145): civicrm_api("job", "fetch_activities", (Array:1))

8 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(79): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))

9 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(99): CRM_Core_JobManager->execute(FALSE)

10 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_execute((Array:2))

11 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))

12 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:7))

13 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "execute", (Array:2), NULL)

14 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(113): civicrm_api("Job", "execute", (Array:2))

15 /home/oursite/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php(32): civicrm_cli->callApi()

( [message] => Could not connect to MailStore for civicrm_bounce@ouremail.org
Error message:
An error occured while sending or receiving mail. The POP3 server did not accept the password: -ERR [AUTH] Authentication failed. .

 [code] => ) –

I've found that almost all of our 500 errors have been server related, such as a security issue being run into with the site. I usually work with the host to see if they can find something in their logs. The only other reason I've gotten a 500 error was when something in my php settings wasn't set high enough (like memory allocated, execution time for a script, etc).

Usually my host will have me run through the steps to recreate it (making sure they have my IP address) and they will watch for any related errors.


Can I avoid HTML formatting being escaped during API import? I need to import HTML formatted content to a custom event field for a larger number of events.

During import via the API, HTML tags are being escaped and rewritten: Linktext becomes &lt;a href=“https://example.com“&gt;Linktext&lt;/a&gt;.

Is there a way to avoid this and preserve the tags as they are?

You can edit /CRM/Utils/API/HTMLInputCoder.php:
CRM_Utils_API_HTMLInputCoder->getSkipFields returns a list of fields that will be skipped on encoding. Add an entry for your custom-field to this list prevents the html-input from being escaped. The entry must be "custom_" + custom-field-id.


Is the Intuit processor active/functional? I have a question from a group that uses Intuit with their POS system and were wondering if they could integrate their CiviCRM payments directly into that same account.

I see there is a Wiki page from 2013 about setting up Intuit payments, but I can't even get the extension to install on CiviCRM 4.6.8. (I copied the .zip file from Github and unpacked in the CiviCRM Extensions directory but it doesn't show in the Extensions list, even after refreshing. I assume this means the extension is stale / not functional with a recent version of CiviCRM)

Is anyone using Intuit or should I consider this a lost cause and go to plan B?

This is a pre-civix extension - which probably makes it one of the first extensions, period.

I tried building a civix extension and dropping the files in from Github, but it isn't showing up as a payment processor option.

That said - the code doesn't look like it's in such bad shape.  A little bit of love would probably get this functional.


Why does CRM.url give different results in WordPress and Drupal? I'm trying to understand why the JavaScript function CRM.url gives different results depending on CMS. Can anyone explain?
For example this code:
CRM.url('civicrm/payment/ipn/test', null, 'front')

In WordPress it returns the complete URL with the domain:
http://wpmaster.localhost:7979/civicrm/civicrm/payment/ipn/test/
Whereas in Drupal in returns the URL without the domain:
/civicrm/payment/ipn/test
This inconsistency feels wrong. Is it a bug in CiviCRM?
For context I'm looking at this issue: https://github.com/artfulrobot/uk.artfulrobot.civicrm.gocardless/issues/97

I believe the third parameter should be boolean not string, 1 or 0/ true or false


How to use API to bulk delete contacts quickly? In development I would like to use the API to delete all contacted except conctact_id  1 and 2. With Contact

This:

$result=civicrm_api3('Contact', 'delete', array(
      'id' => array('NOT IN' => array(1, 2)),
      'skip_undelete' => "1",
    ));

.. won't work even though with get it does. Would seem there is no good way to do this fast, without making a complicated MySQL query. Who knows a quick work around. Mine were extremely slow and ran into error 500 timeout errors.

Api4 will likely to be able to do this, but it is not yet released.
It is not possible with api3. You'll need to write a custom php script to loop and call the api repeatedly, or else execute a sql query.


All seems fine but I still get this: You are not currently subscribed to any Groups Can't get customers to show up on "My contacts Dashboard" URL.

Using CIVE CRM 5.x and Drupal 7

I checked all settings, created a group,assigned customers to group, but still not showing up...on the My Contacts link :

http://localhost/crm/civicrm/user?reset=1

The dashboard only shows public groups that a user is subscribed to. You will need to set group visibility to 'Public Pages'. So you might need to update the groups that you would prefer to show up on user dashboard.

Thanks

Pradeep


Can't access custom fields used in event registration Versions:

Drupal 7.63
CiviCRM 5.9.1

Custom Fields:

Created custom fields with Field Type of Autocomplete-Select with lookup for following fields:

Institution
Area of Study
Year of Graduation

Used for: Participants (Role): Attendee

  Attendee is a type of participant for an event type, alongside other types

Custom Data Set is active
Custom Data Set is public

Custom fields are to be used by CiviEvent attendees to self select as part of event registration, this information is saved against their contact entry.

Drupal Permissions

"CiviCRM: access all custom data" is active for Anonymous User role

Problem

When typing in a valid value for the custom field, such as "Accounting" for "Area of Study" the following error of "Loading Failed" is displayed for an unauthenticated user.

This lookup works fine with the following Drupal Role Permission assigned:

CiviCRM: access CiviCRM backend and API

Master control for access to the main CiviCRM backend and API. Give to trusted roles only.

I've been unable to find more information about the security implications of this setting, and the wording of this setting concerns me when thinking to giving it to Anonymous Users.

I'm trying to get the balance of functionality without leaving the system too open, but I'm unsure why I need to expose access to the backend and API to get this working.

When the following Drupal permission is modified: (thanks @petednz)

"CiviCRM: access AJAX API" is active

The error message in a cell such as "Area of Study" upon searching an area such as "Accounting" is "None Found" (error has light great background instead of red background per image above)

"CiviCRM: access AJAX API" is inactive

The error message in a cell such as "Area of Study" upon searching an area such as "Accounting" is "Loading Failed" (error has red background per screenshot above)

I'm working on this with @zoog and can confirm that the autocomplete only works when 'CiviCRM Backend and API' permission is granted to anonymous.
However changing it to an ordinary select works without this permission.
Seems independent of 'access AJAX API' which remains granted.
What do you think @petednz-fuzion - have you got autocomplete work for anonymous?


Moving Angular extension into /ang/ I'm attempting to move code from an angular extension into core. I've created an ang/crmModuleName and moved the ctrl and partials into it, and crmModuleName.css into the ang/ and crmModuleName.js into the ang/. I've modified Civi/Angular/Manage.php to include js, css, partials, settings. Cleared cache on local server, but it is not working.

Is there another step I've missed?

Here's the detailed steps I took to move the angular extension from an extension and into core.

if your angular files are not already name spaced, they should be changed.  In the angularextension there should be a folder in ang/ named something similar to the module. Namespace this folder to crmModuleName. Outside of the crmModule folder, but inside the ang folder should be your css and the file that creates the module and has the router in it. Namespace these files to crmModuleName.css and crmModulename.js.
Move the crmModulename folder and files to the ang/ folder in CiviCRM core. It should mimic the directory structure of your extension.
There should be a file in the ang/ folder in your extension that is modulename.ang.php - it should have an array that points to where the files in your extension are located:

<?php
return array(
  'js' => array(
    0 => 'ang/crmModuleName.js',
    1 => 'ang/crmModuleName/*.js',
    2 => 'ang/crmModuleName/*/*.js',
  ),
  'css' => array(
    0 => 'ang/crmModuleName.css',
  ),
  'partials' => array(
    0 => 'ang/crmModuleName',
  ),
  'settings' => array(),
);

Find the file Civi/Angular/Manage.php. Within the public function getModules put the information from modulename.ang.php. It should look like this:

$angularModules['modulename'] = array(
  'ext' => 'civicrm',
  'js' => array('ang/crmModuleName.js', 'ang/crmModuleName/*.js'),
  'css' => array('ang/crmModuleName.css'),
  'partials' => array('ang/crmModuleName'),
  'settings' => array(),
);


Progressive Web App (PWA) on Drupal? I would like to get our CiviCRM install running as a "Progressive Web App" (https://developers.google.com/web/progressive-web-apps/).

Has anyone been able to successfully get the following module working with CiviCRM and Drupal?

https://www.drupal.org/project/pwa

What about other approaches to making CiviCRM run as a PWA?

Thanks!

The PWA module is designed to work out of the box for very general cases without providing too much customizable functionality. People wanting advanced PWA functionality often have too-specific of requirements to wrap it up all nicely in a module, but many folks just want branding and some pages to work offline. PWA can offer those basics to you.

When you install the PWA module, you should get a Web Manifest and offline caching, provided you specify which URLs you would like cached in the admin settings. The Web Manifest also works with almost no configuration, but if you want custom icons you can implement hook_pwa_manifest_alter() (link goes to official example) and specify your own icons.

If you have any specific questions the best way to get support is by filing an issue on drupal.org and labelling it as a support request. I typically respond quickly and try to point you in the right direction even if I can't offer a coding solution.

I would also love to document your experience in terms of how it works with CiviCRM, and if necessary we can offer recommendations on URLs to exclude, assets to cache by default, etc.


Can TinyMCE 4.2.1 be installed under CiviCRM 4.1.5? I have been attempting to install TinyMCE 4.2.1 as the default Drupal editor but have run into problems. I have posted separately on the TinyMCE forum about this. I am just wondering if anyone has installed it as a separate wysiwyg editor CiviCRM?

We are on 4.1.5

CiviCRM 4.1 is not maintained and highly insecure. Unless you have manually backported every security patch on this list plus the relevant ones on this list then you are strongly recommended to upgrade to a supported version. Recent versions, incidentally, ship with TinyMCE.


Need to change membership inheritance We have household memberships set up for the household members to inherit from the household.

We also limit the number of memberships per household (currently set to 4).

We did this because on import, any attempt at having the entire household inherit from one member resulted in multiple memberships (always 4).  Not nice.

Now, after almost a year of use, we have an issue with credit card renewals if the member wants to auto renew.  Despite the fact that the renewal email came from the household, the credit card company put the renewal on the household member whose credit card was used.  The household and spouse did not inherit the membership.

I can't change the inheritance rules given that they can only be changed when the membership type is not in use.  We have thousands of members and 8 membership types.

I can think of a couple of possible ways to accomplish this, none nice.  Ranging from create a whole duplicate set of membership types and transitioning them manually when renewals come in (ugh, ugh) to exporting the entire membership table, changing all membership types to have a max of "0"(unlimited) members and allowing inheritance from any member of the household, to attempting to delete one membership level at a time and re-import those.

Has anyone figured out a way to get this done in a reasonably painless way.

Thanks.

Just sharing that we have developed and released a CiviCRM extension which solves this problem, see https://github.com/agileware/au.com.agileware.membershiprelationshiptypeeditor

Membership Relationship Type Editor for CiviCRM - edit existing Relationship Types and re-calculate inherited memberships

We hope this is useful to people using CiviCRM.


Is there a way to find out why an email address is 'on hold'? I'm currently going through our system and there is a lot of emails that have been put on hold, is there a way to find out or is there a list somewhere on the database as to why each one is specifically on hold  (i.e. email is not active or security issues)? I'm currently having to go through one by one which is necessary but time consuming.

Any help would be appreciated.

Yes - you want the "Bounce Report".  Click on Reports menu » Mailing Reports, select Bounce Report.  In "Columns", check the "Bounce Reason" checkbox, and ideally "Bounce Type" as well.


CiviCase dashboard shows cases for invisible contacts iam using CiviCRM 5.25 and Drupal 7.71. I have a bunch of acls running to limit the access to contacts, so with using CiviCase it controls the limited access for case managers to contacts, or more specific: to clients. therefore related permissions module is also running. Normally the limited access is working fine, even on the search pages (!).

But the CiviCase dashboard civicrm/case?reset=1 is not working this way. The CiviCase dashboard show too much cases. As well the overview table as the activites results shows cases the case managers should not see, because the manager is not allowed to see many of this contacts (clients). If i hit a contact name, i get the permission issue and i can't access the contact, this is expected behaviour.

So, the permission on this page is set to "access all cases and activites", which should mean "... for visible contacts", but "for visible contacts" is not working. Is anyone who can confirm that?

You're correct that the case dashboard permission is a bit hardcoded to just "all" or "my" cases, e.g. https://github.com/civicrm/civicrm-core/blob/8036d43973a5d42b0722cc45cba3a9f88e9ce182/CRM/Case/BAO/Case.php#L695


DB Error on upgrade to 4.7: Duplicate entry activity_tab_filter for key 'index_domain_contact_name' I receive the error below during the upgrade process. I restored to previous backup and tried again and received the same. Any ideas what exactly is it indicating is duplicate? Thanks so much!

  [Error: Migrate Settings to 4.7.alpha1] Error Field   Error Value
  Type  DB_Error Code   -5 Message  DB Error: already exists Mode   16
  UserInfo  ALTER TABLE civicrm_setting ADD UNIQUE INDEX
  index_domain_contact_name (domain_id, contact_id, name)
  [nativecode=1062 ** Duplicate entry '1-571-activity_tab_filter' for
  key 'index_domain_contact_name'] DebugInfo    ALTER TABLE civicrm_setting
  ADD UNIQUE INDEX index_domain_contact_name (domain_id, contact_id,
  name) [nativecode=1062 ** Duplicate entry '1-571-activity_tab_filter'
  for key 'index_domain_contact_name']

It seems that you have the same setting that is set twice on your database, and the upgrade to 4.7 enforce it won't happen.

You will need to list your settings as stored in the database, you should see more than one activity_tab_filter for the contact_id 571.

Delete the duplicate(s) and keep only one and then run the upgrade again and you should be fine

X+


How do I configure CiviMail to send through sendgrid? This is a little embarrassing for me to ask, because years ago I set this up multiple times, however, I've been out of the CiviCRM world since 2012, and can't, for the life of me, figure out how to configure a CiviCRM 4.6 to send via sendgrid for an organization I volunteer with.  I have a sendgrid account, I have CiviCRM 4.6.11 configured with wordpress.

Is there a special module/extension/plugin? custom script or code?

Go to Administer> System Settings> Outbound Email (SMTP/Sendmail)

Select SMTP

server: smtp.sendgrid.net
port: 587
authenticate: Yes
Username: your sendgrid username
password: your sendgrid password


Call to undefined function user_load() using Drupal 9 and api3? Full error message:
Error: Call to undefined function user_load() in CRM_Utils_System_DrupalBase->getUserObject() (line 558 of /var/www/drupal/vendor/civicrm/civicrm-core/CRM/Utils/System/DrupalBase.php)

I get this when using an api3 call like this:
$result = civicrm_api3('User', 'get', [
  'sequential' => 1,
  'id' => 1,
]);

The function user_load is deprecated in D9.
https://api.drupal.org/api/drupal/core%21modules%21user%21user.module/function/user_load/8.7.x
Looks like we need a replacement stub function in the drupal module. For a quick hack, you could append this to /var/www/drupal/web/modules/contrib/civicrm/civicrm.module (or wherever it lives on your server).
A better method might be to create a new D9 file of functions that gets loaded selectively only for D9.
/* for when user_load gets deprecated */

if (!function_exists('user_load')) {

function user_load($uid, $reset = FALSE) {
  if ($reset) {
    \Drupal::entityManager()
      ->getStorage('user')
      ->resetCache([
      $uid,
    ]);
  }
  return \Drupal\user\Entity\User::load($uid);
}

}


Is it possible, using ACLs, for a group to have only 'create' access to contact custom data and another group to have 'edit'? My user would like one group of users to be able to have only 'create' only access to a custom field set that will be in a contact's tab, and for another group to be able to have 'edit' access.  I have tried this out and it doesn't seem to be possible using ACLs - at least not 'out of the box' (unless there's an extension that will help with this?). There's a message on the 'Manage ACLs' screen that says "NOTE: For Custom Data ACLs, the 'View' and 'Edit' operations currently do the same thing".  This kind of requirement is perfectly reasonable and probably not unusual - but is it possible for contact custom data?

One way of doing this, if you were using Drupal, would be to use Views and Webforms. This is our 'go to' approach when needing to finesse who can see/do what.
I would use Contextual Filters to show the logged in users the data they should be able to access, and then use links to take that Contact ID over in to a webform_civicrm form for doing any editing.


How to change or transfer mailing list groups properly? Right now - we have a smart group with all individuals tagged, in this example "Email List" and of type "Individual" as our main email list.  This has worked fine for us - as we rarely sent emails.  Now we are moving forward and investing more in email communications. We want to fork this list into two regular groups. (stop using the tag system and smart group)

Group 1: Events and Invitations
Group 2: Monthly E-Newsletter

The base for both groups will be our current smart group as they all indicated they want to receive updates - but I also want to make sure we honor unsubscribes.
We are splitting the two groups up as we suspect that we will get more unsubscribes from the Monthly E-Newsletter group than from Events and Invitations (as people like coming to our events).  Also we find its easier to add people to groups via profiles, instead of tags.  (there is no add new contacts to a tag in the settings of profiles.)

Since folks who have already unsubscribed aren't in the smart group, I would simply search for members of the smart group, add them to group "Events and Invitations", add them to group "Monthly E-Newsletter", and delete the smart group.


Allow users other than Administrator to view report details We are using civi 5.4.1 on Wordpress 4.9.
We want to allow users other than Administrator the ability to view reports and click on the names in the reports to view that contacts details.

Currently if the User searches, they can click on the names with no problems, but if it's a report, they can only view the list, if they click on the name they get the below error message.   Is this a permission issue?

I found the issue, although it is a little confusing.   First I gave all permissions to the role and it worked, then I started working back to find out which permission needed to be checked.  It turns out that this one "CiviCRM: access deleted contacts " is the one that must be checked for other roles to view the details in a report.   Weird.


Theming Civi Vs Drupal Since myself new to civi and drupal combination in certain case we need drupal as backend for few functionalities/workflow, and few functionalities works civi as backend. So my concerns is where would be the theme get placed ..whether we need to build two themes for civi and drupal differently. or theming will be common in one place? Please advise

Thank you

In Drupal 7 at /admin/appearance you can specify what Drupal theme to use for front-facing civicrm pages, and separately which one to use for back-end civicrm interface.

Hope that helps. Not sure I quite understood your question but thought this might be what you need.


Initialization Error After Backing Up Wordpress Earlier today I did a backup and restore on a Wordpress website. After the restore was successful, I noticed I could no longer access or edit my posts/pages in the Wordpress Dashboard. And I noticed CiviCRM throwing this error:

Initialization Error

Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => simpleHandler
)

[code] => -24
[message] => DB Error: connect failed
[mode] => 16
[debug_info] => [nativecode=Access denied for user 'user'@'localhost' (using password: YES)]
[type] => DB_Error
[user_info] => [nativecode=Access denied for user 'user'@'localhost' (using password: YES)]
[to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=Access denied for user 'user'@'localhost' (using password: YES)]"]
)

I've since tried reverting to the website instance that existed prior to the restore, when Civi was still working perfectly, and the same error still exists. I've disabled Civi and have regained the ability to edit posts/pages, but Civi remains broken.

The failure you're seeing is because the MySQL credentials are no good.  These are set in the civicrm.settings.php file.  Did you possibly restore a backup that didn't include the civicrm.settings.php file that was in place when it was working?


Database in unexpected version (and we have no backup DB) Applied the 5.3.2 patch to our WP site yesterday, and in so doing upgraded the database to 5.6.alpha1. After doing this, multiple components (Contributions, Events, Mailing) became unusable. Trying to access these caused 500 (server) errors. Meanwhile, Civi 5.4.1 dropped, so I replaced the 5.3.2 patched code with 5.4.1 -- but couldn't update the database, because it was still 5.6.alpha1.

"No problem," I thought -- I can restore the WP database from a backup. But the only backup I had was from after the 5.3.2 patch, i.e. in the 5.6.alpha1 state. And as luck would have it, the hosting provider's backup on the server was corrupt and couldn't be restored.

So here's my dilemma. System Status tells me I need to "determine the correct version corresponding to your current database state." Should I try to manually alter the working database so it aligns with the 5.4.1 codebase (and if so, how do I even begin to do that)? Or do I try to reapply the 5.3.2 patch and hope to somehow fix the server errors? Or do I apply a different codebase entirely?

The error message also suggests fixing the file civicrm-version.php -- so I set the 'version' value to '5.4.1' but no luck. I still get this:

Your database is marked with an unexpected version number: 5.6.alpha1. The v5.4.1 codebase may not be compatible with your database state. You will need to determine the correct version corresponding to your current database state. You may want to revert to the codebase you were using until you resolve this problem. OR if this is a manual install from git, you might want to fix civicrm-version.php file.

How best do I fix this? And since Civi appears to be running okay right now despite having different codebase and database versions, is it possible the database version is somehow misidentified -- that the DB version is really 5.4.1, but identifies itself as 5.6.alpha1? Images (bottom) showthe current DB structure.

As an aside, I've just learned a valuable lesson. Always store a DB backup locally before starting an upgrade, even when two automatic backup systems are running. If I had backed up manually, right now I'd be moving other projects forward instead of trying to remedy this version mismatch on an active production site.

Ahh did you upgraded to unstable version of CiviCRM? The last stable release i see is 5.4.1. Try replacing the civicrm code base to 5.4.1 and then update the civicrm_domain.version to 5.4.1 and also truncate all cache tables and anything under template_c folder.


How to create a Drupal View that calculates activity end time by duration I'm trying to create a Drupal View table of CiviCRM activities that calculates the end time of the activity based on start time and duration.So far I've got the unix start time of the activity, a math expression that turns duration into unix minutes and a math expression that adds the unix start time and the unix duration minutes to get the unix end time of the activity.The final step is to convert that unix end time of the activity to a human readable time like 7:32 AM. All math expressions work correctly, I've checked the computed end time (expression_1) field with unix converters.I'm not certain where I'm hitting a wall but if I test the output with the Views PHP module (I'll code it into my template once I get it ironed out) using something like this:

<?php
print date('d-M-y g:i A', $row->expression_1);
?>

I get 31-Dec-69 7:00 PM as the output for every row. Which is the day prior to unix's base time of January 1, 1970.I'd appreciate any guidance.

The template file is just to change how this one field is displayed.

Create a view of civicrm activities.
Add the Scheduled Activity Date field three times.
First to display the date.
Second to display the time in.
Third to convert the start date/time to Unix (I had previously added Unix as a time format in Drupal).

Then add Duration.

Add a Math Expression field to convert duration into Unix minutes.

Add another Math Expression field to add the Unix start time to the unix duration math expression.

Here is the final list of fields:

Save the view.

To create the template for this field we need to get the specific name for the template.
In the Advanced section of the View, go to Theme:Information.
Scroll though the listed fields until we get to the one we are interested in manipulating.

In our case it was the final field and the most specific template name available (templates are listed from least to most specific). Copy the last listed template.

Now create a new file and paste in the name you just copied. The name should end in tpl.php.

In the file put:

<?php
print date("g:i A", $output);
?>

Save this new template to sites/all/themes/current_theme/templates where current_theme is your theme name.

Flush cache and you should be good.

Here is the final result:

Notice that when you are editing the view, this field still displays in Unix time.


How to deal with ' or (') in CKeditor I am unable to use smarty in CKeditor because it's transforming the ' into & #39;
I couldn't find anything useful when click the configure CKEditor Button in display preferences.

You can turn off html encoding for CKeditor through UI (i.e >= 4.7)

Navigate to Administer >> Customize Data and Screens >> Display preferences

Scroll down until you see Configure CkEditor button. Click on it to view all the settings. Under Advance options add entities option as False(as shown in image) and save the form.

Note: You will need to clear your browser cache to reflect the changes(and CiviCRM caches).


Smarty Custom Variable / Token Array We've written a custom token to pull a piece of custom data off of any open cases. The token works as an imploded variable. I'd like to be able to use the token as an array as well (so I can run a for each loop in an email communication.) I am having trouble accessing the array.

If I use the variable {extrainfo.namearray} the email prints "Array". I've tried a simple foreach loop

{foreach from=extrainfo.namearray item=value key=label}

    {$label}
    {$value}

{/foreach}

This prints out an "0" and "extrainfo.namearray" I can only assume that's becuase I don't have the "$" before the token name. The statement prints out nothing if I add the $ to the token name.

I know the array has content, if I use {debug} in an email, I can see that it is part of the {$contact} tokens. It prints our the array itself with the expected data:

extrainfo.namearray => Array (3)
97485 => "Name 1"
97486 => "Name 2"
97547 => "Name 3"

I also tried accessing it in this manner {$contact.extrainfo.namearray} but that prints nothing (not even "Array").

Any advice on how I can target/loop items in the {extrainfo.namearray} array?

Through further testing I found that if I FIRST include the {extrainfo.namearray} token (which simply prints 'array') and THEN run a loop through the contact array, it does in fact show all of the tokens!

In the case anyone else finds this useful, my final code:

{extrainfo.namearray} // hide this so not seen in email
  {foreach name=outer from=$contact key=k item=it}
     {if $k == 'extrainfo.namearray' }
       {foreach name=mid from=$it item=inn}
           {$inn}
       {/foreach}
     {/if}
  {/foreach}

I'm not sure why I have to include the custom array first before it will include it in the contact array so that I can properly loop through it - but alas it's a workaround that works!!!


CiviMail space characters added In CiviMail, in the subject or at the end of the text of the mail, spaces are added after certain number of characters.

How to solve that?

Screenshots of the problem below. An additional space between word European and agricultural.

We did enounter the same issue earlier. I created an issue for it and proposed a patch: https://issues.civicrm.org/jira/browse/CRM-20228