# Question
Title: How can I allow multiple petition signatures from the same computer?
I have a petition in CiviCRM - Joomla that is working great. We use it as a 'Contact Us' form. If different people want to use the same public computer to submit the form, they will get a 'duplicate' error. How can I allow multiple people to submit comments on the same computer?

Thanks!

# Answer
> 2 votes
If you clear the browser's history after each entry you should be able to have multiple entries from the same computer.

# Answer
> 1 votes
You can open a new private window and sign it.

---
Tags: joomla, civipetiton
---


title: How to clear pseudoconstant cache?

text:
# Question
Title: How to clear pseudoconstant cache?
I find that if I create a new tag via the api, and then try to attach it to a contact with the entity\_tag api, it will sometimes fail with the message "'##' is not a valid option for field tag\_id".

This is because the entity\_tag api checks for the existence of the tag\_id using a pseudoconstant lookup -- which is a cached value. How can I easily clear that pseudoconstant cache after the tag has been created to ensure it can be added to the entity?

# Answer
You can manually clear caches with `civicrm_api3('AnyEntity', 'getfields', array('cache_clear' => 1));` (use any valid entity, it doesn't matter which).

However, if you are using the api to create tags, and this does not automatically clear the cached list of tags, I would consider it a bug. If you are able to reproduce it in the latest version please look in the issue tracker for an open bug report, and if there isn't one, please open one.
> 3 votes

# Answer
CRM\_Core\_PseudoConstant::flush() should do it.
> 2 votes

---
Tags: api, cache
---


# Question
Title: "Empty needle" error when exporting from Advanced Search results
I get the following Warnings when export contacts after performing an advanced search:

> Blockquote Warning: strpos(): Empty needle in /home/iskcohdx/public\_html/crm/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php on line 600
>
> Blockquote Warning: Cannot modify header information - headers already sent by (output started at /home/iskcohdx/public\_html/crm/wp-content/plugins/civicrm/civicrm/CRM/Export/BAO/Export.php:600) in /home/iskcohdx/public\_html/crm/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php on line 833

What could be the cause of this and how to fix this issue? I'm using CiviCRM 4.5.3 on Wordpress.

# Answer
It's likely an issue with the code. The fastest "fix" is to hide that armless message by changing the setting. you add in your civicrm.setting.php that line:

```
ini_set("error_reporting", 0);

```

and it should avoid to show that message.

Beware that it means that you might have other errors (eg. from other modules) that will be hidden too.
> 3 votes

# Answer
This looks like a bug. Can you try to replicate it on d45.demo.civicrm.org? Please create an issue for it at issues.civicrm.org indicating if you were able to replicate it on the demo site or not. As export errors can arise because of interactions involving the field mapping configuration and / or data, it might be useful to include a screen shot showing your specific field mapping when creating the issue.
> 1 votes

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


# Question
Title: Adding custom roles to Case "Add role" function
I've tried this on a couple of instances, but if I have a Case I want to add role to, the list is restricted to the core roles that come with CiviCRM and none of my custom roles based on custom relationships show up in the list.

How can I set it up so my users can add more roles than offered?

# Answer
> 5 votes
In CiviCRM versions 4.5 and above, you can add case roles by navigating to **Administer -\> CiviCase -\> Case Types** and clicking "Add Role"

Note that roles and relationships are not precisely the same. A case client can have any relationships, but within the case, only the roles you have defined will be available.

# Answer
> 2 votes
In CiviCRM versions 4.4 and below, you need to configure the additional roles by modifying the XML file for your case type, per the documentation.

---
Tags: relationships, civicase, roles
---


# Question
Title: (Event reminder) Exclude Participant who registered after the event!
In some occasions we had some event participants who just turned up on the events without registering. A schedule reminder is already in place for registered participant, day before the event.

Now for those who registered after the event they also receives an email after. Is there a way to excluded those participants?

# Answer
The only one I can think of is to switch off the confirmation email once the event date is up? This can obviously be done manually, or you could create a little extension with a scheduled job that does this on a daily basis?
> 1 votes

---
Tags: civievent, scheduling
---


# Question
Title: Adding a Facebook Conversion Pixel Code to the contribution confirmation screen
To track the efficacy of a Facebook ad campaign, my users want to insert a Conversion Pixel to some (but NOT all) contribution confirmation pages. What's an effective way to do this?

# Answer
I ended up taking Nicholai's idea, but instead implemented it as an extension for better maintainability across upgrades - and for sharing. Folks can see the extension here: https://github.com/PalanteJon/civicrm-facebook-conversion-pixel
> 3 votes

# Answer
You could override the Thank-you smarty template. Copy the one from templates/CRM/Contribute/Form/Contribution/ThankYou.tpl. Then you could do something like this:

```
{if $contributionPageID == 20}

    <script type="text/javascript">
    {literal}

      function doFacebookStuff(){
      };

    {/literal}
    </script>
{/if}

```
> 3 votes

# Answer
In Drupal, if you use an alias for the page, you could check for that alias in a preprocess\_html hook and insert some FB Conversion Pixel javascript if it's the right alias.

Example:

```
function MYTHEME_preprocess_html(&$vars) {
  $path = drupal_get_path_alias();
    if ($path == 'special-fb-contribpage-alias') {
    drupal_add_js(drupal_get_path('theme', 'MYTHEME') . '/js/facebook-conversion-pixel.js', 'file');
  }
}

```
> 1 votes

---
Tags: civicontribute, facebook
---


# Question
Title: Are there any CiviCRM loyalty/rewards extensions available?
Has CiviCRM been extended to support a loyalty/rewards program for donors? I searched the CiviCRM forum and found this question has been asked before, but there has been no response from the community.

# Answer
> 2 votes
Short answer: there are no available extensions for loyalty or rewards for past actions.

Background / longer answer: Loyalty or rewards programs are typically used by sellers to get buyers coming back and buying more. CiviCRM is designed for not-for-profit organisations, not as a CRM for regular e-commerce sites, so there has been little effort put into this.

However, it's possible to integrate modules from the CMS to create programs along these lines.

One very specific use case: There is a CiviDiscount extension that can be used to reward people who have joined as members with discounts on events, for example.

A second very specific use case: Premiums can be used to incentivize users to make larger donations/buy more expensive memberships by allowing them to claim a gift (eg a mug or T-shirt) if they donate more than a specific amount (eg \>$100 or \>$250).

# Answer
> 3 votes
This may not be exactly what you were after, but CiviCRM does have the ability to add "premiums" to contribution pages as a reward to donors. For example, "Donate $20 and get a coffee mug".

From the book:

> **Premiums**
>
> Configure premiums, such as T-shirts or subscriptions, that you want to offer on your contribution pages:
>
> 1) Navigate to **Administer \> CiviContribute \> Premiums** (Thank-You Gifts).
>
> 2) You can edit an existing premium or click **Add Premium** to add a new one.
>
> 3) Once you edit or add a premium, you can then enter additional information: Name, Description, SKU (an optional product code), Premium Image (an optional image of the item), Minimum Contribution Amount to receive the premium, Market Value of the premium, Actual Cost, and Options (e.g., colors and sizes).
>
> 4) If you're offering a subscription or service, you can also click on the **Subscription** or **Service Settings** and define additional information here, such as Period type (e.g., Fixed or Rolling), the Fixed Period Start Day, the Duration, and the Frequency.

# Answer
> 0 votes
One option is to use the "Premiums" feature on contribution pages. This allows you to offer your donors/members different gifts or incentives when they sign up or donate. http://book.civicrm.org/user/current/contributions/setup/

---
Tags: extension
---


# Question
Title: Has anyone added discounting functionality to the 'cart' component of CiviEvent?
I am testing/trying to use CiviEvent 'shopping cart' (needs to be enabled using CiviEvent Component Settings under Administer/CiviEvent) mode of registering for events and while I am on an older version of Civi I looked at 4.6 code and it looks about the same re: Cart functionality. I have modified Cart code to allow for using CiviDiscount, if an event is configured to allow discounts - is anyone else interested in this? I will submit a patch if so. (there are other features that seem lacking in Cart, I will include a README to document)

# Answer
> 2 votes
This might an important feature for folks using Event Cart functionality. It would be great if you can submit a PR against CiviDiscount repository at

> https://github.com/dlobo/org.civicrm.module.cividiscount

# Answer
> 1 votes
Thanks very much for this. It would definitely be a useful feature, so please submit a PR.

I think the best way to share desired features is via the issue queue for the extension at https://github.com/dlobo/org.civicrm.module.cividiscount/issues. Perhaps separate each suggestion into a different issue. That will make it easier to manage the suggestion, and to cite the issue when submitting a PR implementing a new feature.

---
Tags: civievent
---


title: How Do You Copy Live To Sandbox?

text:
# Question
Title: How Do You Copy Live To Sandbox?
Turning the normal progression of development on it's head, what I am looking to do is take a copy of a production site and put it on a sandbox.

I am currently using D 7.36 and Civi 4.4.14

My intention is to take a copy of the working site from the live server and place on a local XAMPP so that I can experiment with ideas and test things such as how to implement Eileen's Permissions as ACLs 1.2 branch - specifically I am not sure how to install Entity Settings as it talks about registrations and PHP ... I would rather not do that on a live server.

I am not too fussed about taking the live contact and organisation data because I would create a large number of test contacts to do all that.

The problem is that our developer also included a custom member management module, so I want to ensure that all the right things are copied across so that it will work.

I did search through the usual sources, but I can to the conclusion that lots of them require disabling CiviCRM, I was of the opinion that I am likely to break it by doing that!

# Answer
> 1 votes
Theoretically, CiviCRM can easily be migrated. In my experience though, following the recommended instructions often runs into hiccups. For this reason, I'll share my alternate method for local testing.

Since it's not hard to mirror server setups for local testing, it's usually good enough and easy to do just that. For example, if the website is at http://example.com and the base path is at /var/www/example.com/htdocs, just setup your virtual hosting and hosts file to handle that url and base path.

I won't give instructions on how to setup virtual hosting, because those are very OS dependent. So if you'd like to know how to setup virtual hosting, good article are easily found in google searches.

# Answer
> 0 votes
I assume by "usual sources" you mean this? http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location

I know it says to disable CiviCRM. I usually skip that step, personally. I would proceed with the instructions in the link above and edit your question with more detail if you have any trouble.

---
Tags: drupal, debugging
---


# Question
Title: "nativecode=1060 ** Duplicate column name 'created_id'" when upgrading from 4.4.14 to 4.6.2
Keep getting this error when Upgrading from 4.4.14 to 4.6.2 directly. I am upgrading based on the civicrm documentation.

Seems like civicm\_mailing\_abtest has some error. But I have checked I did not have this table in 4.4 version and it was created during the upgrade process.

How to deal with it?

DB Error: unknown error in unknown on line unknown nativecode=1060 \** Duplicate column name 'created\_id' ALTER TABLE civicrm\_mailing\_abtest ADD COLUMN `created_id` int unsigned

# Answer
> 2 votes
That looks very strange error, it appears to be complaining that the created\_id column is being created twice, However looking through the upgrade sql files on the github repo, I can only see the one reference to creating created\_id column on that table and that is in the 4.6alpha7.sql file. I do note that it came from this JIRA case https://issues.civicrm.org/jira/browse/CRM-15970. Perhaps you should raise it as a bug in the Jira system but also would recommend looking through the upgrade sql files on your system to see if they match what is in the git repo

---
Tags: upgrade, civicrm-home
---


# Question
Title: Does Price Set for Memberships also allow for Recurring on a Donation
Goal is that a Membership page will have a Price Set that offers Membership (not auto renew) plus 'other amount' that would have option of being set as recurring. I read http://wiki.civicrm.org/confluence/display/CRM/Price+Sets+for+Recurring+Contributions but it doesn't leave me any wiser (yet). I set up a Price Set on demo here http://d46.demo.civicrm.org/civicrm/admin/price/field?reset=1&action=browse&sid=11&new=1 but see no option on the Donation price field to make it recurring. I confirmed that there is no such option either when I set up a Price Set for a Contribution page, so conclude that for Donations, it uses the 'recurring' settings from the Contribution page settings, but that if we use a Price Set for Memberships, we have to turn off "Contribution Amounts section enabled" and hence concluding that there is no such an option for a Membership page. Is there a way to to this that I have missed?

# Answer
I think this is resolved in our case by not using Price Set now that I twigged that the 'financial type' setting on the Contribution page ONLY affects the Donations, while it is the 'financial type' setting on the Membership Type that takes care of the other.

> If you are using this contribution page for membership signup and renewals, the financial type configured in the membership type settings will be used when recording the membership payment. The financial type selected here will only be used if you are also collecting additional contributions (as configured on the Membership Settings page).

So the outcome is

* recurring donations work
* donations get recorded as 'donation' financial type
* memberships get recorded as 'membership' financial type
> 3 votes

---
Tags: contributions, civimember, price-sets, recurring-contributions
---


# Question
Title: How can I set default active dashlets for all users globally?
Can I create a default dashboard setup (active dashlets and arrangement) for all users?

This would greatly improve the usability of the Dashboard, since the dashlets relevant to the use-case of the organization could be configured by an admin and users would see relevant data on their home screen instead of "CiviCRM News" or just this:

> Welcome to your Home Dashboard Your dashboard provides a one-screen view of the data that's most important to you. Graphical or tabular data is pulled from the reports you select, and is displayed in 'dashlets' (sections of the dashboard).

# Answer
The DefaultDashlets CiviCRM extension creates a settings page that allows administrators to define the active dashlets for new users based on group membership.

Keep in mind it was born some hours ago as part of a CiviCRM developer training exercise. You rock David Hayes!
> 4 votes

# Answer
You don't need to use SQL! There is an API and a hook for this, assuming you're on Civi 4.4 or higher.

Check out the DashboardContact API, especially if you're working with contacts that have already been created.

If you're mostly concerned about new users, I'd recommend exploring hook\_civicrm\_dashboard\_defaults.
> 3 votes

# Answer
I'm not aware of a front-end way to set a default, but you can use a SQL query to copy the dashboard setup from your "template" contact to new users as you create them. Below is an example:

```
insert into civicrm_dashboard_contact (
    dashboard_id,
    contact_id,
    column_no,
    is_minimized,
    is_fullscreen,
    is_active,
    weight,
    content,
    created_date)
select
    dashboard_id,
    35, -- replace with new contact id
    column_no,
    is_minimized,
    is_fullscreen,
    is_active,
    weight,
    content,
    NOW()
from
    civicrm_dashboard_contact
where
    contact_id = 1 -- replace with contact id whose dashboard you want to copy
;

```

If you use a certain contact type/group/tag to define back office users, you can join to the appropriate table and do it all at once rather than one contact at a time.
> 1 votes

---
Tags: dashboard, ux, default-settings
---


# Question
Title: Create a "Not Attending" Option for CiviEvent
I've been getting complaints from my invitees that there's no way to indicate that they won't be attending. Is there someway to activate or build this option?

# Answer
You can create a custom "Participant Status" at **civicrm/admin/participant\_status** (via the menu at **Administer \> CiviEvent \> Participant Statuses**).

I don't think there is a default way to expose the participant status on a core event registration form (they are typically for admins in the backend only), so you may consider using a separate workflow with a tag or group for those that are not attending, as noted by @Nicholai below. You might even be able to use Rules to automatically change their status to the new one you created based on the tag/group they are in.

However, if you are using Drupal with Webform-CiviCRM for the registration, it would be a nice clean solution to expose this new participant status on the form (allowing "Registered" or "Not Attending" as choices), and then use Webform's Conditional functionality to show or hide event registration fields as appropriate. This way they can indicate they are not attending without having to see/fill out any custom registration fields on the form.
> 2 votes

# Answer
This seems an inventive workaround but would imply the user who doesn't want to attend the event still has to fill in all required fields of the registration form (most of those very specifically and only relevant for people who will attend).

The main use case for declining an 'invitation' would be in case someone is invited with a link to the registration form and a checksum token. A simple button/link to inform the event host with either a maybe, a no or a registration (a yes) would definitely mature the event registration of CiviCRM! A special profile with fields for people who choose maybe/no would preferably then be selectable from the even settings page.
> 2 votes

# Answer
Consider keeping the invitation and the registration as different concepts in your workflow, as invitees aren't really event participants if they don't attend. When you email invitees, link them to a Profile page containing options for two groups (I will attend / I will not attend). They can check the desired group, and you can track and contact them more easily.

You could maybe even play with the CiviMail checksum links to have your options be direct links within the email, which would add the contact to the appropriate group in one click (depending on whether you use the double opt-in feature of groups).
> 2 votes

---
Tags: civievent
---


# Question
Title: How to let CiviCRM not send a confirmation to a new Mailing Group member?
I added Groups to a Profile for a Contribution Page.

The public Mailing Group is nicely shown on the Contribution Page. Can I prevent CiviCRM from sending a confirmation email?

It's on a Donation Contribution page with a IPN Payment Provider, so I can not use a webform for this page.

# Answer
I think you can check this on the contribution page? There is an option there:
> 1 votes

---
Tags: civimail, profile
---


# Question
Title: Can I create a custom System Workflow Message for a particular Contribution Page?
I need to create a custom system workflow message for

```
Contributions - Receipt (on-line)

```

that will be used instead of the default template when a particular contribution page is used.

I already know about the `Receipt` tab of the contribution page wizard. There I can prepend text to the receipt that is unique to that contribution page.

But I need to fuss with the template itself. I know about the System Workflow Messages at: `civicrm/admin/messageTemplates`. The problem there is that the change applies to all contribution receipts. I'm looking to change the template only for a particular contribution page.

I'm using CiviCRM 4.5.8 on Drupal 7.36.

Thanks.

# Answer
> 7 votes
As I learned from @Nicholai in a previous (unrelated) thread, you can override these templates with some pretty easy logic to add something custom to a single page. For example:

> {if $contributionPageID == 20}
>
> ```
> {* whatever you need to do on this page *}
>
> ```
>
> {/if}

I assume this would work in this case, too. If you try it and it works, let us know!

---
Tags: receipts, smarty, custom-templates, system-workflow-messages
---


# Question
Title: Changing directory permissions to get Cron to work via drush
Here's my core question: **Is it ok to allow full write access to Users, Groups, and Others for the directory sites/default/files/civicrm/templates\_c/en\_US ?**

Background: I have been running CiviCRM for a while now without getting Cron set up to automatically run (we run it manually, which is terrible). I'm trying to get this set up finally.

I'd like to run it using Drush, because it does not use a username or password. This was suggested in the wiki on scheduled jobs.

The following drush command works from the command line, but only if I set the permissions of the above mentioned en\_US directory as "777", or "users, groups, and others can read, write, and execute."

> path/to/drush -u 1 -r path/to/drupal -l www.example.org civicrm-api job.execute auth=0 -y

If I run this command with the original permissions setting, "755" (drwxr-xr-x) then I get the error message "CiviCRM does not have permission to write temp files in sites/default/files/civicrm/templates\_c/en\_US/, ExitingDrush command terminated abnormally due to an unrecoverable error." The owner of the directory is listed as "daemon".

Would it be a terrible thing to allow this directory to be writable by anyone?

CiviCRM 4.5.4 Drupal 7

# Answer
To answer non-programmatically for non-coders, the CiviCRM Cron module has been a life saver for us. This will run cron for Civi whenever Drupal's cron runs. Setup is minimal, just needs user, password and sitekey. This allowed me to skirt coding cron.

https://www.drupal.org/project/civicrm\_cron
> 2 votes

---
Tags: drupal, cron-job
---


# Question
Title: Can you use CiviMail headers and footers on System Workflow Messages?
CiviMail has an option to insert headers and footers at the top and bottom of a message (**Mailings \> Headers, Footers and Automated Messages**). Is it possible to use these as a default for all "*System Workflow Messages*" Message Templates (**Mailings \> Message Templates**).

The default templates are necessarily quite plain, and while I know you can edit each template individually, it would save time to be able to insert a common header/logo on all system templates. Changes to the header would apply to all templates at once, and future upgrade-related improvements to the message templates wouldn't require reverting and re-editing if all you had done was add the logo at the top.

If there is a way to do this, I am not familiar, so I realize this may be a feature request. If so, I'd appreciate tips on where this change would need to happen and could add it to my (ever-growing) rainy-day project list.

# Answer
This question was asked here:

How can I include a custom template file in an email template using smarty?

It has been answered with quite a few specific places to make the needed changes
> 0 votes

---
Tags: civimail, message-templates, system-workflow-messages, header-footer
---


# Question
Title: Is there a way to see the actual change performed by the entry in the change log?
The change log as it stands seems pretty pointless if you only can see that someone has changed something (anything) for a contact.

Is there any way to see *what* was changed?

# Answer
> 7 votes
You can switch on the advanced logging in the Administer/System Settings/Misc, that will show you far more detailed logging. I expect it will impact your performance, so it is probably worthwhile to test it first.

---
Tags: contacts, logs
---


# Question
Title: Can one change the order of Groups shown on a profile?
I would like to change the order of the set of groups that are displayed to a user. In my case, I'm working with Mailing List groups, and all five are set to "Public Pages" visibility. If they are shown on a profile using the "Group(s)" field, they come up in alphabetical order.

The same ordering default is exhibited on the Mailing List Subscription page, /civicrm/mailing/subscribe.

My goal here is to create a mailing list preferences profile that users would get to through a checksum placed in emails sent to them by CiviMail. In my case, the default alphabetized order creates an awkward presentation for how my organization wants to relate to our community.

I'm currently running CiviCRM version 4.5.4 on Drupal 7.

# Answer
> 7 votes
To extend on peterdnz answer:

On drupal, you can install webform and webform\_civicrm modules and build the form you want.

Once you have enabled civicrm on that form, you can choose the various fields existing in civicrm (first or last name, email... and groups)

For the list of groups, you can then chose which one(s) you want to display and in which order. You can even change the name of each group (on that form) without having to change the name of the group, so you can use shortcuts as you might call the group differently within the team and with your visitors.

It's fairly intuitive once you get into the logic of having to take the fields as available in civicrm and add them to the form (conceptually similar to profiles, but the interface is IMO clearer)

# Answer
> 6 votes
I agree that a Webform is the best solution if you are using Drupal, but to answer the exact question that was asked:

CiviCRM profiles do not currently have a UI to alter the display of groups on a form. Doing so would require a little bit of custom code.

* If you are more comfortable with PHP, use hook\_civicrm\_buildForm to modify the options in that form element.
* If you prefer javascript, use jQuery to modify the order of checkboxes.
* If you simply need to hide some options, the easiest was is to use css to set `display:none`.

# Answer
> 6 votes
For anyone not using Drupal and relying on the standard /civicrm/mailing/subscribe page, you can also just add a number to the front of your group name to order them as you want. So

* Event updates
* General newsletter
* Service news

becomes ...

1. General newsletter
2. Service news
3. Event updates

No coding skills required! :)

Heather O.

---
Tags: civimail, profile, groups
---


# Question
Title: Does the email address always have to be in the donation section on a Contribution Form?
I tried to add an email address in the "Name and Address" profile, hoping it would remove the email address from up in the donation amounts area (keeping all the contact info in one section). Instead it deleted the email address field from the "Name and Address" profile.

Can I move that email address down somehow?

# Answer
> 3 votes
For contribution forms yes. For event registration pages, the code has been modified to detect if an email address is being recorded in the profile and if so to remove it.

Might be easiest to take a look at the event registration code and see if you can port the relevant code to the contribution side of things

---
Tags: civicontribute, profile
---


# Question
Title: Limit the list of contacts to search when assigning a case role
When I assign a case role to someone it seems like CiviCRM allows/requires me to search through the whole contact database. As there might be many matches for a search string it takes extra time to ensure that the one I assign is really the one I intended.

In my organization only a few persons are actually possible targets for such an assignment, as I assume is the case in most constituents, thus only a few in the contact database should be possible to select on e.g. assignment of case responsible.

Am I missing some configuration to make this happen? I know about permissions (which I so far have had no need for, "normal" contacts don't access our CiviCRM), are they related to this?

On essence, I want the contacts to be searched when assigning a case role to be limited, e.g by a group, so a match can be found quicker and more unambiguous. How do I do that?

# Answer
> 1 votes
The contact selector is an EntityRef field. If you'd like to "enforce" a certain group or other filter on this field, you can do so with a small amount of custom code on your site.

Modifying a form in CiviCRM depends on how the form is generated. Because this form is written in javascript, I recommend adding a custom js file to the CiviCase dashboard screen. It simply needs to add data to the two fields (`edit_role_contact_id` and `add_role_contact_id`) that specifies the group\_id of your group.

You can either use a custom module/plugin on your website or create an extension to add your javascript file using CRM\_Core\_Resources from a hook. hook\_civicrm\_caseSummary might be a good one, you wouldn't be using it for exactly its intended purpose but it fires on the right screen.

# Answer
> 2 votes
As of CiviCRM version 4.6 the contact autocomplete (aka entityRef) field provides the sort of filters you are requesting.

When the autocomplete box opens you'll see a "Refine search..." option, which allows you to limit results by group, tag, contact type, and other filters.

---
Tags: civicase
---


title: Restoring groups and linked contacts

text:
# Question
Title: Restoring groups and linked contacts
50 groups were deleted by mistake. Please don't ask how.

So from a 2 weeks old backup, we're able to extract a CSV from civicrm\_group and civicrm\_group\_contact

group\_id, name, contact\_id, email

We would like to reimport the groups and their assignation to contacts. The contacts are already in the system normally. We would not want duplicate users

Afraid of simply going to the civicrm\_group\_contact table and just filling it through phpmyadmin

Any tip? Thanks!

# Answer
If you are confident the users are all there, you could do an import with the CSV dump you mentioned, using the **Group ID** and **Contact ID**.

1) Batch import the groups using the API csv Import module.

2) Assuming the Group IDs could be imported and match up, you could import the users via their internal IDs. Instead of selecting "Group" for the *Entity To Import* (as in step 1), you can import "GroupContact" and match up the Group ID field and the Contact ID field.
> 2 votes

---
Tags: groups, import
---


# Question
Title: How can people view which mailing lists they're subscribed to?
We have a number of mailing lists for various topics, and sometimes people aren't sure which ones they've subscribed to. I would like to send a newsletter to our main mailing list (group) with an option to go to a form (profile) that lists ALL the mailing lists/groups the person is included in. Ideally the form would allow them to unsubscribe from any they don't want to be in as well.

Please help!

# Answer
Have a look at the CiviCRM Tokens wiki page: http://wiki.civicrm.org/confluence/display/CRMDOC/Tokens

I think the one you'll be most interested in is {action.subscribeUrl} which provides a link to view and subscribe to any public mailing lists.

You could also build a profile with the groups field in it and sent it out via a checksum token. This will link the details to their record and allow them to update. This is useful if you want them to be able to update other information at the same time.

Full details on the checksum token at the bottom of the wiki page.
> 3 votes

# Answer
Depends on how you want that a user sees this. If you mean by user someone who could login into CiviCRM and see his/her own contact summary then they could see which groups they are part of.

If you mean by user the recipient of a mass mailing you could use tokens as explaind by Heather O.

If you mean by user someone who could login into drupal/wordpress/joomla but doesn't have access to CiviCRM then you could use your CMS system to build a custom profile page. In Drupal you could use Drupal views for this task.
> 1 votes

# Answer
If your groups are Public then directing people to civicrm/mailing/subscribe?reset=1 should show them a form where people can sign up (or unsubscribe) to any of your (public) mailinglists

or perhaps civicrm/?page=CiviCRM&q=civicrm/mailing/subscribe&reset=1 for wordpress
> 1 votes

---
Tags: civimail, groups
---


title: Changing the activity dashlet

text:
# Question
Title: Changing the activity dashlet
CiviCRM 4.5.6. (trouble updating at this time) Drupal 7.34

I am just beginning to explore customizing CiviCRM. I have a lot of questions. Any answers to the following question will give me a better foundation upon which to explore my other questions.

On the dashboard, the activity dashlet shows the date but not the time of day.

What php or template file do I change to make the time part show? The time does show when I do a search for activities.

Also, what do I change to make the time the first column in the report?

I have spent hours studying the documentation but failed to make some kind of connection between that information and my needs.

Thanks in advance for any help you can provide.

# Answer
> 1 votes
An excellent question - the Advanced Date Settings don't seem to affect the report.

You can try to make it a type of "timestamp" in civiroot/CRM/Report/Form/Activity.php. You might also want to build your report in Views. If you choose this approach, you'll want to install the Drupal Views in CiviCRM Dashlets module

---
Tags: search
---


# Question
Title: Custom fields do not appear in profiles for anonymous users
I am running 4.5.2 Civicrm on a Drupal 7 installation and I have the following issue:

I have created a couple of donnor's pages with Civicrm contribute pages. In this pages I have included a couple of customized fields but **these fields are not being shown to users that are not logged in** (as an admin I can see them, but not as an anonymus user). Can you give a clue as to where the problem may be?

This have been my steps:

* First, add the custom fields to the contacts tab using the Admin \> Screen and Custom Fields \> Custom Fields. (Fields added to Contacts tab)
* Then, added to the profile that is going to be used on the Contribution Page
* Then create and make public the contribution page.

I know that there can be a number of setup problems at any of these steps, but since it is quite hard to give all the specs, I'd like to get suggestions as to where start looking and I will update the question with more info. Thanks in advance

# Answer
Our developer found the answer. It was an ACL problem. We fixed this adding a ACL where all roles can edit custom groups of fields.
> 5 votes

# Answer
You can also check your Drupal permissions. (The path is admin/people/permissions.)

If you are happy for all custom data fields to be available to the public, look for the CiviCRM permission "CiviCRM: access all custom data" and make this available to anonymous users as well as authenticated.

Heather.
> 2 votes

# Answer
Also found an easier way to do this. In the profile, you can set permissions to each field. Didn't realize this at first because both default and custom fields had the same permissions, and part of them were visible to not registered users and part of them --custom fields--were not.

Anyway, problem solved.
> 1 votes

---
Tags: profile, contributions, contribution-page
---


# Question
Title: Does the core Moneris payment processor work?
I have a US-based org that is exploring using Moneris with a CiviCRM contribution page. The core Moneris payment processor seems a little rough -- is anyone using it/does it work? The Wiki page for Moneris configuration mentions changes to the mpgClasses.php file but the link to the patch is non-existent. Are the required changes documented anywhere else?

I also notice there is a newer "replacement version" of the core files in process (by Alan Dixon), but apparently recurring is still "fragile" and it is not working for the US (yet). Will this version end up in core?

# Answer
> 5 votes
Our general strategy with payment processors is to get most of them out of core and into extensions, where they can be better maintained, so no, this is not going back into core. In fact, it's because Moneris didn't ever respond to the license questions about their mpgClasses.php file that it started falling out of core ...

I'd be happy to work with you to get the US code working. Contact me via the form:

http://blackflysolutions.ca/contact

with details about your needs and I can update my extension to support US$.

Alternatively - if your organization is a non-profit, I'd also recommend you compare iATS Payments services, they tend to be better (less expensive, more features, better service).

# Answer
> 1 votes
There is a discussion within the group about payment processors and the future. We are encouraging any new development to happen outside of core and in an extension. I suspect there might be some changes coming to the payment processor architecture from work being done at the colorado sprint (happening right now).

I dont think there has been any change with moneris recently. I've asked alan dixon to update the status of the code base here.

---
Tags: payment-processor, evaluating-civicrm, moneris
---


# Question
Title: How to match Activities to Contacts during import?
We recently distributed supplies to many of our members and used a GoogleForm to create a .csv spreadsheet to track the number of supplies given to each member. We imported the names of any new members into CiviCRM.

We would like to import the activities, but we are having trouble assigning the activities to the appropriate contact.

We have separate columns for first name, last name, address, but don't have emails for all contacts, and the .csv does not have a Contact ID for each contact. How do we import the activities? We could also just create one activity and batch update the details, but in every case we can't seem to figure out how to get all the contacts assigned to the activity. It's about 300 contacts, so we'd rather not enter it manually!

# Answer
You might want to reconsider importing your data as activities, which tend to turn into a bit of a junk-drawer of stuff. Maybe a custom field, either of the member or the contact?
> 0 votes

# Answer
Export the contacts with their contact ID, first name and last name. (Hopefully you have a way of searching for just the new contacts, but if not, exporting a larger group of contacts will be OK)

Open each CSV in something like Excel or Calc and create a combined "First Last name column in both. You can then use vlookup (in Excel) or the equivalent in Calc to add the contact id to the list of activites you want to import.
> 5 votes

---
Tags: import, activities
---


# Question
Title: Pledge reminder emails sending out invalid payment links
Periodically, we have people complaining that their pledge reminder email has a link that doesn't work. They get the "0 Error" with text "Sorry but we are not able to provide this at the moment." If I edit the pledge and change something in the Payment Reminders section, the next email they receive will contain a link that is exactly the same but will have a different number after "cs=" and it will then work as it should.

This is in CiviCRM 4.4.5 but I can't find any issues in the issue tracker that seem to be related.

# Answer
It might be an issue about the checksum that has a lifetime of (by default( 7 days. I suppose that's the ones taking more than a week that experience that problem?

you can set a longer lifetime in the admin misc setting /civicrm/admin/setting/misc?reset=1
> 0 votes

---
Tags: civicontribute, pledges
---


# Question
Title: Unable to configure CiviCRM on Wordpress
Wordpress 4.2
CiviCRM 4.6

I've reached the point where I am running the CiviCRM Installer. I get nothing but a blank screen

# Answer
> 2 votes
Turns out that the hosting service has PHP 5.2.17 installed and this version of CiviCRM requires 5.3

---
Tags: wordpress, installation
---


title: How to manage a scholarship fund?

text:
# Question
Title: How to manage a scholarship fund?
I'm on a project where the organization receives corporate donations to offer scholarships for their summer arts camps. When eligible students are found, their event registrations are paid via scholarship. For the donation side, it will come in as a Check or other pay type, and we'll use a "Scholarship" Financial Type. For distributing that money, I think a Payment Instrument of "Scholarship" is best, as the scholarships could be full or partial, with the remainder paid by other means.

So doing this means I can track how the money comes in and is allocated, and I'm guessing the bookkeeper will be keeping an eye on the balance. However I'm a bit stuck accounting-wise for how to present it to her. What kind of Financial Account Type makes sense to go with my new Financial Type and Payment Instrument?

Does this method even make sense, or should I consider using CiviDiscount instead?

# Answer
> 1 votes
At Administer \> CiviContribute \> Financial Types create a financial type of 'Scholarship grant revenue' to record the check. This will also create a revenue financial account with the same name that should be edited to have the correct account code etc. Create a financial account of 'Scholarships disbursed' to record the scholarship payments sent out at Administer \> CiviContribute Financial Accounts, make it an Expense account, and make other relevant changes such as entering the Account Code.

Ensure the existing Accounts Payable account or another new one is correctly configured with the appropriate account code and other details. Also optionally ensure the bank account from which checks to the scholarship winners will be drawn is correctly configured with its account code, etc.

Go to Financial Types and create a Financial Type also with the name of Scholarships disbursed. Assign the similarly named Financial Account to it as an Expense Account, and the Accounts Payable and optionally the Checking Account as the asset account.

Use CiviGrant to create Grants for the Scholarship recipients.

If desired, install and use the Grant Applicaton Pages extension to accept applications from students.

If desired, install and use the Grant Programs extension to assist in evaluating applications and communicating with applicants, and optionally printing checks.

Export all financial transactions associated with recieving the original check, allocating the grants, and paying the grants at Contributions \> Financial Batches.

---
Tags: civicontribute, accounting
---


title: CiviCRM and Apache Solr - Drupal 7

text:
# Question
Title: CiviCRM and Apache Solr - Drupal 7
I have CiviCRm installed Drupal 7 and Apache Solr Api.

My search configuration says that the site is 100% indexed, however there are CiviCRM events that do not show up in a search. For example, we had an event in the past titled "Mom You're Incredible". A search for "mom" or "mom you're incredible" shows no results.

Does Apache Solr index CiviCRM data, or is there a special procedure that has to be completed. I have CiviCRM in a separate database (MySQL) as recommended on the CiviCRM site.

# Answer
The apache solr module by default does not index civicrm tables. There is an integration with this module that indexes civicrm attachments:

https://github.com/civicrm/apachesolr\_civiAttachments

This was work done for the New York State Senate. The next steps would be to get other civicrm tables indexed via this or other similar modules.

You might want to check the Drupal Entity integration. This might make integrating with solr a lot easier

If you do make progress on this, please do share your work
> 2 votes

---
Tags: drupal, search
---


# Question
Title: How to use a CiviCRM generated form in an Android App
I'm programming an Android App for a company, and they use CiviCRM for subscribing to newsletters. The form is available to anyone online, but I have to add the form in an android app. On the android app, i use a button "Send", who should send the form as the online form. Then the form is recorded in a database using CiviCRM. In order to do that, I need to create a JSON object, and send the request using Ajax. But I have no idea of what should be the url of the ajax request, and what should be the variables I should use.

The form is composed of three parts: a select, four text inputs and two checkbox sets.

# Answer
You might want to check the CiviMobile Extension:

https://civicrm.org/extensions/civimobile

and see how things are done in that app. Might help give you a better direction for the app.

In general, you might want to first design / develop what you want to do with CiviCRM first before deciding how to do it in an app. Your use case seems to be an instance of CiviCRM profiles.
> 1 votes

# Answer
Visit the API Explorer (**Help menu \> Developer \> API Explorer**) on your CiviCRM installation. You can use it to generate both the set of variables you can use, and view the REST API URL specific to your installation.

If your form submits fields that are part of different entities (an entity generally maps to a SQL table), start with getting it to work with a single entity. Once you've got that handled, you can do API chaining to avoid multiple REST calls.
> 1 votes

---
Tags: api, email, contacts, ajax
---


# Question
Title: How can I show contacts that DO NOT have an activity of type X in last Y months?
I'd like to be able to track which contacts details have been confirmed every so often. Every so often, we'll go through our contacts and confirm that their address, email address, phone numbers, etc are still accurate.

I'm thinking about using an activity type to accomplish this. I'd call it "Confirm contact details" or something and when I confirm that a contact's information is correct, I could create an activity on that contact. This would have let me know when the contact's information was last checked, and by who.

This would be ideal, except that I can't figure out how to generate a report showing only those contacts whose information *hasn't* been confirmed in so many months.

Is there a way to find contacts that do not have an activity of type "Confirm contact details" in the last Y months?

# Answer
The process is slightly roundabout:

* Create a smart group that captures all contacts called "All Contacts".
* Create a second smart group consisting of people who have the activity type "Confirm Contact Details".
* Use the "Include/Exclude Search" (**Search menu \> Custom Searches**) to include the first smart group and exclude the second smart group.

Once you've done this, you can save it as a smart group for one-step searches moving forward.
> 11 votes

# Answer
If you are using Drupal you could do this by sending out a checksum link to the webform, and in the webform settings have an Activity that will set to Completed when they submit the form. Then you can simply check in CiviCRM which contacts have an Activity that is Scheduled v Completed.

Otherwise, you could set up a custom CiviCRM profile and send out a checksum link to that profile, and in the Adv Settings of the Profile add anyone who submits the Profile to a specific Group. And then do as Jon suggests above.
> 1 votes

---
Tags: contacts, activities
---


# Question
Title: How can I display variables for templates other than the top/main one?
The popup window enabled at civicrm/admin/setting/debug?reset=1 contains only the top level Smarty template variables. How can I see the variables for a lower level included Smarty template?

# Answer
To view debug output for the main page template, add `&smartyDebug=1` to the url of your page.

To view debug output in a nested template, add the tag `{debug}` in the template itself.

Note that only users with the permission "view debug output" will be able to see debug info.
> 3 votes

# Answer
There is only one smarty template object and hence only one scope. Hence the variables that are displayed at the top level include the variables that are displayed at all levels.

You can optionally rename a variable and/or send in a constant to the included templates, but besides that its all one scope. You should think of template inclusion more as a macro rather than a function call.
> 0 votes

---
Tags: debugging, smarty
---


# Question
Title: Can't edit or create Custom Search options via front end?
I'm a little confused as to whether I should post likely bug reports here or on the forum since the top of the forum indicates that bug reports should still be there, but the Using CiviCRM boards are marked as deprecated...let me know if this is wrong!

On my Joomla install, confirmed on sandbox:

I go to Administer-\>System Settings-\>Option Groups then scrolling down to Custom Search and click Options. I try to edit an existing option or add a new one. When I click Save, I get the error "Value is a required field."

I assume the form should display the Value field as many other forms do. Or if it's not meant to be user editable, it should be a hidden field and submit invisibly with the rest of the form.

I can work around this with direct sql queries as described at http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Custom-Search+Extension

# Answer
This is a known reported bug, please check https://issues.civicrm.org/jira/browse/CRM-16254 and was fixed for 4.6.1

I would recommend upgrade to latest stable 4.6.2.
> 1 votes

---
Tags: custom-search
---


# Question
Title: How to delete "Not you or want to join..for a different person"?
I am a newbie to CiviCRM but have just managed to upgrade civicrm wordpress from 4.5.8 to 4.6.2.

On my membership contribution page, there is now the following entry at the beginning of the text "Welcome Mr. XXX. (Not Mr. XXX, or want to do this for a different person?). This text wasn't there before. After clicking on the link, the user then gets taken to another page where they can enter details for the other person. After entering a few details, other members personal details including names, phone numbers, addresses etc begin to emerge which is not good from a security point of view.

How do I turn off the facility to accept payment for a different person please?

Thanks

Peter

# Answer
> 3 votes
I think what you see when you have "other members personal details" that emerge is either because they are stored by your browser (so civicrm isn't involved, it's a browser feature) or because you are logged in as a user that has the right to see other members.

Try doing it without being logged in (eg. using the anonymous mode of your browser), you will see that civicrm doesn't show private information to anonymous visitors

---
Tags: wordpress, civimember, contribution-page
---


# Question
Title: How do I create a Webform that will open a case and assign case role
I'm trying to set up a webform to open a case and assign a case role.

3 contacts: Source, Client, Case Coordinator

The open case part works great, but if I add the Case Coordinator relationship, it creates the relationship outside of the case.

If I add another activity (the first one is open case) and use assign case role, I don't get the option to choose which contact to use.

Any guidance?

# Answer
> 4 votes
I setup three contacts, all with just first and last name for simplicity sake. Here is a screen shot of the case setup for Webform-CiviCRM 7x.4.10.

I haven't setup an activity to also be created when the form is submitted.

When the form is submitted, it creates the client, source contact and case coordinator. Then creates the case with the client as the client and the case coordinator as the case manager

Note that it does also create the relationship between the client and the coordinator outside the case in addition to inside the case. The rationale here is that if the client has more than one case, it would be useful to know who the other case coordinators for that client are. This relationship will be automatically pulled into the Other Roles fieldset of subsequent case(s).

Joseph

# Answer
> 0 votes
That is weird, we are doing this pretty often in our project. But I am not working on the Webforms, let me do a quick check on one. In one of our webforms I see a Case Manager field? (see attached print)

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


# Question
Title: Strength testing password used to create user account
Is there a way to control the minimum strength of the password required when a user creates a "User record" from the actions menu on a contact record. In Drupal I have been able to do it via using the password\_strength module and looking at using the password\_policy module

Anyone got any thoughts?

Cheers

Also my system is CiviCRM 4.4.13, Drupal 7.35

# Answer
Seems like CiviCRM might not be calling the right functions within Drupal (which trigger hook invocation that modules like password\_strength or password\_policy implement.

Would be good if we can adapt Civi's code to do the right thing. The user/password creation for drupal is isolated to the file:

CRM/Utils/System/Drupal.php

Check the functions createUser and checkUserNameEmailExists
> 1 votes

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


# Question
Title: Change Receipt Email Title: Template, Localisation File or Somewhere Else?
We have a different title for the (pay later) offline receipt contribution email (civiContribute). The first email with the data necessary to make the payment has a title saying something and the payment confirmation email (sent afterwards) title says something else. I do remember this having been changed by us. However I cannot remember or find where. We would like to change the first email title again, in order to say something else.

I've checked the system workflow message templates and the localisation files at transifex and the change does not seem to have been done there. Is there a translation file for tokens? And if so, where can it be found?

Thank you.

# Answer
> 1 votes
Normally this would be done in the System Workflow message templates - you can change both the message subject and text there, as well as adding more extensive customization using Smarty tags. So it's odd that it's not showing there...

One other option I can think of is that you can change certain pieces of text globally using the Word Replacements feature (Administer \> Customize Data & Screens \> Word Replacements. So perhaps if there was a word or phrase that you changed not only for the receipt titles but anywhere it was used on the site, you might find it there?

---
Tags: civicontribute, localisation
---


# Question
Title: What are best practices for bad postal addresses?
I work with a number of organizations that do a lot of outreach via postal mail. What is the best way to handle the bad addresses when returned mail is received? I do not want to simply delete the address as there may be a need to easily reference it in the future (for NCOA updates or to avoid re-adding it from another source).

There doesn't seem to be a way to simply mark an address as bad or inactive like the On Hold field for emails. One idea I had would be to just use a new Address Location Type but I'm wondering if there are other approaches.

# Answer
I think a location type of something like "Rejected" will give you great flexibility. If you want to get a bit more elaborate, combine the location type with a custom field that tracks the reason for nondelivery.

By using a location type, it simplifies searching, exporting, and importing when you want to run those addresses through NCOA or have a user work through a spreadsheet of bad addresses. When good ones are found and it's time to import, use the API csv Import GUI extension so that you can overwrite the address records, change their location type, and wipe the custom field in one pass.
> 9 votes

# Answer
I would second Erik's suggestion of adding an "on hold" or "bad address" property to postal mail addresses, similar to what civicrm has for email address.

The "invalid postal address" scenario is common enough, and this has come up a few times, that a generic solution is definitely worth it and avoid orgs that do a fair amount of mailings work around this. I would structure this similar to the "on hold" for email addresses, and then have the mailing label and other workflows respect the property

Integrating this with the USPS (or other providers) address cleanup/validation would make it even better
> 5 votes

# Answer
I guess I would add an 'on hold' custom field to the Address entity?
> 3 votes

# Answer
RE: Lobo's answer. We've (Palante) written an extension that adds a Fundraising address flag, based on the Primary address flag, which could be repurposed for this. Though without knowing all the use cases, I can think there might be differences, one of which is you can't have more than one fundraising address but you might have more than one bad address. We'll be adding this extension to the forthcoming experimental extension list, so it will be available soon.
> 2 votes

# Answer
The approach I would take is as follows:

Firstly I would create a group for contacts where mail to the postal address has been returned as undeliverable for one reason or another.

When mail gets returned the contact gets added to the group. The group can then be excluded form further mailing attempts to reduce your mailing costs.

You can then focus on contacting the person or organisation involved via other channels (phone, email) to get a correct address from them.

When you have a correct address you can edit their record and remove them from the group so that they then get included in future mailings.
> 1 votes

---
Tags: 4.6.0, contacts, addresses
---


# Question
Title: In which table is Activity assignee contact information stored in mysql?
I'm looking for the table in which Activity assignee contact information is stored in mysql.

# Answer
> 3 votes
In most cases you would not use direct sql queries to look up or manipulate CiviCRM data.

Activity contacts, like most CiviCRM data, has an api which you can use to read, write, update and delete contacts in an activity.

You can browser this api on your own site using the Api Explorer:

# Answer
> 5 votes
Depends on your version. From CiviCRM 4.4 the activity assignee can be found in the table civicrm\_activity\_contact, where record\_type\_id = 1 is 1 for source contact, 2 for assignee contact and 3 for target contact.

---
Tags: activities
---


# Question
Title: Could CiviCRM 4.5 or 4.6 make it easier to generate large numbers of PDFs at once?
I have a client using CiviCRM 4.4, who prefers to generate donation and membership receipts as PDFs for mailing in print form, but has found that they often have trouble generating all the PDFs they need to at once, and have to break the list of donations or memberships down into small batches in order to generate the receipts.

They are considering upgrading to 4.5 or 4.6, but are wondering whether this might help address the problems with batch generation of PDFs. I looked through the issues list in Jira for both releases and didn't see anything that seemed specifically related, but there are so many things listed that it's easy to miss something.

Does anyone have any personal experience of this, or know whether there are any improvements to PDF generation in 4.5 or 4.6?

# Answer
Are you using the wkhtmltopdf option in CiviCRM:

Administer CiviCRM \>\> System Settings \>\> Misc

http://d46.demo.civicrm.org/civicrm/admin/setting/misc?reset=1

Its a local binary installation (needs to be done by your system admin), but gives you a lot better performance than the php pdf libraries shipped with CiviCRM
> 8 votes

---
Tags: upgrade, receipts, pdf
---


# Question
Title: can't log into a site build using civibuild
This is how I created my site

```
civibuild create demo8 \
 --type drupal-clean \
 --web-root /sites/demo8 \
 --title demo8 \
 --url http://demo8.roiaws.com \
 --admin-user admin --admin-pass 12345

```

and this is what I get after I try to log on using admin/12345 or demo/demo (in short - it doesn't login):

Additional info: when looking for problems in the civibuild output, this is the only interesting thing I saw:

```
+ pushd /sites/demo8/sites/all/modules/civicrm/./bin/..
/sites/demo8/sites/all/modules/civicrm /sites/demo8/sites/all/modules/civicrm
+ php bin/cli.php -e System -a flush --triggers 1 --session 1
Failed to bootstrap CMS
Died during initialization+ mysql -udemo8civi_k31lr -poNammLP06izIxkcx -h 127.0.0.1 -P 3306 demo8civi_k31lr -e 'UPDATE civicrm_domain SET config_backend = NULL; UPDATE civicrm_setting SET value = NULL WHERE name = '\''userFrameworkResourceURL'\'';'
+ popd

```

# Answer
When setting up a new environment, sometimes Apache's mod\_rewrite is disabled. This breaks in Drupal -- creating a symptom where the home page opens, but logins do nothing. Try enabling mod\_rewrite.

I've filed an issue about this: https://github.com/totten/amp/issues/23
> 3 votes

---
Tags: drupal, drupal-7
---


# Question
Title: How can I track donor movement on CiviCRM?
Our organization is using CiviCRM on Drupal and I'm looking for a way to create, track, and report on solicitation plans -- essentially, having a report that forecasts income from a variety of channels (individuals, events, etc) It would track details such as channel (ie individual), ask amount, likelihood, etc. Ideally, this report could be integrated with a contribution report to compare forecast and actual income.

I think a modified CiviCase might be able to handle the solicitation plans, with customized reports, but I'm hoping someone might have more concrete solutions or know of an existing module that can handle both forecasting and contribution reporting.

# Answer
You could do a workaround using custom fields.

If you create a custom fields on contribution, with two values: Real and Budget. You then make Real as a default value, to work for your contributions.

Whenever you are forecasting, you create a contribution with the value Budget. You could then select for yourself on which detail level to forecast on. But if it is important to distinguish channels, ask amount, likelihood and receive date (maybe pr. month), then you create aggregate contributions for each distinct values, and the custom value Budget.

You then need to update all your contribution reports to select only Real. And then you could add some with Budget, and display them together in the dashboard.

Or you could probably make custom reports comparing Real and Budget. But at this point you might be considering to have a reporting program (not CiviCRM) making reports on the CiviCRM-SQL-database.
> 1 votes

# Answer
It is not entirely an answer to your question but you would probably be interested in the extension CiviRules that is being developed. Check: https://civicrm.org/blogs/erikhommel/civirules-sprint-january-and-march-2015 and/or http://redmine.civicoop.org/projects/civirules/wiki
> 1 votes

# Answer
I would recommend checking out two tools:

* The Advanced Fundraising Reports extension is similar to what you're looking for. You can compare numbers of donors in two time periods and show a trend.
* The Summary Fields extension isn't directly relevant to your question, but sounds relevant to your use case.

If you'd like to get more sophisticated than this, you may want to talk to Veda Consulting. They've done some very clever work integrating business intelligence tools with CiviCRM.
> 0 votes

---
Tags: civireport, civicase, best-practice
---


title: Working with git

text:
# Question
Title: Working with git
My development configuration: I work on netbeans on my Windows. My civicrm site runs on a remote ubuntu-server to which I can ssh and ftp. I need to make some changes to civicrm-core.

I would like to work with netbeans' git feature (in order to graphically see history in netbeans, committing from the IDE etc.) so I cloned my fork using the IDE, and created a project that uploads the files to my servers.

Now my server has a folder which is like my fork, but of course I can't just symlink to it from `<drupal base>/sites/all/modules`. I need to add all the stuff missing, and right now I am copying (without overriding existing files) from a tarball I downloaded from sourceforge. I guess there is a more programmatic way for doing that. The help on gitify explains the opposite of what I am trying to achieve (it starts from a tarball and then connects to github).

thanks,

Roi Modify message

# Answer
> 2 votes
Sounds to me that you are using two kinds of methods of deploying. You are using git and you are using ftp. Is that right?

I am also wondering why you need to directly change civicrm-core. Is there something missing and is there not another solution to find a solution for that specific need. Usually when you edit core files directly your maintance and updatability of your civicrm site gets more complicated.

---
Tags: developer, upgrade
---


title: How to enable CiviDiscount for members?

text:
# Question
Title: How to enable CiviDiscount for members?
I'm considering using CiviMember and CiviDiscount to offer discounts to members... but when I try to create a new discount code, there is no member option. How can I enable this feature?

# Answer
> 6 votes
CiviDiscount is smart ... and will only display the membership option if you have created at least one membership type.

So...

1. Create your membership (Administer -\> CiviMember -\> Membership Types)
2. Create your discount

Note that your discounts can apply to more than one membership!

---
Tags: civimember, cividiscount
---


title: {mailing.viewUrl} returns faulty URL

text:
# Question
Title: {mailing.viewUrl} returns faulty URL
When I click on the {mailing.viewUrl} inside an email the URL formed is as follows:

www.http.com//www.example.com.au......

I am not sure why the www.http.com is replacing http:

Cheers Martin Fuggle

# Answer
> 1 votes
Ooops - my mistake. I had included "http://" in the href before the token. Sorry for the trouble and the answers

# Answer
> 0 votes
Go to Resource URL Settings (**Administer menu \> System Settings \> Resource URLs**). I'd guess that you'll see an setting there containing a malformed URL.

If not, please update your question with your version number and the values you see in that screen.

---
Tags: tokens
---


# Question
Title: How is membership type best set up for monthly direct debit payments?
An organization has some members paying their fees annually by cash and therefore need reminders. There are three membership levels - Under 16, Over 65, and others. It's quite straightforward to set CiviCRM's membership types for this.

Other members pay by monthly direct debit, which means they continue to be members until they take action to cancel the direct debit. Bearing in mind they also are categorised by the same three levels - under 16, over 65, others - how should membership type be set up for these members?

# Answer
> 3 votes
Since CiviCRM does not yet allow partial payments/payment plans for annual memberships, you'll have to create a membership type for each level and each payment schedule.

Using your example of levels of memberships, define your membership types as:

* Annual membership for over 65 - amount: $1200
* Monthly membership for over 65 - amount: $100 (require auto-renew)
* Annual membership for under 16 - amount: $60
* Monthly membership for under 16 - amount: $5 (require auto-renew)

# Answer
> 1 votes
I have worked at an organisation where they had a memberships paid by direct debit every quarter (1 jan, 1 april, 1 july, 1 october). And the same principle was applied they didnt had a cancel period. You could cancel at any time. But CiviCRM did not have an option for a fixed quarter membership period. And in addition there was a small selection of people who paid by bank transfer.

So we set up a fixed yearly membership type and I developed two extensions one which would made from one membership contribution, four (for every quarte one) and an extension which added a button to cancel a membership and if pressed any pending contributions where cancelled. Due to the direct debit and financial process we had to generate the four contributions in advance.

The extensions could be seen/downloaded from https://github.com/CiviCooP/org.civicoop.quartelymembershippayment https://github.com/SPnl/nl.sp.membershipcancelcontribution

---
Tags: civimember
---


# Question
Title: Does CiviCRM work with Site Performance Engines in Wordpress such as Falcon?
I'm using CiviCRM on Wordpress, and recently installed Wordfence, an excellent security plugin to make my installation more secure. It also offers the Faclon Engine, a server-side caching system which promises to speed up the website by 30-50 times.

While my installation of CiviCRM isn't too slow, some more speed would be welcome. However, due to the sometimes complex php searches and apis that CiviCRM runs, I was wondering if it'll lead to mistakes / crashes when running.

Does anyone have a sense if these kinds of engines are ok with CiviCRM or if they're better avoided?

Thanks.

# Answer
Most of the pages displayed by civicrm can potentially be customised per user (eg. pre-fill the contribution form if the visitor is known or display "looks like you are already registered" on an event page for instance).

So if you start generating a page for one specific visitor, cache it and distribute the result to all visitors, there is a big risk you will show information about one visitor to all the others, and finetuning which specific page is cache safe is going to be tricky

However, it seems that the falcon cache allow you to explicitly exclude some pages, so you could exclude every civicrm page and still benefit from the cache for all your other pages (eg. your articles).

That's what I'd suggest you to do. The potential speed gain isn't worthwhile the risk of showing private information to the wrong visitor.
> 5 votes

# Answer
If it helps, we're running with WP Super Cache and it works fine. Civi pages are excluded. It's extremely fast, and the associated lack of PHP processing takes some strain off the server, so there's a corresponding speed bump in Civi too.

(Super Cache used to need a hack to work, but latest versions seem to be ok)
> 3 votes

# Answer
No experience with any of these tools, my recommendation would be to try with a sandbox site first and see what happens.
> 0 votes

---
Tags: wordpress
---


# Question
Title: MailChimp Integration imports First Name, but not Last Name
CiviCRM 4.4.14 (Drupal)

I am trying to use the MailChimp integration extension but on importing a list from MailChimp, only the first name is imported. I've gone through all the settings but cannot find a way to get last name too.

# Answer
> 3 votes
The extension looks for specific MailChimp merge token names (FNAME, LNAME, and EMAIL). You can check it out in the function CRM\_Mailchimp\_Utils::updateContactDetails() if you want to see the guts of what it is doing. If your merge tokens are different, I think your options would be:

* update your tokens on the MC side
* hack the extension to hard-code your own token names instead of the default ones
* improve the extension by creating some kind of field mapping!
* create your own extension to override the functions that affect merge tokens

---
Tags: import
---


# Question
Title: Date Format and CiviContribute/Data Form Confirmation Page
We are using CiviCRM with the european portuguese language pack and during setup we set the date format to be dd.mm.yyyy at localisation/date format (administration tab).

We have created a civicontribute form/page where we request dates twice. Everything is fine in the way a user inserts the date and it shows the date in the preset date format we chose (e.g. 10.04.2015). However when you press "contribute" and advance to the confirmation page the dates don't show like that anymore but in the US format (04/10/2015). I am afraid this will generate a lot of confusion because people will think they have filled in the date incorrectly.

I've tried changing all possible date settings at civiCRM administration and nothing works. We simply can't use the form until this is fixed.

Help would be appreciated. Thank you.

# Answer
> 3 votes
The bug come from QuickForm being used to render in "freeze" mode (read-only) for the contribution confirm page.

The bug had been reported here:
https://issues.civicrm.org/jira/browse/CRM-14588

I wrote a patch for it against CiviCRM 4.7 (master dev branch), but it should be easy to apply on 4.6:
https://github.com/civicrm/civicrm-core/pull/5729

Could you test the patch to see if it fixes the issue? If you are not familiar with patches, you can download the file from the pull-request:
https://github.com/mlutfy/civicrm-core/blob/47-crm14588/CRM/Core/Form/Renderer.php

Then click on the "raw" link, which leads to:
https://raw.githubusercontent.com/mlutfy/civicrm-core/47-crm14588/CRM/Core/Form/Renderer.php

You can then save this file and replace the file in your local CiviCRM installation.

# Answer
> 1 votes
Most likely this is semi-related to this issue:

https://issues.civicrm.org/jira/browse/CRM-15973

Would be a great candidate for a patch contribution

---
Tags: civicontribute, forms, localisation
---


# Question
Title: Shouldn't CRM_Core_PseudoConstant::get localize parameter be setted to TRUE by default?
Some translations are missing in non-english language (french in my case), because of the fact that localize's parameter is set to FALSE by default with no way to change it via configuration.

So my question is why that ? And not the opposite ? And best of all why not when the language is not english set localize to TRUE.

# Answer
> 2 votes
Case statuses are user-defined option values (configurations). If you have installed CiviCRM initially in English, then switched the language, you will have to edit/translate the case statuses manually in: Administer \> Case \> Case statuses (/civicrm/admin/options/case\_status?reset=1).

---
Tags: best-practice, localisation
---


# Question
Title: CiviCRM, Ubercart, and donations through the shopping cart
I know that UC CiviCRM creates a "purchases" tab in the CiviCRM contact view that links purchases made through an Ubercart store. Is it possible to set the Financial Type per product in the Ubercart store? For example, rather than requiring a shopping cart checkout and then a completely separate donation process, it makes sense from a usability standpoint to allow a supporter to add a donation to an Ubercart checkout process (using a UC Variable Price product, for example). It would be nice to be able to do this and have the donation push into CiviCRM automatically, but I have a feeling it is not so easy. Am I right, and if so, what would be the best way to implement this?

# Answer
we have found that using CiviEntities opens the door for using Rules directly to control what gets pushed in to CiviCRM and how (in our case with Commerce not Ubercart). I can't really flesh out more on this as Eileen did the work and she is probably en route back from the Sprint in Denver. Perhaps the above is enough to give you something to look in to if no one else comes back with a more succinct solution.
> 1 votes

---
Tags: civicontribute, ubercart
---


# Question
Title: how to fix 'Warning Error loading module file (). Please restore the file or disable the module.' error message?
I'm using civicrm 4.5.5 in drupal 6 I enabled tracing to explore another problem and when I removed the defines in the settings.php file that setup the query logging, this error appeared.

How do I get rid of it?

# Answer
* Visit your Extensions page @ `civicrm/admin/extensions?reset=1`.
* Click *Refresh*.
* If visible, uninstall the extension which is currently not found.
* Worth trying Cleanup Caches too @ civicrm/admin/setting/updateConfigBackend?reset=1
> 8 votes

---
Tags: drupal
---


# Question
Title: Options for monthly payments and annual payments on same contribution page
I am using civicrm 4.6.1 on Drupal 7.3.5.

I need a contribution page that lets users choose between annual memberships and monthly "sustaining" membership payments. I have set up price sets and membership types for each, but I can't seem to get both price sets on the same contribution page.

If there is not a way to do that, do I set up a contribution page for each and send my members through a screening page?

Thanks

# Answer
> 2 votes
You could make a single priceset which is capable of accepting the various combinations that are possible, then implement a design which provides a different UI for selecting the preferred amounts.

An example CiviCRM membership/donate page which implements a similar approach is the one at http://greens.org.nz/join \- the visible elements trigger changes in (hidden) CiviCRM form elements to deliver the required user experience.

CiviCRM permits you to ensure a minimum amount on the contribute form, but that won't account for the combination of payment term and amount. With a small extension you can implement any validation required to ensure the correct amounts are paid (so a user can't submit the form with a cheap annual membership).

---
Tags: civicontribute, civimember
---


# Question
Title: issue with Joomla and CiviCRM Dashboard as a Menu Item
I'm following the directions found here:

http://book.civicrm.org/user/current/website-integration/integrating-with-joomla/

I'm having no problem adding some of the other CiviCRM menu item types to a menu, but when I try to add CiviCRM Dashboard to a menu item then navigate to the page using the navigation on the front end, I receive the following error message:

"0 SORRY BUT WE ARE NOT ABLE TO PROVIDE THIS AT THE MOMENT. COULD NOT FIND VALID VALUE FOR ID RETURN TO HOME PAGE.

OH MY GOSH! YOU FOUND IT!!! Looks like the page you're trying to visit doesn't exist. Please check the URL and try your luck again. TAKE ME HOME"

I've gone through the "Advanced, Link Type, Page Display, Metadata, ..." etc options under Menu Manager and I haven't been able to uncover anything obvious. I also have made sure that access is set at "Registered", and I am logged in as "Registered" on the front end. Any ideas?

# Answer
There are actually several dashboards in CiviCRM. The two you may be confusing are

Both require the user to be logged in or the page will not work. Note that the url's are constructed differently, and any page you want available to normal (non super) users should point to /index.php and not /administrator.
> 2 votes

---
Tags: joomla, menu, dashboard
---


# Question
Title: Different credit card choices for each payment processor
I have one payment processor set up that only accepts VISA and MasterCard. I have a different payment processor set up that only accepts American Express. Both use the Authorize.net style payment processor APIs.

I have added both payment processors to my contribution page. But all credit card choices (VISA, MasterCard and American Express) are offered to the visitor no matter which payment processor is selected.

How should I configure this?

(FYI: I already checked the settings at http://mygroup.org/civicrm/admin/options/accept\_creditcard?reset=1 but the settings there seem to be global, not per payment processor.)

# Answer
> 2 votes
I can't think of a way to do that out of the box - I think the only way to get that functionality would be a custom extension

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


# Question
Title: How to sort civimobile event participant check-in list?
I will like the have the names of event participants listed alphabetically on the event check-in screen, how can i modify the civimobile extension (civimobile.participant\_checkin.html) to list names alphabetically?

I have this code but it doesn't work,

CRM.api('Participant','get', {"sequential": 1,"options": {"sort":"display\_name"}, 'version' :'3', 'sort\_name': q, 'event\_id': eventId, 'participant\_status\_id': {1:1,2:2,5:5}, 'return' : 'display\_name,participant\_status\_id', 'rowCount' : 500 },

```
    {
      success:function (data){
        if (data.count == 0) {
          cmd = null;
        }
        else {

```

# Answer
I think it makes sense as the default behaviour. Can you go to the github project and add an issue there to talk directly with the developers and consider proposing that as a PR? https://github.com/webaccess/com.webaccessglobal.module.civimobile

The line you'll need to change is the api call, and add a "option.sort"="whatever is the field for the participant name" param (use the api explorer to find out the exact syntax and name of the field name)

https://github.com/webaccess/com.webaccessglobal.module.civimobile/blob/master/code/civimobile.participant\_checkin.html#L35
> 1 votes

---
Tags: extension
---


# Question
Title: How to tie multiple event registrations to a single (non-monetary) transaction?
We're using the API to create multiple event registrations via a single form, then send the user to Quickbooks Payments after submission for those who wish to pay a deposit online. The bookkeeper sends the back office staff a weekly QB report of all payments received that week (online, checks, cash, etc), which they then enter into Civi manually.

Is there an "invoice number" or some other unifying ID we could use to help staff easily find the appropriate payments from the bookkeeper's report and create them on the correct Civi registrations? I see a Cart ID in the civicrm\_participants table, but the cart functionality doesn't have an API, so I can't insert in a safe way. Should I just go with the Source field, or a custom field?

# Answer
Why don't you create a contribution (using the api) and connect the participant to it?

I'd create that contribution with the right financial type and status pending and update with the QB report. On that topic, it probably needs some tuning and work to import the file, but https://github.com/Project60/org.project60.banking would make it possible to automatically match most of the payments and let your staff focus on the ones that are a bit weird (eg. where the amount or reference quite doesn't match)
> 1 votes

---
Tags: civievent
---


# Question
Title: Need to make changes to Paypal website pro templete, Where is it located?
I am trying to find out the template for Paypal website pro payment page that i see in contribution page. I am not abale to locate it!! Can anyone help me to locate this file please?

# Answer
> 2 votes
templates/CRM/Core/BillingBlock.tpl

Note that the template is quite programmatic and gets in pretty much all of its info via template variables. I suspect you will benefit from reading the developer documentation which will help you with the Civi learning curve.

---
Tags: civicontribute, paypal
---


# Question
Title: How to add validation to the 'Add Case Role' option in Case Summary View?
I have a customer where it is vital that there is only one Case Role on a case. In the CaseView form it is possible to add a case role, and I want to add some validation to this. in core actual processing is done in a jQuery function, with the callback function at CRM\_Contact\_Page\_AJAX::relation.

I can do nothing with a validateForm hook here, so what I am planning to do is:

1. create a 'dummy' page with my own version of CRM\_Contact\_Page\_AJAX::relation with the desired validation included
2. replace the template for CaseView with a local version, linking to the new function with the alterTemplate hook

Unfortunately this solution is not viable for a true generic extension. Any better ideas? If not, I will add the instruction to the README and still publish the extension as it might be useful for others too but I wonder if there is a better way.

# Answer
> 1 votes
Futher investigation has given me at least one answer. I can create my own template file with new jQuery functions using my new function as a callback. In that new jQuery function I can replace the .onClick functions for the button 'add Role' and the edit pencil. But still open to better suggestions!

---
Tags: extension, civicase, developer
---


# Question
Title: How can I have a fixed date membership with no rollover date?
An organisation I'm working with wants to edit a membership type to change it from annual rolling to annual fixed. When I set the fixed option CiviCRM appears to require a rollover date (if I don't set a date for this field CiviCRM flags it up and won't save my changes). But we don't want a rollover at all. Instead we are offering reduced fees based on when in the year the new member signs up.

There doesn't seem to be any option to not have a rollover date. The start date for the membership is Jan 01. If I set the rollover date as Dec 31, then I'm concerned that someone signing up on Dec 31 2015 will get low price *and* get a membership lasting 1 day, plus the rollover year, with and end date of Dec 31 2016. Any other date I could set would simply extend this rollover window.

# Answer
I tested this a bit and you are correct. If someone signs up Dec 31st they get the whole next year. Probably the easiest thing to do is not offer a discount for the Dec. Pay the full price and then make the rollover date Dec 1. Yes they will get one month free but only the first time.

Probably the code should be changed so that it is greater than and not \>= since the membership starts the next day by default anyway. Or if you set the start date and rollover date the same, it doesn't give you two full periods for the price of one.
> 2 votes

# Answer
Could you set the rollover date to Dec 31st?

This way you could have a fixed date membership ending on the 31st of Dec and also a rollover after the 31st of december. I am not sure wether the rollover date is used as after or upon or after. E.g. what would happend if someone signs up for a membership on the 31st of december, or they a member for that day? Or are they then signed up for another year.

Another solution is to create some custom code which will hook into the membership system and creates the behaviour what you want.
> 1 votes

---
Tags: civimember
---


# Question
Title: CiviCRM 4.5.8 - Bounce Fetcher - Max Line Length Exceeded
I have recently been getting this error message from the bounce fetcher but the error message is not notating which message is the culprit:

> Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}
>
> Full message: Finished execution of Bounces fetcher with result: Failure, Error message: An error occured while sending or receiving mail. The IMAP server could not list messages: * BAD maximum line length exceeded.

Please advise.

# Answer
> 3 votes
This issue has been fixed by Zimbra, the email application we use. Can CiviCRM be adjusted to deal with this issue or is it purely on the IMAP server side? Would using POP3 have a different effect?

Their solution is with a caveat that has a *drastic* effect at the enterprise level:

> The issue stems from the bug reported at - https://bugzilla.zimbra.com/show\_bug.cgi?id=73266
>
> Pasting an internal comment from the bug, which help explains the issue --- This goes back to the fix for bug 63644. There are two limits at play zimbraImapMaxRequestSize and zimbraMtaMaxMessageSize. The latter is used for all literals, regardless of command. Due to the way literals are processed there isn't a really clean way to use zimbraImapMaxRequestSize for some literals and allow larger literals commands such as APPEND where we really want to allow huge literals; at least without a big rewrite that is too much for 8.0 at this stage.
>
> Staff, for the purposes of the test can you also set zimbraMtaMaxMessageSize to a really small value (say 5). I think the main purpose of those two limits is to protect against buffer overflow; so as long as we have some limitations for all commands that should be safe enough for now.
>
> The downside of disabling NIO is that you loose out on the performance improvement that NIO offer - http://wiki.zimbra.com/wiki/IMAP\_NIO :
> *\> NIO implementation helps reduce the mailboxd memory footprint with a small CPU overhead. NIO eliminates the need of 1 (IMAP connection)-to-1 (server thread) mapping and helps reduce the memory footprint of the ZCS server. It is useful when there are many concurrent IMAP users. The exact benefit depends on the number of IMAP users/server and number of live connections/users.*
>
> *\> The saving is linear to the number of active IMAP connections that are in a single mailbox server.*
>
> *\> Example for 10,000 concurrent IMAP accounts:*
>
> *\> With NIO: If there are 10,000 IMAP accounts, each of the IMAP accounts has an IMAP client which maintains 3 to 4 connections. There are at most 100 to 200 Java threads required in the mailboxd process to handle requests from those clients. If one thread uses 256k memory, it uses 25 to 50MB Java memory.*
>
> *\> Regarding the CPU and depending on the load, the overhead usage can range from 0 to 20%. Since ZCS is not CPU bounded, the CPU increase should not be a significant factor to impact the client side response time.* \*\> Without NIO: If there are 10,000 IMAP accounts, each of the IMAP accounts has an IMAP client which maintains 3 to 4 connections. There are 10,000\*3 or 10,000\*4 Java threads required in the mailboxd process to handle requests from those clients. If one thread uses 256k memory, it uses 7,500MB to 10,000MB of Java memory.\*

# Answer
> 1 votes
Most likely this is the first message in your CiviMail IMAP folder. The error message that we print out is what is returned from the ezMail package

---
Tags: civimail, joomla, 4.5
---


# Question
Title: Drupal CiviCRM Rules module: How to use the action "CiviCRM Mailing: Send email"?
I need to schedule CiviMail mailings through Drupal rules. I see that the **CiviCRM Rules Integration** module has an action labeled "CiviCRM Mailing: Send email" but it's not clear what this action is supposed to do. My assumption was that it would create a scheduled CiviMail bulk mailing. But this is the default body text, which confused me:

```
A new mailing has been scheduled: {mailing.name}

{mailing.viewUrl}
You can review the mail here: {mailing.editUrl}
You can schedule the mail for here: {mailing.scheduleUrl}

The content of the email is:
<pre>
{mailing.html}
</pre>

```

I don't understand. Can this rules action be used to schedule a CiviMail mailing? Or is it intended for a different purpose? Any experience or insight would be greatly appreciated.

# Answer
The integration of CiviMail with the rules module is primarily for workflow purposes. i.e. they allow another person to approve a scheduled email. Thus a CiviMail has to be scheduled and approved before it can be sent out (if this has been enabled within CiviMail settings screens)

The action by itself does not create or schedule a CiviMail. It just approves it and/or sends it back to the creator (a link via email) for further edits and revisions.

This was work done in support of the New York State Senate's usage of CiviCRM an CiviMail
> 2 votes

# Answer
Not a direct answer to your question, but still relevant I think: The new extension CiviRules is developed this spring. This extension aims at doing the same for CiviCRM that DrupalRules does for Drupal. That could then cover your problem natively in CiviCRM.

Check: https://civicrm.org/blogs/erikhommel/civirules-sprint-january-and-march-2015 and/or http://redmine.civicoop.org/projects/civirules/wiki
> 1 votes

---
Tags: civimail, drupal-rules
---


# Question
Title: Why does PHP Contribution API not filter on contact_id in 4.6.2?
We recentely upgrade from 4.5.x to 4.6.2 and after that the following API call from PHP does not filter on contact\_id and return all contributions for all contacts.

```
$params = array(
    'contact_id' => $contact_id,
);
$api->Contribution->Get($params);

```

In the backend explorer, the follow error occurs:

```
{
    "is_error": 1,
    "error_message": "A fatal error was triggered: CiviCRM is not of the type Int"
}

```

Good ideas very welcome :)

# Answer
> 3 votes
This is a bug and has been reported by @huulbaek as https://issues.civicrm.org/jira/browse/CRM-16393?jql=project%20%3D%20CRM

---
Tags: wordpress, api, contributions, php, 4.6.2
---


# Question
Title: How can I limit the number of participant roles?
We are using CiviCRM to coordinate volunteer registration to work events. As such, the event form has the "Participant Role" field. Is there away to limit the role of, say, "Lighting Designer," to one member and have it not be an option once the role is filled?

If there's a better way of doing this please let me know!

# Answer
You should use CiviVolunteer to manage and track volunteers for your event. Your requirement works our of the box with CiviVolunteer

https://civicrm.org/extensions/civivolunteer
> 2 votes

---
Tags: roles
---


# Question
Title: Initialization error after moving installation of CiviCRM for Wordpress from localhost to Server
I've just moved an installation from my localhost setup to my server on Nearlyfreespeech.

I've moved everything over and changed everything having followed this tutorial.

I initially got an error related to the civicrm.setttings.php file. I fixed this by following this advice.

Now I'm getting another error. It says 'Initialization Error' Warning: fopen(/home/public/wp-content/plugins/civicrm/../files/civicrm/ConfigAndLog/CiviCRM.f446a1fd9c619d6abf51f11bf29f358c.log): failed to open stream: Permission denied in /home/public/wp-content/plugins/civicrm/civicrm/packages/Log/file.php on line 216.

Full error at the url: http://logistics.nfshost.com/

Thanks for any help!

# Answer
might want to delete the contents of the ConfigAndLog directory and start clean on the new server:

% rm -rf /home/public/wp-content/plugins/files/civicrm/ConfigAndLog

You probably need to root access and/or do the above operation as your webserver userid (which probably is the owner of the aboe directory)
> 2 votes

---
Tags: wordpress
---


# Question
Title: Upgraded to 4.6.2 - 'New Mailing' brings up 'Unknown Extension' error
Just upgraded CiviCRM from 4.5.3 to 4.6.2 on Wordpress. All seems to be working apart from when I select 'New Mailing' option under 'Mailings' - it takes me to a screen showing the message below:

\*Sorry but we are not able to provide this at the moment.

Unknown extension: .

Return to home page.\*

Any suggestions?

# Answer
> 2 votes
You'll get a more complete error message if you turn on debug + backtrace in CiviCRM. Also, since the message is coming from the extensions system, can you try disabling your CiviCRM extensions?

---
Tags: civimail, 4.6.2
---


# Question
Title: How to get the value of a disabled form field in webform civicrm?
I have 2 radio buttons whose values I can access on page 2 using $form\_state\['input'\]\['submitted'\]\['nameoffield'\] when the field is not conditionally hidden. When conditionally hidden however (and pre-filled) I can't access the value, presumably because the field is disabled. What is the best way to access a pre-filled civicrm value on the second page of the webform?

# Answer
Unfortunately it's a limitation of the Webform module (not specific to Civi) that hidden fields cannot be accessed as tokens or from hooks. They *might* be available in the $\_POST superglobal, but only immediately after submitting page 1 (e.g. not after returning to page 2 from page 3, or from a saved draft, or from reloading page 2 with validation errors). Since you are writing php code, consider using the CiviCRM API to fetch this info instead.
> 2 votes

---
Tags: webform-civicrm
---


# Question
Title: New membership page as default Drupal register page
Our non profit organisation has members who should have full access tot the web site.

We created in civicrm a contribution page with

1. no "contribution", only "membership" information
2. a choice between three types of membership
3. a civicrm profile with extra fields (address, phone number, birth day...)

Now, my question: how to get this page when the visitor goes to the Drupal register page? For the moment, only the civicrm profile is displayed, not the choice of the membership type.

# Answer
> 3 votes
As far as I'm aware you can expose a profile on a Drupal user registration page, but not a contribution page. Assuming you will have at least some public-facing content that is not member-only, you can include within this some information about joining, with links to your contribution page.

As part of your profile settings, you can specify whether a user account is created. So, when a user submits the contribution form, they will provide a username and an email address, and a Drupal account will be created for them.

One thing to look out for - if your membership is paid, the Drupal account may well be created regardless of whether the payment is completed successfully or not.

Then you can use the CiviMember role sync module to give the new member a Drupal role with appropriate access permissions when they next log in.

# Answer
> 1 votes
What I've done in Joomla in this situation is to first make a profile with the Joomla account creation option. Second make a plugin that redirects anyone who goes to the normal Joomla registration page to the profile page. You could also do it without the plugin if you make a layout override for the login module that changes the link for the "create an account page" go to your CiviCRM page and make a menu link to the Joomla account creation page that is special access. (Mainly I'm saying you want to avoid people directly typing in the create account URL.

---
Tags: drupal, civimember
---