title: Using ACLs to manage access to contacts

text:
# Question
Title: Using ACLs to manage access to contacts
As I understand it I can use CiviCRM's Access Control Lists to to control the groups that users can see and work with. But I'm not clear on a few points about this:

If a user does not have the permission to see a given group (for example in a list of groups) can they still see and work with the contacts in that group? Or to put it another way, when the ACL refers to a "group of contacts" does the permission that is granted by the ACL apply to the group, or the contacts within that group, or both?

And following on from that, if a contact is in two groups, and a user has permission to view one group but not the other, can the user see the contact at all?

# Answer
> 5 votes
The ACLs in CiviCRM are only additive. So assuming a user doesn't have the "View All Contacts" or "Edit All Contacts" permissions (which overrides all ACLs), the default is that a user can view zero contacts.

So to answer your second question: If you grant the user permission to access contacts in Group A, all contacts in Group A are accessible to the user - even if they're in Group B, which the user doesn't have access to.

This, in turn, should answer your first question - the ACL applies to the contacts in a group.

---
Tags: groups, acl
---


# Question
Title: Send Test and Next not clickable (greyed) due to missing value in reply_id field (i think)
Similar to this question and this one but different issues. All required fields and tokens are filled in. But db is showing Null for reply\_id field, whereas all earlier mailings have an '8' in that field. I can't see if this is settable via the UI and am unsure why this would either now be required, or the default is NULL. This site recently upgraded from 4.4.19 to 4.6.8 with no warnings related to this afaik.

# Answer
Not sure if this is the answer, or a better identification of the problem.

I see that in Headers, Footers etc Auto-responder ID is '8' but is not set as default.

Not sure if setting it to default, and saving and reopening my mailing resulted in button being clickable or if that was the one I edited in DB.

Will have to look in to whether someone turned that default off or it is was a minor glitch in the upgrading.
> 2 votes

---
Tags: civimail
---


# Question
Title: CiviCRM 4.6.3 - [CiviContribute] - Option to automatically email a receipt for a contribution
In CiviCRM 4.6.3, I do not see an option to automatically email a receipt for a contribution, when manually entering a contribution via Contributions -\> New Contribution.

Why is the option missing?

# Answer
> 2 votes
Is this for one contact or for all contacts?

If for just one contact, are you sure they have an email address in their contact record and that the communication preference "Do not email" is not set?

---
Tags: civicontribute
---


# Question
Title: How can I include the number of relationships in a household in exported data for that household
I need to mail multiple copies of our Client and Family Newsletter to households shared by individual clients.

How can I access the 'number of relationships' for each household (visible in the top ribbon), so that I could include that number in the info I give to the mail house, so that they can put the right number of copies in the envelope for each household?

Or is there a better way to achieve the same outcome?

# Answer
> 4 votes
Pete's answer is the only solution I can think of that doesn't require coding, but it's only an option for Drupal users.

If you're on Joomla/Wordpress, you'll need to code a solution, or hire someone to do so. Create a custom field on the contact "number of relationships". Create an extension with `civix` and use `hook_civicrm_post` on any relationship being created/updated/deleted; use an API call to `getcount` for relationships, and populate the number of relationships to your custom field.

If you know SQL but not PHP, an easier solution is to set up a cron job to fill in the custom field with a SQL statement that runs over the whole database. I'm not sure if you can use an UPDATE statement with a GROUP BY though - so you might need to use a subselect, which is expensive.

The other SQL-centric option is to create a trigger to handle this. You can be quick and dirty and drop it right into the database, or you can wrap it in a CiviCRM extension. If you go the latter route, consider coding it into the "Summary Fields" extension: https://civicrm.org/extensions/summary-fields

# Answer
> 2 votes
Sorry I don't have a solution in CiviCRM directly. if you are using Drupal, then I would expect that you can make a View that uses Aggregation that should give you the count of relationshipss along with address etc which you could then print out as Mailing Labels either via a PDF plugin for Views, or view an external 'mail merge' solution.

---
Tags: contacts
---


# Question
Title: Lack of payment processor blocking renewal reminders
We do not (yet) have a Payment processor - Internet bank transfers (which count as offline payments) are more or less the norm in New Zealand. However, we still need to set up scheduled reminders as memberships expire. The lack of a payment processor means we can't select anything for Auto-renew options for each membership type, and this in turn is causing the form to create a membership reminder to fail, as there are no valid entries in the third part of the entity selector. How can we work around this?

Richard

CiviCRM 4.4.4

# Answer
The issue you're seeing is because you must deselect the "auto renew options" text in the third input box. You can deselect with a Ctrl-click. I just tested on my 4.4.19 demo site and could save OK with that text deselected.
> 3 votes

---
Tags: civimember, scheduled-reminders, auto-renew
---


# Question
Title: list of all participations for a contact
I am trying to get a list of all Ids of participations for a certain contact\_id (to use it in JS). Currently I am using the `_civicrm_buildForm` hook to do that, but to extract the contact\_id from the passed in $form object I need to use reflection, since is is stored under `_form_values` which is protected and `$form->getFormValues()` always returns NULL.

Also `CRM_Core_Resources::singleton()->addScript($script, 5, 'page-footer')` doesn't seem to have any effect, probably its too late to call it. So I'm simply echoing the script.

==\> all less then ideal I assume it is possible to get the participant ids with smarty or an ajax call, but haven't found any example how to express a "Where-Clause" with those. This is the SQL-Query I'm trying to perform:

```
SELECT `id` FROM `civicrm_participant` WHERE `contact_id`= x

```

So any help to prettify the first approach or an example for the others would be much appreciated .

# Answer
Ouch - you're doing it the hard way!

Getting a list of participant records by contact ID is pretty simple using the API. It sounds like maybe you haven't discovered the API Explorer. Without knowing your Civi version (and CMS software/version) I can't tell you exactly where to find it. If you're on Civi 4.5 or 4.6, then in the **Help** menu (renamed to **Support** menu in 4.6.5+), go to **Developer \> API Explorer**. If you're on an earlier version, in Drupal it's `example.org/civicrm/api/explorer` \- I can't speak to other CMSes.

Below I've copy/pasted my API Explorer results for finding all the participant records for contact ID 247. Note that some of the syntax for Javascript may not work in Civi earlier than 4.6, so run API Explorer yourself to double-check!

Rest

```
/sites/all/modules/civicrm/extern/rest.php?entity=Participant&action=get&api_key=yourkey&key=sitekey&json={"sequential":1,"contact_id":247}

```

Smarty

```
{crmAPI var='result' entity='Participant' action='get' contact_id=247}
{foreach from=$result.values item=participant}
  {$participant.some_field}
{/foreach}

```

Php

```
$result = civicrm_api3('Participant', 'get', array(
  'sequential' => 1,
  'contact_id' => 247,
));

```

Javascript

```
CRM.api3('Participant', 'get', {
  "sequential": 1,
  "contact_id": 247
}).done(function(result) {
  // do something
});

```
> 2 votes

---
Tags: contacts
---


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

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

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

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

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

---
Tags: drupal, custom-fields, contact-types
---


# Question
Title: civicrm_handler_filter_participant_role.inc
this file is missing from the latest civicrm

\sites\all\modules\civicrm\drupal\modules\views\civicrm\civicrm\_handler\_filter\_participant\_role.inc

Is this intentially missing? We have functionality that depends on the sql rewrites and need to know if civicrm will be resolving this or if we need to implement our own custom code to provide this functionality

# Answer
> 2 votes
Hmm, I looked at a new download of that version of the civicrm module and it doesn't have that file. It seems that civi on this project has been "customized"

---
Tags: issues
---


# Question
Title: Add custom data field column to contribution tab
Is there a way to add additional fields in the contribution tab on a contacts record?

# Answer
As Jon says you will need to write some code, it wouldn't be difficult to implement though.

What I tend to do is create a Civi extension or use an existing one as explained here.

Once done, you could use hook\_civicrm\_searchColumns to add an extra column header as explained here and then create a custom template, as documented here, of the file `templates/CRM/Contribute/Form/Selector.tpl` to output the value needed.

The downside of the searchColumns hooks is that you wont be able to sort the data for that specific value.

Hope that gives more insights.
> 3 votes

# Answer
It's not clear from your question if you're looking for a means to add a column without coding. If so, the answer is "no". This is a good example of what's hoped to be possible with the CiviCRM 5 form builder, but that's still a ways off.

If you're able to code, or know/hire someone who does, the relevant file is `templates/CRM/Contribute/Form/Selector.tpl`.
> 2 votes

---
Tags: custom-fields, contributions
---


# Question
Title: Bulk assign contribution page based on contribution type?
Issue: We migrated about 5000 contacts from one CRM to CiviCRM.

The organization required historical data to be moved over, but also changed their membership pricing scheme which has been resolved with price sets + custom contribution page.

Members migrated over need to be assigned to this new contribution page so they can renew online.

All their contributions involving membership was tagged as "Member Dues". Unfortunately, we cannot seem to bulk assign this to the new contribution page.

Any ideas?

# Answer
> 1 votes
Have you tried exporting those member dues contributions (including their contribution IDs as well as their Civi contact IDs), adding a column for contribution page ID, and importing that information back in as an update of the existing contributions? If you've not tried that, it might be worth testing with a small subset of those member payments to see if you get the results you expect as far as updating the information.

Lesley

---
Tags: civicontribute, civimember, import
---


title: Wordpress & Mod Rewrite

text:
# Question
Title: Wordpress & Mod Rewrite
I have Wordpress installed in a subdirectroy on my site (mysite.com/wordpress) while the site is displayed using mod rewrite as just mysite.com

This works fine for the backend of CiviCRM, but it is causing problems on the frontend. CiviCRM writes up URLs as mysite.com/wordpress/civicrm?etc which works fine on the backend, however, upon clicking on the links on the frontend the URLs are rewritten to mysite.com/civicrm?etc, which causes the links to fail and takes the user to a WP Page that says

CiviCRM

Do not delete this page. Page content is generated by CiviCRM.

How can I fix this? Is there a way to prevent WP from rewriting those URLs? Or is there a way to properly Configure CiviCRM when WP is installed in a subdirectory?

Edit: It turns out I indirectly came across a solution to this in another question I asked. The URL is here: CiviCRM/Wordpress "Page" Integration

# Answer
I found a way to make this work, though I don't know if it is a solution or a workaround...

I made a page called Wordpress, and made the auto-generated CiviCRM page a child page of that page. Therefore the URL of that page is mysite.com/wordpress/civicrm and I suppose because that page exists, WP does not try to rewrite it? For some reason, it works now...
> 1 votes

---
Tags: wordpress
---


# Question
Title: I have imported memberships, need memberships to count as contributions
I have imported memberships tied to households via CSV, but have just realized that despite the fact I uploaded the membership type and payment amounts are saved for each membership type, no associated contribution record has been created. In other words, the membership appears in a contact's record with the correct start and end date, etc., but when I pull by contributions or look at a contact's contribution record, there is nothing.

How might I go about fixing this? I need contributions to inherit membership purchases.

Thank you!

Ahna K

# Answer
> 4 votes
Do a .csv import of new Contributions of financial type Member Dues, Civi ID, contribution amount, contribution date for each, then export that list with Internal Contact ID, and create a list of new or updated (a separate import for each) Memberships to import.

---
Tags: civicontribute, civimember, import
---


# Question
Title: Activity drop down list not displaying activites
I have a number of custom activities set up, all of which are reserved and enabled.

However they are not showing up on the new activity drop down when recording a new activity.

Any ideas on how to make them appear in the drop down (they do appear in the filter by activity type dropdowns)

# Answer
Use phpMyAdmin or the api explorer to inspect those records in the db and look for differences between the old activity types which are not showing, and the new ones that are. In particular, check the `filter`, `is_optgroup` and `is_active` fields. This is how to do it in the api explorer:
> 3 votes

# Answer
I guess you are not using latest version of civi please upgrade to the latest version where I could find all the activity in the drop down box

I guess this got fixed in the latest version - I couldn't find NA in latest version (demo site)
> 0 votes

# Answer
If your Activities set to be used only for Cases then I don't expect them to show in the dropdown. Are they set for Cases or for Contacts or for Cases and Contacts?
> 0 votes

---
Tags: activities
---


# Question
Title: How to Integrate Web form with Wordpress?
I want to integrate new contact form with wordpress for public display/data entry like in this drupal page

I want to have this

To be a web form for data entry, showing with the wordpress.

# Answer
> 5 votes
the Drupal page you screenshot is a Profile as you can see in the URL. To find out how to display a Profile as a public form on a WordPress site I recommend you refer to this Chapter and read the section called "Standalone forms with Profiles"

---
Tags: wordpress
---


title: CiviHR extensions

text:
# Question
Title: CiviHR extensions
We just installed CiviHR 1.4. Although the tabs for *absences* and *jobs* are showing, there is no way of adding any information.

We have disabled, enabled and refreshed these extensions to no avail.

All the other extensions seem to be working OK.

Any suggestion on how to solve this?

# Answer
Will add as an answer in case it helps. According to the documentation 1.4 is pre-release ie sandbox and is not compatible with 4.6.

> From the development team at Compucorp: The MVP product (for 1.4) to be released at the end of the year (2015) will be based on Civi4.7. At the moment we support v4.5 and will probably continue to do so until the MVP.
> 1 votes

---
Tags: civihr
---


title: HTML code for two-paged PDF

text:
# Question
Title: HTML code for two-paged PDF
What HTML-code snippet must be included so when you create a PDF in CiviCRM, you would create a two-paged PDF?

One contact, one PDF, two pages, and the desired page break at a position of my own choice.

Any help is much appreciated.

# Answer
> 4 votes
Try:

`<div style="page-break-before:always;"></div>`

Works for us, using wkhtmltopdf rather than the default.

---
Tags: pdf, html
---


# Question
Title: Access Denied on one computer, but not another using same user
I am getting an access denied when looking at the report statistics in a mailing on one computer, but when I log in using another computer but the same user I can see the report just fine. Any ideas? One computer is apple and one a pc.

# Answer
Are you sure the two computers access the same address? It's a common mistake to have both www.yourdomain.org and yourdomain.org (without the www) that display the same pages.

Unfortunately, connecting to one doesn't automatically connect to the other, even if they look exactly the same. It's the same with the protocol, so login on http:://yourdomain.org doesn't mean you are authenticated on https://yourdomain.org.

Check what is the main domain name and protocol, the one put into civicrm.settings.php, it must me the "official" one and it's where you have to do and login to work properly. That's probably what was done on the computer that works but you are logged to the "wrong" domain on the second one.

X+
> 4 votes

---
Tags: permissions
---


# Question
Title: Participant to my events cannot download the calendar on their Outlook
This is my trouble:

Participants to my event have completed the registration form, created with CiviCRM 4.4.7.

When they receive the confirmation email, they can also download clicking on **Download iCalendar File.** And it does not work. I tested it myself, trying to download it on Outlook and the link (this one http://events.esn-eu.org/civicrm/event/ical?reset=1&id=61) takes me to a page telling me the following message:

Access denied

You are not authorized to access this page.

What can I do to solve the issue? Thank you

# Answer
> 1 votes
You need to grant anonymous users the permission "view event info", could you check if it's done on your site?

---
Tags: civievent
---


# Question
Title: Can I control visibility of CiviCRM profiles that are used for "View/Edit Drupal User Account" using permissions and/or ACLs?
I want to set up some profiles that are visible and editable only to Drupal users with a given role. However it looks like regardless of the permission settings I use, all users can see the profiles in their user account. Is this expected behaviour?

# Answer
If this is problematic it could be easier to provide these as Webforms which have fine grained access settings
> 1 votes

---
Tags: drupal, permissions, acl, user-account, roles
---


# Question
Title: Fee amount (percentage) of each contribution
I'm using drupal 7 with CiviCRM 4.4.6, and PayPal Standard as payment processor.

When I visit CiviContribute dashboard, click "view" of one of the contribution records, it shows:

From: xxx
Financial Type: Member Dues
Payment Amount: 25.00
Fee Amount: 3.10
Net Amount: 21.90

How is this fee amount calculated? I'm observing other records paid using same payment processor, and it shows different percentage of payment amount as its fee amount.

Is there any way I can set the percentage of fee amount? As I will be using other payment processor, and I need to figure out how this fee amount is working.

# Answer
> 7 votes
This fee is being calculated and charged to you by PayPal.

Each payment processor charges differently, a combination of percentage and per transaction.

I don't think you should try and set a fee amount yourself, but perhaps you can play around with tax if you want to calculate a percentage of the dues.

# Answer
> 3 votes
PayPal Standard's pricing is here: https://www.paypal.com/webapps/mpp/merchant-fees

As you can see, there's a flat fee (usually 30 cents USD) plus a percentage. That's why the numbers don't add up for you. That said - those fees are VERY high! I assume you're doing an international transaction.

# Answer
> 3 votes
When CiviCRM asks a payment processor like PayPal to get it to process a payment, some of them tell CiviCRM how much they have charged in fees on the transaction.

(NB Not all payment processors provide this information at the time the transaction is made, and perhaps not all payment processor extensions for CiviCRM record the information even if it is available.)

I would strongly discourage modifying this fee information since you are likely to make it so that CiviCRM has different fees and thus different amounts deposited in your accounts than reality.

If you use a payment processor that does not return the fees, then it might make sense for the payment processor extension developer to calculate the fees and record them according to the fee schedule in effect at a certain time.

The problem with this, however, is that the schedule will change, and then there will be a period where the payment processor extension might not be using the correct calculation. Even if the plugin is updated in a timely way, not all users of the extension are likely to update it in time. A fee of zero is obviously wrong, but an automatically recorded fee 2.13 gives the semblance of accuracy. Probably best for any plugins that do record fees based on their own calculations to post a warning about this.

---
Tags: civicontribute, drupal
---


title: Importing Pledges

text:
# Question
Title: Importing Pledges
I am doing a billing. We enter items as pledges. I need a way to import the pledges from a spreadsheet. Last year I imported directly into the pledge table and did not realize I needed to also load the pledge\_payment table. The pledge\_payment is more complicated as you need the pledge number. Looking for an easy way to load both.

# Answer
The API csv Import GUI extension will allow you to import pledges. You can import the pledges and then separately, the contributions marked as pledge payments that correspond to the needed pledges.

Note: When you import the contributions, you will need a column for "pledge payment" that is marked Y for each row. Also, you will need a column with the corresponding pledge number for each row so the import knows which pledge the contribution goes to.
> 4 votes

# Answer
We solved the current problem using a tool called Selenium. It is basically a testing tool, but you can record a script and create an XML file with each line having the data for one transaction. The tool simulates a user at a browser. Took about 5 hours time from an experienced programmer to setup. For 300 transactions we probably broke even on time but being a nonprofit the labor was volunteer. If we had to pay for the developer it would have been less expensive to hire a temp.

Our plan for next year is to code a module so our office staff can easily import a CSV file.
> 0 votes

---
Tags: pledges
---


# Question
Title: I want to display the date on reports as mm/dd/yyyy
I'd like the dates to display as mm/dd/yyyy instead of Month dd, yyyy.

# Answer
Go to Administer, Localization, Date Formats at civicrm/admin/setting/date?reset=1 and change the Complete Date to the format you'd like.

I think %m/%E/%Y is what you're looking for.
> 6 votes

---
Tags: date-preferences
---


# Question
Title: Is there any benefit to running CiviCRM on a non-profts website server rather than its own server?
When I have implemented CiviCRM for various clients I have always set it up on its own server. One of my clients saw some benefits in having it run on their website server - partly economics - and so it was moved. And then the problems started...one problem was conflicts with the many Drupal modules on the website which broke various bits of Civi. So my conclusion is that it's better to run Civi on a dedicate server where the environment can be controlled & suited to Civi. What do others think? What are the pros and cons?

# Answer
> 5 votes
I have worked with many clients that maintain their website (usually Drupal, but WordPress and Joomla as well) and CiviCRM running on the same server, usually in the same domain instance. I seldom have seen issues.

Now, of course, with a mis-sized or misconfigured server, you will have problems. And if the website gets a huge amount of traffic, you will have problems. And if your CiviCRM database has many hundreds of thousands of contacts, you will have problems. But these type of installs are few and far between.

There are definite benefits running a Drupal website and CiviCRM together. You are easily able to embed contribution pages and event registration pages into a Drupal site. With Views Integration to CiviCRM you can pull information out of CiviCRM for display on the Drupal site. With Webform Integration with CiviCRM you can build robust webforms in Drupal updating CiviCRM.

Ultimately, the key is properly sizing and configuring the LAMP stack, Drupal, and CiviCRM. (Additionally, try to install on a VM rather than a VPS. You want full access (ala root/ssh) to tune things up.)

# Answer
> 2 votes
It depends what you mean by "server" and "website". A single server can have multiple websites, with (mostly) their own environments. It sounds like it was not only put on the same server but installed as a module into the same website, i.e. into the same set of folders as their "main" website.

If the hosting plan allows for subdomains, you could install the civi "website" into a subdomain on the same "server", and then they would be separate. You will likely have to share the RAM, php version, mysql version, and apache (or nginx or whatever) version, but otherwise you can then set up the environment as you like.

So the main factor is whether php/mysql/RAM on the desired server meet the minimums required for Civi.

# Answer
> 1 votes
I agree it depends, How active is the website and how active is Civicrm. I am running fine on a Cpanel with 2 additional test systems and a few other accounts. We are using Drupal and everything plays nice.

Civicrm is very database usage heavy. Depending on your server 1 transaction a second may be a light load.

Do a little math to understand your load and ask the question, somebody should have some benchmarks which can give more meaningful answers.

---
Tags: installation
---


title: How do I identify a Cron Job?

text:
# Question
Title: How do I identify a Cron Job?
I scheduled a CiviMail but it hasn't gone out yet even though the scheduled time has past. When I ask for a report it says:

Delivery has not yet begun for this mailing. If the scheduled delivery date and time is past, ask the system administrator or technical support contact for your site to verify that the automated mailer task ('cron job') is running - and how frequently.

How can I get the mailing to go out?

# Answer
> 2 votes
Cron is a operating system level function, which may be available for you to manage in your host panel of your server. It is basically a scheduler that can run programs on regular, scheduled times.... like every 10 minutes.

The first thing to do is to see if other scheduled jobs are running via cron. Go to Administer | System Settings | Scheduled Jobs. On the resulting page is a list of all the possible jobs that might run via cron. Note the column "Last Run"... if cron is running hopefully you will see a recent date/time shown in here.

If cron is running, then find the scheduled job entitled, "Send Scheduled Mailings". This is the job that actually will send your CiviMail job out. Make sure it is enabled. If not, enable it and see if things run.

If cron is not running, your best bet is to contact with your hosting company to have them check for you. Refer to the CiviCRM documenation for help in setting it up: http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

---
Tags: cron-job
---


# Question
Title: Does Veda Consulting's dedupe workflow extension work on 4.7? Or is it now in Core?
Does Veda Consulting's dedupe workflow UI extension,which looks really cool, work on Civi 4.7, Drupal 7?

and if so, from where and how exactly do I install/git clone it? The latest commits are at https://github.com/veda-consulting/civicrm-core/compare/4.5...veda-consulting:dedupe-workflow-45

Or is the functionality now in Core for 4.7?

Thanks!

# Answer
I think this pull request, that was merged into 4.7, contains at least some of these improvements. But not the functionality from the extension (as far as I know):

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

Check out the new functionality on the demo site, and see if it meets your expectations.

http://dmaster.demo.civicrm.org/
> 3 votes

---
Tags: extension, duplicate-contacts, workflow
---


title: Undefined Index on line 222 of ACL.php

text:
# Question
Title: Undefined Index on line 222 of ACL.php
I received the following message at the top of my Manage ACLs page:

Notice: Undefined index: 5 in CRM\_ACL\_Page\_ACL-\>browse() (line 222 of /home/ourbase/www/www/sites/all/modules/civicrm/CRM/ACL/Page/ACL.php)

# Answer
> 1 votes
In my case, this was caused by disabling a group of custom fields. Look for a blank spot in the "Which Data" column to show you which one it is. There are two ways to solve this:

Solution 1: Re-enable the custom data group. or Solution 2: Remove the offending ACL rule.

---
Tags: acl
---


# Question
Title: "API error: DB Error: constraint violation" when installing Stripe extension
With debugging and back tracing turned on, I receive the following error on our Drupal 7.38 and CiviCRM 4.6.8 site when trying to install the CiviCRM Strip 1.9.1 extension:

```
Exception: "API error: DB Error: constraint violation"

#0 …civicrm/CRM/Core/ManagedEntities.php(265): CRM_Core_ManagedEntities->onApiError("Dashboard", "create", (Array:6), (Array:4))
#1 …civicrm/CRM/Core/ManagedEntities.php(168): CRM_Core_ManagedEntities->updateExistingEntity(Object(CRM_Core_DAO_Managed), (Array:4))
#2 …civicrm/CRM/Core/ManagedEntities.php(141): CRM_Core_ManagedEntities->reconcileEnabledModule(Object(CRM_Core_Module), (Array:3))
#3 …civicrm/CRM/Core/ManagedEntities.php(122): CRM_Core_ManagedEntities->reconcileEnabledModules()
#4 …civicrm/CRM/Core/Invoke.php(403): CRM_Core_ManagedEntities->reconcile()
#5 …civicrm/CRM/Extension/Manager.php(246): CRM_Core_Invoke::rebuildMenuAndCaches(TRUE)
#6 …civicrm/CRM/Admin/Form/Extensions.php(195): CRM_Extension_Manager->install((Array:1))
#7 …civicrm/CRM/Core/Form.php(345): CRM_Admin_Form_Extensions->postProcess()
#8 …civicrm/CRM/Core/StateMachine.php(164): CRM_Core_Form->mainProcess()
#9 …civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), "next", "Next")
#10 …civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), "next")
#11 …civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), "next")
#12 …civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("next")
#13 …civicrm/CRM/Core/Page/Basic.php(395): CRM_Core_Controller->run()
#14 …civicrm/CRM/Core/Page/Basic.php(174): CRM_Core_Page_Basic->edit(1, NULL)
#15 …civicrm/CRM/Admin/Page/Extensions.php(125): CRM_Core_Page_Basic->run()
#16 …civicrm/CRM/Core/Invoke.php(312): CRM_Admin_Page_Extensions->run((Array:3), NULL)
#17 …civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#18 …civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#19 …civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:3))
#20 [internal function](): civicrm_invoke("admin", "extensions")
#21 /home/oursitename/www/www/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
#22 /home/oursitename/www/www/index.php(21): menu_execute_active_handler()
#23 {main}

```

On the extension page, it appears as if the CiviCRM Strip extension has installed, but Stripe is not available as a payment processor.

Is anyone able to give guidance on next steps to troubleshoot?

# Answer
I fixed this particular problem. I haven't been able to recreate the problem so I can't state the source, but the following steps allowed me to install the extension.

1) remove all other extensions from the extensions folder (including ones which were not installed). 2) truncating the civicrm\_extension table 3) truncating the civicrm cache tables

Note that just trying v1.92 of the extension was not effective, nor was deleting the Stripe extension record in the civicrm\_extension table.
> 1 votes

# Answer
My understanding is that you should use the 4.6.dev branch for CiviCRM 4.6. The README does state there will be releases/tags for each version...

> There will no longer be branches for each version. The branches will be:
>
> Civi's major.minor-dev, and we will create releases (tags) for each new release version.
>
> Example: 4.6-dev.

...but the only release showing is 1.9.1 and there has been a lot of change (21 commits) since that was released in January. I'd recommend trying 4.6.dev and seeing if that solves this issue.
> 0 votes

---
Tags: drupal, extension, stripe
---


# Question
Title: How do I set access control so I can get Batch entry? It's not showing up
Batch Entry is not showing up for us. I've been told it might be something with access control however, I need help figuring out who I look at access control to turn this feature on. I do have a version of Civi that has the feature (CiviCRM 4.2.7.) so I know it's available. Can anyone help me figure this out so I can use the feature for recording donations? Thank you.

# Answer
> 1 votes
So Civicrm has two main ways to grant or restrict access:

* permission: it's more "high level" and it's about granting access to big features, eg to administer events or view anything about financial contributions
* Access Control (ACL): it's mostly so a group of user see only a subset of your contacts, for instance the media people only see the journalists

In your case, it's most probably a permission issue, not access control one. Where you set these permissions depends on your CMS, because it's related to the users and their roles.

There is a rather long list of permissions you can grant, including a few about batch (eg. "CiviCRM: create manual batch, Create an accounting batch", check what applies to your case for this user.

If you don't see a change in the menu when you grant extra access, you might need to logout/login so the new rights are taken into account

---
Tags: civicontribute
---


title: Search behavior Individual/Household

text:
# Question
Title: Search behavior Individual/Household
I have a individual contact called: "John Wayne". He is connected to a household called "John and Margret Wayne".

When I search now for "John Wayne" in the simple search an in the advanced search, it only returns the household. Is this a normal behavior? Our NGO workers get super confused about this, is there a way to get the individual and household contact in the result table?

# Answer
I found a way to get this work. I don't know if it's quite a hack, but it works at least.

Change this line in the "CRM/Contact/BAO/Query.php": public function sortName(&$values):

```
if ($fieldName == 'sort_name') {
$wc = self::caseImportant($op) ? "LOWER(contact_a.sort_name)" : "contact_a.sort_name";
} else {
$wc = self::caseImportant($op) ? "LOWER(contact_a.display_name)" : "contact_a.display_name";
}

```

to:

```
  $wc = self::caseImportant($op) ? "LOWER(contact_a.sort_name)" : "contact_a.sort_name";
  $fieldsub[] = " ( $wc $op $value )";

  $wc = self::caseImportant($op) ? "LOWER(contact_a.display_name)" : "contact_a.display_name";
  $fieldsub[] = " ( $wc $op $value )";

```
> 0 votes

# Answer
It should show up both contacts, I suspect there might be something in the setup of your sort name. Could you attach some screen prints so I can see what happens?
> 2 votes

# Answer
I have just tried your search on the demo site after adding your examples, and I get both contacts if I search for John Wayne in both Advanced Search and Search Contacts.

I think this is your desired behaviour?
> 1 votes

---
Tags: search, search-results
---


# Question
Title: Membership structure with 2 renewal cycles?
I need to implement the following membership structure, and am wondering if this is possible with civimember? I'm having some trouble seeing how this could work with fixed membership periods...

Thanks!

Ahna

Spring Renewal \- Joins/renews Jan 1 - Jun 30 \- Renewal date is Mar 31 of following year \- Grace period extends through Jun 30, when non-renewals are removed from member roll

Fall Renewal \- Joins/renews Jul 1 - Dec 31 \- Renewal date is Sept 30 of following year \- Grace period extends through Dec 31, when non-renewals are removed from member roll

# Answer
This is a strong point of CiviCRM - there's no system out there that supports all of the MANY different quirky membership structures that exist in the world - but CiviCRM makes it easy to write an extension to implement your particular structure. That said, it DOES require that you write custom code, or hire someone who does. You can use civix to create a CiviCRM extension. Most times, you can use hook\_civicrm\_post, in some special cases you might want to use hook\_civicrm\_alterCalculatedMembershipStatus.
> 1 votes

---
Tags: civimember
---


title: How can people cancel their membership?

text:
# Question
Title: How can people cancel their membership?
We have a membership type that auto-renews every month. People pay via Authorize.net, Paypal, or they give us their info from their check and an automated draft is created over via Authorize.net.

However, I can't find a way to tell people how to go about ending their own membership other than contacting the organization and having them do it for the person.

How do people go about ending their membership on their own?

# Answer
> 3 votes
If you are using Drupal, you could set up a webform that allows people to change their membership status. This would not require any custom code, the functionality is all there in the Webform-CiviCRM module. You'd just want to carefully select which membership statuses you want to allow people to give themselves by editing that field and deselecting inappropriate options after adding it to the form.

# Answer
> 1 votes
Member cannot end his own membership on his own - it's bit tricky

**But can be achieved by** provide an option in the contact dashboard with an button to end his own membership - to achieve this you need to write an extension

---
Tags: civimember
---


# Question
Title: Event Registration - Confirmation Page Not Shown - Returns to Blank Registration Entry page First Time in a session?
Using CiviCRM 4.6.8 on Joomla 3.4.4

Implemented an Event Registration page on the front end site.

After the Event Registration page is completed and Continue button pressed the Confirmation Page does not appear and the system represents the initial blank Registration page.

If the registration details are re-entered the Confirmation Page appears as it should and the rest of the process completes.

Any ideas please?

Ray

# Answer
> 0 votes
this could be a situation where you are jumping from www to without www or http to https or reverse. confirm that the urls are consistent throughout your settings eg civicrm.settings.php

---
Tags: civievent, joomla
---


# Question
Title: Bug: adding new contact through relationship limited to subtype
I have a custom relationship type that is has contact B limited to a contact sub-type. Now when I go to a contact to create add this custom relationship and use as related contact ***New individual*** create a new relationship for this custom relationship, then it always fails with the error message:

> 1 invalid relationship record 1 relationship record was not created due to an invalid contact type.

I think this is a bug. When you use ***New individual*** from the context of a relationship that needs a particular sub-type, then you would expect that the new individual is automatically created with that sub-type. Otherwise the convenience of on-the-fly creation has become useless.

I have been able to reproduce this error on the demo site.

Can someone confirm this?

# Answer
> 3 votes
I just replicated this.

First, let's discuss the workaround: Go to **Administer menu \> Customize Data and Screens \> Profiles**. Click on "Reserved Profiles" and edit the "New Individual" profile. Add the "contact subtype" field and save. Now, when creating on-the-fly individuals, you can select their contact subtype. I tested and confirmed that this works.

As for the original problem, I agree that this should probably be considered a bug. However, given that this is a relatively infrequently-used workflow with an easy workaround, I doubt the core team will be investing resources into its fix. I'm sure they'd welcome a patch though.

# Answer
> 1 votes
There is currently an issue open for this: https://issues.civicrm.org/jira/browse/CRM-15704

As Jon said, it is non-critical so the core team is not currently working on it. If anyone is able to step up to provide funding or a patch it would be most welcome.

---
Tags: relationships, contact-types
---


# Question
Title: Creating a public Members directory with CiviCRM in Wordpress using Profiles and shortcode
Issue at hand is shortcode output of permissions error. Anons and logged in users of all kinds can view whole list at `?page=CiviCRM&q=civicrm%2Fprofile&force=1&gid=14` without issue. Shortcode gives errors for all users including admin.

I went over the steps mentioned here Creating a public Members directory with CiviCRM in Wordpress using Profiles

Read http://book.civicrm.org/user/current/organising-your-data/profiles/ and http://wiki.civicrm.org/confluence/display/CRMDOC/Access+Control+Context+and+Overview multiple times

My situation is that anonymous users and logged in users of all kinds can access and search full list of members at `?page=CiviCRM&q=civicrm%2Fprofile&force=1&gid=14` without issue.

When logged in as admin Shortcode `[civicrm component="profile" gid="14" mode="view"]` outputs "Permission Denied You do not have permission to view this contact record. Contact the site administrator if you need assistance." Have also tried adding force="1" to shortcode to emulate url of successful view.

Calling in template while logged in `<?php do_shortcode('[civicrm component="profile" gid="14" mode="view"]'); ?>` outputs nothing at all.

When not logged in shortcode interrupts page drawing and outputs `Sorry but we are not able to provide this at the moment.
Could not find the required contact id parameter (id=) for viewing a contact record with a Profile.`

Here are some steps I have taken: In WordPress Access Control under these items all levels including Anonymous are checked "CiviCRM: view all contacts" "CiviCRM: profile listings and forms" "CiviCRM: profile listings"

Anons cannot access "CiviCRM: profile create " and "CiviCRM: profile edit"

Under Manage Groups "Public Member List" has visibility "Public Pages" and types "Access Control, Mailing List".

Under Profiles I have "Public Directory List" used for "Standalone form or Directory" and "Search Views". Active is checked. "Limit listings to a specific Group?" is set to "Public Member List".

The Profile has two fields- first and last name. Both are set to Searchable, In Selector, and View Only. Required and Reserved are set to No. Preview button just outputs a heading and no data. Seems like that is unexpected behavior...

Created "Not Logged In" under "Manage ACL Roles"

Under "Assign Users to Roles" the assigned to only offers groups of Contacts. Setting this up for non-logged in users so they are not contacts... So confused.

Under "Manage ACLs" Role "Everyone" Operation "View" Type "Group" Which "Public Member List" Desc "View Profiles" Enabled "Yes"

I think that covers the issue.

**9.24 Update:**

Per @Andrei's advice I edited `civicrm/includes/civicrm.shortcodes.php` on line 626 I changed

```
elseif ($mode == 'view') { $args['q'] = 'civicrm/profile/view'; }

```

to

```
elseif ($mode == 'view') { $args['q'] = 'civicrm/profile&force=1'; }

```

Interestingly I got no error but the output was not the group directory I expected:

\**Update 9.25 \**

Here is how I solved this for my templates:

First I used this call to fetch all groups. Dumped that data and got group ID of one I wanted. `civicrm_api('Group','Get',array());`

ID was 6. Now in my templates I use the following to print out the members of that group. I'm sure it could be more elegant but it does what I mean for it to do. :)

```
<?php
 require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/civicrm/civicrm.settings.php';
 require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php';
 $config = CRM_Core_Config::singleton( );
 require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/civicrm/civicrm/api/api.php';
 $group = civicrm_api('GroupContact','Get',array('group_id' => '6', 'options' => array('limit' => 1000), 'version' =>3));
 if ($group['values']) {
    foreach ($group['values'] as $k => $v) {
        $contact = civicrm_api('Contact','Get',array('contact_id' => $v['contact_id'], 'version' =>3));
        if ($contact) {
            //print_r($contact); exit;
            echo $contact['values'][$v['contact_id']]['display_name'] . '<br>';
        }
    }
 }
 ?>

```

# Answer
> 4 votes
What I figured out is that when inserting the shortcode in mode "view" the URL is `http://yoursite.com/civicrm/?page=CiviCRM&q=civicrm/profile/view&reset=1&force=1&gid=14` (which it will prompt you with an error) but the working URL is `http://yoursite.com/civicrm/?page=CiviCRM&q=civicrm/profile&reset=1&force=1&gid=14` which outputs the directory and the search box, if you don't want the search box you could add `&search=0` to the URL like this `http://your site.com/civicrm/?page=CiviCRM&q=civicrm/profile&reset=1&search=0&force=1&gid=14` and it will output just the directory.

Resuming I don't think you are having an permission issue, or a miss configured setting, I believe is a Civi issue.

Please try those URLs and report back. If you confirm this behaviour, I think we could open an issue or try to figure out where the problem is.

---
Tags: wordpress, profile, acl
---


title: Attributes of dumb groups

text:
# Question
Title: Attributes of dumb groups
In the table `civicrm_group`, I've noticed that even my non-smart groups have the fields `where_clause`, `where_table`, and `select_table` filled in. These don't seem necessary and cause a fair amount of slowness.

Is their a reason they exist, and is there a down-side to making those fields null in non-smart groups?

# Answer
> -1 votes
Why are you saying it's the cause of the slowness? Did you manually make them null and measured an improvement of the speed?

---
Tags: groups, smartgroups
---


# Question
Title: WordPress Redirect Loop with CiviContribute
I introduced 3rd party payment processor for our client. After successful payment user is redirected to notify-url, that causes now an infinite redirect loop in WordPress 4.3 (CiviCRM 4.6.8). Our membership payment form is embedded with the shortcode `[civicrm component="contribution" id="2" mode="live"]` in a WP page (`/members/pay-fees/`). Payments are registered correctly in CiviCRM.

Redirects are done in following order:

```
 1. /wp-content/plugins/civicrm/civicrm/extern/PaytrailNotify.php?A_QUERY_STRING
 2. /?page=CiviCRM&q=civicrm/contribute/transact&qfKey=4b1eea15240ba2ec1e48d4111f9dca79_6652&_qf_ThankYou_display=1
 3. /members/pay-fees/?page=CiviCRM&q=civicrm/contribute/transact&
 4. /members/pay-fees/?page=CiviCRM&q=civicrm/contribute/transact&
 5. ...

```

I debugged the problem with PhpStorm Debugger and it seems, that redirect no. 2 returns correctly content for the thank you page, but after that WP launches `do_action('template_redirect')` in `template-loader.php` causing the `redirect_canonical` function to be run (in `canonical.php`). Because of the url in form of `/?page=?` `redirect_canonical` concludes, that user is needed to redirect to the front page with identical parameters, which leads to the erroneous redirect loop. After this rest of the loop seems to be related to the missing qfKey in CiviCRM.

So my question is how the user should be redirected to the correct WP page (`/members/pay-fees/`) after payment instead of redirecting user to the site root (`/?page=CiviCRM...`) or should the `redirect_canonical` be prevented?

Now in the PaytrailIPN (I modified a bit original 3rd party code) the redirect is done in following way:

```
$finalUrlAction = ($component == 'event') ? 'civicrm/event/register' : 'civicrm/contribute/transact';
$finalUrlParams = array(
    'qfKey' => $privateData['qfKey']
);
// Redirect our users to the correct url.
if ($success) {
  // Success. Process the transaction.
  if ($duplicateTransaction == 0) {
    $ipn = self::singleton($mode, $component, $paymentProcessor);
    $amount = (float) $privateData['amount'];
    $transactionId = $_GET["ORDER_NUMBER"];
    $ipn->newOrderNotify($success, $privateData, $component, $amount, $transactionId);
  }
  $finalUrlParams['_qf_ThankYou_display'] = 1;

} else {
  $finalUrlParams[($component == 'event') ? '_qf_Register_display'   : '_qf_Main_display'] = 1;
  $finalUrlParams['cancel'] = 1;
}
CRM_Utils_System::redirect(CRM_Utils_System::url($finalUrlAction, $finalUrlParams, true, null, false, true));

```

# Answer
I solved the problem by using Ramesh's suggestion as a starting point. Instead of introducing hard coded Thank you & Cancel pages I stored the permalink address of the WordPress page along the other invoice stuff during the creation of the payment in Paytrail extension:

```
public function doTransferCheckout(&$params, $component) {
  $paymentHelper = new PaytrailPaymentHelper();

  // For now works only with WordPress & permalinks
  if (function_exists('get_permalink') && $contributionPageCmsUrl = get_permalink()) {
    $params['contributionPageCmsUrl'] = $contributionPageCmsUrl;
  }
  //Save payment info for PaytrailIPN.php to retrieve
  $paymentHelper->insertInvoiceInfo($params, $component);

```

It's utilized in the IPN following way:

```
  static function main() {
    ...
    $invoiceData = self::readInvoiceData($invoiceID);
    $contributionPageCmsUrl = $invoiceData['contributionPageCmsUrl'] ?: '';
    ...
    if ($contributionPageCmsUrl) {
      $queryParams = array_merge(array(
        'page' => 'CiviCRM',
        'q' => $finalUrlAction,
      ), $finalUrlParams);
      $glue = strpos($contributionPageCmsUrl, '?') === FALSE ? '?' : '&';
      $finalUrl = $contributionPageCmsUrl . $glue . http_build_query($queryParams, null, '&');
      CRM_Utils_System::redirect($finalUrl);
    }
    else {
      CRM_Utils_System::redirect(CRM_Utils_System::url($finalUrlAction, $finalUrlParams, true, null, false, true));
    }
}

```

I guess there should be more logic for handling different situations and upgrade hook implemented. This behaviour could be made also optional and support for Joomla and Drupal introduced (if needed), but now it solves the problem for the client.

BTW, double title on the contribution WordPress page should be eliminated. Is the display:none way to go?
> 1 votes

# Answer
Please try to create an Thank-you Page in WP and ignore the payment processor (Thank-you) page URL (replace with WP Thank you page URL ).

Also try to create an cancel page in WP and replace payment processor URL.
> 0 votes

---
Tags: civicontribute, wordpress, payment-processor
---


# Question
Title: On Administrative Dashboard in WP, how do I make column 1 wide enough to display my whole Activities dash let?
On Administrative Dashboard in WP, how do I make column 1 wide enough to display my whole Activities dashlet?

# Answer
> 2 votes
A bit of css will do it. I would suggest to create a new css file in you custom directory like `/wp-content/plugins/files/civicrm/my_css/my_stylesheet.css` Navigate to **Administer-\>System Settings-\>Resource URLs** and put your URL to the css file `http://yoursite.com/wp-content/plugins/files/civicrm/my_css/my_stylesheet.css`

In your css file:

```
#crm-container .column-0 {
        width: 50% !important; // set the width of the left column to the percentage needed
}
#crm-container .column-1 {
            width: 50% !important; // set the width of the right column
}

```

Note that between the two columns the percentage must sum 100%

The next style will set the columns to occupy the entire width of your screen

```
#crm-container .column {
        float: none !important; // remove floating so the column-0 stays on top of column-1
}

#crm-container .column-0, #crm-container .column-1 {
        width: 100% !important; // set the width of the columns to the cantainer width
        padding: 0 0 25px !important; // reduce bottom padding
}

```

You might not need to set the weight with `!important` but it never worked for my without it, also you might need to clear the cache of your browser.

---
Tags: wordpress, dashboard, custom-reports
---


title: Deposit payment

text:
# Question
Title: Deposit payment
I have problems on how to manage payments. The entry fee is € 190.00 that can be paid or all or a deposit of 80.00 €. How do I know who I still have to pay? Thank you.

# Answer
> 4 votes
Marco --

Partial payment from the front end is not yet available in CiviCRM, but it can be done through the extension described in this CiviCON presentation "Front End Partial payments"

It's avaialble in Github.

Your use case is similar to this situation: What will be the way to give user public access to check their contribution?

---
Tags: wordpress, payment-processor
---


# Question
Title: How can I update a particular activity/case via a webform?
Here's the use case:

A user submits reports via a webform on a frequent basis. Each time they submit a report the webform creates a new case, and populate a custom activity type with the data that is submitted.

From time to time the administrator may want the user to re-submit a report (they may have made errors or not reached the required standard in the original submission).

What I want to do is enable the administrator to point the user to a webform where they can see all of the data they submitted originally, edit it and upload new versions of required documents, which then updates the data stored in Civi.

Can I get the webform to present the correct submission data to the user, and if so, how?

I can pass in some parameters to the webform via the url (e.g. case client), but as the user is the client of all the cases they submit that's not going to be enough to identify a particular case.

# Answer
You could create a View of Webform Submissions. It's a bit more complicated, but you should be able to achieve it (if I understand you correctly).

Be sure to add the web form submission data (I think that's the one) relationship so you can sort and filter.

**Additional thoughts:**

I'm trying to get away from views of webform submissions as they are not fun to create/maintain.

Another alternative, and the way I tend to go now, is to create a View of CiviCRM Relationships with the current user in the contextual filter. Include the contact id, case id and activity id fields in the view, but exclude them from the display. Add Case Types and other pertinent info to the view to help distinguish each case and a global text field(s) that links to a new webform.

Create the new webform by cloning the original, on the CiviCRM integration tab change the case section to update existing case and/or activity.

Where your scenario gets tricky for me to understand, is the activity and the case together in one webform. You may need to separate these into two new webforms. One that updates a case and one that updates an activity and create two links in the view one like:
`node/new_webform_id?cid1=[id]&aid=[id_1]` to update the activity
and one like:
`node/new_webform_id?cid1=[id]&caseid=[id_2]` to update the case.
> 1 votes

# Answer
If the user has permission to edit their webform submissions, then that would be easiest - by editing their existing submission they can make any necessary changes.

One easy way to do this would be to have the webform send out an automatic email using a couple tokens to say e.g.

> Thanks for your submission Your submitted values are:
>
> ...
>
> If you wish to edit your submission, click here.
> 0 votes

---
Tags: activities, civicase, webform-civicrm
---


# Question
Title: How can I get webforms to show household and household members?
I tried to follow the instructions here http://wiki.civicrm.org/confluence/display/CRMDOC/Webform+CiviCRM+Integration but I must be doing something wrong.

I created a webform that has household as contact 1 and individual as contact 2. In contact 2, I enabled relationship fields and selected is part of.

In the webform, if I select an existing household, it pulls up the info on the hh but does not populate the individual info.

If I create a new household and a new individual, it creates the household and the individual and a relationship but the relationship doesn't have a type, which isn't possible through the standard interface.

This is on civicrm 4.6.7

# Answer
Prefilling a webform value depends on other values already being there. If the individual is not selected at the time the webform loads, then there's no way for it to populate the household. So you are correct, selecting a different contact 1 on the form will not cause contact 2 to be changed.

One workaround would be to create 2 webforms - the fist one being an incredibly simple form that allows you to autocomplete the individual's name and a submit button that redirects you to form 2 with cid in the url. Not perfect but it would work.
> 3 votes

# Answer
For admins we tend to provide them with a View, or even a View block 'search' so that they can quickly find the person who will be cid=1 and then provide a link on that to the webform so cid=1 is in the url and all related contacts on the form also prefill.
> 3 votes

# Answer
"In the webform, if I select an existing household, it pulls up the info on the hh but does not populate the individual info."

In the webform component for the 'individual existing contact' field you need to set the Filter so that it will prefill if it can find a contact by specifying the relationship.

Is that a step you might have missed?
> 1 votes

# Answer
Unless you have some very unusual circumstances, you should not make Contact 1 a household. Contact 1 is meant to represent the person filling out the form (e.g. the user) and houses are generally unable to operate a keyboard ;)

I suggest making contact 1 an individual and contact 2 the household.
> 1 votes

---
Tags: webform-civicrm
---


title: CiviCRM event registration is failing

text:
# Question
Title: CiviCRM event registration is failing
I am trying to create an event (that includes a fee) but for some reason every time I click on "Info and Settings," it shows me the following:

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

I tried numerous times to create the event, and everything looked fine until it didn't show up in my wordpress form dropdown, and I couldn't insert it onto my website. When I went back, that's what it showed me. Please help!!! I am not experienced with Civi and feel like its a glitch in their system because the system just goes crazy on me every time I click something. Thanks!

# Answer
The problem is almost certainly a misconfiguration of your domain names or your SSL certificate. Please look (carefully!) at the domain name of the page that is telling you that you don't have permission. Then click "Back" to the page from which you clicked the link and look at the domain name there.

* Is one page using SSL and one not? E.g. does one address start with "http://" and the other with "https://"?
* Does one address start with "www" and one not? E.g. http://www.example.org and http://example.org?

If so, that's your problem. As for fixing it - please update your question with your CiviCRM version and the CMS software/version, along with which of the two problems you're seeing, and someone should be able to point you to a fix.
> 1 votes

---
Tags: civievent, wordpress, permissions, error
---


# Question
Title: How to deactivate "update this field mapping" for users?
I would like the users to have only permissions for saving a new export mapping, and not updating the existing ones. Where can I modify this permissions?

Thank you!

# Answer
> 3 votes
There is no way afaik to do this currently. You might need to make an extension that adds field to the civicrm\_mapping table that would then permit you to create a Permission that you can then apply.

# Answer
> 3 votes
I agree with Pete that there's no way to do what's being requested currently out of the box. I'd probably take a different approach though, and change this at the form layer. I'd make an extension that checked permissions, then removed the applicable "update this mapping" checkbox using `hook_civicrm_buildForm`.

---
Tags: export
---


# Question
Title: Any best practices/tips for creating a query view against contacts to used with webforms?
I've created a view to query up existing contact and I was able to create a link to a webform with a specific id.

I added a combined filter for first name, last name and email. Before it filters you get everyone in the db. What's the best way to not get anyone until you hit search? (I found that making the search box mandatory did that, but is that a good way?)

I don't suppose there's an easy way to get the nice autocomplete box that you get for webforms existing contact is there?

Any gotchas I should watch out for?

# Answer
Note this is purely a Drupal question at this point. Anyway, yes requiring the field can suffice. You can also use the Exposed Form to make a search block that has additional settings such as "Input required" (under the Advanced bit of Views on right)
> 3 votes

# Answer
As far as your exposed filter, I use Better Exposed Filters module that has an option "Require input before results are shown." We use that all of the time.

Great module that really lets you customize the exposed filters.

As for the Webform, you can set the contact to Autocomplete and filter by the appropriate group.

**Update** I think I misunderstood about your Webform reference.

If what you are trying to accomplish is an exposed filter that autocopmletes names for View search results, use the Better Exposed Filters module, select "Autosubmit" and "Require input before results are shown." After that, in the advanced section of the View turn on Ajax. That should essentially give you an autocomplete list of contacts.

Also instead of the first and last name fields, I would remove those and use either the display name or sort name fields depending on how you want users to enter names.
> 2 votes

---
Tags: webform-civicrm, drupal-views
---


# Question
Title: Webform created for case activity and multiple case types
Drupal 7.39 Webform Civi Integration version 7.x-4.11.

Just noticed that for contacts with multiple open case types, a new activity submitted via a webform does not always go to the correct case type.

In the Civi Webform settings under Activities, File on Case section I have Test Case as the Case Type, open and resolved selected under Case Status and contact 2 selected for Case Client.

Nothing selected under the Case section of the webform. In the past, I didn't add anything here for an activity on an already open case. Should I be using this section if the case is already open or is this section just for changing case roles, status, etc.?

One case client has two open cases, an open Test Case and an open Other Case Type.

When I click on the link to add a New Test Case Activity, the correct webform comes up with the correct client name. Once submitted however, the activity is filed under Other Case Type and not Test Case.

If I use the same form for someone with only a Test Case, the activity is created in the correct case.

I tried with enabling the Case processing section, but still encounter the same error.

I thought I had this working before, but I could be wrong.

# Answer
Looks like this was a bug in the comparison logic. See if this fix works for you: https://github.com/colemanw/webform\_civicrm/pull/17
> 2 votes

# Answer
Not an answer per se, more a comment, but too long to fit in the comment box:

For me this sounds like a bug. I've just checked the set-up I'm using for a very similar scenario, where I'm creating a new activity and filing it on a pre-existing case. Case processing is not enabled, and the activity is being created as I expect in the correct case, where I am passing in the case client id into a hidden field in the form.

As you are specifying 'Test Case' as the case type for the 'File on Case' section then I would say there is no way that the activity should be getting filed anywhere other than in a Test Case, hence my assertion that there is a bug at work here. In my case I'm only working with one case type so I've not come across this issue.
> 0 votes

---
Tags: activities, civicase, webform-civicrm
---


# Question
Title: Contribution form displaying in footer of WordPress site after form submission
On a Wordpress site which uses the theme "Enlightenment" I have used civicrm shortcode to embed a civi Contribution form on a wp page. All is well until I click the Confirm Contribution button.. the next page that is returned (Contribution confirmation page) has the form results replicated in the wp/enlightenment footer

a part of the footer as it appears before contribution submission: https://i.stack.imgur.com/A2WYW.jpg

same part of the wp footer as it appears after submission.. https://i.stack.imgur.com/ByiCL.jpg

I've studied the page source for these two cases and it appears that civi's

It seems that the problem is related to the civContribution webform submission - any ideas on why the proper style inheritance would be lost after form submission and how/where I can fix this problem?

I realize this is a case of Enlightenment probably doing something the civiContribute doesn't expect but since all is well before form submission I suspect that there could be a civi way to fix this.

# Answer
I installed the plugin Multiple Themes (https://wordpress.org/plugins/jonradio-multiple-themes/) which allows me to set a different wp theme (e.g. Twenty Fifteen) just for the /?page=CiviCRM pages. Now I no longer have the replicated webform problem. The Contribution page appears has a different look & feel but I'm ok with this. Thanks so much for the help Andrew.
> 2 votes

# Answer
Could you set a Civi basepage and apply an extremely cut down template to that specific page?

You'd need to create a custom page template in your theme directory. Create the file, then fill it with the most basic content possible. So something like:

```
<?php /* Template Name: Basic Template */ ?>
<html>
  <head>
    <?php wp_head(); ?>
  </head>
  <body>
    <?php
    if ( have_posts() ) {
        while ( have_posts() ) {
            the_post();
                the_content();
        } // end while
    } // end if
    ?>
  <?php wp_footer(); ?>
  </body>
<html>

```

Then on the base page, change its template to 'Basic Template' and update.

This would apply to *all* pages that Civi uses, so is inherently pretty hacky.
> 1 votes

---
Tags: civicontribute, wordpress, contributions, forms
---


# Question
Title: Is there a way automatically get sort name and greetings to be correct for households?
If you want have individuals and households to show up in alphabetical order by last name you need to enter the hh like Smith, Jane and Joe. Fine except now the greetings will be Dear Smith, Jane and Joe and the addressee will be Smith, Jane and Joe. So then one has to enter custom greetings and addressee.

My users are bad at that. Every time we send out an email or postal thing, I find I have to wade through the data and fix a bunch of them.

If you enter the HH as Jane and Joe Smith, the greetings are better; though, we'd prefer Dear Jane and Joe to Dear Jane and Joe Smith. At least if you miss one you don't end up addressing something odd. But then the sort is not by last name.

Maybe some fancy parsing with smarty in the greeting.

# Answer
Have you tried changing the sort name so the results show up in alphabetical order? (Administer/Customize Data and Screens/Display Preferences). I set it like this:

```
{contact.last_name}{, }{contact.first_name}{ }{contact.middle_name}

```

In that way my contacts are sorted on the last name and I also include the middle\_name (which means something in Dutch so it becomes 'Boer, Jan de').

But perhaps you tried that and your problem is somewhere else?
> 1 votes

---
Tags: contacts, sort-order
---


# Question
Title: Thousand separator for number field in "Tab with table" display
My custom field is a "number text" displayed in a tab with table. For example it's displayed 123456789.99 but I need thousand separators, I mean that I'd like to read 123,456,789.99 How can I add this feature ? I use CiviCRM 4.6.5 with the drupal version 7.38. Regards, Hashkey

# Answer
Check the settings at Administer/Localization? There is a setting for thousands separator!
> 3 votes

---
Tags: drupal, custom-fields
---


# Question
Title: Custom Field Multiple Choice Through the API?
We'd like to retrieve a filtered list of the multiple choice options for one of our custom fields through the API, with the output being both the Label and the Value for that field (so we can use it in a dropdown). Is there an API call to get all multiple choice options for a specific custom field? Or do we need to write a query directly against the database table? Thanks.

# Answer
Yes, if you visit your api explorer you'll be able to play with this in detail, but the api call you probably want is:

```
civicrm_api3('contact', 'getoptions', array('field' => 'custom_123'));

```

where 123 is the id of your custom field.

By the way, you haven't said how/where you are developing this form, but if it's on your own site with access to the ajax api, then a big shortcut for you would be to simply drop in an entityRef field (entity type = "option\_value") and given the correct option group it will do everything else for you.
> 3 votes

---
Tags: api
---


title: How can I view books.civicrm.org?

text:
# Question
Title: How can I view books.civicrm.org?
I'm new to Civi and I'm trying to view books.civicrm.org, but its asking for a username and password, where do I register for that?

# Answer
I'm guessing there is a dns problem somewhere. Depending on where you are in the world and what your dns server is you might be getting directed to the wrong site. Civi did a server migration recently so the problem might resolve itself in a matter of hours, or you might switching to a better dns server, or you could go directly to http://gitbook.civicrm.org/ as JoAnne suggests.
> 1 votes

# Answer
If you are after civicrm documentation the address is book.civicrm.org (ie no "s" on book). That takes you to a page which directs you to various documentation.

(If you are looking for the user and admin guide for v 4.6 you can go directly to gitbook.civicrm.org.

Did you find that URL somewhere on the civicrm site? If so, please let me know where it was so that it can be corrected.
> 2 votes

---
Tags: documentation
---


# Question
Title: Running scheduled jobs from wp-cli doesn't work
Running scheduled jobs using wp-cli doesn't work, whereas CiviCRM's cli.php does work.

I'm running CiviCRM 4.6.8 on Wordpress.

When I try to execude scheduled jobs using wp-cli:

`sudo -u www-data /usr/local/bin/wp --user=my_wp_login --url=https://www.mysite.pl --path=/home/www/wordpress civicrm api job.execute auth=0`

I get the following result, although the mailings are not sent (remain in Scheduled state).

`Array
(
 [is_error] => 0
 [version] => 3
 [count] => 1
 [values] => 1
)` The same goes for running `wp civicrm process-mail-queue`

However, using old cli.php I can run the jobs.

`usr/bin/php5 /home/www/wordpress/wp-content/plugins/civicrm/civicrm/bin/cli.php -s www.mysite.pl -u cron -p passord -e Job -a execute`

What am I doing wrong?

# Answer
> 1 votes
In looking into this a bit further I have failed to get the job to run via the wp-cli by specifing mail\_report and instanceId=x, however, this answer works well with wp-cli civiCRM Cron only run one mail\_report scheduled jobs?

By setting a scheduled job and setting the parameters, wp-cli triggrs the job just fine.

I am curious if drush exhibits the same behavior

---
Tags: wordpress, cron-job, mailing
---


# Question
Title: How to select a default event in webform where event is repeating
Using webform I have created event registration for a nightshelter that runs continuously for 4 months at various different churches. I have set this up as a repeating event so each day is a different event - there are good arguments for doing it this way. I would like to have the 'current' event - which is today's nightshelter - as the default event. Is that possible or is there a hook I can use? Having a default event each day is the problem, otherwise the user is going to have to choose from 122 events!

# Answer
If this is on Drupal, you could generate a View that displays links to the webform and form the link with each event's event id in the URL.

Add a new view of CiviCRM Events.

This will add the event id field. Under settings for that field, check Exclude from Display and make sure for Thousands Marker you change it from comma to none.

Add the start date field.

Add a Global Custom Text field. In the Text area put Register for this Event (or something like that). Under Rewrite results, select output this field as a link. This is where you will link to the webform prefilled with the correct event id. I don't do much work with events, but according to the help on the webform integration:

> Allow events in "User Select" mode to be auto-filled from URL.
>
> Example for "Register all": http://example.com/node/{node.nid}?event1={event1.event\_id},{event2.event\_id}
>
> Example for "Register separately": http://example.com/node/{node.nid}?c1event1={event1.event\_id},{event2.event\_id}&c2event1={event3.event\_id}

So your rewrite might be something like node/1?event1=\[id\] where node/1 is the path to your webform.

On the webform civi settings under event, make sure you have "Allow events to be autoloaded from URL checked."

Then under the view's filter section add start date, change the operator to "Is greater than," in the Value area, change it to An offset from the current time such as "+1 day" or "-2 hours -30 minutes" and in Value field enter Now.

This should give you a view of all upcoming events with a link to the webform prefilled with the correct event.

You'd need to add some more filters to get just what you need and add a sort by start date, but this should get you in the ball park.
> 4 votes

---
Tags: webform-civicrm, 4.6.8
---


# Question
Title: How to delete a contact through the command line (CLI)
How can I delete a contact through the command line?

# Answer
> 5 votes
If you're on Drupal and have drush installed you can do

```
drush cvapi Contact.delete id=17 skip_undelete=1

```

# Answer
> 4 votes
On the command line, type `php path/to/civicrm/bin/cli.php -e Contact -a delete --output --contact_id=17` (Note: passing a contact\_id is mandatory when deleting. But you can delete multiple contacts by creating a php file that has a loop and executes the above command through exec().)

If you want to permanently delete a contact, add the skip\_undelete parameter as well: `php path/to/civicrm/bin/cli.php -e Contact -a delete --output --contact_id=17 --skip_undelete=true`

I was, however, having problems with permanent deleting. I was just getting the error `Could not delete contact`. Looking at the code, my suspicion proved right - it was a permissions issue. So I tried to pass my admin CMS user login credentials: `php path/to/civicrm/bin/cli.php -e Contact -a delete -u myuser -p mypass --output --contact_id=17 --skip_undelete=true`. Unfortunately, for some reason it didn't work for me. Anyways, I thought I'd share my experiences - maybe I'm missing something or it might work for someone else. To circumvent this, in my case I just temporarily commented out the permissions check in CRM\_Contact\_BAO\_Contact-\>deleteContact().

Tip: because the delete isn't very fast, if you are deleting a large number of contacts it might take quite a while to go through them. The little trick I used to speed this up was to start multiple instances of my shell and have each of them delete a portion of my contacts. In that case I found it more convenient to use a bash for loop, like so: `for i in {50000..100000}; do php cli.php -e Contact -a delete --output --contact_id=$i --skip_undelete=true; echo Deleted contact_id $i; done`

---
Tags: api, contacts, cli
---


# Question
Title: Recording Separate Contributions in a Membership Webform
Working on a Civi 4.5.5 site. I've configured a membership renewal contribution page to record a membership fee, and (voluntary) additional donation.

By setting the Contribution Page Financial Type to "Donation", and selecting "Separate Membership Payment" on the Membership tab. When entering a test payment, two contribution records were created with one of type "Donation" and one of type "Membership Fee". As expected.

Renewal is easy, because we are only capturing info for the Primary member.

The membership type extends by relationship to other family members. so the organisation want a membership webform to capture contact details of the related individuals (spouse//partner, and offspring) on initial sign up.

When testing the webform to collect an additional donation on sign up, only 1 contribution was recorded (equal to the value of the membership fee and the donation- but labelled as a donation).

Is it just that the create separate payments option doesn't work with the current civi/webform integration? In which case I need to discuss what is more important with the organisation.

Or am I missing something blindingly obvious? Has anyone been able to get this to work?

*thought of this after pressing save* Should I collect related contact data in the webform, then re-direct to membership contribution page which will populate with Contact 1's data and allow the separate payments to work as expected?

Cheers

Craig

# Answer
> 6 votes
Webform-CiviCRM integration was designed to be able to sign up multiple members plus collect a contribution. It will save a single contribution record containing a separate line-item for each (2 memberships + a donation = 3 line items).

There are some key settings that are required:

* Contributions (in Webform CiviCRM section): Should be set to your Donation Contribution page and *not* your Membership Contribution page if you created one
* Memberships Tab (in Webform CiviCRM section): Should be set to one

With those settings above and any other data that you would like to collect you will be able to receive a donation and membership purchase on the same transaction.

Adding some examples:

So on a contribution level these look like Donations -\> so you must pull LineItem reports; this one is a good one (from Fuzion's Extended Reports): civicrm/report/price/contributionbased?reset=1

Adding some more screenshots:

Contribution page config (also enabled a Payment Processor); but I don't even have Membership section enabled here;

Webform CiviCRM config \[I've hidden Membership type as there really is only one\];

# Answer
> 1 votes
I suspect Webform does not handled that, so yes you might need to either do the Membership page, then pass them on to a Webform to add their related people, or vv

---
Tags: civimember, webform-civicrm, contributions, donations
---


title: Token for different content?

text:
# Question
Title: Token for different content?
I have created a template that I am going to send to a group of people. Depending on a certain value (in this case a custom field), I want to use a different picture.

Today I create four different templates.

Is there a way to "merge" content in a template based on another field value?

And is it a generic way of doing this, if I next time want to merge different sentences, based on the same field values I used for the pictures?

(I have looked at the extension Content Tokens, but this is slightly different)

# Answer
> 3 votes
I have had success in differentiating content based on the value of a custom field by enabling Smarty for message templates http://wiki.civicrm.org/confluence/display/CRMDOC46/Smarty+in+mail+templates

# Answer
> 0 votes
You can code an extension to provide custom tokens using hook\_civicrm\_tokens and hook\_civicrm\_tokenValues.

---
Tags: tokens
---


# Question
Title: How can I switch off the CiviCRM print icon on public pages?
We set up a petition page, which all works fine.

In order to simplify the user experience, we want to "switch off" the CiviCRM printer icon.

Can this be done using the admin interface? Or do we need to do some customization? (and what?)

Thanks, Detlev

# Answer
I think hiding it with CSS might be the most straightforward solution to this... I don't believe this is an option that can be toggled on/off in the admin settings.

Hope this helps, Lesley
> 8 votes

---
Tags: ui
---


# Question
Title: How to clone memberships, display as new tab?
We need to track student levels (rank) in our martial arts organization.

Each rank is essentially a paid membership (so contributions should be recorded) that doesn't expire, but we need to display the levels in their own tab on the contact summary page, not under memberships.

# Answer
> 1 votes
Pair up the membership with custom data. Create a a field set, and mark it to display as a tab (instead of inline). Associate the fields with the type of membership, and then you'll collect paid contributions and generate fields in a separate tab.

---
Tags: civimember
---


# Question
Title: Is it possible to change Custom Field types?
I have a custom data set with a number of custom fields set as alphanumeric text fields - it's become clear that some of these would be better as note/text areas.

Because I'm increasing the size of the fields, rather than decreasing them and potentially cutting off existing data, I'm hoping it's possible to change them in the database.

From what I can see, the only tables affected are civicrm\_custom\_field (where I'd be changing data\_type and html\_type) and the civicrm\_value\_custom\_data\_set (where I'd be changing the relevant field's Type from varchar to text and removing the 255 character limit).

There's only a small amount of data entered using the custom data set, but I'd rather not have to re-enter everything (particularly as it means deleting and recreating the custom fields as well as the data).

Is this possible? Is there anywhere else I need to change the settings? Or is this just generally a horrible idea?

# Answer
> 2 votes
you are making the job harder - just create an Temp table (Export) move all your custom data to it. Delete the unwanted custom field and create new custom field as you needed

Once you have created all the custom field as per your requirement just move all the data from temp table to the new custom field table - job done.

---
Tags: custom-fields
---


# Question
Title: how to add two dropdowns parallel to each other
how to add two dropdowns parallel to each other, e.g. one drop down with name of the item and the second dropdown with the quantity of the item. I have tried to add two dropdowns but they appeared one below thee other. Basically what are I'm trying to do is to have an "Item" correspond to the "Quantity" to how many were sold. Please check the image below.

# Answer
you need to write JavaScript in order to view the drop drown parallel.

If you are trying this in summary screen just use tab.extra.tpl else please let me know the screen so I will help you.
> 1 votes

---
Tags: civimail, civievent, civicontribute, civimember, contacts
---


# Question
Title: What does this import error mean? "Invalid value for field(s) : ... Country input value not in country table"
I am getting a crazy import error message:

> Invalid value for field(s) : Addressee must be one of the configured format options. Check Administer \>\> System Settings \>\> Option Groups \>\> Addressee for valid values; State/Province; Country input value not in country table: The Country value appears to be invalid. It does not match any value in CiviCRM table of countries.

What is wrong?

# Answer
Sounds like the issue is that **CiviCRM doesn't recognise the contents of your Country column** (for some rows).

In the import UI, you should see an option to **download rows with errors**, and that CSV will report which exact country values CiviCRM does not recognise.

Eg, CiviCRM would accept either `US` (ISO-3166), `United States` (CiviCRM's label) or `1228` (CiviCRM's DB ID), but if the CSV contains `United States of America` or `U.S.A`, then CiviCRM might not recognise that alternative.

Cleaning this up is usually as simple as a *Find & Replace* in your import spreadsheet before re-importing. You might then rinse and repeat (`N.Z` =\> `NZ` or `New Zealand`) for further countries, or other invalid data that needs cleanup.

To get a working *import* format, try *exporting* a few contacts (even if you have to create a few first), then use the resulting CSV as basis for your next import.
> 4 votes

---
Tags: import, error
---


# Question
Title: How to alter the InvoiceID/ContributionID count
I'm wondering if is possible to alter the current Contribution\_ID start count.

The invoice prefix is set to "INV" so when viewing a contribution I can see the invoice ID like INV76, I guess the ID comes from the contribution\_id which matches with invoice\_id in any single contribution. I would like to alter the current count so the next contribution\_id starts with for example 4076.

Resuming, my target is to change the count of the invoice\_id so it matches with our current invoices count (right now is about 4356) as we would like to use this fantastic CiviCRM feature.

Any help is appreciated.

CiviCRM 4.6.X Wordpress 4.3

# Answer
> 2 votes
You want to change the auto-increment number:

```
ALTER TABLE civicrm_contribution AUTO_INCREMENT = 4356;

```

Note that this is very dangerous if you set the number backward rather than forward.

---
Tags: civicontribute, wordpress, accounting, invoice
---


# Question
Title: Good tools for building a call for proposals in Civi?
I want to do a call for proposals for a conference. I can just use a profile and custom fields for people to enter the info, but I'd prefer for them to be able to save it in progress before eventually submitting, and also to track whether or not it had been approved.

I know there are other specialized tools for this, but I was hoping maybe there was a way to do it in Civi so I don't have to set one up. We're running Civi in Drupal.

# Answer
> 4 votes
Zak, I agree with Peter's comment. If you are using Drupal, you can use the CiviCRM Drupal webforms integrations. **There were a few good examples of these at the CiviCRM User summit** last week (i.e - Susan's ReThink Church example - which is essentially what you want).

Basic concept: User logs in and starts to fill out a multi page webform that saves the data on their CiviCRM record. If you want to add a little custom code, you can have the final page be a "signature page" so that it can not be edited again.

---
Tags: custom-fields
---


title: Upgrading from 4.2.6 to 4.6.8

text:
# Question
Title: Upgrading from 4.2.6 to 4.6.8
we've been running CiviCRM 4.2.6 for a number of years now on Drual 6 and I've finally got round to upgrading. Has anyone here gone from 4.2 to 4.6? Any gotchas that you hit?

I've run the upgrade on our test Drupal 6 site and once MySQL permissions around triggers were sorted the upgrade ran through fine.

I'm keen to hear other peoples experiences.

Em

# Answer
CiviCRM 4.6 officially supports direct upgrades from versions as far back as 4.0.8, so you fall within that window.

If you've already done a trial run on your test site and everything checks out, I'd say you're good to go. Back up your live site just prior to running the upgrade.

If the core upgrade works fine, then the biggest concern about things that could go wrong is with integrations - if your site has any custom code, modules or extensions related to Civi, be sure to review them to ensure they still work with the latest version. I would do thorough testing on your test site first.
> 1 votes

# Answer
Been involved in a few upgrades from 4.2 to 4.6 and generally they work fine. If you've got it running through as Coleman has said your in a pretty good position. Sometimes we'll got 4.2 to 4.4 then up to 4.5 or 4.6 to reduce the risk of something going wrong. As you've mentioned there are now mysql triggers and functions that CiviCRM relies on and this can sometimes trip things up. Back everything up before you do it on your production environment.
> 1 votes

---
Tags: drupal, upgrade
---


# Question
Title: Installed CiviCRM in Wordpress via ftp, but it doesn't appear in plugin directory
I have Wordpress 4.2.5 running, with PHP 5.4. I am installing CiviCRM 4.6.8. I followed the directions here: http://wiki.civicrm.org/confluence/display/CRMDOC/WordPress+Installation+Guide+for+CiviCRM+4.5#

Before installing I checked with my hosting provider that I had all the other specs listed on the page to install and their support person confirmed that I did, fwiw.

I downloaded the CiviCRM folder, then uploaded it via sftp into the wordpress plugins folder, after changing the permissions for that folder. I tried both writeable and executable permissions.

When I log in to my wordpress site with my administrator credentials CiviCRM does not appear in the plugins directory anywhere, or in the plugins editor dashboard.

I saw that Jetpack and Super Cache were incompatible with CiviCRM. I deactivated both, but no change.

Please help.

# Answer
> 1 votes
I believe the issue might be what Lesley is pointing out at the end of the comment, regarding the folder structure. In order for WordPress to identify a plugin, the plugin shouldn't be in a sub-folder, it could have happened that depending on the zip/unzip software you have used to extract the plugin, the civicrm folder (inside your /wp-content/plugins folder) might look like:

* civicrm-4.6.8
    + civicrm
        - civicrm.php
        - uninstall.php
        - civicrm
        - includes
        - assets
        - ...

When it should look like:

* civicrm
    + civicrm.php
    + uninstall.php
    + civicrm
    + includes
    + assets
    + ...

---
Tags: wordpress, php, installation
---


# Question
Title: How to change the direction of a relationship type with existing data
I have made an organisation / individual relationship type as an `a_b` relationship while it should be a `b_a` relationship to be consistent with the existing relationships like employer of which always have a as individual (child) and b as organisation (parent).

There are allready a lot of contacts that have this relationship in the database.

I tried to change the direction of the relationship type at `civicrm/admin/reltype?action=update&id=12&reset=1` and then swap the data of the `contact_id_a` and `contact_id_b` columns in the database for that relation type id.

So what is the best way to change the direction (swap individual/organisation) of a relationship? And what else has an influence on this except for the database tables of `civicrm_relationship` and `civicrm_relationship_type`?

# Answer
I agree with ErikH, but if you don't feel comfortable updating the database, you can...

* create a new relationship type with the opposite order (b\_a vs a\_b)
* do an advanced search, selecting only individuals with that
relationship
* select the action to "export" the contacts
* select two fields (1)the internal contact\_id and (2) the relationship type field with the internal\_contact\_id and export (verify that you did this correctly and the ids match as expected!)
* use civicrm import to import the csv file to new relationship type created in the first step.

May more steps, but if you don't know how or want to mess with the database, this will work.
> 5 votes

# Answer
You will probably have to update the tables directly, and as you have figured out you will have to change civicrm\_relationship. And of course try in a test environment first.

You will have to make sure the relationship direction is changed in the civicrm interface (civicrm/admin/reltype?reset=1), and then update the civicrm\_relationship table in the database.

You can duplicate the civicrm\_relationship table as civicrm\_relationship2 and then use this second table to swap the a and b columns, in this example for relationship\_type\_id 5.

```
UPDATE civicrm_relationship, civicrm_relationship2
SET civicrm_relationship.contact_id_a = civicrm_relationship2.contact_id_b, civicrm_relationship.contact_id_b = civicrm_relationship2.contact_id_a
WHERE civicrm_relationship.id = civicrm_relationship2.id AND civicrm_relationship.relationship_type_id = 5

```
> 4 votes

---
Tags: relationships
---


title: Extension Resource URL being rewritten

text:
# Question
Title: Extension Resource URL being rewritten
When I save the Extension Resource URL it is rewritten from:

```
/var/www/vhosts/examplesite/httpdocs/wp-content/plugins/files/civicrm/custom_ext

```

to

```
https://www.examplesite.com//var/www/vhosts/examplesite/httpdocs/wp-content/plugins/files/civicrm/custom_ext

```

It looks like it is taking the https://www.examplesite/ part from the civicrm.settings.php file:

```
define( 'CIVICRM_UF_BASEURL'      , 'https://www.examplesite.com/' );

```

I'm getting a number of errors telling me that extensions are pointing to the wrong place, so I figure I've **gone astray somewhere in the settings**. I see the Extension Resource should be the same as the CiviCRM Extensions Directory, which currently is:

```
/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/files/civicrm/custom_ext

```

Where have I gone wrong? Any pointers much appreciated!

Edit:

So I changed the Resource URL to https://www.examplesite.com/wp-content/plugins/files/civicrm/custom\_ext, but I still seem to get an error indicating that maybe the extensions are still not pointing to the right place?

`mod_fcgid: stderr: PHP Fatal error: require_once(): Failed opening required 'CRM/Core/Session.php' (include_path='/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/files/civicrm/custom_ext/uk.co.vedaconsulting.mailchimp-1.0-beta4/:/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/packages/:/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/files/civicrm/custom_ext/com.drastikbydesign.stripe/:.:/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/civicrm/civicrm:/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/civicrm/civicrm/packages:/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/civicrm/civicrm/:/var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/civicrm/civicrm//packages:.:') in /var/www/vhosts/examplesite.com/httpdocs/wp-content/plugins/files/civicrm/custom_ext/uk.co.vedaconsulting.mailchimp-1.0-beta4/mailchimp.php on line 442`

# Answer
> 2 votes
The 'Extension Resource URL' under 'Resource URLs' is the web-accessible URL that points to the extensions directory, not the path to that directory on the server's filesystem. The path on the server belongs in 'CiviCRM Extensions Directory' under 'Directories'.

Edit: for the example shown, the 'Extension Resource URL' is 'https://ffnew/sites/default/extensions' for a 'CiviCRM Extensions Directory' of '/var/www/html/prod/drupal/sites/default/extensions'. This will differ if you're not on Drupal.

---
Tags: extension, resource-urls
---


title: WYSIWYG Editor Permissions

text:
# Question
Title: WYSIWYG Editor Permissions
In the online contribution section when we enable Tell A friend as a option we noticed that the option for an anonymous user only shows in a WYSIWYG Editor format. This is high risk and we would like to avoid it by only allowing admins to use the WYSIWYG Editor. However, I only see one option in the Customise Data section whichs says use the WYSIWYG Editor or not i.e. CKeditor, TinyMCE and Text area.

Is there a way to control access based on a users role.

# Answer
> 1 votes
Please refer the below link

Is there a way to disable the wysiwyg editor when editing mail templates?

you need to disable the Editor before user access the editor page

---
Tags: civicontribute
---