title: Household Membership Identifiers

text:
# Question
Title: Household Membership Identifiers
We are a non profit volunteer group with 16000 members. Our members are household members and then have individuals with a relationship link. One issue that is bugging us is that when we look for example at our membership list, the household name is that of the last name of the household. EG Smith. However we have 92 "smiths". What is the best way to narrow down which smith we are looking at. Should we also include after their last name a comma followed by eg Tony & Michelle? Our volunteers sometimes need to quickly look at the persons name and choose their record. Or is their a better way.

# Answer
> 2 votes
You can certainly do what you suggest and change the household name to **Smith, Tony & Michelle** or you could change it to **Tony & Michelle Smith**.

There are pros and cons for each.

Try it out on your test site, or on one of the demo sites for two different households and pay attention to the form of the Addressee and mail and postal greetings in each case.

Also try searching for the households using both quick and advanced search.

You will have to decide which format for the household name suits your particular system best.

---
Tags: civimember
---


# Question
Title: Can I change a contribution's values for Financial Type and Campaign directly in SQL without danger?
When using "Import Contributions \> Update Existing Contributions" I can import a Financial Type using the full name of an existing (and active) Financial Type. However, if I try to use the full name of an existing (and active) campaign it does not seem to work consistently.

**EDIT** I notice that in the database the `civicrm_contribution` table has fields for `financial_type_id` and `campaign_id` -- **is there any danger in using some SQL directly to populate these values?** (ie. can anyone verify that if I set those IDs correctly in this table, it won't conflict with anything else)

# Answer
> 1 votes
If you're not using the in core CiviAccounts bits - then changing the financial\_type\_id is ok. We do lots of retyping (update more specific financial\_type\_ids ad-hoc) - on projects where we do our own Accounting integration i.e. bypassing the core CiviAccounts.

PS - forgot to note that updating campaign\_id should be safe

---
Tags: civicontribute, mysql, civicampaign, sql, financial-types
---


# Question
Title: Hiding Extra Profiles when Manually Adding/Editing Registrant
I have a site that has multiple different event types on it. Each of these event types have a different profile associated with the event.

The client has back-end access to CiviCRM and when they try to manually register a person for an event it shows all of the profiles, not just the one associated with the event. Some of these fields are required fields, so the client then has to put something in them to finish the registration or save the edit.

Is there a way to have all of the profiles that haven't been associated with an event type to not display in the back-end when editing or adding a registrant.

# Answer
> 3 votes
Ah those are not profiles but custom data sets/fields.

Two tips:

1) Make sure that the custom data sets that you create are more specific than just on Participants -\> configure it to also narrow down to a specific event.

2) Don't make the custom data fields within a custom data set required - but only make them required in the Profile - once you pull them in there. That way these fields are only required on pages that contain the profile.

# Answer
> 2 votes
You can also set the Group of Custom Fields to be collapsed on first view, which will impact on the back end 'add a participation record' (which use the Group of Custom Fields) but not on the front facing 'registration' forms (which use the Profile).

This can help if you do have multiple Groups of Custom Fields showing on the same Entity or sub-Entity (eg Participant or Activity of Contact Type/sub-type)

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


title: Kid gloves and hotspot flagging

text:
# Question
Title: Kid gloves and hotspot flagging
Is there a good (and simple :) way to have CiviCRM flag up when contacts may need to be handled with care (as a way of forestalling situations where we can never contact them again, ever)?

Obviously the 'No bulk emails' setting stops us from spamming people who want more of a personal touch, but I'm thinking more about situations where someone books on to an event, and they might need a more specific response than just an e-ticket, or we might want to flag up with the event coordinator that they're attending. There might be different reasons for this - e.g. they booked on to an event which was cancelled, and they missed the email about the cancellation, so we need to let them know by phone if there's any changes to events; they have specific access needs and may not be comfortable sharing this with new people; they're connected to funders and we want to impress them; and so on.

We can use tags or custom fields to record issues to be flagged but I'm not sure how to get those flags to appear in a useful way in upcoming activity lists or event participant listings. Or, indeed, how they could be displayed clearly in contact searches. Is there a way to set css classes in reports that relate to tags or custom fields?

ETA: Some of this flagged information may be confidential or sensitive and should only be seen by staff (and not the volunteers who do data entry for us) - but those contacts should not be completely hidden from volunteers.

# Answer
One option would be to make a special contact sub-type for this purpose.

CiviCRM allows you to use a custom icon per sub-type (just pick one from the internet) which would make the contact appear special in search results, the summary screen, etc.
> 6 votes

# Answer
We've implemented something similar ("VIP Contacts") for an organisation who wanted to restrict access to VIP supporters.

This was done via ACLs, so regular volunteers weren't able to see those contacts at all. The code used to do this ended up as the Wiki example of custom ACL restrictions via `hook_civicrm_aclWhereClause` \- that same org had need to restrict volunteers to both their own defined geographic region AND to exclude VIPs. Geographic restriction is what's shown in the wiki, but the same SQL exclusion method did both.

To keep the contact visible but denote them as needing special care, Coleman's answer sounds sensible.
> 3 votes

# Answer
You mentioned the "no bulk emails" privacy preference. I thought it worth noting that a similar list - "preferred communication method" can be edited. So "Kid Gloves" could be one of them:
> 1 votes

# Answer
You might consider a report (of event registrations or something else) that is limited to contacts with the tag "flagging" them. If you enable that report as a dashlet, staff could have that dashlet in their dashboards, highlighting people who need attention.
> 0 votes

---
Tags: contacts, css, display
---


# Question
Title: Why can't I delete a Membership Status that has no memberships of that status
Site has a custom Membership status that is no longer required. They try to delete that Status but it says 'no way jose: This membership status cannot be deleted as memberships exist with this status'. They go do a Membership Search - find none with that status. I check in DB as well in case some membership belong to contacts in Trash - still no results.

I suggest they set it to 'disabled' as a temporary solution.

Why won't it allow them to delete via UI. I tried replicating with a brand new custom Status on demo but that could be deleted.

# Answer
> 1 votes
Ok, found it. If you have logging 'on' - and you have a membership which was at some point in history 'that' status - then when you search you find 'no results' - but there is a record in log\_civicrm\_membership

and presumably it is not be able to be deleted in case the record needs to be reverted.

If that is the issue, then perhaps the error message needs to incorporate that fact.

or should the membership status be ok to delete even with data in the logs?

---
Tags: civimember
---


# Question
Title: What's the best version combination for Drupal 7 and Civi 4.5
Tried installing drupals starter-kit with civi with errors wouldn't finish. Tried numerous version combinations none would complete. Do you have a combo suggestion?

# Answer
> 1 votes
the stable versions are 4.6.x and 4.7.x, I'm not sure they are kits that install both drupal and civi, but the recommended path is to install drupal first, then follow the instructions to enable civi.

https://civicrm.org/download

---
Tags: drupal, error
---


# Question
Title: How to Change Price Set Field Type without deleting and re-adding
I have some price set fields created as Radio currently, but they need to be Checkbox type. Is there any way to safely change (even in backend) without having to recreate the entire field (there are a lot of choices)

CiviCRM 4.6.x Drupal 7.x

Thanks!

# Answer
> 2 votes
My first answer is: yes you can do this in the backend! I just confirmed it: in the `civicrm_price_field` table find your `Price Field ID` (row) and then change the `html_type` from: `Radio` to: `CheckBox` I just did this on a dev site and my price/field?action=preview looks just fine - no errors/notices.

My responsible answer is: first make an extra backup - next make a clone of your project and make the edit to the `html_type` \- check your contribution page(s) where you offer this `price_set` \- run any report you would normally run to check to see that everything still adds up \[IF you've already had users selecting these price\_set fields so you have data in them already\].

---
Tags: civievent, price-sets
---


# Question
Title: Geocoding: Can you only use it for contacts?
I want to use Geocoding on Cases. My cases have specific locations and I would like to input an address and then use Geocoding. Can this be done? Thanks

# Answer
If this is a situation where the Case is related to a house/building site and hence you want to be able to map 'all cases' then getting Address fields and Lat/Long fields would take significant coding I think.

Workarounds? If you already have an Organisation Contact sub-type to represent the dwelling then you can get the Lat/Long for that and hence create the map filtering on those which have current Cases.
> 1 votes

---
Tags: contacts, civicase, geocoding
---


# Question
Title: Message template option missing in send SMS activity in CiviCRM 4.5.8
After upgrading a site to CiviCRM 4.5.8 the drop down template selector is missing in the Send SMS activity.

Has anyone else had this problem?

I've upgraded the CiviSMS Extension from 1.0 to 2.0, but this doesn't seem to have made any difference.

The character limit for the message has also jumped from 160 characters to 460 characters, I know I can amend the SMS API settings to allow extended messages. How can I return the character limit in the activity to 160?

Cheers

Craig

# Answer
> 1 votes
I just wrote a fix for this - https://github.com/PalanteJon/civicrm-core/commit/a7ea8fd5e8f74ea415d9ac026da4607e5a4da0fd

I'll submit it upstream as soon as I have a minute to write a webtest for it.

---
Tags: sms, message-templates, 4.5
---


# Question
Title: Which Extensions are you using with 4.7 which do not yet state they have a 4.7 release
Not sure if this is a valid question for SE, but I thought it as good a place as any to try and assess what Extensions people are successfully using with 4.7.x even where the extension does not state that it is compatible with 4.7

My sense - and very happy to be proven wrong - is that a good many may work, they have just not been tested by the developers, or no-one has updated the release information for them

# Answer
> 1 votes
There are two major hurdles preventing my extensions from working:

a) settings storage has changed. Unlike many extensions, mine remove their settings when uninstalled.

b) cj being removed in 4.7 as a valid JS format. My extensions need (in theory) to work on 4.4 and I don't think that allows CRM.$

In short, I'm not convinced that they can be made to work without splitting the codebase along versions somehow.

# Answer
> 1 votes
bgm says here that the Region Lookup extension works for 4.6, and would require a small fix to work with 4.7.

# Answer
> 1 votes
CiviRules is reported as working as far as it's been tested. See: CiviRules and CiviCRM 4.7

# Answer
> 1 votes
Thought I would put up something I can maintain as a useful list

CiviRules (G H: SE post)

Email API

Region Lookup - discussed here

# Answer
> 0 votes
Email API is working happily on 4.7 along with CiviRules

# Answer
> 0 votes
I've been using Multisite Permissioning in production for a couple of weeks now.

Ditto for Summary Fields \- but watch out for CRM-18115, a core bug that might affect you if you use Summary Fields with smart groups.

I've also successfully testing inbound/outbound SMS with Twilio.

---
Tags: extension
---


# Question
Title: Is CiviCRM going to ever change to be more like CiviCRM Webform?
I am sorry if this is a terrible way to ask this, or I asked it the wrong way, or its in the works. But after my experience working with Civi it seems like I should be able to make a synthesis of a form that uses CiviContribute, CiviEvent, and CiviMember, Profile Fields, CiviRules- but in a more flexible way. I know that CiviCRM Webform for Drupal kind of does it, but there are so many places it doesn't solve all the needs we have.

I was imagining it would go like this.

Form Builder.

And then I could add in the kinds of features I want on the form, and stack them, kind of like how you add profiles to a contribution page.

```
Membership
Event
Contributions
Profiles
Civi Rules

```

Then the form would let me configure the components. Or, at the bare minimum, I could include them but configure them elsewhere. Even better, there would be a very rudimentary layout tool for ordering them.

It seems like everything I build is trying to achieve some part of this solution, but gets 90% of the way there.

Does CiviCRM have any intention of being more "loosely coupled" I suppose? I really love the features it does have and what it has done for the orgs I've work with. No complaints, just wondering if someone can give me an answer as to if this is being worked on, will it be done, is it a valid idea, etc.

Thanks!

# Answer
> 7 votes
The short answer is "yes." If you look at civicrm.org/roadmap you'll see 3 goals for the next evolution of CiviCRM, the first being:

> ## GOAL 1: A POWERFUL FORM DESIGNER
>
> Today our users, and those that support them, are able to customize CiviCRM installations with a number of powerful tools, many with point and click interfaces. But there are still some 'flies in the ointment', for example:
>
> * Customizing layouts for some back-office screens (e.g. the contact summary page) requires developer skills and can complicate the upgrade processes.
> * Some front-end screens (e.g. online contribution forms and event registration forms) have limited layout and page flow options. Our community spends too much time tweaking these pages to meet their requirements, and maintaining these tweaks through upgrades.
> * Building and improving core forms requires developers to learn an antiquated and poorly documented form layer (HTML\_QuickForm). This is an obstacle to bringing new developers into the ecosystem.
>
> A new and powerful form designer built with modern tools will make it quicker and easier for users and service providers to customize screens allowing them to work on substantive improvements (for example like improved workflows for specific use cases). It will attract more developers to the project, bringing their skills and experiences and resources to the project. Replacing older varied code with a new consistent set of tools will increase the mantainability of the code and reliablity of the product.

The core team has been discussing and refining this goal for several years, however there are still some hurdles to clear before it is achieved, the largest being a considerable funding gap. Building revenue streams and fundraising has taken some (but not all) core team attention away from developing new features.

As of this writing, a start has been made on goal #3 the next generation api, and a partner organization has been working on goal #2 Bootstrap theme integration. The core team has successfully laid the technical and community infrastructure in place for iterative improvements and their next task will be to start work on the form builder system with the goal of gradually replacing core forms with the new technology.

---
Tags: civievent, civicontribute, webform-civicrm
---


# Question
Title: How to (hide) NOT show £0.00 in Price sets for the FREE options?
I have a price sets, which have an option FREE. How to NOT show £0.00 in Price sets for the FREE options?

# Answer
Can you tuck in your FREE options into a separate Price Field? And then to not show any $ values for all options within a given Price Field: de-select the display amount checkbox:
> 1 votes

---
Tags: price-sets
---


# Question
Title: How to Clone a Price Set Field and Its Options
Currently one can Clone an entire Price Set, however it is not possible AFAIK to clone Price Fields with their Price Options.

Does anyone have a clever way to do this, front end or backend?

My situation: I am creating a large amount of fields, but many are just copies. Such as Person 1 Data, Person 2 Data, Person 3 Data. I need to clone everything EXCEPT the Price Field Title.

Thanks! (and take pity on my wrists and mouse)

# Answer
Sorry - your best bet is a big pot of coffee and just getting it done via the GUI! That's because there are quite a few places in the database that are touched when storing price options. Even with phpMyAdmin access (like you have) it's going to be a lot of copying of rows - then updating IDs - carefully linking them properly to the other tables involved in Pricesets. Something is likely going to be out of place. Best to use the GUI.
> 3 votes

---
Tags: civievent, price-sets
---


# Question
Title: Civimail 'Send test email to group' allows sending mailings to groups for which 'Mailing list' has been disabled
Though for a group the 'Mailing list' option has been disabled the 'Send test email to group' function still allows you to select these groups (version 4.6.16).

There also isn't a option to disable this test function for certain groups, I've seen users use this test function to send out the mailing. Of course that is not the purpose of this test so it would be great if I could disable it per group.

# Answer
Which version of CiviCRM are you using? Version 4.6 adds a "preview" window that shows you exactly who will recieve the test mailing to prevent mistakes:
> 1 votes

---
Tags: civimail
---


title: Is there a roadmap for CiviCRM?

text:
# Question
Title: Is there a roadmap for CiviCRM?
This question will hopefully help people find their way to the big picture stuff.

# Answer
> 3 votes
The current roadmap can be found here

---
Tags: core
---


# Question
Title: How to add a field on Date Formats setting form?
I want to add a field under `Localization > Date Formats`. What is the correct procedure to do this?

This is what I tried. I added an entry in `Localization.settings.php`, `CRM/Admin/Form/Setting.php`'s *$\_settings* array property and `CRM/Core/Config/MagicMerge.php` and, added a corresponding record on `civicrm_settings` table and cleared the cache. The field is not showing up. What am I missing?

# Answer
> 1 votes
I wouldn't do this by editing core files. I would implement the buildForm and postProcess hooks in a module extension.

https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension

https://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference

But having said that I probably also wouldn't add it to a core form, I would make a settings page for my extension, which is just a module extension that implements the "add a basic web form" instructions at the first link.

---
Tags: forms, settings, date-preferences
---


# Question
Title: Is there a report that will group by source of contact?
We have stared to use the contact source field to designate how our contacts get into CiviCRM. (event, membership, donation, helpline call etc.

I would like to be able to have a report that lets me filter by contact source and show the numbers from that source by month. (A pivot tabe would be OK but isn't ideal as contact source is a free text field.) I haven't be able to find a core report or reprot in an extension that will do either.

It seems like something other organisations might also be interested so someone might have already created an appropriate report.

Does anyone know of a report that will provides that summary information?

# Answer
In Drupal this could very easily be done with a View using Aggregation that would do this if you will accept that.

EDIT: The above should not have said 'very' easily ;-) but you can see / grab an example from Fuzion's Treasure Trove
> 1 votes

---
Tags: contacts, civireport
---


title: Title for Containers?

text:
# Question
Title: Title for Containers?
I'm trying to add a title to a container. I've created the following:

However, I would like to have a title like this, for example:

Is there a default CSS class that I could use? Currently, I've wrapped a table with a div of

`class="crm-tabset ui-tabs ui-widget ui-widget-content ui-corner-all"`

# Answer
> 1 votes
Found a workaround under the 'Membership' section:

---
Tags: fields
---


# Question
Title: Can I add an automated "other" field using custom fields?
I have a "Select" field options for one of the custom data set. One of the "select" option is "Other". But I would like user to manually enter data related to "Other" field into another text field. Is it something possible to do?

# Answer
The way to achieve this natively in CiviCRM without writing any code is to create a second text field in which the user can enter their "other" value.

If you want to further improve the UX you can write a little jQuery which will hide the extra field unless the "other" option is selected.
> 2 votes

# Answer
This is very possible and easy to configure with webform\_civicrm module - for those of you on Drupal! The Drupal webform module has built-in conditionals. You can use it to show/hide any Contact field (core or custom) at any time depending on the value of any field (drupal, core or custom) selected by the user earlier on.

If you're not on Drupal - then you will need to code your own conditionals functionality:

```
-create the Other Text/TextArea field and insert it in the profile
-add some .js to pages that shows a profile with such fields in it
-use jQuery to hide the Other Text/TextArea field by default
-and to make it show when the Other option is clicked

```

EDIT: re: registering multiple participants: here is an example!

```
-have 4 Child-Contacts in the CiviCRM tab
-ask the user for the #Children they would like to register for the Event (webform field)
-use webform conditionals to show the correct # of Child-Contacts
-of course these fields can even be made to prefill for logged in users!
-but I can't show you that - or you'd know way to much about my kids!
-use the Event Registration section in the CiviCRM tab to create Event
-Registrations for all!
-(and perhaps mom/dad) - when form is submitted

```
> 1 votes

---
Tags: custom-fields
---


title: Authorize.net changes

text:
# Question
Title: Authorize.net changes
I received a notice from authorize.net telling of changes to the interface. I did not see any comments so I thought I would ask the question. Does the connections to civicrm require any updates because of:

* Akamai SureRoute
* Transaction and Batch ID
* RC4 Cipher Disablement

# Answer
This isn't a *full* answer, but ... I just had to research this same thing for a client.

1. Check that your processor config is using the correct URLs: http://www.authorize.net/support/akamaifaqs/#newurls

/civicrm/admin/paymentProcessor?reset=1

2. Even in our client's old version of CiviCRM, the transaction ID field is 255 characters.
3. The cipher suite is a question for your host. A good host *should* be using modern cipher suites and disallowing insecure ones.
4. Not sure about requiring sequential transaction ID ... have not done a CiviCRM code audit to make sure (yet). Don't see why it would, but who knows.
> 3 votes

# Answer
See CRM-16928, a pull request on CiviCRM 4.6 to update `core/xml/templates/civicrm_data.tpl`. It is marked as fixed/completed as of 4.7.
> 2 votes

---
Tags: authorize.net
---


# Question
Title: How to limit number of participant less than 10 for a single transaction?
Scenario is like this:

* Total Participant for the event is 500 (I know how to define that)
* 2 types of ticket available: Adult & child
* On a single transaction only 5 people should be able to register, mix and match of adult & child. (But when I select "multiple participant is allowed", CiviCRM automatically enables 10 participants).

Is it something possible to do to decrease number of participant value to less than 10?

# Answer
> 3 votes
This function is added to CiviCRM core 4.7. But I have managed to get it done by this extension https://github.com/veda-consulting/uk.co.vedaconsulting.maxadditionalparticipants

---
Tags: civievent
---


# Question
Title: Adding dynamic data in CiviMail angular template
I have developed an extension which adds the possibility to add attachments to a message template. When a user select the template in CiviMail the linked attachments are also sent. This is working well.

But now I want to show which attachments are linked to a template when a user selects a template in the CiviMail UI.

In the old way I would add jQuery and an event listener to the drop down with templates and then fetch with Ajax the linked attachments and inject them somewhere in the screen. However CiviMail is now working with Angular and my understanding is that this should be much and much easier in Angular. However I have played around and can't get it working.

My question is how do I use angular to listen for a template change and then inject some data into the angular template?

# Answer
I've been recently digging into Angularjs, as I'm trying to make some customization, and this is what I figured out after a reading loads of blog posts covering the subject. I'm not an angular expert so I don't know how this affects performance.

The following script is from an extension using hook\_civicrm\_angularModules and Angular's `$provide` service in conjunction with the `decorator` function to intercept a CiviCRM directive and 'decorate' it to add/replace/extend behaviour, more info here.

**Demonstration**:

```
// myModule.js
  (function(angular, $, _) {
      // declare your module
      angular.module('myModule', []);

      // Hook into crmMailing module
      angular.module('crmMailing').config(function($provide){
         // intercept crmMailingBlockMailing directive, note the 'Directive' suffix
         $provide.decorator('crmMailingBlockMailingDirective', function($delegate){
              var directive = $delegate[0];

              // Original compile function
              var compile = directive.compile;
              // New compile function
              directive.compile = function(Element, Attrs){
                  var link = compile.apply(this, arguments);
                  // Append your custom directive
                  Element.append('<div crm-my-directive></div>');
                  return function(scope, elem, attrs){
                      link.apply(this, arguments);
                  };
              };
              return $delegate;
         });
      });

      /*
      * Extending crmMailing
      */

      // Your simple custom directive
      angular.module('crmMailing').directive('crmMyDirective', function(){
         return {templateUrl: CRM.resourceUrls['uk.co.myextension'] + '/ang/directives/crmMyDirective.html',
                controller: 'ExampleCtrl',
         };
      });

      // Your controller
      angular.module('crmMailing').controller('ExampleCtrl', function($scope, crmMsgTemplates){
        $scope.$watchCollection('mailing', function(mailing){
            crmMsgTemplates.get(mailing.msg_template_id)
            .then(function(value){
                 mailing.msg_template_title = value.msg_title;
            });
        });
      });

    })(angular, CRM.$, CRM._);

```

**Custom directive template**

```
<div id="my-directive">
    <div crm-ui-accordion="{title: ts('My Custom Directive')}">
        <p>Template Id: {{mailing.msg_template_id}} | Template Title: {{mailing.msg_template_title}}</p>
    </div>
</div>

```

You can pretty much create your own services/factories, directives, etc or change the behavior of existing ones and hook it into the Mailing app.

Hope it helps.
> 7 votes

---
Tags: civimail, angular
---


# Question
Title: How can I add a banner image in the confirmation email for a particular event?
I have already customised the system generated email template with organisation banner & logo, but I am not able to figure out how to add a banner for a specific event which would be different than the generic banner? is it possible to do?

# Answer
> 5 votes
If you want it in addition to the default/generic banner you can probably add it in at the top of the "Thank you and receipting" section of the event.

If you want to use it in place of the generic banner, you may need to customize the template with some If/Then logic, checking the event ID in the smarty template somehow. Here's an example for a Contribution page, perhaps you can do something similar in the Event page. (To find the variables you have to work with, try inserting {debug} into the template and then registering for the event to receive the email with the Smarty variables listed)

EDIT: Default message template can be changed like this

```
{if $event.id == '36'}
<p><img alt="" src="https://your.image.url.in.full" style="width: 600px; height: 300px;" /></p>
{/if}

```

---
Tags: civievent, message-templates, system-workflow-messages
---


# Question
Title: Use Create Mode Profile - Selection fields shown twice
Joomla 3.5.1 Civicrm 4.7.7

I have created a custom profile, used for volunteer registration. When the form is loaded on the joomla front end in create mode, any fields that are either multiselect, or simply select, show the selections field twice. First field shows default as "-none-" and the second shows "Select some options".

See here for example:

Any help will be appreciated.

Thanks

# Answer
> 1 votes
This sounds like a theme related issue and if you try a more standard Joomla theme for the civicrm pages then you might find the problem disappears in which case you then know that you need to either switch theme or resolve some css issues.

---
Tags: profile, joomla
---


# Question
Title: Test email does not match CiviMail WYSIWYG editor
We are building complex emails with a multi-column template. The geometry of the mailing looks good in the WYSIWYG editor, but when you send a test email, it looks different. Does anybody hear the same concern from users?

# Answer
> 8 votes
*WYSIWYG* is something of a misnomer; what-you-see is not really what-you-get. This is universally true whenever your editing environment is different from the final product, even going back to the print world— my bluesheet was always going to be slightly "off" compared to my proof. This is not specific to CiviCRM, but the inherent problems are exacerbated because 1) you are working in a web browser, and 2) your are trying to produce an email— and triply if you are trying to copy and paste from material prepared in a Microsoft Office, Adobe Creative Suite, or other desktop software.

## Formatting-to-markup varies almost arbitrarily

The first issue is that the HTML produced by a Javascript WYSIWYG editor like CKEditor differs slightly from machine to machine. To repeat, not only will the appearance differ slightly from browser to browser (and browser version to browser version), operating system to operating system, and editor configuration to editor configuration, but the *markup itself* is different.

This happens because there is no standard way to translate "rich text" into HTML elements. Even with HTML5, each browser manufacturer interprets ContentEditable in its own way, and at its own success rate.

I tried copying and pasting the same text from an e-mail signature from Outlook 2013 into the same CKEditor-enabled form on the same site in four different browsers and got four different markup results when I view source:

Microsoft Edge

```
<p style="margin: 0in 0in 0pt;"><b><span style="font-size:10.0pt;font-family:
"Arial Narrow",sans-serif; color:#1F497D">PUBLIC SECTOR</span></b></p>

```

Google Chrome

```
<p style="margin: 0in 0in 0pt;"><strong>PUBLIC SECTOR</strong></p>

```

Firefox Developer Edition

```
<p><strong>PUBLIC SECTOR</strong></p>

```

Opera 12

```
<p><strong>PUBLIC SECTOR</strong><br />
 </p>

```

You cannot rely on a WYSIWYG editor to produce predictable HTML. End of story.

## Email clients are weak at HTML, terrible at CSS

The next problem is that email clients do not interpret HTML and CSS as well as browsers do (Javascript, and often webfonts, are out of the question entirely due to security concerns). Cross-platform HTML emails are exceptionally difficult to produce. This is a top question in the manuals of every email provider from Litmus to SendGrid, and the raison d'être for companies like EmailonAcid and PutsMail.

The problem is exacerbated further because people can check their email in many different ways. For my various work and personal accounts, I use a combination of Outlook 2013, Rackspace webmail, other webmail (Gmail, Outlook.com, AOL, etc.), various mobile clients (iOS Mail, TypeMail, Gmail for Android), and even Trillian, and while as an IT worker I am an outlier in this regard, it wouldn't be unusual if many of your recipients checked email on a desktop client or webmail, an Android phone, and an iPad as my parents do.

## Simplify your formatting

CampaignMonitor offers a well-maintained guide to CSS in email, showing how different email clients will mangle your CSS in different ways. Gmail, probably the largest and most popular webmail service, strips out quite a bit. Outlook, probably the most popular desktop client, doesn't support responsive layouts or most positioning. And these are relatively easy to get a hold of for testing— good luck finding a test suite for IBM Notes (neé Lotus Notes) or Novell GroupWise.

Therefore, the old advice still applies: the more predictably you want your emails to render, the more primitive your formatting must be:

1. inline CSS 2.1 only, and using only basic selectors
2. no HTML 5 elements
3. only basic text and font formatting, which means
a. no positioning
b. table-based layouts c. avoid padding or margin
d. avoid floats
4. basic image handling
a. no CSS background images
b. specify pixel-based image dimensions

There are many guides available and many testing suites.

## Suggested practices for CiviCRM

To mitigate the problems with HTML, I encourage authors to do the following:

### 1. Always provide a text version

For CiviMail, you have the option to include separate text and HTML input. There are people who prefer text to HTML for various reasons, but it also provides a mechanism for people with absolutely hopeless email clients to read the content.

### 2. Include the permalink to view the mailing as a web page

If anonymous users have the "view public CiviMail content" permission in your setup, you can include the token that provides a link to a web page version of your message. Then you can simply stick this link at the top of the header with the usual explanatory text, e.g. *If you have trouble reading this message, visit XYZ to view it as a web page*.

But I think the best advice I can give is to give up the desire to have total control over the end user's experience. Email was never designed for that, and there's nothing CivicRM alone can do to change the way the world consumes its electronic mail.

# Answer
> 2 votes
A solution that is round the corner (available now as alpha) is Mosaico integration with CiviCRM to give you a drag and drop template builder. Alpha-5 was released recently which works with 4.7

---
Tags: civimail, ckeditor
---


# Question
Title: Civimail & Drupal Multisite -- tracking url looks in wrong location for civicrm.settings.php
I've looked around and seen several similar issues to this, but not exactly the same. I have civimail configured to send emails just find and the tracking url works initially, but ends in failure as it cannot find the civicrm.settings.php file in sites/default/

The problem may be that I have multiple sites running on a common installation of drupal. But, the sites folders are named the same as the virtual site (e.g., sites/example.com for example.com). It's not clear to me why Civicrm is failing to detect the proper path for the civicrm.settings.php file.

For reference: Civicrm 4.6.14, Drupal 7.42

# Answer
> 1 votes
**KEY thing is** that when you have a Drupal multi site config - make sure that each civicrm is in its corresponding /sites/example.com/modules

You can structure that too: put your CiviCRM versions in one central place eg /var/www/ so you have a civicrm/4.6 a civicrm/4.7 etc - then add a symbolic link in each projects /modules directory to the /var/www/civicrm/4.x version it's on.

This way you can now easily update both minor Drupal and minor CiviCRM versions across all your sites/projects!

**EDIT:** example: in /home/karin/org.ca/modules

> lrwxrwxrwx. 1 karin karin 20 Jan 15 13:37 civicrm -\> /var/www/civicrm/4.6

---
Tags: civimail, drupal, multisite, webserver
---


# Question
Title: Setting default values for Personal Campaign Pages
We have a student organization where all students are being asked to help solicit contributions to a campaign. Was hoping to create personal campaign pages (PCP) for each student. Rather than having each student create their own individual title, message, etc. for their PCP, I'd like to default values that they can then override if they choose to do so.

Is there any straightforward way to auto-create the PCPs with default values for a list of current users within a group? Anyone tackled this one before that can point in the best direction?

Using CiviCRM 4.5.4 on Drupal.

# Answer
> 1 votes
I am not sure about API - But you can create an script against database that would be easier you can insert values into the table called civicrm\_pcp just make an entry using different contact Id this will be faster - just create a single PCP first and copy the value for the rest of contact

# Answer
> 0 votes
No, Contribution Page API does not support PCP (or other 'extras' like Widget,Tell-a-friend, etc.) but that would be a great addition!

# Answer
> 0 votes
An API for Personal Campaign Pages is in development. You can follow the issue here:

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

---
Tags: civicontribute, personal-campaign-pages
---


title: Webform CiviCRM and Gift Membership

text:
# Question
Title: Webform CiviCRM and Gift Membership
Is it possible to use Webform CiviCRM Drupal module to create Stand Alone Forms for gifting a membership to a third party?

# Answer
Yes, you can do this with Webforms. Create two contacts on the webform. Contact 1 will pay (that's always the case with contact 1), you can set contact 2 to receive the membership. Incidentally you could also add contacts 3, 4, etc. to also receive gift memberships.

More details can be found in these instructions.
> 6 votes

---
Tags: civimember, webform-civicrm
---


title: Partial Upgrade

text:
# Question
Title: Partial Upgrade
This is the second time (and the first caused a whole lot of misery) that I have tried to upgrade Civi to the latest version and get an error message saying "Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again." The upgrade tasks screen reads /drupal /civicrm.module:489 civicrm\_invoke('upgrade', 'queue', 'ajax', 'runNext') unknown:unknown call\_user\_func\_array('civicrm\_invoke', Array)
/usr/home/recovery /htdocs /mtpleasantvillage.org /drupal/includes /menu.inc:517 menu\_execute\_active\_handler()
/usr/home/recovery /htdocs /mtpleasantvillage.org /drupal /index.php:21 {main}

All of this is beyond me and challenges my understanding of Civi as a system that relatively naive users can use.
Maybe my internet connection hiccuped and the upload of the extracted file didn't go through, so I will try again. The last time this happened, I had to get my ISP to load the backup of the DB and then upload all the data (membership and contact info) that had changed since the last update. I will say that Civi seems to work just fine with what it thinks is a partial update. I did see a number of references to the 4.6 alpha DB when I was trying to upload 4.5. Could this be the problem?

# Answer
Just to follow up with an answer, it looks like your sql configuration is causing problems, based on your comment:

> I'm now getting an error message that says the backup that was loaded is in MyISam format and Civi wants InnoDB and that this might result in data integrity issues. I'm following up with my ISP to see if this will solve it. I also see that I have lost my Civi Admin menu, so that may also be a data integrity issue.
> 1 votes

---
Tags: upgrade
---


# Question
Title: Rich html CiviMails can send from a Mac but not Windows?
I've an issue with the new 4.6.5 CiviMail on Joomla 3.4.3 where the 'send test' button remains deactivated after pasting in content - and when a draft is saved, it saves blank.

We send out a weekly newsletter that is rendered as a web page ( http://www.pctscotland.co.uk/latest-newsletter ), the source html of this is copied and pasted into the source of the CiviMail interface. This has been working for some years but stopped after I upgraded to 4.6.3 (normal composed mass mails were fine but not these html ones copied and pasted). Upgrading to 4.6.5 fixed this for me (Mac Chrome/Firefox) - but not for the other site users using Windows Chrome.

They paste the content in, fill in the required fields and the 'send test' button remains greyed, with no 'preview as html' link to the left. When they save the draft, it saves it as blank. When I do the same, it works. I've just done a detailed screen share to make sure there is no difference in processes - and there isn't. All users trying to do this have the same super user privileges.

Any help on this would be really appreciated.

Nic

# Answer
> 1 votes
I haven't heard any other issues like this so I suspect this has been solved by now. Please upgrade to the latest version and try again.

---
Tags: civimail, email
---


title: Civicase activity table default options

text:
# Question
Title: Civicase activity table default options
I would like to change two aspects of the Activities table on the Civicase summary screen.

1. Change the default number of rows to be shown from 10 -\> 100
2. Also have a filter to automatically hide the actvity 'edit custom data' which is created whenever any custom data relating to the case is updated. This is especially relevant as i'm using Multiple case clients and this seems to create 3 instances of the activity 'change custom data' (if there are 3 clients) for each single edit of the data.

For number 1, I've looked into the templates and have so far found the template . /CRM/Case/Page/CaseDetails.tpl is being called. I think the bit concerned is {foreach from $rows item row} ,

I've not got to point 2 yet.

Any answers or guidance very much appreciated.

# Answer
> 1 votes
Point 1 is probably not the part, that just reads from the array $rows. I think you have to go to CRM/Case/Form/CaseView.tpl and change the 10 in here to 100:

```
  oTable = cj('#activities-selector').dataTable({
    "bFilter"    : false,
    "bAutoWidth" : false,
    "aaSorting"  : [],
    "aoColumns"  : columns,
    "bProcessing": true,
    "bJQueryUI": true,
    "asStripClasses" : [ "odd-row", "even-row" ],
    "sPaginationType": "full_numbers",
    "sDom"       : '<"crm-datatable-pager-top"lfp>rt<"crm-datatable-pager-bottom"ip>',
    "bServerSide": true,
    "sAjaxSource": sourceUrl,
    "iDisplayLength": 10,
    "fnDrawCallback": function() { setSelectorClass(); },
    "fnServerData": function ( sSource, aoData, fnCallback ) {

      if ( filterSearch ) {
        var activity_deleted = 0;
        if ( cj("#activity_deleted:checked").val() == 1 ) {
          activity_deleted = 1;
        }
        aoData.push(
          {name:'status_id', value: cj("select#status_id").val()},
          {name:'activity_type_id', value: cj("select#activity_type_filter_id").val()},
          {name:'activity_date_low', value: cj("#activity_date_low").val()},
          {name:'activity_date_high', value: cj("#activity_date_high").val() },
          {name:'activity_deleted', value: activity_deleted }
        );
      }
      cj.ajax( {
        "dataType": 'json',
        "type": "POST",
        "url": sSource,
        "data": aoData,
        "success": fnCallback
      } );

```

But try! And it is best to modify this in an extension. The same for number two, identify the button and hiding it in a specific template which you add with a combination of buildForm or pageRun hook and CRM\_Core\_Region like so:

```
CRM_Core_Region::instance('page-body')->add(array(
    'template' => 'yourtemplate.tpl'

```

# Answer
> 1 votes
For point 1 i found that the code was in CRM/Case/Form/ActivityTab.tpl which i believe is called from CRM/Case/Form/CaseView.tpl

I changed the figure from 10 in here to 100:

```
oTable = $('#case_id_'+CaseId).dataTable({
 "bFilter": false,
...
...
 "sAjaxSource": sourceUrl,
 "iDisplayLength": 100,
 "bDestro": true
...
...

```

# Answer
> 0 votes
I'm trying to make the same change in 4.7, but everything seems to have changed. Where should I be looking now for these CiviCase activity table display tweaks? Thanks.

# Answer
> 0 votes
Point one has been addressed by this improvement which will remember users' preference about how many rows to display (using local browser storage, so works even between sessions).

---
Tags: activities, civicase
---


title: Drupal 6 Fatal error on profile view

text:
# Question
Title: Drupal 6 Fatal error on profile view
D6, Civi 4.6.7

I've ceated a directory profile of organisations. I can see the directory list, but when trying to 'view' the details of an organisation I get the following error:

```
Fatal error: Class 'CRM_Profile_Page_View' not found in /home/xxxx/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php on line 297

```

How I can fix this?

# Answer
> 1 votes
If you have recently upgraded, make sure you clear your caches, including the contents of /sites/.../files/civicrm/templates\_c/\*

---
Tags: profile, drupal-6
---


title: How to get url for custom image field

text:
# Question
Title: How to get url for custom image field
I have currently created a custom field in CiviEvents to upload an image for my event. When viewing the eventinfo page I can see the image in a collapsible field which shows the thumbnail of the image and when I click on the image it enlarges in a popup box.

All I need is the actual custom field url that point to the image so I can theme it correctly on my template.

I've dug deep into the CustomDataView.tpl and come across {$element.field\_value} but again this loads the custom field in the collapsible pane.

Any suggestions?

Thanks in advance

# Answer
> 2 votes
For security reasons, CiviCRM does not expose uploaded files directly, but routes them through a php script which checks permissions before fetching the image. If you know the file id and the event id, then you can construct the url yourself:

yoursite.org?q=civicrm/file&reset=1&id=FILE\_ID&eid=EVENT\_ID

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


# Question
Title: How can a member view past and present pledges?
How do I add a Pledge so that he may view & pay pledges thru the self-service payments page? Thank you for your help.

# Answer
> 1 votes
You can give your contacts (who have a user login) access to their Contact Dashboard - and once there they can see Pledges

If you don't have CiviPledge enabled go to Admin \> System Settings \> Enable components.

If you have enabled it but don't see it you may need to go back to your Permission settings and enable those.

You will also find that when you add a Pledge it offer a SelfService Payments Page option.

Maybe worth reading the chapter in the civi book

---
Tags: pledges
---


# Question
Title: How can I set up an email discussion list based on CiviCRM groups?
Is it possible to create civicrm integrated email discussion lists? For example I want the members of a civicrm group to be able to send an email to theirgroupname@ourcompany.org and have it sent to all members of the group. All members of the group should be able to respond to such messages. Email version of google groups, yahoo groups. I did some googling and saw some mentions of Drupal/Civicrm/Organic Groups/Mailman integration but can't tell what is the current best solution. A lot of the pages were very old.

# Answer
we have deployed this in a couple of situations including making a UI that let's you set the Civi Group, or a Civi Relationship, as the basis for the Mailman group. There is still the issue about what happens when someone unsubs via Mailman, since the Civi synch just puts them back in ;-)

I don't think we were ever able to take it further than a build for that single client ie it didn't not get developed as an extension or even a releasable module. i should check what might be involved in making it able to be shared.
> 1 votes

---
Tags: email, groups, mailing, google
---


# Question
Title: What versions of PHP are used in CiviCRM's internal QA?
The wiki currently states that CiviCRM has bare minimum (5.3.10) and recommended (\>= 5.4) PHP requirements.

Knowing what CiviCRM has been tested with can help identify what should be expected to work reliably.

* As of today, what versions of PHP do CiviCRM's test infrastructure test with?
* This question will become out of date over time; for future reference, is there a better place to check this information?
* For orgs who aren't able to match the PHP versions that CiviCRM is tested with internally, what other options are available?

# Answer
> 6 votes
* At time of writing, all PRs tests and scheduled tests run under Ubuntu 12.04 (PHP 5.3.10). There is an effort underway to introduce a test node for Ubuntu 16.04 (PHP 7.0) (although details are still a bit in flux).
* When you inspect the results of a test run, you can get some details (such as the node name and console output). The node names follow a convention -- `test-ubu1204-5` is running Ubuntu 12.04 (precise); `test-ubu1604-1` is running Ubuntu 16.04 (xenial).
    + This tells you the general platform and hints at the PHP version. I'd like to keep these generally aligned with upstream versions.
    + As a somewhat stronger statement, I want to keep the test nodes aligned with `civi-download-tools --full`, which autoinstalls system requirements on some common builds of Ubuntu/Debian. If you know the target platform, you can lookup a more specific list of packages.

---
Tags: php, testing, coding-standards
---


title: One page and auto link

text:
# Question
Title: One page and auto link
We have a volunteer organisation. Most of the volunteers are in thier 70's. Is there a way that CIVI can do the following using either a profile or a specific page that does the following sequence at once after data entry

1. Add the Household Contact and relevant fields
2. Adds a new individual for each household member
3. Adds the relationships for primary contact then household member(s)
4. Then adds the Household as a membership and save it all

Ok i hear you....am I drawing a very long bow?

# Answer
> 2 votes
It sounds like it will depend somewhat on your set up. If you're on Drupal, you could have a look into using webform civicrm which would be able to handle all of the above (creating the contacts, relationships, and membership). You could also do clever things like populate the name of the Household based on the Last name value entered for one of your contacts.

I'm not as familiar with the other CMS integrations but hopefully someone more versed in Wordpress or Joomla can chime in if you're using one of those.

---
Tags: contacts, profile, households
---


title: Invalid MailChimp List ID: 3b27444534

text:
# Question
Title: Invalid MailChimp List ID: 3b27444534
Good morning,

I was trying to sync my contacts from CiviCRM to Mailchimp, but I get the following error Invalid MailChimp List ID: 3b27444534. After a while, the syncing process does not progress at all. Do you have any solution to this issue?

Thank you very much,

Best Regards,

Alberto

# Answer
> 1 votes
It looks like this issue is known by the maintaining developers for the mailchimp extension. Please see https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp/issues/129 and run through the steps they've suggested on there.

If it leads to a fix, it would be great if you could come back and post your solution on SE!

---
Tags: extension, error, mailchimp
---


# Question
Title: Is there a way to customize the Contact Dashboard?
Is there a way to customize the Contact Dashboard?

Thank you for your help.

# Answer
> 2 votes
Laryn covers basic customization of the main dashboard (assuming that's the dashboard you're referring to). You can also customize further:

# Answer
> 1 votes
For a fuller description including how to create dashlets, see the chapter/documentation about the Dashboard here. (Excerpts below).

> When you first log into CiviCRM, the first page that you will see is the dashboard (CiviCRM Home). The dashboard allows you to see important information about your site and CiviCRM by displaying a series of "dashlets". A dashlet is a report that you can display on your home dashboard. Many dashlets come with CiviCRM by default, and you or your administrator can create additional dashlets that are specific to your organization's needs...
>
> You can add these dashlets to your CiviCRM dashboard by clicking the Configure Your Dashboard button. You will see a list of dashlets that can be dragged into the right or left column of your dashboard.

---
Tags: user-dashboard
---


title: Contacts export only contains one entry

text:
# Question
Title: Contacts export only contains one entry
In CiviCRM 4.7.5 and 4.7.6 (tested in both) we have a problem exporting event participants.

If you 'find participants' \> search results screen \> select all records, and then click 'export participants' no matter what options you select on the next screen (primary fields vs selected fields), only one record is exported.

The same behaviour happens if you use the advanced search tool to export any list of contacts - eg a list of members, so I think there may be a bug in the search results screen, as this is used by both of the above routes.

Using Event Reports \> Event Participant List \> Export to CSV will export a full list of participants, but doesn't have our custom fields.

Is anyone else seeing this behaviour / bug?

# Answer
> 2 votes
This was a bug in CiviCRM which has since been fixed. You can upgrade to version 4.7.7 to fix your site.

See https://issues.civicrm.org/jira/browse/CRM-18378

---
Tags: search, export
---


# Question
Title: What are these symbols on the batch entry screen?
I am updating the contributions chapter of the user guide so I am examining in detail funcionality that I don't necessarily use every day.

To the left of the contact field in the batch entry there are some symbols. Should they be there and if so what are they for? They are not really obvious unless you magnify the image, but there was enough there when unmagnified for me to investigate further.

# Answer
> 1 votes
No, they are not supposed to be there. I suspect there is something amiss with the css on your site; possibly an interfering theme. This is what the screen looks like on dmaster.demo.civicrm.org:

On the other hand, I don't think they are working properly. I believe the checkboxes are supposed to represent that the row has been entered with valid data... but they appear regardless of what's entered. That sounds like a js bug in core.

---
Tags: civicontribute
---


# Question
Title: How to Include Supplement address line 1 to billing block on Civicrm 4.6.10?
By default on billing block there's no supplement address line available. I would like to include this field to billing block. What is the easiest way to do it? I have looked at the Billingblock.tpl file but this particular field is not available!

Can anyone help please?

# Answer
> 1 votes
As far as I know this can't be done without modifying core code. The list of fields in billingBlock.tpl is hard-coded.

---
Tags: billingblock
---


# Question
Title: Is civicrm-buildkit safe to use in production?
Background: I am recreating our CiviCRM installation on top of Drupal inside a Docker container. After a significant amount of research, I have decided to incorporate the best parts of civicrm-docker and the official Drupal Docker container. However, before I progress too far down this road, some questions came up.

Q1: Is it sensical to run a production site that has been built using civicrm-buildkit?

Q2: What is the update procedure for a civicrm-buildkit build?

Q3: Should Drush be used instead of civicrm-buildkit?

Q4: (open ended) Does anyone have experience they would like to share?

I will keep an eye on this thread, but if anyone would like to chat realtime, I can also be found in IRC.

Thanks!

# Answer
Buildkit is not *designed* for production use but I can't think of any reason it *can't* be used that way. As your second question suggests, the upgrade procedure will indeed be different. Steps for upgrading on a buildkit install would be:

1. Backup your database
2. Do a `git checkout tagname && git pull` for all 3 git repos (civicrm-core, civicrm-packages & civicrm-yourcms).
3. Run `setup.sh` with the correct arguments to regenerate code and download dependencies.
4. Run the upgrader (can do this from the command line as well)

You'll probably want to create a little script to do this for you.
> 2 votes

---
Tags: drupal, installation, best-practice, security, civicrm-buildkit
---


# Question
Title: Cannot get to Upgrade Now screen - Upgrade from 4.4.3 to 4.5.1 - Wordpress
I am trying to upgrade CiviCRM from 4.4.3 to 4.5.1 (and eventually go to the latest version. I am doing it incrementally 4.4-4.5-4.6-4.7 to be safe). I have been following these steps

https://wiki.civicrm.org/confluence/display/CRMDOC45/Upgrade+WordPress+Sites+to+4.6

I am stuck at step 4:

* Point your web browser to the following URL (you should already be logged in to Wordpress with administrator-level permissions): http://wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

I copied the civicrm.settings.php file to the civicrm folder after I uploaded the new 4.5.1 files. When I try to go to the link above I get a Page Not Found error

If I remove the civicrm.settings.php file I get a Page Isn't working error

Does anyone have any idea on what I need to do here? Thank you so much for any help you can provide.

# Answer
> 0 votes
Kevin is right, there's no need to stop at each intermediate release--you can just download the latest and upgrade all the way through.

In fact, even besides wasted time, it's generally a bad idea to upgrade through in-between releases. The point releases fix bugs, and sometimes the bug they fix is a bad upgrader.

On occasion, an upgrade from a *really* old version (you'd be surprised at some of the Civi911 calls) will fail if we try it straight through, while it works if it's broken into a couple of pieces. Still, the process would be to upgrade to the *last* of the 4.5 series (for example) and then to the latest version. You should generally never upgrade to the .0 or .1 unless that's the latest release.

# Answer
> 1 votes
When I last did this, I went to 4.4.latest and then jumped to 4.6.15

I was able to bypass the 4.5 upgrade, the 4.6.x upgrade has all the db update scripts so you will not miss anything.

# Answer
> 0 votes
I figured out my CiviCRM upgrade problem. The documentation said to enter xxxxxxx/wp-admin/admin.php?page=CiviCRM&q=civicrm/… I looked further into that location and found the actual path on the server to admin.php was /home/xxxxxx/public\_html/wordpress/wp-admin The path actually had to be xxxxxxx/wordpress/wp-admim/admin.php?... Once I put that into the browser it brought me to the upgrade page. I am working on the upgrade now. I did upgrade straight to the newest version.Thanks for working with me on this

---
Tags: wordpress, upgrade, 4.5
---


# Question
Title: Webform form submit, and notify auto email in html format!
I have a newsletter signup form built over webform. For people who signed up, I want to send an automatic notifications email once the form is submitted. It's working like a plain text. But I would like to customise the email and send in html format. Is it possible to do?

# Answer
> 4 votes
Yes you can! You'll need some more Drupal modules/ config - here is a pretty good tutorial: https://www.ostraining.com/blog/drupal/html-emails-from-drupal-webform/

Note (if this was re: Contribution, Membership or Events): webform\_civicrm module will also check to see if you have the Thank you and Receipting section filled out on your CiviCRM side - get into your message templates (HTML version) to make edits to that - if you go that route!

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


# Question
Title: How do we set up WordPress front end pages to allow our team to access CiviCRM admin tabs etc.?
After viewing the video of this webinar, I'd like to emulate the page that Erik Hommel had shown. CiviCRM 101 for Newbies https://www.youtube.com/watch?v=a5bjr0s02NQ

It looks like he had a front end page to allow users to access the CiviCRM admin area.

We are exploring CiviCRM to see if it will meet the needs of our non-profit organization. We need users to access the contact and case modules primarily. We'd like to set this up as front end pages that would not be visible to the public but perhaps set up with role permissions and possibly limit some of CiviCRM functionality. They need to enter cases and contacts for clients who call with questions, asking for publications etc.

I've read about shortcodes for creating front end contribution and events pages, but nothing about the CiviCRM admin area with the tabs across the tops to create new contacts, cases, dedup contacts etc.

Does anyone have any information or links to where this might be in the documentation or if it's even possible?

Thanks in advance for any help offered.

# Answer
One issue is that in Drupal, there isn't really a division between front-end and back-end. The whole idea of an administration theme in Drupal is *relatively* new, and the default prior to Drupal 7 was that settings forms would look no different than content pages.

Meanwhile, WordPress (and, to an even larger degree, Joomla!) has a clear delineation between front- and back-end. CiviCRM's main interface (the part for trusted users to see other contacts' stuff) is considered a back-end feature, and you have to access it via the WordPress administrative menu.

*(That said, at least in WordPress it's a relatively smooth process to get to the back-end. In Joomla! the login sessions are independent.)*

To accomplish what you need, create a dummy user to serve as a prototypical case manager and do the following:

1. If you haven't already, install a role editing plugin for WordPress to allow you to define a new role for case managers.
2. Go to **Administer \> Users and Permissions \> Permissions (Access Control)** in CiviCRM and then click **WordPress Access Control**.
3. You should see a column for your newly-created role with a bunch of checkboxes. Each row is a separate capability within CiviCRM, and by default, your new role will have none that are special. You may need to experiment a bit with granting capabilities, but the ones I know you'll need to grant your new role are:

* `CiviCRM: Access CiviCRM`
    * `CiviCase: access all cases and activities`

Most permissions have a description (shout out to Jane Hanley and Tommy Bobo for actually documenting all of them at a code and documentation sprint), so you can get an idea of what others you should grant. Unless you grant specific ACLs (see below) for your users, for example, you'll probably want to also grant `CiviCRM: edit all contacts` and `CiviCRM: view all activities` to your role.
4. Use the "Private Browser" feature in Firefox (or "Incognito" feature in Chrome) to log in as that prototype user. See if the permissions seem correct for that sort of user. If not, go back to the WordPress Access Control page as an admin and adjust accordingly. (When you, the admin, grant or revoke capabilities, you, the case manager user, should probably log out and then back in to make sure the permissions are working correctly.)

If you want to set up detailed permissions over subsets of contacts, fields, etc., you'll need to use CiviCRM ACLs to grant access. Permission is additive, so if, for example, a user has the `CiviCRM: edit all contacts` capability, the ACLs for editing contacts will have no effect since that permission is already granted across the board.

Finally, check out the CiviCRM User Guide page for Permissions and Access Control for a more thorough guide to this.
> 2 votes

# Answer
I see what you mean :-)

In CiviCRM you can switch on/switch off tabs but that does not deal with the part where user a can see only part of it. In Drupal I would do that with the CiviCRM permissions but I guess that is different in Wordpress.

It is quite possible that an experienced WP developer has better answers but what you could do I assume is create an extension where you use the tabs hook to determine what user can see which tabs?

Alternatively we have created a CiviCRM Wordpress plugin for Contact Form 7 which sends all the data from a Contact Form to CiviCRM using the API. That might provide part of the answer? Check https://nl.wordpress.org/plugins/contact-form-7-civicrm-integration/ and https://civicrm.org/blog/erikhommel/send-wordpress-contact-form-7-data-to-civicrm-with-api
> 1 votes

# Answer
Thanks for watching my webinar :-) I am not sure I understand what your question is about? What CMS are you using? In my webinar I used Drupal with CiviCRM, and in Drupal you can allow users all sorts of access to parts of CiviCRM, which also means being able to create new contact etc. Not sure if that is what you mean by 'the CiviCRM admin area'?
> 0 votes

---
Tags: wordpress, evaluating-civicrm, admin
---


# Question
Title: ACL controls not working with smart groups?
I submitted a bug on an ACL problem in Nov 2014. CRM-15662. It was fixed in 4.5.5, and I tested it as working.

This appears to be broken again in 4.7.1. I have not tried to use this feature in a year so I don't know what happened since I last tested it as working. The organization needs this feature now. The target purpose is that chapter staff be able to view and edit their own members. A smart group is used to define the data they can see.

# Answer
> 1 votes
I can see that the pull request https://github.com/civicrm/civicrm-core/pull/4708/files which Jitendra claimed fixed the issue is not in version 4.7.1. It seems that it may have caused an issue and was therefore backed out - but I have not sleuthed that far so I am only surmising.

It‘s a fairly straightforward fix - but I do not feel I understand the potential knock ons particularly if it did introduce this other bug or not.

Your options are:

1) Go ahead and apply that one line fix manually or have your sysadmin do it, and back up everything and test thoroughly.

2) Report it as a bug and wait for it to be addressed.

3) Report it as a bug and provide funds for a core team member to examine it sooner. Show the previous ticket and let them sleuth it out. As there is a fix already there it probably will not take long to confirm if it did cause the other issue, and if so prevent that.

4) Recruit your local CiviCRM partner agency to examine this for you and make the best decision for you and your client.

# Answer
> 2 votes
I think this was an issue of misunderstanding. An ACL can have a target of a Smart Group, but the Group that contains the people who are permitted to access the target contacts must be a standard group.

The discussion was shifted to this ticket afaik.

---
Tags: smartgroups, acl, 4.7
---


# Question
Title: How to make tables with fixed header and left column - scroll vertically and horizontally
In our use case we need to batch update participants with large tables - up to 45 columns and 20-50 rows. For this to have any hope of success we had to find a way of getting the table to scroll vertically and horizontally, while fixing the header and left column. How to do it? Read on...

# Answer
We found a way that may perhaps be helpful for others, so we're posting the answer here. This applies to Drupal 7, Civi 4.6.17:

1. We needed to add extra fields to the Batch update profile code, as per this answer.
2. We used some javascript and custom css and allocated it to our batch update pages as a Drupal block, using php to target pages with '\_qf\_Batch\_display' in their query string. (Actually, the Css went in our custom css file.)
3. You can find a simplified example containing the javascript, html and css here.

Hope this might give others a leg up to a system that has worked really well for us.
> 5 votes

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


# Question
Title: Why do ACL roles not appear in Reports 'Access' option menu?
I want to restrict access for users so that they can only see certain contributions - just those for their own campaign. It doesn't appear to me that CiviContribute is very ACL aware, so I'm looking at producing a contribution report that is restricted in the same way. The 'Access' part of CiviReport has a menu where I can add an 'ACL Group/Role' - but it seems that only Drupal roles appear here - not ACL roles. Is this working as designed? Or is there something I'm missing? It appears that with contributions either a user sees everything or nothing, but I hope that isn't the case. I'm using Drupal and 4.6

# Answer
> 1 votes
Not sure if it is or was possible but as an alternative, you can :

* create a group in CiviCRM
* synchronize it with a Drupal role using CiviGroup Roles Sync (civicrm\_group\_roles) module (provided with CiviCRM)
* use this new role to limit access to your report

---
Tags: civicontribute, acl, 4.6
---


# Question
Title: Exporting Notes for Contacts Resulting in Incomplete Notes
So I'm new to using CiviCRM and I'm having some difficulty exporting my contacts properly. More specifically, I am unable to export all of the notes from a few of the contacts. I have been using the Select Fields for Export option and have selected several fields, including the Notes field. When I open the resulting CSV file I have found that only a few of the notes were actually exported. The notes are quite extensive (the person who made them originally wrote mini-novels on each contact) and, from what I have read online, this causes a problem. From what I have gathered it looks like the notes cut off when they reach some sort of a character limit. My question is: is there a way to export all of the notes, in their entirety, without loss of information, or is there some sort of a "hidden" character limit for fields?

There are 29 more for this contact alone.

I've blurred the actual text for confidentiality.

Thanks for any help.

# Answer
You should be able to do so by using API directly. cf. `https://yourdomain.org/civicrm/api/explorer` and use `Entity = Note` and `Action = get`

If you want to have it in a csv format, you could use the command line script provided in CiviCRM `bin/csv/export.php`

You will find the information about this script here : https://civicrm.org/blog/xavier/new-tools-to-automate-the-configuration-and-stagingproduction-migration

So you should be able to do what you want we a command line like :

```
php /full/path/to/bin/csv/export.php -u"user" -p"password" -s"yourdomain.org" Note > notes.csv

```
> 1 votes

---
Tags: contacts, export
---


# Question
Title: "Page www. ... .com does not work" when Submlitting Event Registration Webform for immediate On-line Payment
I use Webform Civicrm Integration to register multiple attendants to an event, and calculate the total fee. (This works fine).

I have included a Contribution Page, which provides the choice : Now on-line / Later.

"Later" works fine, but if I choose "Now on line", I get a page "Page www. ... .com does not work ; impossible to manage this request for the moment ; Error 500".

FYI :

The Contribution Page refers to a CM-CIC Payment Processor (extension), but the "test" processor behaves the same.

The Contribution page alone (via "https://.../index.php?q=civicrm/contribute/transact&reset=1&id=1"), works fine.

It seems that sth is missing between Webform and Payment page

# Answer
Webform CiviCRM works great with a number of Payment Processors! Especially those that process in-line (e.g. PayPal Pro and iATS Payments - Credit/Debit) - if you want to use https://civicrm.org/extensions/cm-cic-payment you'll have to check in with the Author for it - to see why this is not working for you.

I'm guessing CM-CIC may have a Payment Page? Then that will not work - you need an in-line payment processor.
> 2 votes

---
Tags: civievent, civicontribute, webform-civicrm
---


# Question
Title: Want to auto populate city and state from an entered U.S. zip code, WordPress
I am a complete newbie to CiviCRM and hoping to use this platform with WordPress to replace an antiquated CRM (even has comments for displaying properly on netscape). One of the desired features is to auto populate the city and state when a user enters a U.S. zip code.

I see something similar here. https://civicrm.org/extensions/civicrm-region-lookup. However, it doesn't look like it is being maintained for recent versions of CiviCRM. Is this a red flag? Also noted that this is for Drupal and I would need a WordPress version.

I did manage to find Administer \> System Settings \> Extensions but I don't see anything there similar to what I need.

I also see that USPS has Web Tools API with this functionality but wouldn't know how to implement that for CiviCRM within Wordpress. https://www.usps.com/business/web-tools-apis/address-information-api.htm#\_Toc410982991

All ideas, suggestions and help would be very welcome.

Thanks so much in advance!

D

# Answer
I only now stumbled on this question, so will copy-paste my response from the forum:

I am the developer of civicrm-region-lookup. I use it on CiviCRM 4.6, and it would require a small fix for CiviCRM 4.7, but it should work otherwise.

Although it is probably not the most user-friendly solution. It was meant to be flexible and vendor-neutral (i.e. not rely on specific paid sites for the data, make it possible to manage your own mappings).

For the US, you would need to import a list of postcodes via phpmyadmin, then configure the correct mapping in the admin settings (i.e. to set the field names so that the postcode field sets the city, but you might need an additional custom Javascript hook to set the state as well, which is not ideal, but not very complicated either).

There may be simpler solutions out there, especially for the US. If you decide to use this extension, I will be happy to provide some support on this forum if you run into issues.

Reference: https://forum.civicrm.org/index.php?topic=37098.0

See also the comments from petednz on the forum.
> 3 votes

---
Tags: wordpress, addresses, postcode
---


title: Civi AJAX API Search by "AND"ing 2 Tags

text:
# Question
Title: Civi AJAX API Search by "AND"ing 2 Tags
I would like to search the Civi API for Contacts that have both of two tags. I'm at a loss as to how to do this. Right now if you provide multiple tags, the default is to use an `OR` operation. For example:

```
CRM.api3('Contact', 'get', {
  "sequential": 1,
  "tag": [5,7]
  "return": ["tag","first_name"]
}).done(function(result) {
  // do something
});

```

This currently returns all contacts that have either tag 5 OR tag 7. I want to return all contacts that have both tag 5 AND tag 7. Is there any way to achieve this functionality?

# Answer
I don't think you can do this with one api call.

Not optimal but you could do a postprocess in place of the `// do something` when the result comes.

Better, you could create your own api call in a custom extension - see https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-AddanAPIfunction
> 1 votes

---
Tags: api, tags, javascript
---


# Question
Title: best practices for demo-site replication of a membership bug?
I think I've encountered a veeeeeery use-case-specific bug with online user-driven membership renewals and I'm trying to replicate it on the demo server to confirm. We're on drupal 7 and the issue pertains to users renewing their own on-behalf memberships as logged-in CMS users. The demo site is (rightly) nerfed from sending emails, so new drupal users never get their activation emails, so I can't find a way to fully create a new CMS user and log in as them to test. What's the best practice for doing this?

# Answer
> 1 votes
As you are in Drupal, i recommend using the drupal module masquerade which let you act as if logged in as another user.

Otherwise, with drush you could generate a one-time login for the user you want without sending an email. So from the command line, type : `drush uli user-name` and you will get a link that will log-in as the user `user-name`

---
Tags: civicontribute, civimember, contribution-page
---


title: Webform Submission URL Access Control

text:
# Question
Title: Webform Submission URL Access Control
I use CiviCRM Webform to manage complex Event registrations.

At the end of registration, an email is sent to the registrant, which contains a submission URL, in the form of : https://www..../?q=node/xx/submission/yy

But this URL is refused except for the Administrator

How must I manage Access Control, so that the registrant can access AND edit this submission ?

# Answer
I finally used *Webform: Edit own content* permission ... which worked Thank you all
> 0 votes

# Answer
I think you need to grant the *Webform: Edit own content* permission. This may still not give access to *view* the submission (haven't tried) but it would give the user access to edit their submission, which is probably more important (tweak the link you email out to edit rather than view the submission).

If all you want is to allow the user to see their submitted values, I second Karin's suggestion that you put them in the body of the email. This way the user can see them immediately without needing to click on a link.
> 3 votes

# Answer
A couple of thoughts:

1) I tend to always delete the submission URL from the webform Email notification. To give authenticated users access to their Webform Submission tuck it into a View where you filter the View /user/%/submissions \[a contextual filter (Webform Submission User) User: Uid\] so that they can only see their own Submissions - and create a Menu Tab for them in their My Account.

2) As @Kboy mentioned - you may just want to Email them all Values of the webform - if you want to pretty that up - you can make that a HTML Email format: here is a pretty good tutorial: https://www.ostraining.com/blog/drupal/html-emails-from-drupal-webform/
> 2 votes

# Answer
permissions per webform can give you more control on who has access to the webform submissions but i wonder if you really want to give results access to anonymous users, this mean that all non authenticated users will see the results tab on the webform.
> 1 votes

# Answer
Jacques - rather than giving the edit webform (ie the node) you can give

* Access own webform submissions
* Edit own webform submissions
> 1 votes

---
Tags: civievent, drupal, webform-civicrm
---


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

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

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

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

Thank you in advance.

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

```
.label {
  color: #000;
}

```

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

Also have a look at:

Backbone isn't loading on Civi 4.6.11 WP 4.4.1

Dequeue Backbone from theme load and load CiviCRM Backbone

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

---
Tags: wordpress, profile, error, theme
---


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

Am using Civicrm 4.6.15 with Wordpress.

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

---
Tags: profile
---


# Question
Title: In 4.7 CiviCase, why does reassigning a role not delete the old one?
In 4.7, when managing a case, I try to reassign a role to another contact, but it adds a new one.

It should delete the old relationship. The button is an 'edit' pencil and the hover text says 'reassign'. There is a separate add role button.

The function that is invoked is relationship() in CRM/Contact/Page/AJAX.php but the "cid" value is not set (this should be the Contact Id of the current person holding that role). So the existing relationship is not deleted.

# Answer
This is a defect. See issue CRM-18698 for details.
> 2 votes

---
Tags: civicase, issues
---


# Question
Title: How can i investigate what duration a specific checksum had when it was sent out
I need to check on some checksums to confirm if the duration matched the setting (which we had set at 90 days but mysteriously was showing as '7' again when i went to check the Misc. settings. Can anyone tell me which table the data is in?

Should this find it for me - if so I guess the field has an unrelated name

```
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%checksum%'
    AND TABLE_SCHEMA='<my-database>';

```

# Answer
The checksum is not stored in the database, have a look at `CRM_Contact_BAO_Contact_Utils` more specifically at the methods generateChecksum and validChecksum.

The `genereateChecksum` method returns the checksum like `$checksum_$timestamt_$life` the life is in hours, so for a given checksum you could tell when was generated and what was is expire date.

The `validChecksum` method takes the `$contact_id` and a `$checksum` And validates it. This method is called when a profile/contribution/event/etc page is rendered and is taken from the requested URL.
> 4 votes

---
Tags: checksum
---


# Question
Title: What to do when a CiviCRM demo site is not working?
I am trying to do some testing on the wordpress demo site but it seems to be down.

http://wpmaster.demo.civicrm.org/membership-page/

I seem to be getting an error when running deduping with the wrong wordpress account being link to the remaining record. I want to be able to test this in the demo before submitting another ticket

Cheers - Phil

# Answer
> 1 votes
The demo site may have been down but is currently working.

Demo sites are periodically reset and I'm not sure if there's any downtime when that happens. In any case if CiviCRM infrastructure like demo sites is not functioning correctly, you can try the IRC and someone there may be able to assist.

---
Tags: demo-site
---


# Question
Title: Show/Hide a Price Set Section based on Membership
Currently I have a Membership Options price set on my registration form. It is a radio button widget, showing the available options.

I also have some Javascript running that will show a Non-Member priceset field by default, and if they select a Membership option it will .hide() that section and .show()the Members Only Pricing section.

In this paradigm, the currently logged in user who is already a Member has to do something like choose an option "I am already a Member" to see the correct price set options. This relies on a trust model.

How can I show or hide a price set based on if someone is a logged in member?

EDIT: The reason I did not use CiviDiscount is that AFAIK discounts can't be 'stacked' so if I auto apply a discount to price set options based on Membership, then a user can not enter an additional discount code and have them both work.

# Answer
https://civicrm.org/blog/stoob/using-only-jquery-and-civicrm-to-create-members-only-pricing

I used the technique on this page modified with something like this:

```
if($('#B').length){
   $('#A').hide();
}

```

So if an anonymous user views the form, a block prints. If that block is on the page, hide the price set option which would reveal member pricing. Its not "secure" but in our case we would just contact someone who cheated and ask them to become a member, so its almost a marketing opportunity ;)
> 1 votes

---
Tags: civievent, civimember
---


title: add CiviCRM extensions to local site

text:
# Question
Title: add CiviCRM extensions to local site
I am working on a redesign of an existing site. I've gone ahead and created a local site and imported the CiviCRM database. The client wants to allow the user to add a discount code while subscribing to an on-line magazine (part of the redesign). I've followed these directions https://wiki.civicrm.org/confluence/display/CRMDOC/Extensions and got to installing the manage extensions page where when I click on the install CiviDiscount Module Extension it redirects me to the log in page on the live site.

I am thinking that there must be a configuration issue somewhere.

# Answer
Sometimes CiviCRM sends you to an absolute URL, even though most of the time you navigate through links with relative URLs.

CiviCRM uses the base URL in your civicrm.settings.php file to build the absolute URLs, and it caches that base URL for performance. I suspect that your situation is either:

* the base URL in the settings file still points to the live site, or
* the cache still has the live site URL even though you updated the settings file.

To fix this, confirm that the settings file has the right URL, and then visit **Administer \> System Settings \> Clear caches and update paths**. Update the paths there, and you should be good to go.
> 4 votes

---
Tags: drupal, cividiscount
---


title: Search counts vary by screen

text:
# Question
Title: Search counts vary by screen
I have set up a smart group to list current memberships by chapter. When I search contacts by a certain chapter I get 222 contacts. If I search by the smart group defined for that chapter I get 221 contacts. If I search memberships by that chapter I again get 222 contacts. I hit the update counts link in the groups page but the smart group count stays at 221.

# Answer
> 1 votes
If you are searching by **Memberships** then it is possible that a contact will have more than one membership, eg if one Expired and a new Membership record has been created for them.

If you are comparing that with a search of **Contacts**, then the numbers will differ.

# Answer
> 0 votes
Have you used the smart group as a mailing list to send out a bulk email through CiviMail?

If so, then someone may have unsubscribed from the group through the link in the email.

---
Tags: search, 4.7.6
---


title: API for update an address

text:
# Question
Title: API for update an address
I'm testing the API in order to update some addressee informations (eg. the street\_number) using the API Explore page. In any test:

```
CRM.api3('Address', 'replace', {
  "id": 204,
  "street_number": 556
}).done(function(result) {
  // do something
});

```

or

```
CRM.api3('Address', 'replace', {
  "contact_id": 202,
  "location_type_id": "Casa",
  "street_number_suffix": 556
}).done(function(result) {
  // do something
});

```

I obtain the following result:

```
{

    "is_error": 1,
    "error_message": "Mandatory key(s) missing from params array: values"
}

```

How can I set the key?

# Answer
@Zeno when you have create option you don't have to look for replace

please use create key word to create new or to update the record if record exist

```
$result = civicrm_api3('Address', 'create', array(
  'sequential' => 1,
  'contact_id' => 202,
  'location_type_id' => "Work",
  'street_address' => "test",
  'street_number_suffix' => 506,
));

```

Please try the above - This will work
> 4 votes

---
Tags: api, addresses
---


title: Null values -where do they come from

text:
# Question
Title: Null values -where do they come from
I have a number of custom fields. Quite a lot of them are yes select option answers. However a number of contacts have what I think is a null value in them.

So if I search give me everyone who has a yes in the field answer I get the answer 579 for example. If I search is not null I get a much higher value eg 1179.

Does anyone know where his data comes from and what it is? If I get rid of it will it just come back?

The reason I am asking is that I am building a chart in Views where I want to display multiple custom fields in a bar chart. As I am trying to display multiple values I can't filter the data for each custom field rather I am relying on the fact that there is data in the field at all to act as the filter and to ensure an accurate count.

I hope I have explained myself properly!

Thank you!

# Answer
Assuming you're using Views - \[noticed the tag\]! You're definitively on the right track! Drupal Views integration is an extremely powerful way to get more out of your CiviCRM (literally!).

So to handle this add a Filter in Views to not display such NULL results. Here's an example where I want to make sure that addresses without a Latitude or Longitude do NOT get plotted on a Map:
> 1 votes

# Answer
Since you are Doing Customization, I Suggest that you have a look at the Search Builder because it gives you the possibility define your own search and arrange the criteria according to your own particular needs as opposed to Advanced search which lets you choose from a wide range of criteria in a user friendly manner.

You can read more about Search Builder here Searching in CiviCRM
> 0 votes

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


# Question
Title: CiviEvent 4.7.7 Issue with Repeating Event
I cannot find any reference to this issue in 4.7.7 mentioned here. My "Repeat Event" tab appears different than in test - with additional options.

Situation: As expected, there should be an enforced error check between radio buttons "Repeat On" and "Repeat By". Repeat On is once a week or once a month or year, or whatever day you select. Repeat By could be the 1st of each month, the First Sunday of every month, etc. The two options (Repeat On and Repeat By) are mutually exclusive.

HOWEVER - the error check is looking at the two options *within* *"Repeat By"* and ignoring the fact that Repeat On is selected. It throws the error that I must select one option (see attached pic) in what appears to be the Repeat By section.

There is not an option in Repeats By for "Every" - only specified regular intervals excluding weekly. Options are First, Second, Third, Fourth, Last. No option for EVERY.

FURTHER - when I select "Repeat By" and hit Save, despite what appears to be a successful save, IT IS NOT SAVED. No errors. No repeating event confirmation. And the tab is cleared

The behavior I expect is that I can select Repeat Every 1 Week Repeats On Sunday Ends On or After.

Or am I missing something?

Thanks

# Answer
Unfortunately I wasn't able to recreate this error on the demo site (4.7.8), or on our installation. I also couldn't see an issue related to this in JIRA.

It looks like the JavaScript that conditionally displays those settings fields isn't working correctly on your site. You could check your JavaScript errors console to see if any problems are coming up.

Eg: in Chrome, press F12, go to the 'console' and then reload the settings page and try to make your changes.
> 1 votes

# Answer
I was able to test this in 4.7.9. It became quickly obvious that 4.7.7 has an issue with the repeating event setup. The screens/options are NOT the same between the two versions. (Note the version numbers at the bottom of the screenshots.)
> 0 votes

---
Tags: civievent, 4.7
---


# Question
Title: Add CiviDiscount code "field" to a particular event on site
We are running several events and while I understand how to create the discount code for each event I am still wondering how one goes about adding the field, to the page, for the user to submit the code that was created.

# Answer
> 1 votes
That field just gets added to your Event Registration page if you've got everything configured properly!

Make sure you multi-select all Fields within all PriceSets (and or other options) that you'd like to attach the Discount to.

---
Tags: drupal, cividiscount
---


# Question
Title: When sending SMS messages - contacts must have mobile phone set as primary
Is there a reason for this restriction or is this a bug or a new feature request to have it changed?

I expect SMS messages to be sent to a contact if at least one of their phone numbers is marked as a mobile phone number, even if it is not their primary phone. I suppose it might be confusing if they had more than one mobile number, but picking the first of several mobile numbers would seem preferable to simply not sending a message if no mobile number is picked.

Also - this restriction seems limited to sending SMS as an activity. I can still send a Mass SMS to contacts even if their primary number is not a mobile number.

# Answer
> 1 votes
I tracked down the bug here:

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

CiviCRM is suppose to send to your mobile number even if it is not the primary one.

---
Tags: civisms
---


# Question
Title: What is Best Approach When integrating custom payment gateway to CiviCRM/Wordpress
When integrating custom payment gateway to CiviCRM/Wordpress what is the best approach to use so that when you update CiviCRM to newer versions your payment gateway integration files will not be affected?

# Answer
> 1 votes
Put your code in a native CiviCRM Extension! There are a number of Payment Processor Extensions already available - go here:

https://civicrm.org/extensions/home?title=&body\_value=payment&field\_extension\_cms\_tid=All&field\_extension\_ready\_value=All&sort\_by=title&sort\_order=DESC

That will find most of them!

---
Tags: payment-processor
---