title: "lost" main & secondary menu (drupal)

text:
# Question
Title: "lost" main & secondary menu (drupal)
I have stupidly unticked both the main and secondary menu in the Bootstrap settings options (too many windows open!). I have lost both the Drupal and Civi menus and basically all administrator ability to access/edit anything via the frontend.. :(

I can get back to the Bootstrap settings page via the browser back button but now just get and now get "access denied" if i try to re-enable the menus. Any pointers where to go on the backend to restore? Many thanks.

# Answer
First, it's possible it's just your login session got ended, so if you haven't already tried I'd try just logging in again.

Otherwise there might also be more going on that's not related to the main/secondary menu because it looks like you have something customized, but you can try this directly in the database to reset. Assuming drupal 7.

`update variable SET value = 'a:15:{s:11:"toggle_logo";i:1;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:1;s:24:"toggle_node_user_picture";i:1;s:27:"toggle_comment_user_picture";i:1;s:32:"toggle_comment_user_verification";i:1;s:14:"toggle_favicon";i:1;s:16:"toggle_main_menu";i:1;s:21:"toggle_secondary_menu";i:1;s:12:"default_logo";i:1;s:9:"logo_path";s:0:"";s:11:"logo_upload";s:0:"";s:15:"default_favicon";i:1;s:12:"favicon_path";s:0:"";s:14:"favicon_upload";s:0:"";}' where name='theme_seven_settings';`

You might have a custom theme so the `name=` part might need adjusting. You can do

`SELECT * FROM variable WHERE name like '%_settings';` to see what you have.
> 0 votes

---
Tags: drupal, menu
---


# Question
Title: Recommendations or Experiences on Archiving Mailing Data
We have an instance that has been using CiviMail extensively for years. The civicrm\_mailing and civicrm\_activiy tables far exceed the number of records of any other tables.

It seems likely that these tables could have some ancient history removed from them and make some operations work more smoothly, faster, or less error prone. e.g. back-ups or operations in civicrm involving groups.

Are there any recommendations, best-practices, or gotcha's for archiving/deleting historic data in CiviCRM. Specifically for mailings and activities, but while we are at it: contact or other data as well?

Top database tables:

```
2.6G    ./prod_civicrm/civicrm_mailing_recipients.ibd
2.3G    ./prod_civicrm/civicrm_mailing_event_queue.ibd
1.6G    ./prod_civicrm/civicrm_activity_contact.ibd
1001M   ./prod_civicrm/civicrm_log.ibd
641M    ./prod_civicrm/civicrm_mailing_event_delivered.ibd

```

# Answer
we have a custom overnight routine that copies data from civicrm\_mailing\_x and civicrm\_mailing\_event\_x tables to duplicate tables with a archive namespace and then deletes the appropriate rows from the main tables. The biggest things is making sure that you adequately understand the relationships between the tables so you don't accidentally delete data that hasn't yet been archived due to a Foreign Key constraint. The other thing to note is that doing it this way means you loose stats from the reports etc for the mailings that have been archived.
> 4 votes

# Answer
One small gotcha with large deletions: MySQL may not free-up the space in the way you expect.

The exact mechanics and numbers probably depend on the variant of MySQL and its configuration options, but just for a general sense: if the goal is to reduce the disk-usage of those tables on the active system by 75% (8gb to 2gb), then you might try to `DELETE` the oldest 75% of records. That may not reduce actual disk-usage by 75% -- because MySQL has its own system for freeing/reusing/reallocating space.

If you really need to reduce usage in a major way, then you might have to setup new tables or a new DBMS instance; then copy over the desired subset of recent information and drop the old. (Of course, you don't *have* to do this first-thing; you might try a simple `DELETE`; assess the change in disk-usage; and then decide.)

This gotcha is only a consideration when performing one epic shrink. If you follow a practice like Seamus's comment, wherein data is incrementally migrated out (`outflow =~ inflow`), then the size of the active system can hover around an equilibrium.
> 4 votes

# Answer
I've had an excellent experience using this extension: https://github.com/jitendrapurohit/nz.co.fuzion.deleteoldbulkmailings

I needed a few small fixes for my purposes (include a limit parameter and removal of code that assumed extended logging is on), which you can see in my fork here:

https://github.com/adixon/nz.co.fuzion.deleteoldbulkmailings

As I recall, this was about 12 years of mailings and reduced the daily dump from maybe 12Gb to 4Gb (I left the previous 12 months of log data). Tim's notes are relevant if your goal is to reduce your disk size usage for the database, but you don't need to worry if you only goal is reducing the size of dumps for backup and reducing the potential for lengthy updates if those tables get changed.
> 3 votes

---
Tags: email, database
---


title: Unique custom field - contact creation

text:
# Question
Title: Unique custom field - contact creation
I want to add a custom field that we use as an ID from a 3rd party. I need to ensure this value is unique as a way to prevent duplicates. What is the best way to do this?

# Answer
> 7 votes
The "external identifier" field on contact records is available so you don't need a custom field. It won't allow duplicates.

---
Tags: civimember, contacts, custom-fields, duplicate-contacts
---


# Question
Title: I want to customise my contact form - New Donor
I am looking to add a field initial next to Mr so that we can create a postale letter with Mr C XX

# Answer
> 1 votes
The language of the question is a bit unclear, but I think what you want is a token that takes just the first letter of the first name. You don't need to collect it separately to do so.

If this is what you're looking for, please leave a comment to this answer saying so. I have an extension that adds a "middle initial" token, I could quickly adapt it for your situation.

---
Tags: contacts
---


title: How can I hide or modify page name

text:
# Question
Title: How can I hide or modify page name
This might more be a Drupal rather than a CiviCRM question but how do I hide or modify the name of a page like in this example? It's CiviCRM home page here.

# Answer
> 1 votes
If you just want to hide on that particular page one option is to add this in css/extras.css

```
body.page-civicrm-dashboard div#tabs-wrapper h1 {
  display: none;
}

```

# Answer
> 0 votes
Try adding word replacement. Navigate to CiviCRM \>\> Administer \>\> Customize Data and Screens \>\> Word Replacements.

For some strings it works but for others you need to add some JS to replace the words or hooks to change the page titles.

Pradeep

---
Tags: templates
---


title: Link Contact Type with Drupal Roles

text:
# Question
Title: Link Contact Type with Drupal Roles
I have the CiviGroup Roles Sync working fine but realistically i want to link Drupal Roles to the CiviCRM Contact Types.

Is this possible? So if i add a role in Drupal it will be reflected in Civi? Instead of being added into a group.

Thanks,

Moe

# Answer
> 1 votes
Can you create a smart group for each contact type and then use CiviGroup Roles Sync?

Also if you add contact sub type field on the user registration profile and so that you can update the contact type and role on same screen.

HTH

Pradeep

---
Tags: drupal, groups, roles, rules
---


title: Cannot Edit CiviCRM Profile via Drupal

text:
# Question
Title: Cannot Edit CiviCRM Profile via Drupal
I have created a CiviCRM Profile called "Edit Details" i have checked:

* View/Edit Drupal User Account
* Standalone Form or Directory

It Displays correctly with no issues however when i go to edit it nothing happens, it does not add in the fields.

This is me trying to edit it as a Administrator so all the permissions are enabled.

Another thing i realised when saving the page it removes my Drupal Roles which is really weird. This is only when doing this with the CiviCRM profile.

Is there another way i can put CiviCRM fields onto the Drupal Edit page other than profiles.

Thanks

# Answer
> 2 votes
Is there another way? Yes (not necessarily a great way)

1/ make a Webform-civicrm form, and set it to work as a a block showing on user/\* and user.

2/ make a View showing the data in a block on /user with an Edit linking going to a webform.

That said, I have never seen a Profile not work in the way you are describing so it sounds as if something else is tripping you up.

---
Tags: drupal, profile, editor
---


# Question
Title: <br> tags inserted in rich text fields custom fieldsets when displayed as tabs
I am looking at a site where there is an extra `<br>` tag being inserted between all elements in rich-text fields in custom fieldsets, including between list items! And two being inserted between paragraphs. The html is clean in the editor, but this is how it's being rendered on the front-end. This is **only** happening when the fieldset is set to display as a tab. As soon as you move it 'inline', the problem goes away. Site is using default CKEditor.

Any ideas about why this could be happening and how to fix it? Thank you.

# Answer
> 1 votes
Oh I get it now. You mean `<br>` tags in the html source when you are in view mode causing extra line spacing to appear on the screen, not the literal `<br>` appearing as a visible string `<br>` on the screen.

So I personally agree that's not a faithful representation of the stored html which normally ignores whitespace when displayed, but it looks like it's been that way for a long time. Where this is coming from is https://issues.civicrm.org/jira/browse/CRM-11598 which doesn't specifically say it but I'm assuming it's referring to when you choose TextArea as the type for the Note field, where you *would* want this. The code looks like it's here: https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Custom/Page/CustomDataView.tpl#L90

So ideally it would also check to see whether it's TextArea or RichText. You can file a bug report at https://lab.civicrm.org/dev/core/issues

---
Tags: custom-fields, ckeditor, html
---


# Question
Title: Can CiviDiscount be used on a Contribution Page without Membership
I have seen references to CiviDiscount on contribution pages for memberships. Can it be used for a fundraising dinner? Note - I often struggle between creating an event or contribution page for fundraising dinners - both have tradeoffs

# Answer
> 5 votes
Here is an extension that adds support for discounts on contributions:

https://civicrm.org/extensions/discount-contributions

Edit: It has been improved with time, and seems to be working well so far. In the long term, it might be more interesting to get it merged in the main CiviDiscount extension.

# Answer
> 1 votes
You can use Discount for event registrations too, assuming you mean the fundraising dinner is an event sign up?

---
Tags: contribution-page, cividiscount
---


# Question
Title: Import/export database from old CRM version(5.4.0) to New CRM version(5.15.2) in wordrpess
Currently I am using Civi CRM (5.4.0) and want to upgrade it. I downloaded new version and installed it in my wordpress website.

I had a separate database for CiviCRM. When I installed & activated new version CRM plugin, it created tables in existing wordpress database.

Now my concern is, how can I import contacts, custom fields, Profiles etc. in new CiviCRM. Old plugin had civicrm.settings.php for database connectivity but same not found in new one.

# Answer
Ashok welcome to CiviCRM stackexchange

If you new CiviCRM database has not gone live than i would

1. Create a test instance of CRM 5.4.0
2. Upgrade CiviCRM to 5.15.2
3. Dump the Civi database after upgrade.
4. Drop the Civi database or all civi table from CiviCRM database i.e linked to your new Wordpress.
5. Import the CiviCRM database that was dumped at #3
6. Open CiviCRM from UI.
7. Clear CiviCRM cache by navigating to Administer \>\> System Settings \>\> Cleanup Caches and Update Paths.
8. Rebuild trigger by running http://domain.orn/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1&triggerRebuild=1

If you don't like above approach then you can use extension that migrates settings from one site to another

1. Config Items \- This tool supports adding and updating using json method ContactTypes, MembershipTypes, RelationshipTypes, OptionGroups with OptionValues, Groups, Tags, FinancialAccounts, FinancialTypes, EventTypes, ActivityTypes, LocationTypes, CaseTypes, CustomGroups with CustomFields, CiviCRM Settings (system settings set through the Setting.API - be especially careful with that!)
2. MI Data quality Tools \- This tool supports adding and updating using json method ContactTypes, MembershipTypes, RelationshipTypes, OptionGroups with OptionValues, Groups, Tags, EventTypes, ActivityTypes, CustomGroups with CustomFields, Profiles
3. Config Export (Undeveloped) and exports into yml format. (Import is not handled)
4. Import/Export(CRM\_Utils\_Migrate) This script performs data migration like Contacts, Contributions etc but not settings. But you can use export script to export in json format and then import using using extension from #1 or #2.
5. You can also use CiviCRM UI import/functionality to import Contact and their related data.

Cheers

Pradeep
> 2 votes

---
Tags: wordpress, import, export
---


title: Access Denied to CiviMail Opt-Out Form

text:
# Question
Title: Access Denied to CiviMail Opt-Out Form
The Unsubscribe link (in mailings) works fine if I am logged in as administrator, but I have "Access Denied" to the opt-out form if not.

(I have defined an Unsubscribe Group, with public visibility)

How can I fix that ?

# Answer
There is a permission for it. Go to your Drupal -\> People -\> Permissions and give anonymous (and authenticated) permission to Unsubscribe:

Access CiviMail subscribe/unsubscribe pages
> 7 votes

---
Tags: civimail, permissions
---


title: Receiving Lots of Spam

text:
# Question
Title: Receiving Lots of Spam
Our online profile forms are receiving lots of spam, even though reCAPTCHA is enabled. Any suggestions? Example form is here: http://insideout180.org/donate/adult-allies-registration-form/

# Answer
> 2 votes
Please add required fields to your form, at the moment it's possible to submit form with no data and even a spam bot can bypass the CAPTCHA.

Protect also the publicly accessible form with SSL certificate

# Answer
> 2 votes
I just had a look at your form (on my iPhone) and the issue is that there is NO reCAPTCHA configured.

In the Profile that you’re exposing in this form -\> hit its Settings -\> click on its Advanced Settings (fieldset at the bottom of the form) -\> check the reCAPTCHA box but most importantly hit that ? to the right of it to get a popup with detailed instructions on how to configure it.

---
Tags: profile
---


# Question
Title: Editing public profile listing view template
We are not wanting to have the links on a profile view page to query the data. For instance, an email link should be 'mailto:' and not search function. I viewed the page as see

```
<!-- .tpl file invoked: CRM/Profile/Page/View.tpl. Call via form.tpl if we have a form in the page. -->

```

as the template but in the code I do not see how to change. Alternatively, removing all link on the view profile page would also work.

# Answer
> 1 votes
You can simply set a field's Visibility setting to `Expose Publicly` and it will not use the field as a search function.

From the Visibility field helper text:

> When visibility is 'Expose Publicly and for Listings', users can also click the field value when viewing a contact in order to locate other contacts with the same value(s) (i.e. other contacts who live in Poland).

---
Tags: wordpress, profile
---


# Question
Title: Certain Emails, not all are falling into SPAM
We have an install where on certain contacts if you send an email directly from the contact record it goes through correctly. If an email is triggered via CiviRules it goes to SPAM. The email content is the same as well as the from address. This also happens when emails are sent from CiviMail (traditional). We are using mail() for outbound mail.

Is there a process difference when mail is triggered by CiviRules or CiviMail rather then directly from the contact record?

Install is in WordPress 5.2.2 with CiviCRM 5.13.4.

The SPF record for the domain references the web server.

# Answer
Receiving mail servers use a variety of different metrics to give your mail a 'spaminess' score to decide whether it is spam or not.

> Is there a process difference when mail is triggered by CiviRules or CiviMail rather then directly from the contact record?

There are small differences in the email headers generated via different routes. These *may* be affecting the score. The differing content is likely having an effect as well (even simple messages can appear spammy to receiving mail servers).

My hunch is that you don't have DKIM set up. Setting up DKIM will reduce your score and put you under the threshold in both cases, though it wouldn't work if:

* your emails (headers and content) look really spammy to the receiving mail server's algorithms
* clients using the receiving mail server keep on marking your emails as spam

Typically a receiving mail server will add a header to the email with 'authentication results' that typically refer to DKIM, SPF and DMARC. For example, when google receives a mail, it adds a "ARC-Authentication-Results:" header.

Posting those headers would be useful so we can check what it says about DKIM and SPF:

* If you are sending via mail() is it likely not using DKIM. The easiest way of adding DKIM is to switch to a third party mail provider.
* Also, you may have (in the eyes of the receiving mail server) a mis-configured SPF record, so worth checking.

A couple of final things to note:

* Each receiving mail server / service has its own algorithms. What works for one, might not for another.
* You need to give the receving mail server time to get used to this new source of mail (regardless of whether the config is correct or not). If the total volume of mail is low, receiving mail servers may never get used to it. This is one reason why many people choose to use a third party service.
> 2 votes

---
Tags: civimail, email, civirules
---


title: Help with configuring CiviCRM

text:
# Question
Title: Help with configuring CiviCRM
new to Civi CRM and really need help with setting up / customising. Anyone here that does that as volunteer for charity or paid ? looked on peopleperhour and cannot find

# Answer
Welcome to StackExchange. You can find many people who will do this on a paid basis at https://civicrm.org/partners-contributors

If you want to do it yourself and have specific questions then ask away on this site.

If you describe what your charity is, it may just resonate with someone willing to offer more substantial pro-bono help - but that's an exception.
> 2 votes

---
Tags: contacts, contributions
---


title: Token Example Module

text:
# Question
Title: Token Example Module
I am working on an extension that is going to use a custom token from Drupal content. I found the great example blog post from CiviCRM 4.1 but it appears that in CiviCRM 4.7 tokens switched to using `Civi\Token\TokenProcessor`. I have looked at a few extensions that do not appear to be using this model. Is there a good example (other than the documentation) of the new model.

Thanks, Josh

# Answer
> 1 votes
I think it's fair to say the new `Civi\Token\TokenProcessor` model is still evolving, but the older method still works and is the easier option for now unless it is not sufficient for your needs.

You can find a range of extensions doing things with tokens here

---
Tags: tokens
---


# Question
Title: method for versioning configuration of civicrm?
Is there a way to version the configuration so we can just roll it back if its a bit broken? Or is the only option full filesystem and db backups?

# Answer
> 1 votes
There doesnt seem to be, so I have gone with just regular full backups, and keeping a list of all the changes that I made as I go along, so I can keep track and undo them ;)

# Answer
> 2 votes
There is the CiviConfigure extension but I'm not sure how current it is.

There is also still bin/csv/export.php which you can use for option values and tags and such.

You can also use the api to retrieve and set various entities, e.g. using the cv tool.

For CiviCase, one of the original arguments for using external files was for versioning and managing dev/production. You can still use xml files for its config.

---
Tags: configuration, configandlog
---


title: Does civicrm support mysql sockets?

text:
# Question
Title: Does civicrm support mysql sockets?
My wordpress is installed and uses localhost:/run/mysqld/mysqld/socket but civicrm only works if I point to localhost

Is there a way to install civicrm through file socket ?

# Answer
You can set the DSN in the civicrm.settings.php file using this format:

`mysqli://user:password@unix(/path/to/socket)/databasename`

Use the actual word "unix" in the string to indicate sockets.
> 2 votes

# Answer
I believe CiviCRM does support UNIX sockets, yes. If your hostname is "localhost" and there's no port configured, MySQL defaults to a UNIX socket connection.

```
$ grep DSN sites/default/civicrm.settings.php
  define('CIVICRM_UF_DSN', 'mysql://vagrant:vagrant@localhost/vagrant?new_link=true');
  define('CIVICRM_DSN', 'mysql://vagrant:vagrant@localhost/vagrant?new_link=true');

```

And for me, `cv` works fine with this configuration:

```
$ cv api3 Contact.get
{
    "is_error": 0,
    "version": 3,
    "count": 25,
    "values": {
        "202": {
            "contact_id": "202",
            "contact_type": "Individual",

```

I did notice on a recent (Drupal, web UI) installation that CiviCRM defaulted to adding `:3306` into the `CIVICRM_DSN` value (but not the `CIVICRM_UF_DSN` setting). IDK why this happened, but this might be the source of your issue?
> 2 votes

---
Tags: mysql
---


# Question
Title: Is Civicrm 4.7.20 compatible with PHP 7.? - only using core components and one extension, cividiscount
I set up our website using Civicrm 4.7.20, MySQL 5.0.11, PHP 5.6 and Apache 2.4 some time ago; I will update (soon ISA) but want to know whether I can activate php 7 now?

# Answer
> 1 votes
If you look at the release notes for CiviCRM you will see various comments about fixes for PHP 7 / 7.1 / 7.2 / 7.3 from around 4.7.14 onwards. Some of those are wide-ranging or critical fixes, others just affect a specific function. So whether any particular version of Civi works under a specific version of PHP depends to some extent on which bits of Civi you are actually using.

If your site is as simple as it sounds, I'd just crack on with upgrading both Civi & PHP!

---
Tags: php, compatiblity
---


title: how civicrm class prepared on body tag

text:
# Question
Title: how civicrm class prepared on body tag
Does anybody have an idea, how and where we build CiviCRM class on body tag.?  E.g. 1

E.g. 2

Basically class build using civicrm url

* page-civicrm-admin-setting-updateconfigbackend
* page-civicrm-admin-setting
* page-civicrm-admin
* page-civicrm

# Answer
> 1 votes
Some of it is added via javascript, e.g. https://github.com/civicrm/civicrm-core/blob/5.15.2/js/crm.menubar.js#L104

But as this ticket notes the rest depends a bit on the CMS and the theme and is inconsistent: https://lab.civicrm.org/dev/core/issues/300

# Answer
> 1 votes
I was using Drupal 8 adminimal theme and shoreditch civicrm theme. but civicrm tab for contact were not showing correctly as expected. Found issue that civicrm class build using url path were not present.

Following block should be present in hook\_preprocess\_HOOK, This is total CMS functionality.

File Ref : adminimal\_theme/adminimal\_theme.theme

```
/**
 * Implements hook_preprocess_HOOK() for HTML document templates.
 */
function adminimal_theme_preprocess_html(&$variables) {
  // Add adminimal class to the body.
  $path_args = explode('/', \Drupal::request()->getPathInfo());
  $path_args = array_filter($path_args);
  if ($suggestions = theme_get_suggestions($path_args, 'page', '-')) {
    foreach ($suggestions as $suggestion) {
      $variables['attributes']['class'][] = $suggestion;
    }
  }
}

```

---
Tags: evaluating-civicrm, ui
---


title: CiviMail "View in Browser" Link Error

text:
# Question
Title: CiviMail "View in Browser" Link Error
I am on civi 5.14.2 drupal 7.x flexmailer & mosaico 2.x installed. It used to be working so far and all of a sudden it stopped working!! This email was sent using "traditional" link. Any idea what could go wrong? Here is the message I receive..

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

```

`Expected one Contact but found 0`

EDIT:getting debug message in drupal

> $Fatal Error Details = array(3) { \["message"\]=\> string(32) "Expected one Contact but found 0" \["code"\]=\> NULL \["exception"\]=\> object(CiviCRM\_API3\_Exception)#221 (8) { \["extraParams":"CiviCRM\_API3\_Exception":private\]=\> array(3) { \["is\_error"\]=\> int(1) \["error\_message"\]=\> string(32) "Expected one Contact but found 0" \["error\_code"\]=\> string(9) "undefined" } \["message":protected\]=\> string(32) "Expected one Contact but found 0" \["string":"Exception":private\]=\> string(0) "" \["code":protected\]=\> int(0) \["file":protected\]=\> string(68) "/home/webadmin/public\_html/cmm/sites/all/modules/civicrm/api/api.php" \["line":protected\]=\> int(45) \["trace":"Exception":private\]=\> array(7) { \[0\]=\> array(4) { \["file"\]=\> string(82) "/home/webadmin/public\_html/cmm/sites/all/modules/civicrm/CRM/Mailing/Page/View.php" \["line"\]=\> int(145) \["function"\]=\> string(12) "civicrm\_api3" \["args"\]=\> array(3) { \[0\]=\> string(7) "Mailing" \[1\]=\> string(7) "preview" \[2\]=\> array(3) { \["id"\]=\> string(3) "477" \["contact\_id"\]=\> int(0) \["version"\]=\> int(3) } } } \[1\]=\> array(6) { \["file"\]=\> string(76) "/home/webadmin/public\_html/cmm/sites/all/modules/civicrm/CRM/Core/Invoke.php" \["line"\]=\> int(311) \["function"\]=\> string(3) "run" \["class"\]=\> string(21) "CRM\_Mailing\_Page\_View" \["type"\]=\> string(2) "-\>" \["args"\]=\> array(2) { \[0\]=\> array(3) { \[0\]=\> string(7) "civicrm" \[1\]=\> string(7) "mailing" \[2\]=\> string(4) "view" } \[1\]=\> NULL } } \[2\]=\> array(6) { \["file"\]=\> string(76) "/home/webadmin/public\_html/cmm/sites/all/modules/civicrm/CRM/Core/Invoke.php" \["line"\]=\> int(85) \["function"\]=\> string(7) "runItem" \["class"\]=\> string(15) "CRM\_Core\_Invoke" \["type"\]=\> string(2) "::" \["args"\]=\> array(1) { \[0\]=\> array(15) { \["id"\]=\> string(3) "376" \["domain\_id"\]=\> string(1) "1" \["path"\]=\> string(20) "civicrm/mailing/view" \["title"\]=\> string(12) "View Mailing" \["access\_callback"\]=\> array(2) { \[0\]=\> string(19) "CRM\_Core\_Permission" \[1\]=\> string(9) "checkMenu" } \["access\_arguments"\]=\> array(2) { \[0\]=\> array(3) { \[0\]=\> string(28) "view public CiviMail content" \[1\]=\> string(15) "access CiviMail" \[2\]=\> string(16) "approve mailings" } \[1\]=\> string(2) "or" } \["page\_callback"\]=\> string(21) "CRM\_Mailing\_Page\_View" \["breadcrumb"\]=\> array(2) { \[0\]=\> array(2) { \["title"\]=\> string(7) "CiviCRM" \["url"\]=\> string(16) "/civicrm?reset=1" } \[1\]=\> array(2) { \["title"\]=\> string(8) "CiviMail" \["url"\]=\> string(24) "/civicrm/mailing?reset=1" } } \["component\_id"\]=\> string(1) "4" \["is\_public"\]=\> string(1) "1" \["is\_ssl"\]=\> string(1) "0" \["weight"\]=\> string(3) "800" \["type"\]=\> string(1) "1" \["page\_type"\]=\> string(1) "0" \["page\_arguments"\]=\> bool(false) } } } \[3\]=\> array(6) { \["file"\]=\> string(76) "/home/webadmin/public\_html/cmm/sites/all/modules/civicrm/CRM/Core/Invoke.php" \["line"\]=\> int(52) \["function"\]=\> string(7) "\_invoke" \["class"\]=\> string(15) "CRM\_Core\_Invoke" \["type"\]=\> string(2) "::" \["args"\]=\> array(1) { \[0\]=\> array(3) { \[0\]=\> string(7) "civicrm" \[1\]=\> string(7) "mailing" \[2\]=\> string(4) "view" } } } \[4\]=\> array(6) { \["file"\]=\> string(78) "/home/webadmin/public\_html/cmm/sites/all/modules/civicrm/drupal/civicrm.module" \["line"\]=\> int(444) \["function"\]=\> string(6) "invoke" \["class"\]=\> string(15) "CRM\_Core\_Invoke" \["type"\]=\> string(2) "::" \["args"\]=\> array(1) { \[0\]=\> array(3) { \[0\]=\> string(7) "civicrm" \[1\]=\> string(7) "mailing" \[2\]=\> string(4) "view" } } } \[5\]=\> array(4) { \["file"\]=\> string(48) "/home/webadmin/public\_html/cmm/includes/menu.inc" \["line"\]=\> int(527) \["function"\]=\> string(14) "civicrm\_invoke" \["args"\]=\> array(2) { \[0\]=\> string(7) "mailing" \[1\]=\> string(4) "view" } } \[6\]=\> array(4) { \["file"\]=\> string(40) "/home/webadmin/public\_html/cmm/index.php" \["line"\]=\> int(21) \["function"\]=\> string(27) "menu\_execute\_active\_handler" \["args"\]=\> array(0) { } } } \["previous":"Exception":private\]=\> NULL } }
>
> $backTrace = #0 /home/webadmin/public\_html/cmm/sites/all/modules/civicrm/CRM/Core/Error.php(463): CRM\_Core\_Error::backtrace("backTrace", TRUE) #1 /home/webadmin/public\_html/cmm/sites/all/modules/civicrm/CRM/Core/Invoke.php(55): CRM\_Core\_Error::handleUnhandledException(Object(CiviCRM\_API3\_Exception)) #2 /home/webadmin/public\_html/cmm/sites/all/modules/civicrm/drupal/civicrm.module(444): CRM\_Core\_Invoke::invoke((Array:3)) #3 /home/webadmin/public\_html/cmm/includes/menu.inc(527): civicrm\_invoke("mailing", "view") #4 /home/webadmin/public\_html/cmm/index.php(21): menu\_execute\_active\_handler() #5 {main}

# Answer
> 2 votes
Can you try updating the version of flexmailer extension to latest from https://github.com/civicrm/org.civicrm.flexmailer?

I think this problem was resolved via https://github.com/civicrm/org.civicrm.flexmailer/pull/33 and related PRs.

---
Tags: civimail, error, tokens
---


# Question
Title: How to send a formatted mail for webform submission?
I have created a Unpaid event and connected to the webform. Although online registration is enabled and email option is ticked, I was not able to send a formatted email.

I am able to send email using the webform email settings submissions.

Is there a workaround? Thanks

# Answer
> 1 votes
You could use CiviRules for this.

Additional info: Consider setting a small delay (when you configure your CiviRule) to ensure all CiviCRM data are saved before you Email your message out.

PS in additional to CivRules - you will also need to add the Extension: https://civicrm.org/extensions/e-mail-api

---
Tags: civievent, webform-civicrm, email, receipts
---


# Question
Title: How to I track down this problem when I try to CIVIMail? Sorry an error occurred and your information was not saved
While in CiviMail I keep getting this message

"Sorry an error occurred and your information was not saved."

# Answer
Did you check your firewall settings? The wordfence plugin (on WordPress) was doing that for us. Had to white list the params. Also, can be an error in the html of your email (or a smarty error). As @demerit said it's a generic error and can be plenty of things.
> 1 votes

---
Tags: civimail
---


title: Send QR code via SMS?

text:
# Question
Title: Send QR code via SMS?
Does anyone know whether it is possible to send QR codes to event participants via CiviSMS? A client wants us to send participant's QR codes to their mobiles.

# Answer
It doesn't look like the Twilio extension supports MMS at the moment and probably not Clickatell either but you can text the recipient the *link* to the QR code. It looks like you would need a public link anyway for Twilio's api if the extension supported it.
> 1 votes

# Answer
As mentioned in my comment to Demerit's answer I successfully achieved my objective to send a QR code to an event participant's phone (albeit the URL and not the image).

I installed the Clickatell extension for CiviSMS and the QR Code Checkin extension to generate the emails or SMSs to send the QR Code or its URL to event participants.

The instructions to set up the Clickatell extension at https://docs.civicrm.org/user/en/latest/sms-text-messaging/set-up/ are outdated but it was not hard to set it up.

The QR code extension was easy to set up, but don't forget to manually set the required permissions in your CRM (Drupal in my case). The extension provides a handy couple of tokens that can be easily included in an email or SMS.

The downside of the QR Code extension is that it only works on one event at a time. If you have multiple events that run on different days it may be possible to change the 'effective' event (on the event page) before sending QR codes and again during checkin. I haven't tested this.

Below is an example of the test SMS I generated.
> 3 votes

---
Tags: sms, twilio, clickatell
---


# Question
Title: Email addresses being set to on-hold bounce due to Away responses
We just discovered that we have several hundred contacts whose email addresses have been set to on-hold bounce due to Away responses. Apparently the 3 bounce maximum is also being applies to emails with Away responses. How do we change this? Also, is there a time maximum interval for the 3 bounces, after which old bounce history is discarded? Thanks for any light that can be shed on this.

# Answer
> 1 votes
You can change the hold\_threshold in civicrm\_mailing\_bounce\_type table for Away to your own choice. By default it is set to 30. Not sure why your system is set to 3.

I dont think if there is any way to discard old bounces unless you delete from civicrm\_mailing\_event\_bounce table. Probably good idea to write a script that runs on cron job to delete the entries of certain bounce type and X days old.

Cheers

Pradeep

---
Tags: email, bounce
---


title: Unable to enable CiviCase

text:
# Question
Title: Unable to enable CiviCase
When I try to enable CiviCase I get a white screen of death and the following msg:

"A fatal error was triggered: Could not create the MySQL views for CiviCase. Your mysql user needs to have the 'CREATE VIEW' permission"

I cannot find any way to add this permission in PhpAdmin. What should I do?

# Answer
RESOLVED thanks to help from Hershel: Unable to enable CiviCase - Definer v Invoker problem maybe

The solution was to enable remote connections for the specific MySQL database.
> 3 votes

# Answer
You'll need to look in your hosting control panel or ask your hosting provider. The mysql user account may not be allowed to have this permission in your hosting setup.
> 0 votes

---
Tags: civicase, mysql
---


# Question
Title: Is there a way to upload multiple discount counts into CiviDiscount?
We are getting ready to do a Groupon promotion that will discount memberships. Groupon has generated individual "voucher codes" for each person who purchases. I need to enter each of these voucher codes as a single-use discount code. I'd like to be able to enter up to 200 codes at once, all with the same usage limits and rules, but so far, I can't figure out how to do this except to enter each code manually and set all the rules each time. When I try to just copy one code to avoid having to set all the rules each time, the copy shows a randomly-generated code that can't be edited. Has anyone figured this out?

# Answer
> 3 votes
I upvoted Zachary's answer, but I felt conflicted. I do NOT recommend importing directly to MySQL, because you end up bypassing validation logic and could create corrupt discounts. However, their suggestion of the API CSV Import GUI is a good one, and the one I'd recommend.

If you're not sure what the values should be for your various columns, go to **Support menu » Developer » API Explorer**. Set your entity to **DiscountCode** and action to **Get** and press **Execute**. You'll get something much like you're seeing below. In the "Results" screen you can see the values, which you can copy/paste. If you already had discount codes, you may need to scroll down to find one that matches the ones you want to enter. You can click "Add Option" to set **Limit** to **0** if you can't see the full list.

# Answer
> 2 votes
It might be possible to import the codes directly into the database using a tool like PHPMyAdmin with the proper formatting.

The table which contains your codes is 'cividiscount\_item'. It contains 18 fields. If you were able to generate a code in CiviDiscount which defined the same usage limits/rules, you could essentially use that as a 'template' for the other codes you imported - assuming it was the same for all of the codes you needed to bring in.

There are various ways to import or create the codes in mySQL, either using some insert/update statements, or import from CSV. The fields in the database which contain the codes rules/logic are serialized, but I am assuming you could use a statement to update the codes you imported fields from the original one without losing any data integrity.

You could also just copy the code 199 times (ouch) and then use PHPMyAdmin to go and update the codes to your liking in the 'Code' field, but I can't see how that would be more efficient. Also, have to be careful about changing things in the database once they have gone into actual use on your site.

The API CSV Import GUI extension also seems to be able to import Discount Codes but you would face the same issues above - might be useful to you: https://civicrm.org/extensions/api-csv-import-gui

Edit, this is also *Really Ugly* and not preferred, but you can go to CiviDiscount, right-click and edit the code in question in a new tab. Use Chrome Developer Tools (Etc.) by right clicking and "inspecting element" on the discount code field which is uneditable. Change the value to the new code, and then save. I verified this reflected the change in the database. The part you change will look like below. I think this also means developing an extension to change it or even some jquery might be possible - however, there are good reasons to not change a live code. Perhaps the copy function should be overridden to allow code definition?

```
<span class="crm-form-text big">TESTCHANGING2<input type="hidden" name="code" value="TESTCHANGING2" id="code"></span>

```

---
Tags: civimember, cividiscount
---


# Question
Title: CiviMobile won't login: "Server API Error" Drupal
Using CiviCRM 5.13.5 and Drupal 7.67.

I'm trying to install CiviMobile but am getting an error that says "Server API Error" when trying to login on my mobile phone.

The steps I followed are as follows:

* Downloaded "CiviMobile API" from https://civicrm.org/extensions/civimobileapi
* Installed "CiviMobile API" (4.0.2) through CPanel in the same way that I've installed other extensions in the past (/default/files/civicrm/ext)
* Installed the extension on civicrm/admin/extensions?reset=1
* Had a message pop up on that page saying that my CiviCRM now supports the CiviMobile extension and a prompt to head to the app store to download the CiviMobile app
* Downloaded the CiviMobile app (iPhone, IOS 11.2.1) and filled in my credentials on the login screen
* Put in my correct username and password that I use to access CiviCRM on the computer, and filled in the URL (with https://) through which I access CiviCRM'
* Received the "Server API Error" message. I get the same error message when I use the following variations of the URL: https://URL.com/loginpage and https://www.URL.com/loginpage (However the URL we use is https://URL.com/loginpage)
* When I type in the URL as http://URL.com/loginpage or www.URL.com/loginpage I get the error message "Please install CiviMobile extension in your CiviCRM" however I don't think this is important since we use https

Not sure what else to try here, does any one have any insights? I'm sure I've put in my correct credentials.

Thanks in advance

# Answer
> 1 votes
A. The url should be https://www.URL.com Do not include loginpage. B. Not sure how you installed it, but make sure the directory of your extension is com.agiliway.civimobileapi (of there is a -master or a version number at the end remove it).

---
Tags: civimobile
---


# Question
Title: CiviCRM Log Viewer 1.2 not working after upgrade from CiviCRM 4.6 to 4.7
CiviCRM Log Viewer 1.2 not working after upgrade from CiviCRM 4.6 to 4.7, what do I need to change for it to work again?

Error message (I took out root dir info) Unable to read entries from logfile at /wp-content/plugins/files/civicrm/ConfigAndLog/CiviCRM.d1b4fb7408ae18b71a1d53b3.log

There is no such file in the "files/..." directory

# Answer
> 4 votes
I figured it out. It was related to menus not being rebuilt.

The menus had to be rebuilt, but before that the row format on the civicrm\_menu table had to be changed to dynamic. Somehow during the database copy from production to test, the test table row format was changed to dynamic so didn't have the issue.

THE FIX: ALTER TABLE civicrm\_menu ROW\_FORMAT=DYNAMIC Then rebuild the menus ( I used CiviCRM Admin Utililties -\> Rebuild Menu)

Error was: \[debug\_info\] =\> TRUNCATE TABLE civicrm\_menu \[nativecode=1118 \** Row size too large (\> 8126). Changing some columns to TEXT or BLOB or using ROW\_FORMAT=DYNAMIC or ROW\_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.\] \[type\] =\> DB\_Error

---
Tags: upgrade, configandlog
---


# Question
Title: How to Transfer Big Data to a Different Domain
I received a SQL error while updating CiviCRM. He asked me to restore the old database, but I didn't have a backup at the time. Therefore I could not make a healthy update. Then I applied all the updates, but I still get "Database Partially Upgraded - Database check failed" warning for the database.

I have very serious data. I don't want anything to happen to this data.

So I thought of something like this. I'm going to build a new Joomla - CiviCRM. In my setup, I will rebuild all the fields as in the old site. Then I will import the data from the old domain.

But here's the thing. There are more than 130000 activities. It is not possible to transfer such data in bulk. It is not even possible to get 100 pieces because it gives a constant error.

Here are the data I'm trying to get.

Contact ID, Contact Type, Sort Name, Display Name, Contact Source, Contact Hash, First Name, Last Name, Email Greeting ID, Postal Greeting ID, Addressee ID, Created Date, Modified Date, Addressee, Phone, Phone Type, Activity ID , Activity Type, Activity Type ID, Subject, Activity Date, Duration, Details, Activity Status, Activity Priority, Source Contact, Source Contact ID. I also have custom fields that I have created for Activity Types.

How can I transfer all this without problems.

# Answer
> 0 votes
I have used "big dump"to move big databases ozerov.de/bigdump/ with good success

---
Tags: joomla, import, export, backups
---


# Question
Title: Database error when using CiviCRM admin UI: "Row size too large"
I'm helping on a site that is on a different server than usual and see this error regularly in the back end when trying to complete various tasks (e.g. clear caches, run database updates, etc.)

`[debug_info] => TRUNCATE TABLE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.]`

The site is mostly working, but as mentioned many tasks error out and the above shows in the debug log. What could cause this?

# Answer
Also see https://civicrm.stackexchange.com/a/31644/225 where the suggested fix is:

```
 ALTER TABLE civicrm_menu ROW_FORMAT=DYNAMIC

```

Then rebuild the menus
> 3 votes

# Answer
Suggestions from various folks on chat include the following settings in `my.cnf`:

I changed those and was still having issues. This setting fixed it for me (and may be due to the site running on MariaDB?).

* `innodb_strict_mode=0`
> 1 votes

---
Tags: error, database, webserver
---


# Question
Title: Got error on installing CiviCRM on Drupal 8
I tried to install civiCRM with Drupal 8 following this https://www.mydropwizard.com/blog/better-way-install-civicrm-drupal-8 but I am unable to do so. I am getting the following error:

Fatal error: require\_once(): Failed opening required 'D:\Myprograms\php\civicrm\vendor\civicrm\civicrm-core/packages/DB.php' (include\_path='.;D:\Myprograms\php\civicrm\vendor\civicrm\civicrm-core;D:\Myprograms\php\civicrm\vendor\civicrm\civicrm-core\packages;D:\Myprograms\php\civicrm\vendor/civicrm/civicrm-core/vendor/tecnickcom;D:\Myprograms\php\civicrm\vendor/pear/archive\_tar;D:\Myprograms\php\civicrm\vendor/pear/auth\_sasl;D:\Myprograms\php\civicrm\vendor/pear/console\_getopt;D:\Myprograms\php\civicrm\vendor/pear/log;D:\Myprograms\php\civicrm\vendor/pear/mail;D:\Myprograms\php\civicrm\vendor/pear/net\_smtp;D:\Myprograms\php\civicrm\vendor/pear/net\_socket;D:\Myprograms\php\civicrm\vendor/pear/pear-core-minimal/src;D:\Myprograms\php\civicrm\vendor/pear/pear\_exception;D:\Myprograms\php\civicrm\vendor/pear/validate\_finance\_creditcard;D:\Myprograms\php\civicrm\vendor/phpseclib/phpseclib/phpseclib;.;C:\php\pear') in D:\Myprograms\php\civicrm\vendor\civicrm\civicrm-core\install\civicrm.php on line 151

I am getting the above error when installing CiviCRM module. Please help

# Answer
> 1 votes
I don't know how it works on Windows, but had the same problem yesterday with Ubuntu. Fixed by forcing the directory structure to be writable by both the Apache user and the user I'm logged in as—by default, some of those directories were unwritable and the install failed halfway through.

Note: failing halfway through was an unrecoverable state, I had to revert to a recent backup and start over.

---
Tags: drupal-8
---


# Question
Title: Send different event confirmation emails
I have setup 2 different events. I would like to send different confirmation emails for the events with the relevant information. This hasn't been an issue before because I have only ever ran 1 event at a time and have edited the Events - Registration Confirmation message template with the relevant information.

# Answer
Make two different Message Templates yourself and use CiviRules (also requires Email API extension) to send out the correct one based on the Event someone registers for.

If you need payment details as well then make your default CiviCRM Event Registration template just contain the default bits like profile and payment/receipt details.

The second Email via CiviRules/Email API will contain the Event specific information.
> 5 votes

---
Tags: civievent, webform-civicrm, message-templates
---


title: Dedupe Rule - blank matches

text:
# Question
Title: Dedupe Rule - blank matches
We have a custom field - 80% of our contacts have this custom field in their profile - the rest are blank.

We setup a rule - if 7 characters or more of the custom filed are a match - it meets the threshold - however - contacts with blank custom fields are coming up as possible duplicates. Why is that?

Latest Civi - Drupal 7.

# Answer
It's coming from line 179 in CRM/Dedupe/BAO/Rule.php, but it looks as if it's been like this forever so I'm not sure if there's a reason.

If you change line 76 where it sets `$on` to be the below code instead, it makes it work but I can't immediately see if that has any side-effects for other types of rules.

```
    $on = [
      "SUBSTR(t1.{$this->rule_field}, 1, {$this->rule_length}) = SUBSTR(t2.{$this->rule_field}, 1, {$this->rule_length})",
      "t1.{$this->rule_field} IS NOT NULL",
      "t1.{$this->rule_field} <> ''",
    ];

```

Note that dedupe checking caches results, so **after you make that change clear cache** at admin - system settings - cleanup caches.
> 2 votes

---
Tags: duplicate-contacts
---


# Question
Title: Drupal views: Civicrm drupal_id entity missing after update?
Inside Drupal views, I use some contextual filters and relationships which, I think, are provided by CiviCRM Entities.

Before Civi 5.15, some seemed to be provided by CiviCRM itself (?). Under 'relationships, for example, there was 'CiviCRM Contacts: Drupal ID' which did **not** say 'provided by CiviCRM Entities'.

After an update to 5.15, that relationship, and a whole bunch of others, are gone. Under relationships, the only one left is 'CiviCRM Contact: Entity translation: translations Translation information.'

Also under 'contextual filters', a lot of civicrm filters, but not all, are gone.

What am I missing ? Have they moved somewhere else ?

# Answer
The problem has disappeared.

Ehm, I cleared caches. Fairly sure I cleared caches the first time, but I did it again, now using the UI, and all looks normal now.
> 2 votes

---
Tags: drupal, civicrm-entity
---


# Question
Title: upgrade of civicrm fails with parse error
I have a wordpress site with the civicrm plugin installed. We are still on 4.6, the latest in that branch. But we wanted to try out the latest version, which is 5.16. I cloned the site and in that clone, I installed the zipfile of the new version , using the checklist for the 4.6 upgrades I did before.

When I had finished all steps and try to reload the site, it comes with an error message:

```
Parse error: syntax error, unexpected ':', expecting '{' in public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm/vendor/league/csv/src/functions.php on line 33

```

I can enter recovery mode, but I have really no idea what I should do now. Should I try an earlier 5-version, or should I first upgrade to 4.7?

thanks for helping, Ruud

# Answer
It sounds like your server has php 5.x. You need to use php 7.x for recent versions of CiviCRM.

See https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-version
> 3 votes

---
Tags: wordpress, upgrade
---


# Question
Title: Unable to get CiviCRM running on Drupal 8/Ubuntu server 18.04 LTS/Linode
I have tried following the Roundearth instructions twice to get CiviCRM up and running on a clean install of Drupal 8, on Ubuntu server 18.0.4. First time through, the installer failed with a permissions error but CiviCRM reported as installed—if there's a way of reverting from this situation, I couldn't figure it out, and I ended up having to start over.

Second time through, it all looked good, but going to any CiviCRM page came up blank. Checking PHP errors, it was maxing out memory. So I increased it to 256, 512, and unlimited—each time, it maxed out on memory (3.2 gigs in the case of unlimited, whereas the server has 4), and I gave up and went home. Only to discover when I got there that the pages now loaded, and continued to load with sane memory restrictions. (???) However, there's no CiviCRM menu (it appears to be there, but empty), and when I go to handpasted admin URLs, things that are supposed to be there according to the docs are blank.

Both of these were with the Roundearth instructions—I found a different set here that I'm trying out, but I don't feel good about it.

I have to deploy a staged site by Friday, and if I can't get CiviCRM to work, I'll plow on without it—but I gather that it *really* wants to be installed before I start piling on other modules. Any help *greatly* appreciated.

EDIT: Occurs to me that I have *not* tried installing Drupal from apt-get (if it's there), because the Roundearth composer script had it included. Could try that next before moving on to the linked instructions. *Or not, as apparently it's not in apt.*

# Answer
> 1 votes
This ended up being a combination of adding the settings listed at https://hq.megaphonetech.com/projects/commons/wiki/CiviCRM\_for\_Drupal\_8\_installation\_notes to civicrm.settings.php and the file system permissions.

---
Tags: drupal-8
---


# Question
Title: Trying to kill civicrm/civicrm-cxm-rpc to fix a conflict, and it won't die
Ubuntu 18.0.4 LTS, Drupal 8.7.

New to composer and Drupal 8, trying to resolve a conflict between required libraries for CiviCRM and Open Social. Open Social requires phpseclib/phpseclib 0.3 or 2^, CiviCRM requires 1.0.\*. But the thing is, the bit of CiviCRM requiring that seems to be functionality I don't care about: civicrm/civicrm-cxm-rpc.

Have tried editing various JSON files, composer removes, and rm'ing the offending folder, but every time I try a new command I see it popping back up again and appearing in installed.json and lock files. How the hell do I forcibly remove it and manually install or require the 2.0?

# Answer
Problem appears to have been a newbie-to-Composer issue. Every time I ran various composer commands, I'm told it overwrites the .json files I've been furiously editing for four hours, putting back all the code I'm trying to kill? Charming. Had no idea.

Was also told that the way to do this is to fork the project and point my top-level composer.json at it instead, then edit in the repo. That, however, requires learning eight skills I don't have yet—so I put in a quick-and-dirty hack: deleting the repositories lines from the top-level composer.json. That disconnected my local structure from the repo, and when I killed civicrm/civicrm-cxm-rpc again and required the google/apiclient that needed a newer phpseclib, it installed without a quibble.

Would still like to hear if axing civicrm-cxm-rpc has wider effects than I'm inferring from the docs.

EDIT TO ADD: Installing Open Social over the composer package of Drupal 8/CiviCRM died screaming in ways I didn't understand, so I'm now trying the reverse: using the distro of Drupal 8 and Open Social and patching it with CiviCRM, since dsnopek has a composer script that does only that.

This is running into several conflicts, and this time I *am* forking in github, because the above hack didn't work the second time through.
> 1 votes

---
Tags: drupal, composer
---


# Question
Title: Is there a way to reorder the fields in an export mapping?
I had a request to reorder the fields in an export mapping that had been created previously. Is there a way to do this via the UI? And if not, is it kosher to manually edit the `column_number` in the `civicrm_mapping_field` table, or could that produce unexpected results somehow? (I am assuming that is what determines the sort order, so please correct me if that assumption is wrong!)

# Answer
Laryn -

I don't think there's a way in the UI to update the order... I would suggest creating a small mapping and reordering it in the database (I agree that the column\_number is the likely candidate - interesting that it's not weight as in so many other Civi features) to confirm that will work.

Lesley
> 1 votes

# Answer
This is coming thanks to the work being done on the Form Builder

https://civicrm.org/blog/josh/improvements-to-the-export-interface-are-in-the-works
> 1 votes

---
Tags: export, field-mapping
---


# Question
Title: Your database settings don't appear to be correct. All green, but still error!
trying to install CiviCRM with Wordpress and I get the red DB error BUT all the line items are green.

Any suggestions?

Thanks!

```
WP: 4.9.10
CiviCRM: 4.7.30 Wordpress
Mysql: 5.7 on Azure

```

*Added comment:*

I also ran this:

```
<?php
echo "* SQL CONNECT TEST **";
include('./config.php');
// print_r(get_defined_constants(true));
#phpinfo();
$dbcnx = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$dbcnx)
{
          print ("<hr /><p>Param(s): " . DB_HOST ." / ". DB_USER ." / ". DB_PASSWORD ." / ". DB_NAME . "</p>\n");
          die ("<hr /><p>Error:" . mysqli_connect_errno() . "</p>\n");
}
echo "<p>Connected to the database server!</p>\n";
echo "</p>\n";
echo "<p>End of script!</p>";
?>

```

Came out clean, connected and all (config.php is a copy of the Wordpress config file)

So I checked to see if somehow CiviCRM was using mysql\_connect() instead of mysql*i*\_connect(), but it's not.

Really at a loss here :-|

# Answer
UPDATE: It looks like at the present time you will need to make a small hack to get the installer to be happy. The "does the server exist check" does NOT use the username/password and merely tries to connect as anonymous (https://github.com/civicrm/civicrm-core/blob/5.16.2/install/index.php#L1038). On azure this returns an error 9002, as opposed to the usual 1045 which gets skipped by the next line.

So you should be able to temporarily change that line to

`$conn = $this->connect($server, 'username@server', 'your password');`

and then after install you can change it back. I don't have an azure database to test if that is sufficient, but just doing a command line test it returns the usual error 1045 so should work.

See also CiviCRM on Azure Not Finding the Server

---

Based on your screenshot it looks like you have a "control character" as the first character of your server name, which usually happens when you copy and paste from a website page. i.e. a character that isn't actually a letter but might be a tab or non-ascii character.

In any case the error says it can't find mysql on that server, so check that the server name is correct.
> 0 votes

# Answer
Is it possible your civicrm\_settings.php file is not writable, or is duplicated? If you run php\_info() does it confirm that you're running MySQL 5.7? What is your OS?
> 0 votes

---
Tags: wordpress, error, database, install
---


title: How do you set a fiscal year?

text:
# Question
Title: How do you set a fiscal year?
Also - does changing a fiscal year change anything else outside of reporting and searching?

# Answer
It's under admin - localization - date formats.

This link is old but suggests it's only for reports.

https://forum.civicrm.org/index.php%3Ftopic=30822.0.html
> 3 votes

---
Tags: civireport
---


# Question
Title: How to set up CiviCRM on separate Drupal from primary site?
At wit's end trying to combine Civi and Open Social on the same D8 server, and wondering if I'm going about this all wrong.

How about if I have D8 running Open Social in one html directory, and Civi on D7 in another? Can I set up programmatic hooks so changes in D8 update the Civi database? I figure that way I can get up and running on Open Social for my deadline staging, get D7 glued in before going live, and maybe merge the two into D8 when Civi doesn't require elephant analgesics to work there.

I'm finding docs on multisite, but that's not it. I'm thinking two different Drupals on virtual hosts or separate server instances.

# Answer
You can certainly use the API from Drupal 8 to access your CiviCRM on Drupal 7, this is a set up I encounter fairly regularly.

There are a few resources explaining how this can be done conceptually:
> 2 votes

---
Tags: drupal
---


# Question
Title: CiviCRM edit history for different users
Is there a way to find out when an account signs into the CiviCRM admin panel and edits something. Specifically I am looking for the person who changed a price field. We're using Joomla with Civi.

Logging was not turned on

# Answer
> 2 votes
If you have logging switched on you should be able to find this in the log tables. If you do not have logging switched on I do not think you can find this.

You can check your logging at Adminster\>System Setting\>Misc (Undelete..........

---
Tags: civicontribute, admin
---


title: Does CiviCRM OG Sync support PHP 7 +?

text:
# Question
Title: Does CiviCRM OG Sync support PHP 7 +?
After updating PHP to 7.1 we are now unable to save new organic groups and receive a Civi error. No new group is created in CiviCRM.

```
backTrace
#0 /sites/all/modules/civicrm/CRM/Core/Error.php(377): CRM_Core_Error::backtrace()
#1 /sites/all/modules/civicrm/CRM/Bridge/OG/Utils.php(145): CRM_Core_Error::fatal()
#2 /sites/all/modules/civicrm/CRM/Bridge/OG/Drupal.php(228): CRM_Bridge_OG_Utils::groupID("OG Sync Group :12822:", NULL, TRUE)
#3 /sites/all/modules/civicrm/drupal/modules/civicrm_og_sync/civicrm_og_sync.module(241): CRM_Bridge_OG_Drupal::og((Array:4), "add")
#4 /sites/all/modules/civicrm/drupal/modules/civicrm_og_sync/civicrm_og_sync.module(68): _civicrm_og_sync_node_action(Object(stdClass))
#5 /includes/module.inc(965): civicrm_og_sync_node_update(Object(stdClass))
#6 /modules/node/node.module(1180): module_invoke_all("node_update", Object(stdClass))
#7 /modules/node/node.pages.inc(459): node_save(Object(stdClass))
#8 /includes/form.inc(1524): node_form_submit((Array:65), (Array:23))
#9 /includes/form.inc(906): form_execute_handlers("submit", (Array:65), (Array:23))
#10 /includes/form.inc(386): drupal_process_form("course_node_form", (Array:65), (Array:23))
#11 /includes/form.inc(131): drupal_build_form("course_node_form", (Array:23))
#12 /modules/node/node.pages.inc(14): drupal_get_formcourse_node_form", Object(stdClass))
#13 /includes/menu.inc(527): node_page_edit(Object(stdClass))
#14 /index.php(21): menu_execute_active_handler()

```

# Answer
> 3 votes
We solved our issue - it appears to be related to a separate bug. The OG name we created had some formatting that either OG or the extension (or Civi) did not like

"Course Name 19-20: More things about the course: Subtext"

We changed it to "Course Name 19-20" and then it saved the groups, etc. and worked properly in PHP 7.1

---
Tags: groups, modules
---


# Question
Title: Why can I no longer Merge Contact records in 5.7.3?
After upgrading from 4.6.x to 5.7.3 staff is finding that many records can no longer be merged -\> error:

```
#1 /var/www/platform/oursite/sites/all/modules/civicrm/CRM/Utils/Type.php(554): CRM_Core_Error::fatal("One of parameters  (value: Email) is not of the type Integer")
#2 /var/www/platform/oursite/sites/all/modules/civicrm/CRM/Core/DAO.php(1517): CRM_Utils_Type::validate("Email", "Integer")
#3 /var/www/platform/oursite/sites/all/modules/civicrm/CRM/Core/DAO.php(1481): CRM_Core_DAO::composeQuery("\n                        SELECT v.label\n

```

# Answer
So I looked at the civicrm email records of the two contacts that produce such an error and they look fine.

Alan figured out that this is a bug: during the merge process when data is being gathered about both contacts, code is verifying that the value is valid, but it does so after converting it to an option value (i.e. email is "2").

A quick workaround for those struggling with the same issue - remove Preferred Method Email from Contacts. For this client this field is no longer used so we could just:

```
update civicrm_contact set preferred_communication_method=NULL where preferred_communication_method=2;

```

Merges are working again - phew!
> 5 votes

# Answer
For anyone else landing here I was having a similar problem, but my client is actively using the preferred\_communication\_method in their workflow.

KarinG's answer pointed me in a direction that seems right and definitely works for me, with the issue being that the preferred\_communication\_method is treated as an **array**, and it looks to me like the error encountered in merging is due to code in the merge process that tries to explode the array and work with it.

This led me via an answer at https://stackoverflow.com/questions/47266517/civicrm-crm-core-daovalue-separator-how-to-use-it-in-pure-sql to this immediate solution which lets the client keep using the field **and** have merges work correctly:

```
update civicrm_contact set preferred_communication_method=concat(X'01',2,X'01') where preferred_communication_method=2;

```

-with X'01' being the CRM\_Core\_DAO::VALUE\_SEPARATOR

With this enacted (obviously for all relevant Integer values in addition to 2), all is fine.

Further note: in my case the reason the fields had an integer instead of an array to begin with is a module I have for taking live input from another CRM system. My next task is to fix this module (which uses the Civi API, not raw SQL) to populate this field with an array as expected. Edit: On further research it was my use of the APIv3, which allows entering and will update with a string value, causing the merge problem. The solution is to ensure passing an array for preferred\_communication\_method. My updated API call is now of the form

```
$result = civicrm_api3('Contact', 'create', array(
  'contact_type' => "Individual",
  'id' => $cid,
  'preferred_communication_method' => array($pcm),
));

```
> 1 votes

---
Tags: duplicate-contacts
---


# Question
Title: CiviRules update interfering with another plugin?
Yesterday, I updated the CiviRules extension to version 2.8, then did the database update. Immediately afterward, I began getting error emails each time the cron job runs.

I have in place a hack to `civicrm/CRM/Mailing/Event/BAO/Unsubscribe.php`, to load a language-appropriate template for the unsubscribe email sent out. I don't think the details are important here, but the hack calls a function `get_multilingual_template()`, which is defined in a custom extension.

The error emails I receive read:

```
PHP Fatal error:  Uncaught Error: Call to undefined function get_multilingual_template() in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Mailing/Event/BAO/Unsubscribe.php:379
Stack trace:
#0 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/api/v3/MailingEventUnsubscribe.php(52): CRM_Mailing_Event_BAO_Unsubscribe::send_unsub_response('5051', Array, false, '336')
#1 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_mailing_event_unsubscribe_create(Array)
#2 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
#3 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest(Array)
#4 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe('mailing_event_u...', 'create', Array, NULL)
#5 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/api/v3/MailingGroup.php(62): civicrm_api('ma in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Mailing/Event/BAO/Unsubscribe.php on line 379
Fatal error: Uncaught Error: Call to undefined function get_multilingual_template() in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Mailing/Event/BAO/Unsubscribe.php:379
Stack trace:
#0 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/api/v3/MailingEventUnsubscribe.php(52): CRM_Mailing_Event_BAO_Unsubscribe::send_unsub_response('5051', Array, false, '336')
#1 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_mailing_event_unsubscribe_create(Array)
#2 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
#3 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest(Array)
#4 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe('mailing_event_u...', 'create', Array, NULL)
#5 /var/www/wordpress/wp-content/plugins/civicrm/civicrm/api/v3/MailingGroup.php(62): civicrm_api('ma in /var/www/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Mailing/Event/BAO/Unsubscribe.php on line 379
Error: The site is experiencing technical difficulties.

```

The cron command is:

`/usr/local/bin/wp --user=civicron --url=https://oursite.org/ --require=/var/www/wordpress/wp-content/plugins/civicrm/wp-cli/civicrm.php --path=/var/www/wordpress civicrm api job.execute > /dev/null`

So it seems that somehow the CiviRules update made the cron run fail to load our custom extension? I don't know why it's even trying to call get\_multilingual\_template(), since as far as I can tell, nothing should be triggering an Unsubscribe attempt. (And unsubscribe by email still worked anyway, when I tested it and the cron job ran, generating the same error but correctly unsubscribing my test account.)

I don't know to what the 5051 or 336 numbers in the send\_unsub\_response refer.

Looking at the scheduled jobs admin page, each task is run as expected, and each job shows a Finished status of "success."

I tried disabling and reenabling both CiviRules and our custom extension. I don't know what else to look at, or to try from here. Thanks for any suggestions!

# Answer
> 1 votes
Found the problem. This is a multisite setup, and only one site has the custom plugin installed. So my hacking the Mailing/Event/BAO/Unsubscribe.php made one of the sites fail when it reached the call to the function defined in the custom plugin—but it couldn't find the function.

I didn't realize that the cron error emails I was receiving were for a different site than the one I tested manually. Hence my confusion about success manually running the Fetch Bounces job, but errors when it ran via cron.

Regarding the proximate trigger/cause: since I was logged in and saw the prompt to do so, I upgraded CiviRules at the same time I sent a new mailing. The new mailing bounced to two addresses, which caused the Fetch Bounces job to attempt to process them. I mistakenly thought there were no emails awaiting bounce processing, because, again, I was looking at the bounce email account for the wrong site. That seemed to point to the CiviRules update having done something strange.

So CiviRules probably had nothing to do with it... But I am still slightly confused, because I'm pretty sure there were bounce emails needing processing even before my simultaneous CiviRules upgrade/sending a new mailing. Before that change, the Scheduled Jobs log for Fetch Bounces shows:

> Finished execution of Fetch Bounces with result: Failure, Error message: A fatal error was triggered: Could not connect to MailStore for return@ourdomain.org@mail.ourdomain.orgError message: An error occured while sending or recei (...)

And I wasn't receiving cron error emails to let me know it was failing. After the update/mailing send, the job log shows Start, but never any Finish entries. So it seems my core hack broke it a while ago, but that either the CiviRules update, or my sending a new mailing, changed the way in which it failed.

Anyway, I'm glad it's not bombarding me with error emails now, and that it's actually processing bounces. People who find this issue can enjoy my classic PEBKAC (Problem Exists Between Keyboard And Chair)!

---
Tags: cron, cron-job, civirules, multisite
---


# Question
Title: How do i properly include civicrm.settings.php to use api calls?
Quite a long time ago I wrote an external script that does this at the top:

```
require_once '/path/to/joomla/install/com_civicrm/civicrm.settings.php';
require_once '/path/to/joomla/install/civicrm/CRM/Core/Config.php';
$config = CRM_Core_Config::singleton( );

```

...so that I can use civicrm\_api() calls from an external php script. Now after upgrading to the 5.x train of CiviCRM I realized my script was not working. If I manually run the script I get this error:

> PHP Parse error: syntax error, unexpected '$this' (T\_VARIABLE) in .../civicrm/CRM/Core/DAO.php on line 1123

In an effort to determine if this was happening in a civicrm\_api() call I made a file with just the three lines quoted above and run it with php, and it produces the error. So I'm pretty confident the issue is the require\_once trying to include these files, not the actual act of making an api call.

I've found numerous references to $this issues in DAO.php, but none of them are relevant to including these two files for the purposes of API calls and the line number of the failure is always different.

How can I fix this so I can use my existing script?

# Answer
> 2 votes
I think I found the issue. Command line php was 5.4.16 despite the website using 7.x.

# Answer
> 1 votes
Take a look at cv

You can write your php script without requiring anything and then run:

```
cv scr /path/to/script

```

Or use this at the start of your script:

```
eval(`cv php:boot`)

```

See cv's README for details

(For all of these you'll need to make sure the right version of php is used - preferably 7.2 at the moment.)

---
Tags: api, civicrm.settings.php
---


# Question
Title: Civievent custom data field duplicate fields in Edit
I encountered a strange situation. I have added a custom data group in a participation record called "Emergency Contact" with 2 fields and while this appeared ok in View of the participant records, there would be 2 such group displayed when i click Edit. Entering only 1 of these 2 group will retain the values, the other group wouldn't. Any idea how this happened and how it can be resolved?

WordPress: 5.0.4 CIVICRM: 5.10.4 Ubuntu

# Answer
> 1 votes
I guess the custom field is configured to use for Participants entity with Event name/event type/role set to any.

Solution for fix:

1. Upgrade CiviCRM to 5.15 or 5.16 because i can't replicate the bug anymore on latest version of CiviCRM.
2. Change the custom field config to use only Participants as entity instead Participants(Event Name), Participants(Event Type) or Participants(Roles).

Thanks

Pradeep

---
Tags: civievent, custom-fields
---


# Question
Title: How to use Smarty for change greetings for French?
I need to adapt Greetings in order to fit to French (which has a feminine and masculine for "Dear"). I read on the forum that I should use Smarty and read the short documentation (CiviCRM documentation) but I haven't understood how to use it :(

Where should the following code come (once adapted of course)? In the email source or in the greetings settings?

```
{capture assign=first_name}{contact.first_name}{/capture}
Dear {$first_name|default:Friend},
{if $first_name}
  Hello, {$first_name}, how are you?
{/if}

```

My second question is where do I set something like:

```
WHEN contact_gender IS female THEN contact_greeting IS Chère

```

Do I have to create any custom fields?

Any help will be very appreciated :)

# Answer
Thanks to Pradeep's help I found the way:

For my case, this is the code to use

```
{capture assign=gender}{contact.gender}{/capture}
{if $gender eq 'Homme'} Cher {contact.first_name},
{elseif $gender eq 'Femme'} Chère {contact.first_name},
{/if}

```

I just needed to insert it where needed in the source of the email. FuzionFields was of a good help to find the correct string for the field Gender. It was also important to write `{contact.first_name}` and not `{first_name}` like writen in the documentation.

To make Smarty work with CKeditor you'll also need to set this parameter using Pradeep's other answer: How to deal with ' or (') in CKeditor

I'm very happy to have this small but nice enhancement for our feminine members.
> 4 votes

# Answer
Try below code

```
{capture assign=contact_gender}{contact.gender}{/capture}
{if $contact_gender eq 'Female'}
  Chère {$first_name|default:Friend},
{/if}

```

or

```
{capture assign=contact_gender}{contact.gender}{/capture}
{assign var='contact_greeting' value='Dear'}
{if $contact_gender eq 'Female'}
  {assign var='contact_greeting' value='Chère'}
{/if}

{$contact_greeting} {$first_name|default:Friend},

```

Cheers

Pradeep
> 5 votes

---
Tags: smarty
---


# Question
Title: Issue with sending html email from civicrm with Smarty
I am testing some templates with smarty and I don't succeed to send them when the email is - apparently - encoded in html. I could send them as normal text message. I could also send html templates that I have. But I can't send messages using **both** HTML template **and** Smarty.

I am sending from within Civicrm and it runs endlessly, when other types of messages are immediately sent (and well received).

Is this due to a limitation, a bug or should I set some parameters somewhere?

# Answer
> 3 votes
It might be because you have syntax error in your smarty code. Try not to use editor if you want to use smarty code or use this configuration to use smarty using ck-editor

---
Tags: smarty
---


title: Random Stripe Webhook Issues

text:
# Question
Title: Random Stripe Webhook Issues
Latest CiviCRM - Latest Stripe - Wordpress

I am getting this error often:

```
Stripe Payment Processor Webhook: Credit Card (3)
Stripe Payment Processor Webhook: Credit Card (4)

```

From what I can tell - our stripe webhook is correctly setup.

# Answer
I think the new version tries to create the webhook automatically. Maybe if it already exists in the Stripe account it can't create it -- have you tried deleting the webhooks in the Stripe account and then using the "Fix Stripe Webhook" (**civicrm/stripe/fix-webhook**) page in CiviCRM to regenerate it?
> 5 votes

---
Tags: payment-processor, stripe
---


title: Send or print membership invoices

text:
# Question
Title: Send or print membership invoices
I'm helping a nonprofit set up membership invoicing. They want to create invoices for the current members. They do not want to use automatic reminders -- they want to choose who they send the invoices to, and when. Additionally, they'll want to send individual reminders to those members who haven't paid.

We've created a Message Template and included personalization tokens for name, organization, etc... but don't see any way to include the due date, membership name and amount due. We know we can include checksum links to a contribution page, but many of their members are brick-and-mortar companies, and they need to print a page and carry it to their accounting departments...

Isn't there some way to generate a simple invoice? Something like "Dear *Joe*, your membership will end soon. To renew, please remit payment of *$150.00* by *January 31, 2016*."

Thanks in advance, and apologies for noobiness.

# Answer
I see 2 ways:

* Do Use Scheduled Reminders (Administer - Communication - Scheduled Reminders), If you choose Memberships as Entity you can use Membership tokens in the email being sent. You can limit the recipients per group. So if you want to send it one-time, just search for the people you want to send it to, place them in a group and create a reminder with just that group. Let the reminder be sent and remove the reminder.
* Use PDF invoices (enable via Administer - CiviContribute -\> CiviContribute Component Settings). You can then search Contributions and send individual pdf invoices per email to the results of your searches.
> 3 votes

# Answer
Renewal Invoices for Memberships is a new CiviCRM extension designed to solve this problem. Please see https://github.com/agileware/au.com.agileware.renewalinvoices
> 1 votes

---
Tags: invoice
---


# Question
Title: Creating Invoices for Membership Renewals that are coming due
How do we go about creating invoices for future contributions? As far as I can tell the workflow only seems to support sending an invoice for current ones.

# Answer
If you need to create Invoice for future contribution - still you need to create the contribution for future date (Received date) and set the contribution as Pending

This will allow you to create the Invoice and once you have received the amount then you can set the contribution to completed - I guess this helps
> 1 votes

# Answer
This question is similar to Send or print membership invoices

Renewal Invoices for Memberships is a new CiviCRM extension designed to solve this problem. Please see https://github.com/agileware/au.com.agileware.renewalinvoices
> 1 votes

---
Tags: civimember, contributions, invoice
---


# Question
Title: I have installed eventcalendar extension in civicrm
I am following the steps provided in the Readme as given in the link below.

> Introduction ------------ Event Calendar Extension allows you to view all CiviCRM events in a Calendar by month,day,week.The setting page allows us to select which events should be shown on Calendar with the color we want for particular event type.The setting page configuration for event types filters allows us to filter by particular event types on calendar.
>
> ## Installation
>
> 1. Move the downloaded extension to your extensions folder.
> 2. Goto civicrm/admin/extensions&reset=1 -- install the extension
>
> If you are new to CiviCRM Extension you can get help about extension from
>
> http://wiki.civicrm.org/confluence/display/CRMDOC42/Extensions
>
> Library --------------- Extension uses the fullcalendar library. Add the fullcalendar library https://github.com/fullcalendar/fullcalendar/releases/tag/v1.6.7
>
> ## Usage
>
> 1. Click Administrator-\>CiviEvent-\>Event Calendar Settings menu (civicrm/eventCalendarsettings) -- change the setting if required.
> 2. Click Events-\>Show Events menu (civicrm/showevents) -- to view Event Calendar with Events as per settings.

https://github.com/osseed/com.osseed.eventcalendar

I have followed the installation steps #1 and #2 given below. Also where should I add the fullcalendar library ? In the Usage as mentioned, I don't see Administrator -\> CiviEvent -\> Event Calendar and also Events -\> Show Events. Kindly help me debug on what is wrong ?

# Answer
> 2 votes
The fullcalendar is the plugin called "WP Calendar", if you have WordPress you install and activate it in the WordPress plugin area.

For the other issue, you may want to either disable/reinstall the civicrm extension, (works for some people), or take a look at answer to How to use event calendar extension with civievents

Also there is another step that you didn't list, to copy over the folder mentioned in the "Note" section of the README.

---
Tags: civievent, extension, calendar
---


# Question
Title: CiviRules is not tagging users or adding them to groups
Civi 5.13.5, Drupal 7.67.

Hey everyone,

I've set up a number of CiviRules to help automate the process and add people to groups / tag them based on the types of events they attend, so they get added to our different mailing lists.

We're having issues with two of our CiviRules.

**Volunteers**

As above: we have events that are marked as "Volunteer Inductions". People who are marked as having attended these events are meant to get added to the Volunteers group/mailing list, removed from the EOI group, and have a tag added.

None of these actions happen, despite all the conditions being fulfilled. The actions are all set to have 'no delay'.

**Event Attendees**

As above: when people are marked as having "Attended" a certain event, they are meant to be added to a corresponding group/mailing list.

However, again, despite meeting these conditions, this does not happen. The actions are set to have 'no delay'.

\**

Does anyone know why this is happening or how we can fix it?

Thanks in advance :)

# Answer
> 3 votes
You are using the trigger "Event participant is added" and the participant status "attended", but if you have already added the participant as "registered" and then changed it to "attended" then this doesn't work. You would need to have a trigger "Event participant is changed". You might want two rules if you can go through a "registered" status first only in some cases.

# Answer
> 4 votes
The first thing that strikes me is the trigger is "participant is added". That means it is only done for new participants, not for existing ones. Should it not also do this for changes to participants? Personally I have not done anything yet with the event participant trigger, so I would focus on testing that one first.

I do regularly use tagging of contacts and adding to group actions, so I know that these actually do work, the problem lies elsewhere. Next week we have planned a small CiviRules sprint, I will have a go with these examples.

Okay, here are my test results.

Test 1: This is the rule I have entered (and apologies for the Dutch in some places):

If I now register a contact for the event and immediately give them the status "attended" this works like a charm:

Obviously this will NOT work when I register a participant with the status "registered" and then later this is changed to status "attended" as the participant already exists, so the "participant is added" is not triggered. To deal with this I have a second rule on "participant is changed":

Again, this changed rule works like a charm.

---
Tags: civirules
---


# Question
Title: How do you create a Smart Group with participants from multiple events
I'm trying to create a smart group for all registered users in any 2019 event. There are 5 events I'm trying to pull participants from into a smart group.

The process I am trying to use is:

1. Click "Events" -\> Click "Find Participants"
2. Add the 5 events in the Event Name field
3. Choose the Participant Status of "Registered"
4. Click "Search"
5. Click the "All 214 records" radio button (214 Results are found)
6. Click the "Actions" drop down and select "Group - create smart group"
7. Enter a name in the "Name" field
8. Enter a description in the "Description" field
9. Click "Save Smart Group"

The result is an error message that returns: `72,74,76,80,75 is not of the type Int`
The error itself is not that confusing to me. A comma separated list of event ID's is obviously not an Int.

However, I am not sure how to get around this issue.

How do you create a smart group containing participants from multiple events?

# Answer
I found out that going through almost the same process under "Search" -\> "Advanced Search" allows you to create a smart group of people from multiple events.
> 3 votes

---
Tags: civievent, smartgroups
---


title: problem configuring mollie payment

text:
# Question
Title: problem configuring mollie payment
I recently updated the civicrm plugin to version 5.16, the latest. I am trying to configure a event so that it can be paid with IDEAL (that is via interpay - mollie). For this I use admin\>system\>payment means\>add to find a screen where I can add a mollie payment (I have to translate the menu options to english here, maybe a little bit different) In the new payment means, I select 'omnipay - mollie',

I select an account, add the API-keys, and then, when I change 'creditcard' to the first in the select, being 'IDEAL-omnipay-molly', I get an error screen saying:

```
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.
Deze financiële rekening kan geen '' relatie hebben.

```

Obviously there is something wrong with the selected account, maybe there is no account number configured, but how can I configure that? Have I missed some documentation on this? Any advise is welcome!

thanks in advance, Ruud

# Answer
Oops, in clicking around, the message suddenly disappeared. This is what I did:

* admin \> civicontribute \> payment methods (probably; the entry after *accounts* and *before accepted creditcards*)
* I edited the molly entry
* there I filled in the valueless select box with the account

After that, I was able to save the screen that caused the message. I am a bit desoriented about the relation between the various lists, but I can now continue the configuration. Thanks all for helping me into the right direction! Ruud
> 1 votes

# Answer
It looks like either 'Asset Account is' account relationship is deleted or disabled. You can check by navigation to CiviCRM \>\> Administer \>\> System Settings \>\> Option Groups. Find for 'Account Relationship' option, click 'edit option' link besides it. Find for 'Asset Account is' if its disabled or deleted.

Solution:

1. If disabled then enable it using api or through sql.
2. If deleted then Add a new one with Label and Name as 'Asset Account is'.

Cheers

Pradeep
> 1 votes

---
Tags: civievent, payment-processor
---


# Question
Title: Make CVV code field optional in Authorize.net payment processor in a contribution form
I have a contribution form with credit card payment. Is there a way to make CVV code OPTIONAL/NOT REQUIRED when an administrator uses contribute to process a credit card transaction?

I tried `hook_civicrm_buildForm()` to unset the rules, but it is not working for me.

I was able to skip CVV validation in CiviCRM backend contribution forms by processing as admin. But I need to skip CVV validation in a contribution form page which will be accessed by users of a specific role.

# Answer
That’s a configuration/setting -\>

CiviCRM -\> Adminster -\> CiviContribute -\> CiviContribute Component Settings
> 3 votes

---
Tags: contribution-page, forms, authorize.net
---


title: Installation de civicrm sur worpress

text:
# Question
Title: Installation de civicrm sur worpress
I installed civicrm on wordpress, and when I want to configure it: I fall on THIS MESSAGE / Thank you for helping me.

## philippe

## Parse error: syntax error, unexpected ':', expecting '{' in C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\secret\_defense\wp-content\plugins\civicrm\civicrm\vendor\league\csv\src\functions.php on line 33

Ligne 33 : function bom\_match(string $str): string { static $list;

```
    $list = $list ?? (new ReflectionClass(ByteSequence::class))->getConstants();

    foreach ($list as $sequence) {
        if (0 === strpos($str, $sequence)) {
            return $sequence;
        }
    }

    return '';

```

# Answer
> 3 votes
This seems to be the same as upgrade of civicrm fails with parse error. You need to have php 7.x on the server not php 5.x.

---
Tags: wordpress
---


# Question
Title: CiviCRM Individual Contact Inherits fields from Organisation
I am wondering is it possible to Copy fields from a Organisation Contact depending on relationship?

For e.g. If there is a relationship between Contact A and Contact B can Contact B inherit fields from Contact A.

Contact A - Organisation Contact B - Individual

E.g. If there is a relationship, Contact B Field "Address" will be inherited from Contact A.

Thanks

# Answer
> 2 votes
CiviCRM offers the option of having a Shared Address but there is no way out of the box to trigger that automatically (that I am aware of).

Depending on how you are adding Contacts if you were using Drupal Webforms or WordPress Caldera forms it would be possible to do this (not certain with WP but def. with Drupal)

---
Tags: permissions, relationships, fields, coding-standards
---


# Question
Title: How to creat a report of recurring donors
How do I get a report of all the donors who are set up for automatically give the same amount each month

# Answer
> 6 votes
You can use Recurring Contributions(CiviCRM \>\> Reports \>\> Contribution Reports) report to see all the recurring contribution setup in the system.

You can also use Extended report extension where it gives more reports for recurring.

---
Tags: civireport
---


title: Unable to view CiviCRM contacts anymore

text:
# Question
Title: Unable to view CiviCRM contacts anymore
Today our site started giving fatal error(DB Error: unknown error) screen when trying to view contact. Nothing recorded in php or apache log, but found below error in my CiviCRM logs

```
[nativecode=1116 ** Too many tables; MariaDB can only use 61 tables in a join]

```

Found a relevant issue/blog for this but none of them have provided any solutions. Is it a known issue in CiviCRM?

https://forum.civicrm.org/index.php%3Ftopic=34205.0.html https://issues.civicrm.org/jira/browse/CRM-21491

CiviCRM version: 5.15.2

CMS - Drupal

CiviCRM logging - OFF

Backtrace : https://pastebin.com/6vV59YDM

Any help or pointers would be appreciated.

# Answer
It looks like from your backtrace, its a bug in GDPR extension because its not possible to replicate in CiviCRM. Your system has many custom group for activity, and the extension code breaks when trying to retrieve results, Mysql supports max 61 joins in a query.

Possible solution:

1. Disable custom group for activity which is not required.
2. Restructure your custom group by moving custom fields into new/existing custom group and delete the ones not required. This is bit risky and will take lots of effort since UI may not allow you to move custom field if its defined for subtype. And if you have already used this field in webforms than probably you may need to retain the custom field ID.
3. Apply the fix from here.

Thanks

Pradeep
> 3 votes

---
Tags: contacts
---


# Question
Title: Civivolunteer Declaration of CRM_Volunteer_Permission Line 221 ClassLoader.php
Drupal 7.67 Civicrm 5.15.2 Civivolunteer 4.7.31-2.3.1

I am getting the following message on a number of screens:

Warning: Declaration of CRM\_Volunteer\_Permission::check($permissions) should be compatible with CRM\_Core\_Permission::check($permissions, $contactId = NULL) in require\_once() (line 221 of /home/mysite/public\_html/members/drupal/sites/all/modules/civicrm/CRM/Core/ClassLoader.php).

The biggest issue is the volunteer sign up screen.

Any ideas?

# Answer
> 5 votes
Its a compatibility issue of Civi-Volunteer extension with latest version of CiviCRM. The new version of Civi-Volunteer is still not available but this issue is already fixed in code repository. You can apply patch from here.

Cheers

Pradeep

---
Tags: civivolunteer
---


# Question
Title: Statement violates GTID consistency error when creatng new user account in Drupal
I’m running CiviCRM 5.16.2 against Drupal 7.67 on 1&1 Ionos hosting. MySQL version is 5.7.27.

When I create a new account in Drupal via the “Create New Account” button on the login screen, once I’ve completed all the fields and press “Create new account”, I get a yellow panel with the following error.

```
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: unknown error

```

Then this in the white section underneath:

```
Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame thrown in /xxxxxxxx/sites/all/modules/civicrm/Civi/Core/Transaction/Manager.php on line 107

```

The user account appears to have been created when I go to the People section in Drupal. I have tried this on a completely fresh installation/database and the same thing happenes. I’ve turned on debugging and have got the following further info…

```
Database Error Code: Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions., 1787
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

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

```

What is causing this and how do I go about solving it? Many thanks.

# Answer
> 0 votes
This came up before at https://lab.civicrm.org/dev/cloud-native/issues/9. You might want to ask in there.

---
Tags: drupal, user-account
---


title: Can't delete contribution page

text:
# Question
Title: Can't delete contribution page
We have reassigned a number of our contributions to one single contribution page - as the source was good enough for our record keeping purposes.

```
You cannot delete this Contribution Page because it has already been used to submit a contribution or membership payment. It is recommended that your disable the page instead of deleting it, to preserve the integrity of your contribution records. If you do want to completely delete this contribution page, you first need to search for and delete all of the contribution transactions associated with this page in CiviContribute.

```

The page no longer has contributions associated with it. Even test ones - I searched for them all - no memberships were ever processed via that page either.

# Answer
Can you run the following SQL directly in the database? The code that does the delete check looks for something like this:

`select * from civicrm_contribution where contribution_page_id=<put the page id here>`

There is maybe some phantom entry still.
> 2 votes

---
Tags: contribution-page
---


# Question
Title: What is the recommended Wordpress equivalent for drupal-views
CiviCRM manual mentions X-Data Toolkit as a potential substitution to drupal-views. However X-Data Tookit has not been updated in years and its documentation is not available anymore.

What other plugin would you recomend as a replacement? A first Google search revealed :

Are there other alternatives I have not yet seen?

# Answer
> 3 votes
Great question. Ideally you would create a bridge to the civicrm API and not hit the database directly. I've floated it with two vendors: https://wp-types.com/ and http://pods.io/

You may find this useful: http://pods.io/docs/comparisons/compare-content-types/

# Answer
> 1 votes
Michael McAndrew has just posted a little hack he bodged together to get around the lack of views in wordpress.

1) it very much only solves his own particular use case

2) he is probably breaking lots of wordpress plugin development rules

3) there are many ways in which it would break down but he thought it worth sharing in case people thought it was interesting / wanted to suggest ideas / additions / improvements / alternatives:

https://gist.github.com/michaelmcandrew/1f21e95d13b48c2bdf4d0b300a28c298.

# Answer
> 0 votes
Work is happening to make https://github.com/mecachisenros/content-views-civicrm useful

Referenced here https://chat.civicrm.org/civicrm/pl/g9913yqt1tnmdesc85g6m34xph

---
Tags: wordpress, drupal-views
---