# Question
Title: Unable to add or edit profiles on contribution pages
I am unable to add, edit or delete profiles from my contribution pages. I am not sure what is happening. I decided to not modify reserved profiles and create a custom profiles and trying to change that is no longer possible. Am I doing something wrong? On one of my pages there is a text box, though it does nothing, on the other, there is nothing.

Also occurs when I try and make a new contribution page. Using Wordpress 4.7.5, CiviCRM 4.7.16 - Occurs in Chrome, Firefox, even in incognito mode.

# Answer
> 4 votes
Turns out that Jetpack conflicts with CiviCRM - Fix for now is to disable Jetpack when using CiviCRM Profiles on contribution pages and then reactivate when done. Also note: Jetpack also impacts the ability to edit a calendar date in CiviEvents.

**Update:** In speaking with Jetpack, the Jetpack Notifications module relies on Backbone.js and is in conflict with CiviCRM. There is already a ticket discussing conflict with backbone.js and a multitude of wordpress plugins with CiviCRM. Instead of deactivating Jetpack everytime you need to access a profile or edit a date, simply disable the Notifications Module at http://yoursite.com/wp-admin/admin.php?page=jetpack\_modules

They are working on making the feature easier to access and enable when it’s disabled. https://github.com/Automattic/jetpack/issues/6788

Now I am able to use Jetpack sans the Notifications module which I don't care about and CiviCRM without any issues.

---
Tags: wordpress, profile, contribution-page, debugging
---


title: Cron not working with joomla

text:
# Question
Title: Cron not working with joomla
Joomla 3.7.0 CiviCRM 4.7.19 PHP 5.5.38

I try to get a cron job running for civicrm with a joomla installation.

I looks the the wget does not allows me to get the third parameter over. see example eq1 and eq4. Quotes did not help either. See eq 2 and eq3

examples are senitize (PASSWORD USER MYKEY) HSOMETHING stands for https . Stack exchange does not let me post otherwise

Please advice.

---

```
eq1
wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY&name=USER&pass=PASSWORD

Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 76 [text/html]
Saving to: “STDOUT”

0% [ ] 0 --.-K/s ERROR: You need to send a valid user name and password to execute this file
100%[====================================================================================>] 76 --.-K/s in 0s

2017-05-21 17:34:57 (19.5 MB/s) - written to stdout [76/76]

[1]- Done wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY
[2]+ Done name=USER

**************************************************************************************
eq2

wget -O - -t 1 "HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=USER&pass=PASSWORD@ki23&key=MYKEY"

Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-05-21 17:37:04 ERROR 500: Internal Server Error.

**************************************************************************************
eq3
wget -O - -t 1 'HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=USER&pass=PASSWORD@ki23&key=MYKEY'

Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-05-21 17:38:45 ERROR 500: Internal Server Error.

**************************************************************************************
eq4
wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY&name=USER&pass=PASSWORD@ki23
Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 76 [text/html]
Saving to: “STDOUT”

0% [ ] 0 --.-K/s ERROR: You need to send a valid user name and password to execute this file
100%[====================================================================================>] 76 --.-K/s in 0s

2017-05-21 17:41:04 (23.3 MB/s) - written to stdout [76/76]

[1]- Done wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY
[2]+ Done name=USER

```

# Answer
Joomla 3.7.1 made this work from the command line. But from a c-panel cron job I got the error: "cli.php can only be run from command line."

Now this also works from the command line as well as with the c-panel cron job. : Note the back slashes!

`wget -O - -t 1 https://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=THEKEY\&name=THEUSER\&pass=THEPASSWORD`
> 1 votes

# Answer
One thing to consider is to make sure that the user you are using does have all permissions needed. Probably want to create a super user just for this. I had created on in the past which I just called mailuser.

You also want to make sure the password does not have any characters that may cause issues. For example, I've tried a random password before that included a `$`, and php tried to interpre
> 0 votes

# Answer
Does your password have any shell meta-characters in it? Basically anything outside \[a-zA-z0-9\] might need to be escaped with a preceding \ before it'll work on command line.

Can you download the file to your desktop and use scp (WinSCP?) to copy it to your host?

Last thought, place the whole string from http through the end in single quotes - this turns off shell meta-character processing.
> 0 votes

---
Tags: joomla, cron
---


# Question
Title: How do I get CiviCRM working with varnish on wordpress?
When I activate CiviCRM I get the following notices regarding varnish status:

> Varnish is running but cannot cache.
>
> A plugin or theme is setting a PHPSESSID cookie on every pageload. This makes Varnish not deliver cached pages.
>
> Something is setting the header Cache-Control to "no-cache" which means visitors will never get cached pages.
>
> Something is setting the header Pragma to "no-cache" which means visitors will never get cached pages.

The site is unusable when civi is activated, I can hardly navigate the civi admin pages - I get 'page not found' errors about half the time.

Is there a way to get CiviCRM to play with varnish?

# Answer
> 2 votes
A big part of the pages in civi are not public, so as you might serve different pages to every user, they can't be cached.

But I think your problem is elsewhere, if you are "alone" on your admin pages, it should not be slow, even without varnish

Have a look at the demo pages, are you experiencing the same speed on your server? if not, there is something wrong in your install, and I'd fix that, so you do not need varnish

X+

---
Tags: cache
---


title: Platform independent Webform CiviCRM

text:
# Question
Title: Platform independent Webform CiviCRM
Is there any work being done on a platform independent Webform CiviCRM or equivalent? Our site is heavily invested in Joomla but we just can't seem to get CiviCRM to fit our needs without the customizability of Webform CiviCRM. I'm wondering if I will need to do a rebuild and migration to Drupal just for this plug-in or if there is hope in waiting, or places I can try to help.

# Answer
> 2 votes
There are some developments on generic ways of passing data between forms and CMS but they are at very early baby stages.

However they focus on the situation where CiviCRM is on a different server then the public website as this is the most secure configuration that best allows following European privacy guidelines. So that would certainly not help you right now.

Having said so, have you thought about separating CiviCRM and your public facing website because of security reasons?

# Answer
> 1 votes
Presently there is no platform independent Webform tool for CiviCRM, no.

One other option to use CiviCRM on a separate site, perhaps as a subdomain. Then you would have the issues of matching the look.

The other option is to use an iFrame on your current site which draws in a virtually un-styled Drupal "sub-site" which is just used for CiviCRM. This at least keeps the user on your main site and avoids the problem of matching your site's look.

# Answer
> 0 votes
Is there a way to use Angular Forms to do something similar?

My first thought would be Symfony forms to do this, but the dependencies are high. There would have to be a Doctrine model for all the CiviCRM entities, and while there's a Symfony function for generating these it's only about 75% effective. It would take a lot of work to complete the other 25% and test the whole 100%. Thus, the thought that Angular Forms - already in Civi - might be an easier way.

---
Tags: webform-civicrm, joomla
---


# Question
Title: Only Exposing CiviCRM Contact from Active Group in Drupal Views?
We have a directory (along with a Leaflet map) of our affiliates. Currently, the view is filtering the map and accompanying table of contacts based on the group ID (e.g. 200 = current affiliates).

What I've noticed is that when we remove an affiliate from said group, rather than delete them, the contact record still shows up in the Drupal view. I've added the "CiviCRM Groups: Is Active" filter, however that doesn't seem to be working.

Right now, these are my filters and this is the new filter setup I provided to the view:

CiviCRM Address: State/Province (exposed) AND CiviCRM Address: City / Suburb (exposed) AND CiviCRM Contacts: Display Name (exposed)

AND

CiviCRM Groups: Group ID (= 200) AND CiviCRM Groups: Is Active (True)

Any ideas on what I'm doing wrong?

# Answer
When you remove someone from a group, the status of their group membership is changed from 'Added' to 'Removed', so try adding another filter on status:

`CiviCRM Groups: Contact Status (= Added)`
> 4 votes

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


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

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

It also works with inline edit:

# Answer
> 2 votes
Here is an older thread with some changes that went into 4.3 (not sure if there have been further changes since then):

> Note: Initial discussions were held via email with followups on IRC on Monday (16-Jul-12) and Wednesday (18-Jul-12). An extra discussion document was included on Wed ( http://pastebin.com/BieCSzXa ). A blog post explored the issue further. Another IRC conversation (13-Aug-12) settled on optimistic locking.
>
> Some key design decisions:
>
> 1. Locks are optimistic
> 2. Locks apply coarsely to all core contact tables -- civicrm\_contact, civicrm\_address, civicrm\_phone, civicrm\_email, civicrm\_website, civicrm\_im, and single-value custom-data
> 3. The key used to check revisions will be a "modified" timestamp on civicrm\_contact
> 4. Locks are only checked for the "Edit Contact" and "View Contact - Inline Edit" screens. Other screens will not read the "modified" timestamp or display warnings/errors about it; however, other screens will update the "modified" timestamp.

# Answer
> 0 votes
Can anyone confirm what record locking, if any, is implemented in CiviCRM 4.6 or 4.7?

I swear I've seen a message which tells you someone else has the record open - are you sure you want to save changes, but I can't replicate it on our site.

thanks Jon-man

---
Tags: database
---


# Question
Title: Multi language update to 4.7 does not update Custom Field Sets to be 'is public'
Ran the update script and said it upgraded successfully... however, when running the Wordpress page where my subscription form was, got a No Such Field error...

It seems that the civicrm\_custom\_group\_xx\_XX views are not updated to include the is\_public flag... The civicrm\_custom\_group table is updated, but not the views...

# Answer
> 2 votes
While the patch in https://github.com/civicrm/civicrm-core/pull/10399/files will fix the issue for future site upgrades, it won't help with site that are already experiencing this issue. Running the following will fix sites affected by this issue:

```
drush eval 'civicrm_initialize(); $domain = new CRM_Core_DAO_Domain(); $domain->find(TRUE); if ($domain->locales) { $locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales); CRM_Core_I18n_Schema::rebuildMultilingualSchema($locales, NULL); }'

```

# Answer
> 1 votes
In case others have the same issue, you need to fix the views manually by redefining them to include the 'is\_public' field... You need to do this for each language in your database...

For example, I updated my fr\_CA language (civicrm\_custom\_group\_fr\_CA) view as so:

```
CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`coalitioncivi`@`localhost` SQL SECURITY DEFINER VIEW `civicrm_custom_group_fr_CA`
AS SELECT
   `civicrm_custom_group`.`id` AS `id`,
   `civicrm_custom_group`.`name` AS `name`,
   `civicrm_custom_group`.`extends` AS `extends`,
   `civicrm_custom_group`.`extends_entity_column_id` AS `extends_entity_column_id`,
   `civicrm_custom_group`.`extends_entity_column_value` AS `extends_entity_column_value`,
   `civicrm_custom_group`.`style` AS `style`,
   `civicrm_custom_group`.`collapse_display` AS `collapse_display`,
   `civicrm_custom_group`.`weight` AS `weight`,
   `civicrm_custom_group`.`is_active` AS `is_active`,
   `civicrm_custom_group`.`table_name` AS `table_name`,
   `civicrm_custom_group`.`is_multiple` AS `is_multiple`,
   `civicrm_custom_group`.`min_multiple` AS `min_multiple`,
   `civicrm_custom_group`.`max_multiple` AS `max_multiple`,
   `civicrm_custom_group`.`collapse_adv_display` AS `collapse_adv_display`,
   `civicrm_custom_group`.`created_id` AS `created_id`,
   `civicrm_custom_group`.`created_date` AS `created_date`,
   `civicrm_custom_group`.`is_reserved` AS `is_reserved`,
   `civicrm_custom_group`.`title_fr_CA` AS `title`,
   `civicrm_custom_group`.`help_pre_fr_CA` AS `help_pre`,
   `civicrm_custom_group`.`help_post_fr_CA` AS `help_post`,
   `civicrm_custom_group`.`is_public` AS `is_public`
FROM `civicrm_custom_group`;

```

Did the same for my en\_US view... and all is working... hope that is the only issue...

---
Tags: wordpress, upgrade
---


# Question
Title: how to copy data from one custom field to another (text to textarea)
I created a custom data field of type `text (alphanumeric)` for use in a profile, but now realize it should have been a `textarea` (primarily to support line/paragraph breaks). A number of the these text fields already have data in them. I have created a new textarea custom data field and need to get the data from the each text field into the textarea for the same contact. I'm thinking a can do it using SQL, something like this:

```
UPDATE table_name
SET column1 = column2

```

However, poking around in phpMyAdmin, I can't find the relevant table.

Any help will be appreciated.

Wordpress 4.7.5 CiviCRM 4.7.17

# Answer
> 2 votes
To find the correct table(s), you need to know the id of the custom field as well as the id of the custom group it's in.

* Go to **Administer menu » Customize Data and Screens » Custom Fields**
* Click **View and Edit Custom Fields** next to the relevant custom field group.
* Look in the URL - it should read something like: `http://mysite.org/civicrm/admin/custom/group/field?reset=1&action=browse&gid=4`
* Look for the number after `gid=` (in the example above, "4").
* In phpMyAdmin, look for the tables starting with `civicrm_value`. Find the one that ends with the gid you identified above.
* You should be able to find your custom field data in there. If your fields are very similarly named, you might also need to know the custom field ID. In that case, click **Edit Field** and note the `id` in the URL. The custom field you're looking for ends with that number.

---
Tags: wordpress, custom-fields, mysql, textarea
---


# Question
Title: Permission error trying to create new event or copy existing
I'm using the latest version of CiviCRM for Joomla and trying to create a new event or copy an existing one and I'm getting this error:

> An error has occurred. 0 @import url(/administrator/components/com\_civicrm/civicrm/css/civicrm.css); @import url(/administrator/components/com\_civicrm/civicrm/bower\_components/font-awesome/css/font-awesome.min.css); Sorry but we are not able to provide this at the moment. You do not have permission to access this page.
>
> Return to home page.
>
> function toggle( element ) { var parent = element.parentNode; var className = parent.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { parent.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { parent.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

When I check the CiviCRM log, I see:

```
May 22 20:22:24  [info] $Fatal Error Details = Array
(
    [message] => You do not have permission to access this page.
    [code] =>
)

May 22 20:22:24  [info] $backTrace = #0 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(378): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Event/Form/ManageEvent.php(128): CRM_Core_Error::fatal("You do not have permission to access this page.")
#2 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Event/Form/ManageEvent/EventInfo.php(47): CRM_Event_Form_ManageEvent->preProcess()
#3 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(543): CRM_Event_Form_ManageEvent_EventInfo->preProcess()
#4 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#5 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Event_Form_ManageEvent_EventInfo), "display")
#6 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_ManageEvent_EventInfo), "display")
#7 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#8 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#9 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(283): CRM_Utils_Wrapper->run("CRM_Event_Form_ManageEvent_EventInfo", "Event Info and Settings", (Array:0))
#10 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14))
#11 /home/mysite/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#12 /home/mysite/public_html/administrator/components/com_civicrm/civicrm.php(121): CRM_Core_Invoke::invoke((Array:4))
#13 /home/mysite/public_html/administrator/components/com_civicrm/civicrm.php(40): civicrm_invoke()
#14 /home/mysite/public_html/libraries/cms/component/helper.php(394): require_once("/home/mysite/public_html/administrator/components/com_civicrm/civicrm.php")
#15 /home/mysite/public_html/libraries/cms/component/helper.php(369): JComponentHelper::executeComponent("/home/mysite/public_html/administrator/components/com_civicrm/civicrm.php")
#16 /home/mysite/public_html/libraries/cms/application/administrator.php(98): JComponentHelper::renderComponent("com_civicrm")
#17 /home/mysite/public_html/libraries/cms/application/administrator.php(156): JApplicationAdministrator->dispatch()
#18 /home/mysite/public_html/libraries/cms/application/cms.php(265): JApplicationAdministrator->doExecute()
#19 /home/mysite/public_html/administrator/index.php(51): JApplicationCms->execute()
#20 {main}

```

I checked the folder permissions and everything is 755. This may have started with Joomla 3.7 or 3.7.1, but I can't be sure. I also tried switching between PHP 5.6 and 7.

I did some further investigating and the event is getting created/copied in the civicrm\_event table, but isn't showing up in the Events section.

# Answer
This issue is not permissions related. It's a problem with CiviEvent not showing or allowing you to create more than 26 events. I can reproduce this on a fresh install of the latest version of Joomla and CiviCRM.

Can't create more than 26 events in CiviEvents (or view on dashboard)
> 1 votes

# Answer
I believe that error is more suggesting an issue with the permissions associated with the role. it looks like you need to grant edit permissions for CiviEvents as per https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/Form/ManageEvent.php#L128.

Those sorts of errors are typical where the role that you have has insufficient permissions defined in your content management system (CMS)

Seamus
> 0 votes

---
Tags: civievent, joomla
---


# Question
Title: Can't create more than 26 events in CiviEvents (or view on dashboard)
No matter what I do, I can't create more than 26 events in CiviEvent. It seems this might have happened in the latest CiviCRM update because I already have more than 26 events, but only 26 are visible in the dashboard.

I created a fresh install of Joomla 3.7.2 and CiviCRM 4.17.19, then imported in my civicrm\_event table with around 100 events and the problem still exists.

I removed all the events from the table except 25 of them. Then I was able to create one more event. After that, I only got this error when trying to create or duplicate an event:

Permission error trying to create new event or copy existing

If I delete an event, I can create a new one up to 26 (no matter the ID). If I import 100 events into the civicrm\_event table, only 26 of them will appear on the dashboard. If I delete one of the visible events, one of the "invisible" ones will appear.

I have a test site set up and can share access if someone can take a look at it.

# Answer
> 4 votes
This answer is from @SeamusLee at Bugreport: Impossible to create more than 25 events

"I would recommend you apply the patch here https://github.com/civicrm/civicrm-core/pull/10325 There is a default limit on API calls to 25 records which is what your probably hitting here

Seamus"

---
Tags: civievent, joomla
---


title: One Users Email not working for 'test'

text:
# Question
Title: One Users Email not working for 'test'
I am getting a strange error, though I may be missing something really obvious. This is the first user I have added, so it may be my error.

Our mailer is set up for SMTP, and it works just fine for everything, but a user was getting a 550 error when sending a test email to themself. I have triple checked the email address, it is entered correctly.

Is there somewhere that I have to add this email in CiviCRM in order to have tests work for them?

Using: CiviCRM 4.6.24

Attempting from: Mailings \> New Mailings

> Error in call to Mailing\_send\_test : Failed to add recipient: "EMAIL ADDRESS HERE" \[SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM \>\> Global Settings \>\> Outbound Email \> (SMTP). (code: 550, response: 5.1.1 : Recipient address rejected: User unknown in relay recipient table)\]

Response to Jon G:

I don't think it is the server, i can go check the logs though... The test works for user1@example.org, user2@example.org, user1@aliasforexample.org, etc. It just doesn't work for one particular user.

:::::::::::: SOLVED ::::::::::::

I had to add the user to our relay. I wasn't aware that we were using a relay. :P

# Answer
I think that message is telling you that the email that your smtp server is trying to send to is "EMAIL ADDRESS HERE", which is clearly a placeholder that needs to be filled in. I'd check the record of the contact who is unable to send themselves a test email for fishy bits (e.g. the primary email address, which perhaps got set via an import). If that record looks good, then I'd guess that the email address it's sending to is something unusual for the mail host machine and has a badly configured forward or something like that.

But no, you don't need to do anything special to enable test emails.
> 1 votes

# Answer
I would correlate this with the SMTP mail logs. My guess is that you're not actually delivering to the server you think you're delivering to.

For instance - is the user's email address using the same domain as a site hosted on the server? E.g. if I'm "jon@example.org" and I'm using a site that hosts "example.org", it's quite possible that my MTA (mail sending program) thinks it's supposed to deliver email to "example.org" addresses to itself, instead of to an outside address. If you're using `postfix`, check the `mydestination` setting in `main.cf` to see if that's your problem.

I would also install `swaks` on the CiviCRM server and send an email to the test address and see if there's anything fishy in the transaction.
> 0 votes

---
Tags: email
---


# Question
Title: Joomla release 3.7.2 appears to have broken the menus
I applied the Joomla 3.7.2 update yesterday in my test site. Now when I navigate to CiviCRM the menu doesn't appear at all.

I am running CiviCRM 4.7.19 and Joomla Version is : Joomla! 3.7.2 Stable \[ Amani \] 22-May-2017 09:46 GMT. The Joomla Platform Version is: Joomla Platform 13.1.0 Stable \[ Curiosity \] 24-Apr-2013 00:00 GMT

Anyone else seen this behaviour and , if so, is there a fix for it?

# Answer
I'm curious if you've checked the civicrm log file. Might help to confirm that it isn't reporting any problems due to permissions. Other than that, might want to take a glance at https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location. Its possible you may need to rebuild the menu for some reason. I haven't updated to 3.7.2 yet, so I can't confirm this issue myself.
> 1 votes

---
Tags: joomla, menu
---


# Question
Title: Can't get action token {action.unsubscribeUrl} to work in Welcome automated message
I've been trying to add unsubscribe and optout functionality to the default "Welcome Message" email template you find under Administer, Header, Footers, and Automated Messages. I don't have HTML experience but using the code in the "Mailing Footer" sample, the documentation, and a wysiwyg editor, I added this in the Body - HTML Format text block of the "Welcome Message":

```
<p><span style="font-size:14px;"><span style="font- family:arial,helvetica,sans-serif;">To unsubscribe from this newsletter, <a href="{action.unsubscribeUrl}">click here</a>.  <br /> To opt out of all future emails from us, <a href="{action.optOutUrl}">click here</a>.</span></span></p>

```

When I test this and produce the Welcome email, these tokens don't appear as links, only text. I've been researching this all day with no luck. Please help!

I'm on Wordpress 4.7.5 and CiviCRM 4.7.16.

# Answer
I expect the token only gets populated with the relevent URL when it is used as part of a CiviMailing.

The automated message you are referring to does not go out via CiviMail, so it is possible that it will not function in that feature.

Since it seems that the checksum doesn't work directly with civicrm/mailing/subscribe?reset=1 you can set up a Profile that includes your public mailing lists, and send them to that. Bit of a pain having to do the extra steps.

Using tokens for Profiles is detailed here: https://wiki.civicrm.org/confluence/display/CRMDOC/Tokens

And using Profiles for Mailing Lists is here: https://docs.civicrm.org/user/en/4.7/email/set-up/#allow-people-to-sign-up-for-your-mailing-lists-online
> 2 votes

# Answer
I believe the final answer is that you cannot insert an action token into an automated message. Looking further into the CAN-Spam Act, which says you don't need to include unsubscribe links in transactional email, I guess strictly speaking we don't need to include this unsubscribe link in the "Welcome" email. Would still be a welcome feature.
> 0 votes

---
Tags: tokens, message-templates
---


# Question
Title: User is logged into different account on CiviCRM than Drupal
This is happening inconsistently, but often enough to be a problem.

So far, we have come across two issues with it:

#1 - A new user registers for the site. That user is then taken to a CiviCRM form for them to choose their payment level. Sometimes, the user is logged out between the drupal registration form and the CiviCRM form, leading to them being prompted to log in again when they reach the Civi payment form.

#2 - Background: We are currently testing some changes to our site, and so the admins all have multiple accounts, most of which have admin permissions.

An admin logs into the drupal site, and then goes to CiviCRM. For some reason, though, they are logged into one of their other admin accounts on CiviCRM. They go to "Find a member", and then click the link to the member's drupal profile. When Civi takes them back to drupal, it throws an error because they are logged into a different account on Drupal than on Civi.

We are using Drupal 7 and CiviCRM 4.6.28

# Answer
> 1 votes
Are your users perhaps logging into an https page and then following a link to a http page (or vice-versa) ? I have seen such issues in that case. You need to be consistent, and set the Drupal $base\_url, Civi CIVICRM\_UF\_BASEURL, and $civicrm\_setting\['URL Preferences'\]\[\] values all to either http or to https, and change any links in your content to use that same scheme also.

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

---
Tags: drupal, forms
---


# Question
Title: Webform CiviCRM contribution "other amount"
I've setup a webform with CiviCRM integration that ties back to a Contribution page. This creates a "Contribution Amount" field in the form that I've populated with a number of user selectable options that have assigned dollar amounts. I'd also like for there to be an "other amounts" option that allows the donor to type in a custom amount, just like in the standard CiviCRM contribution page options. I don't see such an option in the Webform settings. Can anyone advise how this is accomplished?

# Answer
> 6 votes
If you want to preserve a predefined values and let the donor the option of entering another amount, Select (or other) Drupal module works nicely with Webform CiviCRM and payment amounts.

# Answer
> 0 votes
ON the civicrm tab, check the Contribution Amount field and read the field help and i think you will figure you need to set the widget to Number

> This amount will be in addition to any paid events and memberships.
>
> Once added to the webform, this field can be configured in a number of ways by changing its settings.
>
> Possible Widgets:
>
> Number (default): Allow the user to enter an amount, optionally constrained by min, max, and increments.
>
> Hidden: Set the amount without giving the user a choice.
>
> Select/Radios: Allow the user to choose from one of several options.
>
> MultiSelect/Checkboxes: Each choice the user selects will be added together.
>
> Grid: Configure multiple items and quantities.

---
Tags: drupal, civicontribute, webform-civicrm
---


title: Custom field not working in search

text:
# Question
Title: Custom field not working in search
I have a search page set up with a shortcode like this:

\[civicrm component="profile" gid="18" mode="search" hijack="0"\]

Everything seems to be working except that searching on a custom data field, "Certification," generally isn't working.

None of the other search fields are custom fields. Don't know if that relates to the problem.

------ new material below, added in response to comments -----

"Certification" is a text field and is set to "Searchable."

Some examples of content for the "Certification" field are shown below. I would expect that I could search on any string within any of these (e.g. `Curr` or `Curriculum` or `Teac` or `Teacher`). None of those work. Even searching on a complete entry like `Coach, Trainer/Teacher, Curriculum Instructor` doesn't work. The only one I've found that works is `Coach` -- I'm guessing because that is a complete entry with no commas? Perhaps the commas are causing the problem?

I'm realizing that this data was imported into a CiviCRM text field from a multiple-select field in another database. There were four options in the other database: `Coach`, `Trainer/Teacher`, `Curriculum Instructor`, and `Mediator`. I'm thinking I need to change or move this into a multiple-select field in CiviCRM. Not sure what the best/easiest way to do that is.

Wordpress 4.7.5 CiviCRM 4.7.17

# Answer
> 2 votes
I would recommend changing the certification field into a multi-select. That way the search field will be a drop down and much easier for the end user. I had to do this recently. Here are the steps I took:

* Create a new multi select custom field.
* Make sure the values match the entries from the previous field to avoid errors in the next step.
* Export the records with the current custom field. Make sure to include the contact ID
* Now do a import updating the new custom field with the data from the old one.

These are the steps I took recently. Looks like you only have about 100 records in this group so it should work fine.

# Answer
> 1 votes
% is the wildcard character to use in civicrm searching. searching for coac%? seems to work for me.

---
Tags: wordpress, custom-fields, search
---


# Question
Title: CiviEvent registration, edit wording relating to a drop down menu
How can I edit the wording in a set field beside a drop down box when a person is registering to attend an event? They could also use the drop down box to register a co-worker. I.e., current wording says "Register someone at your organization" and we want to tweak to say "Register yourself or someone at your organization." Is this possible? Thank you!

# Answer
> 1 votes
You can use the Word Replacement feature under Administer \> Customise to make these sorts of changes ie at /civicrm/admin/options/wordreplacements?reset=1

---
Tags: civievent
---


# Question
Title: Online registration - fill-in boxes both above and below text
Is there any way on the online registration page for an event to include the fill-in boxes for name, email etc. both above and below several paragraphs of text? Right now it is only appearing below the introductory text.

The idea is to handle two scenarios: 1) Someone comes to the page ready to register and can do so right away without having to scroll down through the introductory text, 2) Someone comes to the site, scrolls through the introductory text and can register without having to go back up to the top to register.

So, two identical sets of fill-in boxes, one set before the introductory text and one after.

WordPress 4.7.4 CiviCRM 4.7.17

# Answer
> 1 votes
There are a few options to accomplish this depending on your needs.

If you are using a WP shortcode on a page you can have text above and below the registration block. This option allows specific intro text or text after registration form but does not insert text in specific areas of the form.

If you use multiple profiles on the page You can use the pre & post form help entries in the profile settings to add specific text.

Finally in the individual fields there is also the options to add pre & post help. In these fields you can use html tags to format text the way you wish.

Some custom CSS may be necessary to get things the way you like. Hope these options help out.

---
Tags: wordpress, online-registration
---


title: How do I add to the Wiki?

text:
# Question
Title: How do I add to the Wiki?
I have been learning a lot about bugs and issues with CiviCRM with my recent install on Wordpress. There are areas of the Wiki, such as WordPress plugins/themes incompatible with CiviCRM that I have some workarounds to contribute. However, I am unable to add them to the Wiki, could someone help me figure out what I am doing wrong?

When I try to login to the Wiki, I get the following error:

"Sorry, a network error occurred trying to log you in. Please try again, and contact your administrator if the problem persists."

# Answer
> 2 votes
### Expected behavior

If everything is working correctly, you *should* be able to edit the wiki by (1) logging in, and (2) clicking on an "Edit" link that displays with a pencil icon to the right of the green page title.

### Getting help from an administrator

If you can't log in or you don't see the "Edit" link after logging in, then something might need to be fixed with your account or with the whole wiki. In this case it's best to ask one of the administrators for help by doing the following:

1. Log in to Mattermost
2. Go to the infrastructure channel
3. Post a message in that channel with the problem you're experiencing. Include your wiki username (if you have one) in the message. This is a relatively low-traffic channel that's monitored by administrators who will see your message soon, so there's no need to issue any notifications in your message.

---
Tags: wordpress
---


title: How to setup Clickatell

text:
# Question
Title: How to setup Clickatell
I am having issues trying to setup Clickatell SMS provider, I am running Civi 4.6.26 on wordpress 4.7.5 using the clickatell extension 3.0 and have a Clickatell Platform account.

I keep getting "ERR: 001, Authentication failed" I am not sure why I have checked the username and password, and I can log into the Clickatell portal using those details.

I have tried putting in the "api\_id=" in front of the api key but then it says it is invalid.

any help would be appreciated

# Answer
Here's a link to the current docs for setup of CiviCRM / Clickatell.

In that there's an example that suggests `api_key=XXX` is the correct format. It gives this example (when using a specific 2-way config):

```
api_id=1234567
from=15558238168
mo=1

```

Those docs also give instructions to set up an API product and obtain the key (which it looks like you've done), and say *"Be aware that your Clickatell API password may differ from your Clickatell account password."* which may be the problem you're hitting?

If you're getting a meaningful "authorization failed" response back I'd be inclined to take that as it is given and verify those authorization details (username, API password and API key) are configured right.

Next steps might be to debug around this line to see if the parameters are being set correctly, or to seek out support from someone able to do so.
> 1 votes

---
Tags: wordpress, sms
---


# Question
Title: Bookkeeping report that includes grouping by deposit and Line Item Totals
* We are using Civi 4.6.18
* WordPress 4.7.1
* iATS is our paymentprocessor.
* All donations use Price Sets so we use Line Items for our reports

Is there a way to get a report that groups Contributions by Deposit and includes the line Item info? I know this is probably an iATS extension issue but I thought I'd ask here in case some one already figured out a system.

We do not export each individual donation to our accounting programming as the Bookkeeping report show it. We just want each deposit with the total line item amounts for that deposit. Civi has the donation details so it is not needed in our accounting as well. Right now we have to pull an iATS report with the deposit details and then compare those donations to Civi to manually tally the Line Item Totals.

# Answer
> 1 votes
Here is what we have done. This works with iATS and using Price Sets (Line Items). Not sure how other payment processors group their deposits.

Because iATS does deposits based on these 3 divisions--ACH, Discover, MasterCard/Visa. Instead of just having 2 payment instruments Credit Card & ACH, I created a new one "Discover" and changed the current Credit Card to Visa/MasterCard (We also have ACH). iATS deposits the two CC divisions daily and the ACH weekly.

Now we can run Extended reports and filter by Payment Instrument. If you set the date for one week for the ACH and run a report for each day for the Discover and another for MC/Visa, you will get a "deposit" report with line item detail. The one thing that would improve this is if we could sort the two CC reports by Receive Date. Then you could run a date range and sort them by Receive Date and have each deposit in that date range rather than running a separate report for each day.

Hope this helps others.

# Answer
> 1 votes
This is not an iATS Payments extension issue. Payment Processors like iATS Payments process the total amount - the details of how the total amount was arrived at - are within CiviCRM.

CiviCRM stores the line items in the the civicrm\_line\_item table it contains an entity reference to the civicrm\_contribution table -\> which has the trxn\_id (Transaction ID).

So if you want to group by lineItems as opposed to by contributions you'll need to combine these two tables - and sum up the lineItems over a specific receive\_date range (and/or for specific trxn\_id-s).

# Answer
> 0 votes
Please have a look at Fuzion's Extended Reports extension and see if it provides what you need. it offers a number of reports with Line Items.

---
Tags: reports, iats, bookkeeping
---


title: Organization Listing - can I show logos

text:
# Question
Title: Organization Listing - can I show logos
I have a profile configured to list out related organizations from the Contacts database on the front-end web site. It works great and provides the details I want, however, I would also love to show the org's Logo from their contacts entry - is this possible? I can't seem to find a matching field in the Profile configuration.

Thanks! Norm

# Answer
The field your are looking for is called 'image url' it is a contact field.

You should be able to select it in the profile setup. The image will display scaled to 100X100 pixels.

Hope this helps...
> 1 votes

---
Tags: contacts, profile
---


title: Using login data to skip over search

text:
# Question
Title: Using login data to skip over search
I have set up a bunch of my contacts with a group of custom fields that can have multiple entries.
I set up a profile to list out these custom fields, however, it is asking me to enter search criteria before listing the entries. I would like it to automatically use the logged in users information to search on it and display only their entries - how can I do this?

TIA Norm

# Answer
To close this out, I have actually written a custom PHP script to do this for me in a nice table format. I inject the PHP using a wordpress plugin call XYZ PHP Code and it works great.

you can get the script here: http://txt.do/d01fm
> 2 votes

---
Tags: custom-fields, search-results
---


# Question
Title: Account Type Checking/Savings Disappears when making a contribution
Civi 4.7.17 WordPress 4.7.3 iATS Payments Processor

We recently upgraded from 4.6.26 to 4.7.17, since the upgrade this quirk has popped up. When making an ACH contribution, one of the required fields is Account Type and our two choices are Checking or Savings. This field displays with the drop-downs on initial load. However, once you select Electronic Funds Transfer, the Account Type field disappears. When you hit Confirm Contribution, you get an error telling you "you skipped a required field." This time the Field is displayed adn you can complete the donation. I have attached several screenshots.

I tried changing the default to Credit Card but you get the same results. I tried switching my theme to see if it was a theme conflict, but I get the same results. I also used the Chrome Inspector adn found that it is not a CSS issue. It is missing HTML so likely a php issue. I could not get the demo site to display an ACH payment option to test it there.

Is this a Civi core problem or an iATS Extension problem? Who generates the contribution form? Any ideas on what I can do to correct the issue?

---

---

# Answer
Please note that the xml file specifies that iATS 1.5.3 is **compatible with** CiviCRM 4.6. You must use 1.6.x with CiviCRM 4.7.
> 0 votes

# Answer
We recently upgraded the iATS Payments extension to 1.6 and the problem went away.
> 0 votes

---
Tags: fields, missing
---


# Question
Title: Added some custom fields but it'snot coming in advanced search
I have 4- 5 custom fields in CIVI CRM but I am not getting it in advanced search. Please help me I want to search based on custom fields.

# Answer
> 3 votes
Welcome to CiviCRM Stack Exchange. Please make sure to select the option "is searchable" for evry custom field, otherwise they will not appear in searches.

---
Tags: custom-fields, search
---


title: Custom Database Triggers disappearing

text:
# Question
Title: Custom Database Triggers disappearing
One of the ways I have set up my system to auto-increment a value (registration number) in a custom table is by using a custom database trigger. They are quite straight forward - after insert, update with the next value.
I have developed 2 triggers that seems to work well for me, however, I'm not entirely certain why but the triggers are disappearing on me over time. One trigger is on the civicrm\_membership table (updates a civicrm\_value table) and a civicrm\_value table. This is one of them:

```
CREATE TRIGGER `Increment_Dog_Number`
  BEFORE INSERT ON `civicrm_value_registered_dogs_5`
  FOR EACH ROW
    SET NEW.ddog_number_19 > = (
      SELECT MAX(ddog_number_19)+1 FROM civicrm_value_registered_dogs_5
    )

```

I'm not sure what is causing the triggers to be dropped -- any suggestions on how to work around it?

Thanks Norm

# Answer
> 2 votes
CiviCRM periodically rebuilds triggers, and when doing so it drops ALL existing triggers - see `\Civi\Core\SqlTriggers::rebuild()`.

One solution to this may be to create an extension which adds your custom trigger to the list which CiviCRM will generate when performing this task. That way your trigger will persist through CiviCRM's schema rebuilds. See `hook_civicrm_trigger_info()` for this.

Another may be to configure that custom field to be an auto-increment or calculated value. I thought there was a way to add incrementing fields directly via the CiviCRM interface, but the only method I see on a local test site is setting the value to "View only" then populating it from PHP. You could implement equivalent functionality to the trigger above from a custom extension, perhaps `hook_civicrm_post()` will suit your needs for this.

Generally, it's only recommended to interact with CiviCRM's schema via the API interfaces CiviCRM provides. The application defines (and redefines, as you've discovered!) the underlying data structures, and directly modifying the database (at least, the tables belonging to CiviCRM) can have unexpected results.

# Answer
> 1 votes
Resolved this issue by eliminating the triggers and creating an extension with php code to essentially do the same thing using the hook\_civicrm\_post.

---
Tags: database
---


# Question
Title: How would we implement a monthly prize draw database?
Our charitable group runs a monthly prize draw. Volunteer collectors call on the members to collect the entry fee each month, but some people may not be at home so won't be entered. Some members pay for one month. Others pay for several months at a time. So entry in to each draw depends on whether a member is paid up that month. Each collector is assigned a set of members to call on.

Has anyone implemented something like this in CiviCRM?

# Answer
It sounds like the issue is partly about how you record fact that Mary made one payment which covered entry for April + May + June and therefore you need to ensure she is in the result for your search of folks who bought a ticket for each of those months.

I would suggest doing this as a Membership for a Monthly period, and therefore some who pays for 3 months gets 3 'cycles' of Membership and therefore will be returned as being 'in the draw' for each of those months.

Then do the rest per Jaap's suggestion
> 1 votes

# Answer
I have never implemented a draw but I assume that it is quite easy. You record a contribution and then you search for contacts who a have a paid contribution for that month.

Then you pick a random one. You could probably export the contacts then to excel and let excel pick a random row. Or you develop a custom search which picks a random contact out of the ones who have paid.
> 0 votes

---
Tags: civicontribute
---


# Question
Title: Capturing Price Field selection onto Membership record
We've been doing Membership pricing with a straight Membership Type list i.e. without Price Sets, but now want to add an option to receive the quarterly newsletter via snail mail, with a surcharge. I created the Price Set and managed to create the Contribution Page with a checkbox for the newsletter. I need to capture the newsletter option into the Membership, how do I do that? I set the Financial Type as "Publications", maybe that's wrong.

# Answer
> 1 votes
When you set up your Price Set you need to set them up for Memberships, then when you create eg a Radio button field you should be offered your Membership Types when you add an option to that field.

You should then see these line items on the Contribution record eg

You should also be able to get these out via Reports such as the ones the LineReport extension offer.

---
Tags: price-sets
---


# Question
Title: CiviCRM installed, but configuration screen not as described
after installing the CiviCRM plugin, I read:"CiviCRM is almost ready. You must configure CiviCRM for it to work." If I click the link to configure, or do the following:
"Then go to Settings \> CiviCRM Installer: http:///wp-admin/options-general.php?page=civicrm-install You should see the CiviCRM Installer screen."

then I see only the left and top menu, with 'Settings\>CiviCRM Installer' highlit, and a reminder to update Wordpress, but nothing else.

I'm installing CiviCRM 4.6.16 in Wordpress 4.5

I looked for but didn't find .../civicrm.settings.php .

Dec 2016 - I have now re-installed MySql, PHP & wordpress and again activated CiviCRM, but face the same situation on trying to install CiviCRM: a grey blank center of the screen, with wordpress options on top and left edge.

This LAMP stack is on Ubuntu server 16.0.1.

# Answer
Install civicrm 4.7, not 4.6...LTS
> 1 votes

---
Tags: wordpress, configuration
---


# Question
Title: Creating a New Event Leads to a 'You do not have permission to access this page' Error
As admin with all permissions I am trying to create an event but when I press continue, I get the below error. Not sure what to do as I am the administrator and I have all the permissions I need! Many thanks for any help.

> Sorry but we are not able to provide this at the moment. You do not have permission to access this page.

The full error with stack trace:

```
***ERROR*** message:            You do not have permission to access this page. code:

***LAST ERROR***

***LOGGED IN USER*** contact_id:         2 display_name:       Webserver Administrator email_id:            email:               id:  2

REMOTE_ADDR: 82.47.150.10 HTTP_USER_AGENT: Mozilla/5.0 (Windows NT
10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

***SERVER*** PATH:               /usr/local/bin:/usr/bin:/bin REDIRECT_STATUS:    200 UNIQUE_ID:          WSxX7MMI3iEAACdaNisAAACl TZ:                 Europe/Sofia OMP_THREAD_LIMIT:   1 HTTP_AUTHORIZATION:  HTTPS:              on SSL_TLS_SNI:        rldb.info HTTP_HOST:          rldb.info HTTP_CONNECTION:    keep-alive HTTP_CACHE_CONTROL: max-age=0 HTTP_UPGRADE_INSECURE_REQUESTS:1 HTTP_USER_AGENT:    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 HTTP_ACCEPT:        text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_DNT:           1 HTTP_REFERER:       https://rldb.info/civicrm/event/add?reset=1&action=add HTTP_ACCEPT_ENCODING:gzip, deflate, sdch, br HTTP_ACCEPT_LANGUAGE:en-GB,en-US;q=0.8,en;q=0.6 HTTP_COOKIE:        SESSfdfbbafa8321456c2612c2aa8f3eb683=EzRTZMsNft8fTJR8PL_3IhhpfIxiPz_FXSvx6r_gRmY; SSESSfdfbbafa8321456c2612c2aa8f3eb683=L8h63isFkoafI9SSj2MS7IIme2d7c1G5M0bfBDNbWJA; DrupalModuleFilter=activeTab%3Dadministration; Drupal.tableDrag.showWeight=0; has_js=1 SERVER_SIGNATURE:    SERVER_SOFTWARE:    Apache SERVER_NAME:        rldb.info SERVER_ADDR:
195.8.222.33 SERVER_PORT:        443 REMOTE_ADDR:        82.47.150.10 DOCUMENT_ROOT:      /home/rldb/www/www REQUEST_SCHEME:     https CONTEXT_PREFIX:      CONTEXT_DOCUMENT_ROOT:/home/rldb/www/www SERVER_ADMIN:       admin@rldb.info SCRIPT_FILENAME:    /home/rldb/www/www/index.php REMOTE_PORT:        65507 REDIRECT_URL:   /civicrm/event/manage/location REDIRECT_QUERY_STRING:action=update&reset=1&id=62 GATEWAY_INTERFACE:  CGI/1.1 SERVER_PROTOCOL:    HTTP/1.1 REQUEST_METHOD:     GET QUERY_STRING:       action=update&reset=1&id=62 REQUEST_URI:        /civicrm/event/manage/location?action=update&reset=1&id=62 SCRIPT_NAME:        /index.php PHP_SELF:           /index.php REQUEST_TIME_FLOAT: 1496078316.9872 REQUEST_TIME:       1496078316 argv:               Array (
    [0] => action=update&reset=1&id=62 )

argc:               1

***BACKTRACE***
#0 /home/rldb/www/www/sites/default/files/civicrm/ext/ca.bidon.reporterror/reporterror.php(251): reporterror_civicrm_generatereport("ISKCON London Ltd", (Array:2), NULL, (Array:0))
#1 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Error.php(365): reporterror_civicrm_handler((Array:2))
#2 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Event/Form/ManageEvent.php(128): CRM_Core_Error::fatal("You do not have permission to access this page.")
#3 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Event/Form/ManageEvent/Location.php(74): CRM_Event_Form_ManageEvent->preProcess()
#4 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Form.php(543): CRM_Event_Form_ManageEvent_Location->preProcess()
#5 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#6 /home/rldb/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Event_Form_ManageEvent_Location), "display")
#7 /home/rldb/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_ManageEvent_Location), "display")
#8 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#9 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#10 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(284): CRM_Utils_Wrapper->run("CRM_Event_Form_ManageEvent_Location", "Event Location", NULL)
#11 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14))
#12 /home/rldb/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#13 /home/rldb/www/www/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#14 [internal function](): civicrm_invoke("event", "manage", "location")
#15 /home/rldb/www/www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#16 /home/rldb/www/www/index.php(21): menu_execute_active_handler()
#17 {main}

***POST***

```

Edit 1:

This comment sounds like my issue: Permission error trying to create new event or copy existing

Edit 2:

I did some further investigating and the event is getting created/copied in the civicrm\_event table, but isn't showing up in the Events section.

Edit 3:

I changed:

> if (!CRM\_Event\_BAO\_Event::checkPermission($this-\>\_id, CRM\_Core\_Permission::EDIT)) {

to

> if (CRM\_Event\_BAO\_Event::checkPermission($this-\>\_id, CRM\_Core\_Permission::EDIT)) {

in Web Files\sites\all\modules\civicrm\CRM\Event\Form\ManageEvent.php

and implemented a fix as referenced here: CiviCRM\_API3\_Exception: "Authorization failed to join onto StateProvince api in parameter loc\_block\_id.address\_id.state\_province\_id.name"

And all seems to work! It looks like this is a CiviCRM bug? As I am not sure what else it could be but it seems related: https://issues.civicrm.org/jira/browse/CRM-20581

Edit 4:

Unfortunately my hack only superficially got rid of the errors. The created events do not appear at all in the CiviCRM but there are in the DB. :(

Edit 5:

My CiviCRM version is 4.7.19

# Answer
> 0 votes
You don't state your version of CiviCRM, but the following fixed very similar symptoms for me with 4.7.19:

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

---
Tags: civievent
---


# Question
Title: Receipting for multiple event registrations via webform
We have a webform that allows you to register multiple people for multiple events. Once they have paid we would like them to receive an email receipt that they can print out and bring along to the event. How would we go about doing this?

Options we have explored are:

1. Webform emails: Yes you can format these to provide all the bits of information from the webform and format it however you like BUT it gets triggered to send as soon as you have submitted the form ie got pushed through to the payment page hence the email gets sent even if you do not then complete the payment.
2. If you have receipting on on the event then an event registration confirmation email gets sent. This only gets sent once the payment is completed but the email does not contain the correct information about all the events and participants.

Issues with the email are:

If you register contact 1 for event A and B and contact 2 for event A and C then under the Event Information and Location heading it refers to event C and under event price there is an item for participant 1 and participant 2 referencing event A.

If you register contact 1 for event A and B and contact 2 for event C and D then under the Event Information and Location heading it refers to event D and under event price there is just one item for one participant to event A.

Neither of these emails made reference to who participant 1 and 2 were.

# Answer
> 2 votes
This needed a fix in core. Have raised a JIRA for it at https://issues.civicrm.org/jira/browse/CRM-20657. Hopefully it should be merged in 4.7.21 version.

Fix submitted at https://github.com/civicrm/civicrm-core/pull/10439

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


# Question
Title: CiviDiscount Automatic Discounts Not Working on Events
Using CiviDiscount 3.3, CiviCRM 4.7.1.9 and Wordpress 4.7.5.

When attempting to create an automatic discount for members of type, with status new, current, and grace period or even any current status, I am unable to get a discount to automatically appear on any membership or event pages. The code I created works, but won't automatically apply for members. This also means anyone with the code, even non-members can use it. What am I doing wrong?

# Answer
> 1 votes
Your setup looks correct. This should provide a 10% discount to members. They must be logged in to their WordPress account in order to receive the discount otherwise the system will not recognize them as members.

I recommend using a randomly generated code. This makes it difficult for random visitors to guess the code.

---
Tags: cividiscount
---


# Question
Title: "Unknown path" when viewing a newly generated angular page
I'm trying to get started learning how to make Angular pages within a CiviCRM extension so I ran `civix help generate:angular-page` and read some help text about an example. Cool.

Then I ran `civix generate:angular-page EditCtrl about/me` to follow the example in the help text.

I browsed to `/civicrm/a/#/about/me` and expected to see some of the content shown in my newly generated `EditCtrl.html` file.

Instead I saw a page with an error message "Unknown path".

How can I view the angular page that civix generated?

# Answer
I believe you first need to generate a module, à la `civix generate:angular-module`. Have you already done that?
> 3 votes

---
Tags: developer, civix, angular
---


# Question
Title: Display events by categories for current year, and past 3 years
I am on Wordpress 4.7.5 and CiviCRM 4.7.19. I have tried the CiviEvent Widget but it does not do enough for me. I have tried modifying it but my skills are too beginner.

I would like to display my events by event type on a wordpress page. Then for each event type, I would like to have a past events page where the past events for 2017, 2016 and 2015 are displayed.

Illustration:

**Events page**
Event Type 1
\- event
\- event
\- past events page link
Event Type 2
\- event
\- event
\- past events page link
Event Type 3
\- event
\- event
\- past events page link

**Past Events page for Event type 1**
2017
\- event
\- event
2016
\- event
\- event
2015
\- event
\- event

What I have tried as an alternative: Created event types as post categories, then created years as sub-categories. Then inserted civicrm event as a post under the relevant sub-category. Then I intended to create page templates that display the posts under certain categories. However, I realised that I am unable to filter out the on-going events and past events. In addition, this means that I need to modify the page templates each year to get the id for the new categories. Example, for 2018, I will have to create 3 2018 sub-categories under each event type. I would prefer it to be an auto-thing.

# Answer
I can't think of an existing way to "auto-thing" this, unfortunately. I think you may need to contract a CiviCRM partner to develop some custom code for you, or perhaps reach out to the maintainer of the CiviEvent Widget and see if they're willing to take feature requests. (I suspect they'll want to be compensated for that.)
> 1 votes

---
Tags: wordpress
---


# Question
Title: HowTo fix: client denied by server configuration?
looking in my Apache error logs I get a lot of these errors:

```
17:52:59    client denied by server configuration: /path/to/drupal/sites/default/files/civicrm/custom/delete-this-hLW0uQKV0o    error
17:52:59    client denied by server configuration: /path/to/drupal/sites/default/files/civicrm/upload/delete-this-2oysK1uZ8L    error
17:52:58    client denied by server configuration: /path/to/drupal/sites/default/files/civicrm/ConfigAndLog/CiviCRM.3de7c305138430bacabc11877313657f.log    error

```

The directory permissions for sites/default/files/civicrm and all its subdirectories are 775

```
drwxrwxr-x  45 web  www   140B 19 Mai 10:45 ..
drwxrwxr-x   2 web  www   369B 19 Mai 09:29 custom
drwxrwxr-x   2 web  www     4B 19 Mai 09:29 upload
drwxrwxr-x   2 web  www    10B  1 Mai 05:15 ConfigAndLog
drwxrwxr-x   3 web  www     4B  3 Dez 23:26 persist
drwxrwxr-x   4 web  www     4B  3 Dez 23:22 templates_c
drwxrwxr-x   7 web  www     7B  3 Dez 23:22 .

```

and are owned by the apache user

```
uid=1001(web) gid=1000(www) groups=1000(www)

```

so in principle even 755 should be enough.

I don't think it is related to any apache setting (using 2.4), since my folder with drupal inside is inside a directory which already has a Require all granted directive, and my other web projects (and drupal itself) do not throw such kind of errors.

Understanding this post right it is kind of "normal" that the "delete-this" files through an error? Even if, why this also happens for the log file? Looking into the folder ConfigAndLog I have observed that each month a new file is created. But each month I have to chmod the newly created file in order that the apache user can write into it.

How can I fix this?

# Answer
> 2 votes
See Access denied errors by server itself on uploaded files, which you refer to in your question. The answer there applies to the ConfigAndLog file too. Civi periodically runs tests to make sure that certain directories and files are **not** accessible via the web. These include:

* the current debug log file (`ConfigAndLog.xxxxxxxxxxxxxxxxxxxxxxxx.log`)
* the image upload directory (on your Drupal site, this is `sites/default/files/civicrm/upload`)
* the custom php directory (on your Drupal site, this is `sites/default/files/civicrm/custom`)

The "client denied by server configuration" entries in your error.log are an indication that those directories and files are protected as they should be.

As the author of the security-check function writes in a code comment:

> Per CiviCRM default the logfile sits in a folder which is web-accessible, and is protected by a default .htaccess configuration. If server config causes the .htaccess not to function as intended, there may be information disclosure.
>
> The debug log may be jam-packed with sensitive data, we don't want that.

In other words, it's good that the debug log is not accessible via the web.

---
Tags: drupal, permissions, logs
---


# Question
Title: AH01797: client denied by server configuration
```
[Tue Jul 12 21:36:24.720900 2016] [access_compat:error] [pid 5387] [client 192.158.31.162:44948] AH01797: client denied by server configuration: /var/www/XXX/sites/def
ault/files/civicrm/custom/delete-this-yeIAcdkLVh

```

Hi

I'm getting this in my apache logs when trying to delete some custom data fields left over from a bad extension installation. On screen it spins forever when trying to delete.

Anyone know where to start troubleshooting?

Thanks

# Answer
> 1 votes
The message that you're seeing in your Apache error.log may just be coincidental with your custom field issue. Those error.log messages are created when Civi checks itself to make sure certain directories and files are not accessible via the web. For more information, see Access denied errors by server itself on uploaded files?.

---
Tags: error
---


# Question
Title: How do I add "honoree section" to new contribution form in the backend?
My "new contribution" form in the backend does not have an "honoree" section for manual entry. I am assuming it should be there (it is enabled on our online forms). How do I enable/expose this section?

We are using 4.6.27 on D7.

# Answer
> 1 votes
Here is the solution that I've come up with: first, we created a custom field set for "Honoree Section". We then create two fields in the set (or as many data fields as required for your application). In my case, 1) radio selects for "honoree type" (two types, "In Honor Of" and "In Memory Of") and 2) a text field for the name of the person memorialized with the gift.

Next we create a custom profile for contributions called "Honoree Section" and use the custom fields.

The searchable profile data can now be entered into the backend along with the soft credit. Also, the soft credit can now be entered for the *family* of the deceased, whereas the contribution can be "attributed to" the *deceased* (searchably connected to the deceased via the custom profile).

# Answer
> 0 votes
Just below the payment details in the dark grey highlight is a section "Soft credit" that can be expended. Click on that and enter the contact info

---
Tags: contributions, honoree
---


# Question
Title: Automatically setting a date for an activity being added by a sequence
I am attempting to set up a timeline for a set of case types. I made a sequence for a few activities. However, the scheduled date automatically sets to the current day. How do I get it so that when an activity is added due to a sequence, its date is set based off an offset value?

# Answer
I have figured out the issue that I am having. It turns out there is a bug in version 4.7.18 that is fixed in 4.7.20. So I will just need to wait for the release version.
> 2 votes

# Answer
Sequences are different than timelines and don't have offsets. See https://docs.civicrm.org/user/en/latest/case-management/set-up/#define-case-types and go down to step 5.

> A Sequence defines the order in which a set of defined activities should occur, but unlike the timeline it includes no information about time intervals between activities.

For timelines use the reference and offset fields.

> In a Timeline you control the scheduling of each activity in your timeline relative to the date the case is opened, or relative to another activity in the case, using the 'Reference' and 'Offset' fields.
> 1 votes

---
Tags: civicase, activities
---


# Question
Title: How can I set the end date of a membership to be calculated from birth date?
I want people to be able to sign up for a membership using a contribution form. The membership lasts until the person turns 14. We collect the birthdate information in a profile on the contribution form.

How can I set the membership end date to be calculated from the birth date?

We are using CiviCRM 4.7 and Drupal 7

# Answer
> 1 votes
We created an extension that added this functionality.

Edit: Unfortunately the extension is not publicly available as it is mixed in with a whole collection of custom stuff we needed to do for this client. Also our requirements changed so we were no longer working off birth date but still setting the end date based on a field completed whilst completing the form.

I am not the coder but as far as I can understand we created a function to set end date to the value we then calculated from the field of interest.

---
Tags: civimember
---


title: Translations missing

text:
# Question
Title: Translations missing
I've checked many times on transifex in order not to forget important elements and, eg, all household occurrences are correctly translated to italian. I'm using 4.7.19 on Joomla 3.6.5 (or 3.7.2), php 5.6. I've also downloaded the .po files and combined to .mo with poedit. But there are words that keep being in english, for example on the left sidebar, the dropdown menu for adding new items, still shows household, individual and organization in english. And there are other words everywhere that don't show italian translation. Even trying to substitute words does not produce results, have a look here: http://nimb.ws/rxIJQe Does anyone know if there's a way to overcome this issue?

# Answer
> 2 votes
This is a tricky translation "issue" as far as I know. When you install CiviCRM in one language all the system strings are set with the string status of the translation at the moment of the installation. For this reason when you have an incomplete CiviCRM language translation is common to find some system strings untranslated and although you try to ammend it translating it later they will persist in English.

The only way that I've found to overcome this is to manually overwrite system strings. You can found many of them at civicrm/admin/options?reset=1. E.g. to change contact types names you have to to edit admin/options/subtype?reset=1 options.

---
Tags: translation
---


# Question
Title: Manual Contributions Showing up as 0 Against Contact
When I add in a manual contribution against a contact and specify an amount - when submitting, the amount gets registered as 0 which is not what was input initially. In the database it is seen as 0 also.

The warnings/errors that comes up are:

```
Warning: key() expects parameter 1 to be array, null given in CRM_Contribute_Form_Contribution->submit() (line 1461 of /home/xxx/www/www/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php).
Warning: key() expects parameter 1 to be array, null given in CRM_Contribute_Form_Contribution->submit() (line 1462 of /home/xxx/www/www/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php).
Notice: Undefined index: html_type in CRM_Price_BAO_PriceSet::processAmount() (line 718 of /home/xxxx/www/www/sites/all/modules/civicrm/CRM/Price/BAO/PriceSet.php).

```

and the error in the log is:

```
TYPE    php
DATE    Thursday, May 25, 2017 - 20:26
USER    admin
LOCATION    civicrm/contribute/add
REFERRER    civicrm/contribute/add?reset=1&action=add&context=standalone
MESSAGE Notice: Undefined index: html_type in CRM_Price_BAO_PriceSet::processAmount() (line 718 of /home/xxxx/www/www/sites/all/modules/civicrm/CRM/Price/BAO/PriceSet.php).
SEVERITY    notice
HOSTNAME    xxx.xxx
OPERATIONS

```

This site was upgraded from previous versions to CiviCRM version 4.7.19 and there were some problems with the old database. There was an " Invalid Price Fields " message with regards to the 'Contribution Amount' price set which we couldn't fix, so we just hid that message.

Any help would be much appreciated.

Edit 1: Just to note, however, that adding by selecting a price set works. Its just the manual input for amount.

Edit 2: just to let you know that some price fields were disabled so I enabled them and it all worked!

# Answer
> 1 votes
This problem arises when the default price set, or any of its fields, are inactive

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

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

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

```

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

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

```

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

# Answer
> 0 votes
Since you had related problems before the upgrade it sounds like there is something wrong within the database. There is a procedure for Ensuring Schema Integrity on Upgrades that you could try to repair the schema. Don't be too put off by the references to 2.2.x - I used it a while back, probably on a 4.6 system.

---
Tags: civicontribute
---


# Question
Title: Does the Civi GoCardless extension use the GoCardless API?
We're a charity running CiviCRM 4.6 on Drupal 7. Last year, we moved all of our direct debits to GoCardless, which is running nicely. However, we're wanting to feed information from GoCardless back into Civi to state whether a recurring contribution has been paid or declined or cancelled, etc. At the moment, this is a very slow manual process, downloading a statement from GoCardless and then finding the corresponding contact in Civi line by line.

There's some information about the Civi GoCardless extension here (http://www.vedaconsulting.co.uk/gocardless), but this seems to be showing how to set GoCardless up as a payment processor.

Does anyone know if the GoCardless extension (or a different extension) can be set up in Civi to receive information back about contributions made through GoCardless, and if so, how does one go about configuring and running it?

Thanks

# Answer
I am guessing that the only way civi would know about the information automatically if is the payment was set up via a civi contribution page in the first place.
> 1 votes

# Answer
My GoCardless extension does this.

Each payment is automatically entered in as a contribution and if you cancel the subscription or the mandate, that's handled, too.

It relies on exposing a webhook that receives info from the GoCardless API whenever anything changes.

It's been in production use for 6 months now without a hitch, although see the issue queue for caveats to this. Also see this issue about migration which was parked since nobody seemed to want it, but you may need it.
> 1 votes

---
Tags: api
---


# Question
Title: Something is seriously wrong with CiviCRM - Replicating Contacts
Wordpress 4.7.5 & CiviCRM 4.7.19

My contact is replicating in our system, to the point there were 700+ records with just my email and name. I am not sure what is happening but I have some ideas. Every time I do something on CiviCRM it creates a new contact. Not sure if this is true, but it does not seem to make new contacts while I am away.

Lastly, when I login with my other admin account, none of these issues exist and my user does not replicate anymore. When I login to my user account, it replicates again.

Should I not have users that are also members, donors, etc act as administrators?

# Answer
> 4 votes
You can change the email account associated with a WordPress (or other CMS) account by editing the "UFMatch". If you're SQL-savvy, the correct table is `civicrm_uf_match`. If you want to do it through the web browser, and you acknowledge that this is a tricksy maneuver, you can do this:

* Go to **Support menu \> Developer \> API Explorer**. "Support" menu might be called "Help" menu, it switched somewhere in 4.6.
* Set "Entity" to "UFMatch", "Action" to "Get". In "Parameters", Set "CiviCRM Contact ID" to your admin account's name.
* Press "Execute".
* In the "Results" area below the "Execute" button, note the value of "id". There are two "id" values - you want the one INSIDE the "values" stanza. See screenshot below.
* Copy/paste the entire results somewhere safe in case something gets messed up! Better yet, do this on a test copy of the database.

Now that you have the ID of the UFMatch record you want to change, go ahead and enter the new details:

* Keep "Entity" as "UFMatch", change "Action" to "Create". For "UFMatch ID", put in the ID you just found.
* Press "Add Parameter" twice.
* Set the "CMS ID" to the WordPress user ID of the account you want to link to. Set the "CMS Unique Identifier" to the email address of the same WordPress account.
* Press "Execute".

# Answer
> 2 votes
The problem is clear.

Example of issue: Wordpress admin account is Admin, somehow connected to xyz@otheremail.com contact on CiviCRM. xyz@otheremail.com wordpress account is also an admin, whenever xyz@otheremail.com logs in as an admin on wordpress and tries to do something, it creates a new xyz@otheremail.com contact. The Wordpress admin account should be connected to abc@email.com record in civicrm but instead is connected to xyz@otheremail.com record in civicrm and is causing issues.

A solution could be to assign the admin wordpress account to another civicrm record, such as abc@email.com but I do not see a way of doing so.

Other stackexchange questions seem to share this same issue.

CiviCRM not creating Wordpress user accounts on member registration

New contact created every time I login!

---
Tags: contacts, duplicate-contacts
---


# Question
Title: Can I search for contacts with activity added by specific person?
I am trying to create a smart group for contacts that have **activity** added by specific person.

**Advanced search** allows me to search either (1) for contacts based on some activity; (2) for activities based on **who** has added the activity.

But unfortunately not for contacts based on who has added the activity.

**UPDATE:** (Tested on CiviHosting demo site.)

Advanced search parameters:

* Display Results As: **Contacts**
* Basic Criteria - Complete or Partial Name: **Errol**
* Activities: **(\*) Added by**

**RESULT:** Search returns **Errol** as the only result, not all contacts whose activities have been added **by Errol**.

# Answer
In Advanced Search and Activity Search you can filter by 'Added by'.

Also you can use Search Builder form and filter by 'Activity' with 'Source contact' = ...
> 2 votes

# Answer
Based on a very quick test Search Builder may give you what you want eg
> 1 votes

---
Tags: activities, search, issues
---


# Question
Title: Error during registration for multiple participants
I'm running into an issue for event registrations where multiple participants can be registered. The first registrant goes through fine, however, when submitting registration #2, the following error occurs:

Call to protected method CRM\_Event\_Form\_Registration\_Register::getRegistrationContactID() from context 'CRM\_Event\_Form\_Registration\_AdditionalParticipant'

I am running Joomla 3.7.2 and Civicrm 4.7.19

Thoughts on where to go?

# Answer
> 1 votes
The error is due to call to the protected function `getRegistrationContactID()` in `CRM_Event_Form_Registration_AdditionalParticipant` class for multiple event participants registration.

The issue got resolved in my installation (civicrm 4.7.19) after changing the access control of the function `getRegistrationContactID()` from `protected` to `public`.

The file location is `civicrm-module/CRM/Event/Form/Registration.php`

---
Tags: civievent
---


# Question
Title: Saving a contribution adds a line with negative the tax amount, when using an event price set
I replicated this issue in the demo wordpress account. If one creates a paid event with a financial type that includes taxes, enters a price (without using price sets) and books a person, then opening the contribution and clicking the 'save' button behaves correctly.

The problem appears when the event price is a price set. Each time one opens the corresponding contribution and clicks 'save', a new accounting line is created with negative the amount of taxes.

Example after opening and saving several times:
(the total amount should be 400 SEK, but now it say 14 SEK)

This happens when the price set is used with an event, but also (at times) when directly creating a contribution with the same price set as above, but without registering to an event.

# Answer
This is a bug. I'm unsure if price set config for events was previously tested. I've created an issue in JIRA for this https://issues.civicrm.org/jira/browse/CRM-20676 and we'll work on fixing pro bono (though contributions to help fund fix would be very welcome!).
> 2 votes

---
Tags: civievent, contributions, price-sets, taxes
---


title: Tag Contact Via Link in Email

text:
# Question
Title: Tag Contact Via Link in Email
Is it possible to build a url to be included in an email sent from CiviCRM such that when the user clicks the link, they will automatically be tagged with a term in the system? Or maybe add an activity to their record? Basically I'm looking for a way to do a 1-click and done action to track some things in the system.

Forgot to mention I am using Drupal.

# Answer
I would do this with a Drupal webform as follows:

* Contact 1 - current user (if not logged in you'd need a checksum)
* Contact 2 - the person to be tagged - set this as "existing contact" prepopulated from the url.
* The tag will have to be preselected in the webform, so you'd have do clone this webform for each tag you want.
* Add a tiny bit of javascript to the form to make it auto-submit.
* On submit, redirect or display a success message.
> 1 votes

---
Tags: email, activities, tags
---


# Question
Title: What CMS integrations are available for CiviCRM?
Many CRM platforms offer integrations with a CMS, where they can do things like the following:

1. Provide demographic groups to the CMS to use in personalization
2. Accept form posts from the CMS for lead entry
3. Identify CRM users on the website and track their website activities in the CRM

To what extent does CiviCRM have integrations like this for any CMS?

I've searched quite a bit, but the CMS integrations I see for CiviCRM are more of the "make CiviCRM run *inside* a particular CMS." Like, how to make CiviCRM run inside Drupal. (Or Joomla, or WordPress...)

If my CMS-powered website is separate from CiviCRM, what *pre-built* options does it have to integrate with any CMS?

I know it has an extensive API, and can all of this stuff can be custom-built, but are there are packages/modules/add-ons that bridge the gap between CMS X and CiviCRM in the ways I have described?

# Answer
> 1 votes
CiviCRM has a complete set of APIs that you can use for such purpose, but you would have to custom-develop the part that sits within this other CMS. So for example you can use (Contact, Get) with the email address of the logged-in user in the CMS to achieve function 1 in your list, or (Contact, create) to create leads in CiviCRM from a website form and achieve function 2 in your list, or (Activity, create) to track website activities in the CRM and achieve function 3 in your list.

---
Tags: cms-integration
---


# Question
Title: Autodetecting variables for URL variables
I am having an issue in Settings - Resource URLs where the \[civicrm.files\] variable is detecting incorrectly. It's actually detecting as https://www.mydomain.org/usr/home/webhoster/mydomain.org/wp-content/plugins/files/civicrm/

Is there an override I can put in my civi URL variable settings file to make it right? Or do I need to get a tweak to my server?

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

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

```

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

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

---
Tags: civicrm.settings.php
---


title: The apiv3 does not return joined fields

text:
# Question
Title: The apiv3 does not return joined fields
Not much doc on API and joined table fields... Any special reason I can't get the contact's primary address in a membership query... Basically this

```
$result = civicrm_api3('Membership', 'get', array(
  'debug' => 1,
  'sequential' => 1,
  'return' => array("contact_id.display_name", "contact_id.street_address"),
));

```

Only returns contact\_id.display\_name

# Answer
Membership doesn't have a contact details(apart from `id`) in its API call. To get the address and display name, I think you need to call a chain API -

```
$result = civicrm_api3('Membership', 'get', array(
  'sequential' => 1,
  'api.Contact.get' => array('return' => "display_name, street_address"),
));

```

More about chaining - https://wiki.civicrm.org/confluence/display/CRMDOC/Chaining
> 4 votes

---
Tags: api
---


# Question
Title: drush requires civicrm to be enabled when installing in saltstack
I am trying to use saltstack to provision a centos 6.7 system that has drupal and civicrm. I have civicrm as a tar ball that I extract into `sites/all/modules` before trying to install. I am able to do all the provisioning without problem until I need to install civicrm with drush by running:

```
drush civicrm-install

```

This command works perfectly fine when I ssh into the target machine and execute it directly in the shell, but when the command is executed through saltstack I get this error message:

```
Command civicrm-install needs the following module(s) enabled to run: civicrm.
The drush command 'civicrm-install' could not be executed.

```

I have already tried clearing the drush cache using `drush cc`, I have tried putting the command in a bash script and running the bash script from salt, and I have already placed `civicrm.drush.inc` in `~/.drush` with no luck. Can somebody tell me what drush is missing from the environment in order to execute correctly?

\[edit\] More detail on what I have already tried for clarity.

# Answer
> 3 votes
Turns out that when running in saltstack drush can't resolve the right environment variables to find ~/.drush. I put civicrm.drush.inc in my drush/commands directory and it fixed the problem.

# Answer
> 2 votes
I've seen this behaviour occasionally on CiviCRM sites where CiviCRM is already installed, and it frequently clears up by use of `drush cc drush` or `drush rr` (registry-rebuild).

If you're installing CiviCRM on a "fresh" Drupal site, the Drush commands may not be available until the module is enabled as you say. In that case you might need to install CiviCRM's Drush additions to `~/.drush/` or the commands directory of your installed Drush codebase (eg `/usr/local/src/drush/commands`).

Worth a look into how Provision CiviCRM handles this as well, since it's certainly capable of installing CiviCRM via Drush.

# Answer
> 0 votes
What version of Drush were you using? It did not work for me with 7.x.dev but but did with 8.1.0.

I also passed the following parameter to drush `--include=/var/www/drupal/sites/all/modules/civicrm/drupal/drush` which meant that I didn't have to

> \[...\] put civicrm.drush.inc in my drush/commands directory

as you mentioned that you had to in your answer.

**Note:** the --include option to drush expects the directory containing the configuration file, not the configuration file itself.

---
Tags: drupal, drush
---


# Question
Title: What is required to run CiviCRM on Amazon RDS?
Amazon have scalable MySQL/MariaDB offerings in Amazon RDS for MySQL (and Amazon RDS for MariaDB). CiviCRM uses MySQL functionality extensively, so it would be interesting to see if the two work well together.

* What experiences do people have of running CiviCRM on Amazon RDS?
* Were there any special considerations or steps to get it running?
* Were there any limitations to CiviCRM you ran into?

# Answer
We haven't tried running CiviCRM on RDS yet but we have been shifting a Drupal installation across to AWS. A few things we've noted so far that are relevant:

* It helps if the RDS instance is in the same AZ as the web service
* The various RDS instances have differing network throughput. It's poorly documented and can catch you out
* Default settings for MySQL/MariaDB RDS from memory don't have caching enabled. You should be mindful of checking the paramater group for every RDS instance
* Read replicas can be your friend!
> 3 votes

---
Tags: mysql
---


# Question
Title: Outlook "Failed Fraud Detection" notice--only for some addresses from same domain
I'm experiencing a curious issue that I've been unable to fully resolve. After Microsoft modified their SPF detection sometime late last year, I discovered that the SPF record for my organization had never been correctly configured on our website and **all** outgoing messages where failing Fraud Detection for Outlook recipients.

I did some research and configured our SPF Record and this seemed to resolve the issue for the primary general email address for our organization's domain. However, time passed and one of our other users attempted to send an email using their email address (on the same domain) as the From address, and those messages still triggered the Fraud Detection. I've tested with other email addresses on the domain and replicated this issue, while the primary address continues to send without issue.

Any thoughts on how to resolve this situation would be greatly appreciated.

# Answer
Email delivery can be a tricky business and there can be many reasons why this is happening.

To diagnose, I use https://www.mail-tester.com/

It will give you a score out of 10 and let you know where you can improve, giving you details of SPF and DKIM records which may be causing issues with delivery.

You can just put the testing email provided by Mail Tester in the same place you put any email to send a test message in CiviMail. I'd recommend changing the from address on different tests and see how the score changes. Based on what you described, I would expect some feedback about your mail records.
> 2 votes

---
Tags: civimail
---


title: Is CiviCRM compatible with Nginx?

text:
# Question
Title: Is CiviCRM compatible with Nginx?
If I have PHP installed on nginx, and Wordpress installed too, can I still run CiviCRM as a Wordpress Plugin?

# Answer
> 10 votes
Yes, CiviCRM works fine with WordPress on Nginx. However, since Nginx doesn't use .htaccess you'll want to add any changes to your site-specific configuration.

For example, there are a few upload directories that have .htaccess files denying access to their contents. To do the same thing in Nginx, you'd want to add a location block to your site's configuration.

```
location ~* ^/wp-content/plugins/files/civicrm/(?:ConfigAndLog|custom|upload|templates_c) {
  access_log off;
  return 404;
}

```

See more details in my blog post: https://blog.rudeotter.com/install-civicrm-on-wordpress-with-nginx/

# Answer
> 9 votes
No problems here. My local Wordpress dev environment (vvv) uses nginx and I've had no problems with Civi.

# Answer
> 8 votes
Detailed install and configuration tutorial was just posted here: https://blog.rudeotter.com/install-civicrm-on-wordpress-with-nginx/

# Answer
> 3 votes
Yes all fine, but a quick note that you may need to add an extra line to the NGINX config file to set the CiviCRM file folder to not be accessible from the web as the .htaccess file will no longer block this folder otherwise your clients files that they upload against activities etc can be found.

# Answer
> 1 votes
Yes. It is compatible. For the longest time I thought my server was using Apache, until I discovered it is using nginx. Haven't noticed any differences.

---
Tags: wordpress, php, nginx, evaluating-civicrm, compatiblity
---


title: NodeJS error on latest CiviBuild

text:
# Question
Title: NodeJS error on latest CiviBuild
Encountering the following npm related issue on using the latest buildkit. Any suggestions? NPM is already at latest.

If someone has a working buildkit they could tell me which version of npm they're on that'd be great.

Thanks.

vagrant@civi:~$ ~/buildkit/bin/civibuild create "4719" --admin-pass "password" --civi-ver "4.7.19-rc" --type "drupal-demo" --url "http://4719:7979" --force npm WARN npm npm does not support Node.js v0.10.25 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm You can find the latest version at https://nodejs.org/

/usr/local/lib/node\_modules/npm/lib/install.js:298 \[this, (next) =\> { computeMetadata(this.idealTree); next() }\], ^ npm ERR! Unexpected token \>

npm ERR! A complete log of this run can be found in: npm ERR! /home/vagrant/.npm/\_logs/2017-06-04T20\_40\_46\_477Z-debug.log

# Answer
> 1 votes
Looks like you need to upgrade your nodejs version - https://nodejs.org/en/download/

---
Tags: civicrm-buildkit
---


# Question
Title: How can I link to a specific tab in crm-ui-tab-set
With AngularJS, I have a page (created with `civix generate:angular-page`) that includes a set of tabs like so:

```
  <div crm-ui-tab-set>
    <div id="mytab1" crm-ui-tab crm-title="ts('Tab 1')">
      This is Tab 1.
    </div>
    <div id="mytab2" crm-ui-tab crm-title="ts('Tab 2')">
      This is Tab 2.
    </div>
  </div>

```

Let's say this page is at `/a/#/foo`. As far as I can tell, Tab 1 is the default tab and will always be opened when I open this URL, which is what I want most of the time. But sometimes I want that page to open in Tab 2.

How can I link to `/a/#/foo` in a way that Tab 2 is opened by default?

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

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

```
<div crm-ui-tab-set active-tab="selectedTab">
  <div id="mytab1" crm-ui-tab crm-title="ts('Tab 1')">
    This is Tab 1.
  </div>
  <div id="mytab2" crm-ui-tab crm-title="ts('Tab 2')">
    This is Tab 2.
  </div>
</div>

```

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

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

```

or

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

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

```

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

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

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

---
Tags: angular
---


# Question
Title: Error During "Find & Merge Duplicate Contacts"
We recently upgraded to 4.7.16 and immediately starting having problems when checking for duplicate records.

I set up a very basic merging test -- same last name and email, I've tried picking a very small group (100 contacts), and I always get the same error.

No matter what Matching Rule or whatever group I create (even if it has a couple contacts), I always get the error.

My technical skills are very limited, so I was just checking to see if anyone else has experienced this.

Thanks!

# Answer
The problem you are hitting may be the one that I think we recently provided a fix for here: https://github.com/civicrm/civicrm-core/pull/10442
> 1 votes

---
Tags: duplicate-contacts
---