# Question
Title: Email and test email fail, but Outbound Mail Settings page sends test through mail() fine
This seems to have started out of nowhere (Drupal 7, CiviCRM 4.2.4, HotDrupal host). Sending test email or actual mailing through cron gives

> Sorry but we are not able to provide this at the moment. mail() returned failure".

When I go to the Outbound Mail Settings page and use mail() and hit "save and send test email", it sends fine.

Any ideas?

Here is the log and backtrace message:

Log:

```
$Fatal Error Details = Array (
  [callback] => Array (
    [0] => CRM_Core_Error
    [1] => handle )
  [code] =>
  [message] => mail() returned failure
  [mode] => 16
  [debug_info] => [type] => PEAR_Error
  [user_info] =>
  [to_string] =>
  [pear_error: message="mail() returned failure" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)

```

Backtrace:

```
$backTrace =
  #0 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
  #2 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
  #3 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("mail() returned failure", NULL, 16, (Array:2), NULL)
  #4 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/Mail/mail.php(174): PEAR->raiseError("mail() returned failure")
  #5 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/BAO/Job.php(635): Mail_mail->send("Sky Jacobs ", (Array:10), "--=_ff28f9316674a4c0e79be6481d32633d\nContent-Transfer-Encoding: 8bit\nConten...", "661")
  #6 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/BAO/Job.php(562): CRM_Mailing_BAO_Job->deliverGroup((Array:1), Object(CRM_Mailing_BAO_Mailing), Object(Mail_mail), "", (Array:0))
  #7 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/BAO/Job.php(159): CRM_Mailing_BAO_Job->deliver(Object(Mail_mail), (Array:7))
  #8 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/Form/Test.php(356): CRM_Mailing_BAO_Job::runJobs((Array:7))
  #9 [internal function](): CRM_Mailing_Form_Test::testMail((Array:5), (Array:0), Object(CRM_Mailing_Form_Test))
  #10 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/HTML/QuickForm.php(1598): call_user_func((Array:2), (Array:5), (Array:0), Object(CRM_Mailing_Form_Test))
  #11 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Form.php(301): HTML_QuickForm->validate()
  #12 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/StateMachine.php(141): CRM_Core_Form->validate()
  #13 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Mailing_Form_Test), "next", "Next")
  #14 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Mailing_Form_Test), "next")
  #15 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Mailing_Form_Test), "next")
  #16 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Controller.php(289): HTML_QuickForm_Page->handle("next")
  #17 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Invoke.php(227): CRM_Core_Controller->run((Array:3), NULL)
  #18 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/drupal/civicrm.module(500): CRM_Core_Invoke::invoke((Array:3))
  #19 [internal function](): civicrm_invoke("mailing", "send")
  #20 /home/tucsonmo/public_html/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2))
  #21 /home/tucsonmo/public_html/index.php(21): menu_execute_active_handler()
  #22 {main}

```

# Answer
> 5 votes
What is the mail account you have configured for bounces? Is this the same domain name as the default one in your civi? (check who is the sender of the test when you are sending it from the outbound setting page)

It might be that you have different domain names and that your hosting provider refuses to send the "normal" mails

For instance, you can't put a gmail address as the bounce mailbox, it will not work.

Try to switch to smtp and localhost server, it might be a workaround (but you still need to configure your bounce mailbox).

Bit of technical background: when you send an email with civimail, the actual "technical" sender is the email you have configured as the mail account to receive the bounces.

So if you send your mailing as bob@example.org but have bounce@example.org as your mailbox for bounce, it will use bounce+b+lotsofstuff@example.org as the sender

The receiver will still see bob@example.org, but the mail servers (yours or the recipient) will know bounce@example.org is the mailbox they need to reach if there is a problem (invalid email, mailbox full...).

So it's likely that your host provider doesn't allow you to "impersonate" the bounce email (and so you need to fix the bounce account).

Or, they might have tightened their security rule and forbid you to impersonate any email, in that case, you won't be able to use civimail until they fix that... or that you switch to a different host provider.

---
Tags: civimail
---


title: civicrm 4.6 invoice documentation?

text:
# Question
Title: civicrm 4.6 invoice documentation?
Is there any documentation available on how to generate the invoices with the new functionality introduced in civicrm 4.6. I assume I can generate and email an invoice but am not able to figure out how.

I have enabled TAX & invoicing in the configuration and have read the following articles: https://civicrm.org/blogs/jamienovick/coming-soon-sales-tax-including-vat-and-invoicing-civicrm https://civicrm.org/blogs/tonymazz/civicrm-46-will-support-sales-tax-vat-and-invoicing http://wiki.civicrm.org/confluence/display/CRM/Sales+Taxes+and+Invoicing+-+Phase+1

# Answer
The 4.6 version of the user guide should be published in the next few days (We are waiting for one more section to be proof read.)

In the meantime here are 3 images containing that information (I can't attach a PDF.)
> 3 votes

# Answer
Step by step Process - To print an invoice and also for Tax/VAT calculate

1. In CiviContribute component settings (Enable Tax and Invoicing) \[Menu Link: Administer -\> CiviContribute -\> CiviContribute Component Settings -\> Enable Tax and Invoicing\]
2. Create new Financial Account (name: 20% VAT) \[Menu Link: Administer -\> CiviContribute -\> Financial Account\] **Financial account type** = Liability, **Is Tax?** = is selected, **Tax Rate** = 20.
3. Create - New Financial Type (name: products) \[Menu Link: Administer -\> CiviContribute -\> Financial type\] **Tax-Deductible?** – is ticked
4. Now edit financial type (products) Click on assign financial account. Set - **Financial Account Relationship:** Sales Tax Account, **Financial Account:** Account payable
5. Then I got the new financial accounts assigned to the new financial type products
6. Now all the setting is done - create new contribution against the user for the new financial type (products) – and save the record
7. Now go for View the contribution – you will find a new button for Print Invoice - Click you will get invoice

Please use the link for reference https://civicrm.org/blogs/tonymazz/civicrm-46-will-support-sales-tax-vat-and-invoicing

Once invoice is been generated then you can go to find contribution select the contribution with invoice in the drop down you can select **print or email contribution Invoice**
> 2 votes

---
Tags: civicontribute
---


# Question
Title: How to show only the relevant County/State of multiple countries in a profile?
I created a profile with Countries and County/States along with name and address.

County/States actually merges all the available states regardless of selected country.

Is there a way to show only the relevant county depending on selected country?

My civi version is 4.4.14

# Answer
If you have a state/province field on its own, it will have all options for the countries' states you enable on your site. If you have a country field alongside a state/province field *of the same location type*, the state listing will depend upon the selected country (regardless of whether the country's states are enabled).

My hunch is that you have different location types for the two fields. Changing them to be the same should make it work.

(While it may seem maddening at first, it's a good feature. You can have multiple addresses in your profile, and if your home state field were to change as you set the work country field, that would be a problem if your addresses are in different countries.)

Counties work similarly with regard to states, except you must use a state field: there are so many US counties with repeating names that it would otherwise be a big problem.
> 4 votes

---
Tags: profile, addresses
---


title: Update results in failed DB check

text:
# Question
Title: Update results in failed DB check
In trying to upgrade to Civi 4.6.3, I did a backup using Drupal 7.35 (I know, updating that was next) Backup and Migrate, then copied the Civi code files to my desktop, deleted the old Civi, copied in the new Civi, and got an error message that says "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." So I did that, using both the backup I had just made and a previous one. Same error message both times. In delving into the Advanced Settings on B&M, it appears that the default only backs up the Civi database. I modified it (I think) to backup the Drupal database as well, backed up the whole site (with the reportedly incomplete database), hoping that what was "incomplete" was the Drupal portion. Same error message every time I start Civi. What can I do, short of asking my ISP to restore the whole site to a time when I wasn't messing with it (I'm even more ignorant with MySQL). I know it advises always trying updates on a development site first, but my desktop is Windows and the ISP is Linux. IF I have to, I'll upgrade my contract to give me another site, but I'd probably run into the same problem there. Civi seems to work just fine, but there is that disturbing error message and I am disturbed enough as it is. Thanks for any help.

# Answer
Are you sure the problem isn't already on the "old" site?

Could you try to (without changing any code) go to the civicrm upgrade page on the old site (/civicrm/upgrade). do **not** upgrade, just look at what's on the screen

Do you have a message saying you are already at the correct version and nothing to be done?

```
Sorry but we are not able to provide this at the moment.
Your database has already been upgraded to CiviCRM [your version]

```

... or do you already have a message saying database check failed?

If the later, it means that you had a partial update already that was never properly sorted. It's recoverable, but you might have to dig into sql more than you'd like (or hire an expert to help you, probably an easier option to help you untangle the situation)
> 1 votes

---
Tags: upgrade
---


# Question
Title: Is there a quick and easy way to copy an activity?
We manage activities with many custom fields to record various social parameters of the beneficiaries of our organizations.

These activities are repeated periodically and is common from one activity to another which custom fields change very little.

Is there a quick and easy way to copy an activity? This would save us introduce ever custom fields that are common between two activities.

Note: Events can be copied.

# Answer
There's no built-in functionality to copy activities - but my coworker wrote an extension that, amongst other tasks, allows you to copy an activity. It's organization-specific - for instance, it specifically does NOT copy certain activity fields, and assumes the existence of certain custom fields - but if you've got some developer skills, this is 90% of what you need: https://github.com/PalanteJon/coop.palantetech.multipleactivities/tree/master
> 2 votes

# Answer
I am interpreting you question to mean:

* Contact A might have the same activity type recorded against them in January and March and their custom data will be (mostly) the same each time.
* Contact B might have the same activity type recorded against them in January and March and their custom data will be (mostly) the same each time.
* The custom data for contact A could be quite different from the custom data for Contact B.

I don't think there is an easy way to copy activities.

Events can be copied, but not registrations, contribution pages can be copied but not contributions.

Activities are recorded against contacts as are contributions and registrations and there is no easy copy function.
> 1 votes

# Answer
Are these recurring activities? If so, might want to check the new recurring activity functionality in 4.6 (thx to veda consulting and zing for funding it)
> 1 votes

---
Tags: activities
---


title: Hide some tags for non-admin users

text:
# Question
Title: Hide some tags for non-admin users
We are using CiviCRM to manage different kinds of contacts. Therefore we have some tags that are irrelevant to the "regular", non-admin users (e.g. "check membership fees" for a user who doesn't even have permission to view member contacts)

The tag list starts to become long and cluttered. Can I hide some tags (and their child tags) for some users?

Maybe something similar to hiding/showing a "set of custom data fields" using ACLs?

# Answer
> 2 votes
It's not a perfect solution, but to help declutter you could create an "Admin tags" tagset and make all the admin tags children of that one. They'd still be available to the non-admins but wouldn't be in the regular list of tags -- they show up as an autocomplete field underneath:

---
Tags: permissions, tags
---


# Question
Title: Change Household contact to Organization contact
A staff member added quite a few contacts as Households but they should have been added as Organizations. I can find no form control to switch the contact type to Organization. Can you suggest a procedure to fix this or should we just redo the work?

This not exactly a duplicate of this question because we are going from Household to Organization, and there is no concept of merging a Household into an Organization (as far as I know).

# Answer
> 3 votes
It turns out that exporting the problem household contacts and then importing them as organization contacts, using the appropriate field mappings, is the fastest way to do this. After import just delete the household contacts.

---
Tags: contacts, contact-types, 4.6.3
---


title: 'OR' search syntax

text:
# Question
Title: 'OR' search syntax
How can I search for organisations that share a part of the name (i.e. 'embassy of') but then add more attributes with `OR`? So, for example:

```
'embassy of' AND ('the US' OR 'the UK')

```

# Answer
> 3 votes
(EDITED) You could use a combination of eg a smart group for Orgs with name contains 'embassy of', and then Tag every record that has 'the US', then search for contacts that are in Embassy group and US Tag and set 'search operator' to AND "Search Operator Determines whether your criteria are combined with AND statements, or combined with OR statements. For example, you may want to find all individuals who are in the Volunteers group AND who have a Volunteer Training activity recorded for them. In this case use the AND operator. If you need to find everyone who is in the Volunteers group OR has a Volunteer Training activity recorded, use the OR operator."

# Answer
> 2 votes
Try the search builder:

Include contacts where first name="john" and last name="doe" +also include contacts where first name="john" and last name="coltrane"

should get you the list you want

# Answer
> 2 votes
Based on the revised question you should:

1. Use search builder to create a "countries of interest" (smart) group. "Also include contacts where" is the OR operator. I would suggest you specify % UK% and % US% etc as this will at least eliminate options where uk or us are in the centre of an organisation name.
2. Use search builder or advanced search to create a (smart) group for organisations with names like %embassy of%.
3. Use search builder to find the organisations in both groups then do with them what you will.

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


# Question
Title: Controling the order on wordpress contribution pages
I have a contribution page for membership signup, dues and other member information. It is a "on behalf of an organization" style membership. Right now, the form displays the fields in this order

1. membership pricelist
2. "on behalf of organization" details
3. wordpress account creation
4. and 5 - 2 other profiles I've added using the "Profiles" capacity of contribution forms.

Is there a way to have the order instead be 4, 5, 3, 2, 1? Should this be done through CSS or is there a better way? The "order" field doesn't seem to do much in this regards.

# Answer
There is no UI enabled way to control the order. You'll need to do some of the above via a custom template.

The profiles have a top / bottom ordering which might help a wee bit. More info on customizing templates here:

http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in,+Profile,+Contribution+and+Event+Registration+Screens
> 2 votes

---
Tags: civicontribute, wordpress
---


# Question
Title: CiviCRM menu missing Administer link after reboot
I am a CiviCRM admin. I shut down my computer (personal computer, not the server where CiviCRM is installed) and when I restarted it, the menu is different. I do not have an *Administer* link in my main Drupal menu; I have *Configuration* instead. How can I restore my previous menu (the one with the *Administer* link)?

# Answer
You can access it directly using the URL: - yourdomain.com/civicrm/admin/

But from there you should see the navigation menu and be able to edit the menu and what shows in it.

You might need to check the permissions for your user role in your CMS (Drupal?)
> 3 votes

# Answer
The js for building the Civi menu is cached in your browser. Do a force-refresh (ctrl-shift-R) to reload it.
> 0 votes

# Answer
Are you sure you are still logged in as yourself? Try logging out and back in again.
> 0 votes

---
Tags: drupal, civicrm-home, debugging
---


title: How to customise the activities status?

text:
# Question
Title: How to customise the activities status?
I'd like to remove some statues (ie. Left message), and add some more (to support our workflow.

I could add another "status" custom field, but I'd much prefer customise the existing one rather than create a new one.

# Answer
> 1 votes
From the administer dashboard, you can modify the option groups:

civicrm/admin/options?reset=1

and the activity status is one of them (/civicrm/admin/options?gid=26&reset=1 in my case).

However, there is a big

```
 WARNING: Many option groups are used programatically and values should be added or modified with caution.

```
* Left Message
* Unreachable
* Available
* No-show

Are not reserved (ie. we can delete them)

Is this safe to do so? can I add new statues without issue?

# Answer
> 1 votes
I almost never delete those options, but use the disable option instead, then they can be re-enabled easily. Some code might be counting on those particular id's that ship with CiviCRM (bad, but happens ...). Re-enabling is easy, and then they keep their old id's.

# Answer
> 0 votes
I would test Xavier, but I think it is save to delete those. The only one where I would have a question mark is with the No-show, that might be used by Events?

---
Tags: activities, best-practice
---


title: Outgoing donations tracking

text:
# Question
Title: Outgoing donations tracking
I've installed CiviCRM on my non-profit organization (Wordpress 4.2.2, CiviCRM 4.6.3, MySql 5.1 and PHP 5.3), a trashware association which get computers from companies, other association and families and donate them to people who cannot purchase a computer.

Do you know if there are modules / extension which can allow us to track the outgoing donations too?

I can see that with CiviContribute it's possible to track donations, but it's not applicable to our needs, is that correct? If I well looked at it, it shouldn't be possible to track the donation of computers to us, only moneys...right?

Thanks in advance!

# Answer
For incoming donations, CiviContribute does have the ability to track "in kind" non-monetary donations. Visit **Administer \> CiviContribute \> Payment Instruments** and add "In kind" as an option.

You can also set up some custom fields to extend the contribution record with options like e.g. "hardware type", etc.
> 3 votes

# Answer
You might have good luck with CiviGrant, which is built into Core:

http://book.civicrm.org/user/current/grants/what-is-civigrant/
> 2 votes

---
Tags: civicontribute, wordpress, activities, contributions
---


# Question
Title: How to export website field for a contact where website is specific website type?
I select some contacts for export. In my field mappings, I add `Website` but it does not give me the option to choose a specific website type. Is there any way to do this?

# Answer
I have a website type called Twitter Website, for storing Twitter "handles". Each website/handle contains 'twitter.com' (i.e., like www.twitter.com/joemcl )

So using Search -\> Search Builder, I search for Contacts Website Like %twitter% , then select all search results, select Actions, then Add Contacts to a Group (or better perhaps, choose New Smart Group) to create a new Group of every contact who is a Twitter user.

The same can work for Facebook as a website type.

Obviously this won't work for type 'Work' or 'Home', which won't be in the website name, which is what I think you actually want.
> 2 votes

---
Tags: export
---


# Question
Title: Contribution Status Updates, no more 'overdue'
I've been trying to follow the contribution status updates and found this link very helpful: http://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Data+Flow#CiviAccountsDataFlow-Otherchangestocontributionstatus

I have a follow up question/thought. The 'overdue' status is no longer an option for contributions. We had been using this in the case that a donor who had previously indicated they would mail in a check, or the like, never did. We give is a 90 day grace period but then change the status to overdue. (Although we like the language 'expired' better when talking to donors.) We like that this is a separate status than 'cancelled'. In our workflow they represent two different concepts. This is especially helpful when it comes to talking to the owners of PCPs - we can easily see if we cancelled a donation (something we removed due to an error or request) vs a pending donation that simply never came in.

How hard (or crazy) would it be for me to add a custom contribution status?

# Answer
> 2 votes
Adding the contribution status itself is pretty easy. You can do that with Administer/System Settings/Option Groups, find the one for Contribution Status and click on 'options'. You will then get the possibility to add a value.

This is just adding a status, so I assume the settings of the status will be done manually. If you want to automate that you will have to develop a small extension that acts when a contribution is added or changed, and sets your status in relevant cases.

Am I making sense?

# Answer
> 1 votes
Normally, you can set new options in Administer \> System Settings \> Option Groups, but you'll notice that it says:

> This option group is reserved for system use. You cannot add or delete options in this list.

You could work around it by adding a new item in the civicrm\_option\_value table, but you'd be definitely doing something that CiviCRM is telling you not to do. You may have upgrade problems at some later point, because CiviCRM will assume nobody has gone in and messed around with those options.

Instead, you might consider that there really is no *new* data to be stored; you just want to be able to find really old pending contributions. If you just create a report based upon the donor detail report with the following changes, you ought to be able to find the right folks:

* Contribution Status set to Pending, Cancelled, or whatever else
* Receive date set to "To end of previous quarter" or an equivalent relative date (I know it's not exactly what you want, but date filters will be improving soon, I hear)

You can even set this as a dashlet so that the person in charge of pestering people about this can have it on his or her dashboard.

---
Tags: civicontribute
---


title: Incoporating PCPs in Wordpress

text:
# Question
Title: Incoporating PCPs in Wordpress
I'm trying to write some plugins to incorporate PCPs (mainly lists of them) into my Wordpress sites. I did not see in the API explorer any coverage of PCPs. (I could be blind, please feel free to correct me.)

I'd like to build a search feature, so that a visitor could search by multiple variables, like pcp owner name, or contribution campaign, etc. I'm also thinking of listing top fundraisers for a campaign.

I think I could write something using mysql queries but was wondering if there is a better way to go about it.

# Answer
PCPs don't have an API currently - but I just wrote one in about 15 minutes. I didn't write unit tests, so I can't submit it upstream - maybe this is something you can help with to make CiviCRM better?

Paste the contents of this file into "Pcp.php" in your `civicrm/api/v3` folder: http://pastebin.com/cvzqfq69

There's some odd line of hyphens at the bottom, leave that off! Next, in `civicrm/api/v3/util.php`, you should see a part that looks like:

```
  // FIXME: DAO names should follow CamelCase convention
  if ($name == 'Im' || $name == 'Acl') {
    $name = strtoupper($name);
  }

```

Change that "if" statement to:

```
  if ($name == 'Im' || $name == 'Acl' || $name == 'Pcp') {

```

That should get you a working PCP API!
> 7 votes

---
Tags: civicontribute, api, pcp
---


title: Linking CiviCase with a CiviEvent

text:
# Question
Title: Linking CiviCase with a CiviEvent
This one may have an obvious answer, but I just cant seem to find a simple solution. Running Wordpress 4.2.2 CiviCRM 4.6.3

In a nutshell We want to use CiviCase to coordinate Event management. The Events will be using CiviEvent to deal with venue and participant sign ups etc.

So the Case will be auto assigned to an Event Manager (case coordinator), and also their boss (case supervisor), the Event Manager will go through the steps of the case, such as getting quotes for venue, then tick off from supervisor, then A/V system etc, then any talent issues, then setting up promo etc etc.

So What i want to do is work out a simple way to connect the Case to the particular CiviEvent that will already have been created - so you can easily say click through to the Event from the case..

An obvious way would be to Make the CiviEvent the equivalent of the client, meaning the Case coordinator, and supervisor end up with a role / relationship with the target which is a CiviEvent instead of an individual client - but the case set up does not quite work like that, and it seems case relationships cant be with Events only contact types.

At the most basic it could just be a link in custom field I guess?

But this leaves the problem - who or what should be the client when setting up a new case? Perhaps a dummy Contact could fill this role..

As I said maybe I am just missing a simple solution here, any help appreciated..

# Answer
Who are you organising the event for? Your organisation seems to be the most natural, but having a client of a case (used to be?) is tricky. If it doesn't work easily with your org, I'd put the event manager as the "client".

As for creating the link, I'd put a custom field (integer) that contains the id of the related entity. I'm not sure I'd put the event id on the case or the case id on the event, depends of your workflow and which one is created first, and a tiny extension to display the id as a link instead of the number.

X+
> 1 votes

---
Tags: civievent, civicase
---


# Question
Title: If contact has multiple cases, how do I filter a view to show only case roles associated to that case type
We have contacts that may have multiple cases, each with a case coordinator.

I have created a view for each case type that shows the associated case coordinator along with last activity date, links to add activities, etc.

Everything works great except if a contact has multiple cases, the case coordinator from a different case type may be listed instead of this particular case type's case coordinator.

I have a case type filter set to the specific type, but that doesn't seem to be enough.

Here are the relationships:

Here are the filters:

# Answer
> 2 votes
Thanks for the hint ErikH, you led me down the correct path. We are trying to avoid coding and prefer to just manipulate the views as much as possible.

The view I was working on was a CiviCRM Case view.

I rebuilt it as a CiviCRM Relationship view and added these relationships:

After that, the Case Coordinators were listed correctly and I was able to add all other pertinent fields to the view.

The fields I displayed were:

Client Name (links to another view of client information)

Case Type

Case Coordinator

Case Status

Case Opened Date

Last Activity Date (turned on aggregation for the view and set only this field to Maximum)

View Case Activities (links to another view of activities filtered by contact id)

Add New Activity (links to a webform for that case type)

# Answer
> 1 votes
The case coordinator relationship (table civicrm\_relationship) will hold the case\_id for a case relationship. You should either link to that or retrieve it using the API (if you are coding)

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


title: Cron Job configuration error

text:
# Question
Title: Cron Job configuration error
i use wordpress 4.2.2 and civiCrm 4.6.3. I have created a file CiviCron.php:

```
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.auroratrezzo.it/wordpress/wp-content/plugins/civicrm/civicrm//bin/cron.php?name=user&pass=password&key=key-site");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
curl_close($ch);

```

I have configurated cPanel cron job:

```
php /home/informac/CiviCron.php

```

I recived this error:

```
<br />
<b>Fatal error</b>:  Function name must be a string in <b>/home/informac/public_html/wordpress/wp-content/plugins/section-widget/olt-checklist/loader.php</b> on line <b>64</b><br />

```

Why ??

Marco

# Answer
> 4 votes
The error seems to come from something unrelated to civi:

```
plugins/section-widget/olt-checklist/loader.php

```

Can you try to disable this plugin and see if it works?

# Answer
> 0 votes
Another thought is to do this with wp-cli (WordPress drush equivilant). This way you can tell wp NOT to load any plugins with fatal errors.

The standard syntax I use is:

```
wp --user=<cron> --url=<http://example.com> --path=</path/to/wp> civicrm api job.execute auth=0

```

You can also do this to exclude plugins:

```
wp --user=<cron> --url=<http://example.com> --path=</path/to/wp> --skip-plugins=<plugin> civicrm api job.execute auth=0

```

By adding --skip-plugin= you can get rid of the nasty plugin causing the error. Of course, removing plugins with fatal errors is preferred, but sometime we need to keep them around.

I have also added this to http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

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


# Question
Title: Drupal CiviCRM update account info with CiviCRM profile
I want to allow my registered Drupal users the ability to update certain information in their CiviCRM contact record. I've created a profile and made enabled the following

* Standalone form or directory
* Drupal user registration View/Edit
* Drupal user account

The profile now shows up on the user's Drupal account page and is prepopulated with any information that is already in their contact record, which is great. I did notice, however, that if I use the link found by 'Use Profile-Create mode' the information is not prepopulated for that same user. Is this to be expected or might I have done something wrong?

I would also like to be able to use the Current Employer field as a select list whereas I can have a group of employers show up. We have employers such as The Nature Conservancy and people put in TNC, Nature Conservancy, etc. and that creates many iterations of the same organization. I was able to use this via Drupal's webform CiviCRM integration module but it does not seem possible with just the CiviCRM profiles. Is this also true?

What I currently have is the CiviCRM profile on the user's account page and then I need to redirect them to the webform to collect their employer information which is not ideal. If I get rid of the CiviCRM profile and put everything in the webform then it no longer is attached to their user account page in Drupal.

Just wondering if others have dealt with this same thing and how they went around solving it.

# Answer
"Create Mode" means just that, creating a new contact, thus the fields will appear blank. You want edit mode, with a url like `/civicrm/profile/edit?reset=1&gid=N` where N is the ID of the profile.
> 3 votes

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


# Question
Title: Can Drupal Webform Integration update matching contacts
On the CiviCRM profiles you have the ability to set it update matching contact. I don't see this functionality with the Drupal webform CiviCRM Integration module. Is it there and I'm simply missing it? When I log in and fill out the form it simply creates a duplicate contact if that contact already exists. I would like to update the existing contact instead. Is this possible?

I still seem to be having an issue with duplicates being created. The unsupervised rule is set as such:

* First name: 6
* Last name: 3
* Email: 4
* Street address (First four characters): 1
* The total for a match is 10

I had a contact in CiviCRM 'Janice Anderson' who did not have an associated Drupal account. Janice created a Drupal account and then went to the form and filled out the information on the webfrom and when she submitted the form it created a duplicate CiviCRM contact instead of merging what she was filling out and the existing contact.

I then ran the dedup rule and it found the two (the old one and the newly created one) CiviCRM contacts and stated that the total was 13. So CiviCRM knew they were possible duplicates based on the rule but it still did not merge them at from submission.

This seems to only be happening if the user is currently in CiviCRM and there is not an associated Drupal account for that user. I just tested by creating a CiviCRM user (Jon Doe, jon.doe@mydomain.com). I then created a Drupal account using that same email address and went to the webform and added the same first name, last name, and email address. CiviCRM created a duplicate contact. If I create the Drupal account first then use the webform it creates a CiviCRM contact. If I then go back to the webform while logged in and update information it updates the contact correctly without creating a duplicate.

Is this action to be expected or am I missing a setting somewhere?

# Answer
> 6 votes
When you add the contact in the CiviCRM tab of the Webform, making sure you check the "Existing Contact" box:

From the help:

> Gives many options for how this contact can be autofilled or selected. From the Webform tab you can edit this field to configure:
>
> * Widget: Determine whether to expose this field to the form as an autocomplete or select element, or hide it and pick the contact automatically.
> * Default Value: Select a contact based on the current user, relationships, or other options.
> * Filters: Limit the list of available choices from which this contact may be autofilled or selected.
> * Show/Hide Fields: Control which other fields the user is allowed to edit and which will be hidden.

# Answer
> 10 votes
By default the Webform-CiviCRM module uses the default "Unsupervised" rule from CiviCRM to determine if an unknown contact is already in your database. If this is not happening for you, check your rule's criteria.

And as of v4.11 you can now specify the matching rule per contact.

You'll find this new option just under the "Contact Fields":

The help text says:

> This determines how an unknown contact will be handled when the webform is submitted.
>
> * Select the "Default Unsupervised" rule for the same duplicate matching used by CiviCRM event registration & contribution forms.
> * Select a specific rule to customize how matching is performed.
> * Or select "- None -" to always create a new contact.
>
> Note: Matching rules are only used if the contact is not already selected via "Existing Contact" field.

---
Tags: drupal, webform-civicrm, duplicate-contacts
---


title: CiviContribute: DB Error: no such field

text:
# Question
Title: CiviContribute: DB Error: no such field
I am new to CiviCRM, and we are just setting up our first pages in preparation for our annual fundraising event.

I've created a Contribution page Contribution that gives the following error when trying to process the contribution (after the confirmation page, if that option is activated): Sorry but we are not able to provide this at the moment. DB Error: no such field

I've tried a number of settings and have discovered that the error shows up when the setting for "email receipt" is checked OR when "Allow contributions on behalf of an organization" is checked (with or without an emailed receipt). With **neither** of these options checked, it works fine. But, we want these options!

The Debug feedback is below. I have dabbled in programming, but my experience is limited and this is more than I can figure out. Can anyone help me sort this out!

---

Database Error Code: Unknown column 'civicrm\_value\_roles\_2.roles\_1' in 'field list', 1054 Additional Details:

```
Array (
  [callback] => Array (
    [0] => CRM_Core_Error
    [1] => handle
)

[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] =>

SELECT    contact_a.id                                                                    AS contact_id,
          contact_a.contact_type                                                          AS `contact_type`,
          contact_a.contact_sub_type                                                      AS `contact_sub_type`,
          contact_a.sort_name                                                             AS `sort_name`,
          contact_a.display_name                                                          AS `display_name`,
          contact_a.do_not_email                                                          AS `do_not_email`,
          contact_a.do_not_phone                                                          AS `do_not_phone`,
          contact_a.do_not_mail                                                           AS `do_not_mail`,
          contact_a.do_not_sms                                                            AS `do_not_sms`,
          contact_a.do_not_trade                                                          AS `do_not_trade`,
          contact_a.is_opt_out                                                            AS `is_opt_out`,
          contact_a.legal_identifier                                                      AS `legal_identifier`,
          contact_a.external_identifier                                                   AS `external_identifier`,
          contact_a.nick_name                                                             AS `nick_name`,
          contact_a.image_url                                                             AS `image_url`,
          contact_a.preferred_communication_method                                        AS `preferred_communication_method`,
          contact_a.preferred_language                                                    AS `preferred_language`,
          contact_a.preferred_mail_format                                                 AS `preferred_mail_format`,
          contact_a.hash                                                                  AS `hash`,
          contact_a.source                                                                AS `contact_source`,
          contact_a.first_name                                                            AS `first_name`,
          contact_a.middle_name                                                           AS `middle_name`,
          contact_a.last_name                                                             AS `last_name`,
          contact_a.prefix_id                                                             AS `prefix_id`,
          contact_a.suffix_id                                                             AS `suffix_id`,
          contact_a.formal_title                                                          AS `formal_title`,
          contact_a.communication_style_id                                                AS `communication_style_id`,
          contact_a.job_title                                                             AS `job_title`,
          contact_a.gender_id                                                             AS `gender_id`,
          contact_a.birth_date                                                            AS `birth_date`,
          contact_a.is_deceased                                                           AS `is_deceased`,
          contact_a.deceased_date                                                         AS `deceased_date`,
          contact_a.user_unique_id                                                        AS `user_unique_id`,
          contact_a.employer_id                                                           AS `current_employer_id`,
          contact_a.is_deleted                                                            AS `contact_is_deleted`,
          contact_a.created_date                                                          AS `created_date`,
          contact_a.modified_date                                                         AS `modified_date`,
          contact_a.addressee_id                                                          AS addressee_id,
          contact_a.addressee_display                                                     AS addressee_display,
          contact_a.addressee_custom                                                      AS addressee_custom,
          contact_a.email_greeting_id                                                     AS email_greeting_id,
          contact_a.email_greeting_display                                                AS email_greeting_display,
          contact_a.email_greeting_custom                                                 AS email_greeting_custom,
          contact_a.postal_greeting_id                                                    AS postal_greeting_id,
          contact_a.postal_greeting_display                                               AS postal_greeting_display,
          contact_a.postal_greeting_custom                                                AS postal_greeting_custom,
          IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) AS current_employer,
          civicrm_address.id                                                              AS address_id,
          civicrm_location_type.id                                                        AS location_type_id,
          civicrm_location_type.name                                                      AS `location_type`,
          civicrm_address.street_address                                                  AS `street_address`,
          civicrm_address.street_number                                                   AS `street_number`,
          civicrm_address.street_number_suffix                                            AS `street_number_suffix`,
          civicrm_address.street_name                                                     AS `street_name`,
          civicrm_address.street_unit                                                     AS `street_unit`,
          civicrm_address.supplemental_address_1                                          AS `supplemental_address_1`,
          civicrm_address.supplemental_address_2                                          AS `supplemental_address_2`,
          civicrm_address.city                                                            AS `city`,
          civicrm_address.postal_code_suffix                                              AS `postal_code_suffix`,
          civicrm_address.postal_code                                                     AS `postal_code`,
          civicrm_address.geo_code_1                                                      AS `geo_code_1`,
          civicrm_address.geo_code_2                                                      AS `geo_code_2`,
          civicrm_address.name                                                            AS `address_name`,
          civicrm_address.master_id                                                       AS `master_id`,
          civicrm_address.county_id                                                       AS county_id,
          civicrm_address.state_province_id                                               AS state_province_id,
          civicrm_address.country_id                                                      AS country_id,
          civicrm_phone.id                                                                AS phone_id,
          civicrm_phone.phone_type_id                                                     AS phone_type_id,
          civicrm_phone.phone                                                             AS `phone`,
          civicrm_phone.phone_ext                                                         AS `phone_ext`,
          civicrm_email.id                                                                AS email_id,
          civicrm_email.email                                                             AS `email`,
          civicrm_email.on_hold                                                           AS `on_hold`,
          civicrm_email.is_bulkmail                                                       AS `is_bulkmail`,
          civicrm_email.signature_text                                                    AS `signature_text`,
          civicrm_email.signature_html                                                    AS `signature_html`,
          civicrm_im.id                                                                   AS im_id,
          civicrm_im.provider_id                                                          AS `im_provider`,
          civicrm_im.provider_id                                                          AS provider_id,
          civicrm_im.name                                                                 AS `im`,
          civicrm_openid.id                                                               AS openid_id,
          civicrm_openid.openid                                                           AS `openid`,
          civicrm_worldregion.id                                                          AS worldregion_id,
          civicrm_worldregion.name                                                        AS `world_region`,
          civicrm_website.id                                                              AS website_id,
          civicrm_website.url                                                             AS `url`,
          Group_concat(DISTINCT(civicrm_group.title))                                     AS groups,
          Group_concat(DISTINCT(civicrm_tag.name))                                        AS tags,
          Group_concat(DISTINCT(civicrm_note.note))                                       AS notes,
          civicrm_value_roles_2.id                                                        AS civicrm_value_roles_2_id,
          civicrm_value_roles_2.roles_1                                                   AS custom_1,
          civicrm_value_roles_2.participated_in_2                                         AS custom_2
FROM      civicrm_contact contact_a
LEFT JOIN civicrm_address
ON        (
                    contact_a.id = civicrm_address.contact_id
          AND       civicrm_address.is_primary = 1 )
LEFT JOIN civicrm_email
ON        (
                    contact_a.id = civicrm_email.contact_id
          AND       civicrm_email.is_primary = 1)
LEFT JOIN civicrm_phone
ON        (
                    contact_a.id = civicrm_phone.contact_id
          AND       civicrm_phone.is_primary = 1)
LEFT JOIN civicrm_im
ON        (
                    contact_a.id = civicrm_im.contact_id
          AND       civicrm_im.is_primary = 1)
LEFT JOIN civicrm_openid
ON        (
                    civicrm_openid.contact_id = contact_a.id
          AND       civicrm_openid.is_primary = 1 )
LEFT JOIN civicrm_location_type
ON        civicrm_address.location_type_id = civicrm_location_type.id
LEFT JOIN civicrm_group_contact
ON        civicrm_group_contact.contact_id = contact_a.id
AND       civicrm_group_contact.status = 'Added'
LEFT JOIN civicrm_group
ON        civicrm_group.id = civicrm_group_contact.group_id
LEFT JOIN civicrm_entity_tag
ON        (
                    civicrm_entity_tag.entity_table = 'civicrm_contact'
          AND       civicrm_entity_tag.entity_id = contact_a.id )
LEFT JOIN civicrm_note
ON        (
                    civicrm_note.entity_table = 'civicrm_contact'
          AND       contact_a.id = civicrm_note.entity_id )
LEFT JOIN civicrm_country
ON        civicrm_address.country_id = civicrm_country.id
LEFT JOIN civicrm_worldregion
ON        civicrm_country.region_id = civicrm_worldregion.id
LEFT JOIN civicrm_tag
ON        civicrm_entity_tag.tag_id = civicrm_tag.id
LEFT JOIN civicrm_value_roles_2
ON        civicrm_value_roles_2.entity_id = contact_a.id
LEFT JOIN civicrm_website
ON        contact_a.id = civicrm_website.contact_id
WHERE     ( (
                              contact_a.id IN (29 ) ) )
GROUP BY  contact_a.id
LIMIT     0, 1

[nativecode=1054 ** Unknown column 'civicrm_value_roles_2.roles_1' in 'field list']"] )

```

# Answer
> 3 votes
The core of this error message is this part:

```
 [nativecode=1054 ** Unknown column 'civicrm_value_roles_2.roles_1' in 'field list'] [to_string] => [db_error: message="DB Error: no such field"

```

There's something about a custom field group called "Roles" you have that's got a problem. I wonder if you possibly had a custom field in it called "Roles" that you previously deleted, but wasn't removed from a profile?

I would try using a different profile, one that doesn't use custom fields, and see if that solves your problem. If so, try rebuilding the profile.

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


# Question
Title: Add a membership to a person with an other than default company
i have a sporting company which does multiple sport departments each whith its own results there are all part of the mothercompny called flevostar

so example you have Flevostar Basketball and FlevostarDart i created 3 organisations in my contact list Flevostar/Dart/Basketball

a new member is also created on the add membership page i would like to add a membership linking that new person to for instance Dart. Even though it appears that there is a drop down i can only select default company in this case Flevostar and a membership type.

ending up with that i have to absue the membership tpe to distinquish them so had to create MemberTypes ACTMEM DART and AVTMEM Basketball where as i would have liked to have new member x is member of department(organisation)Dart whith type Member

is this any how to be achieved?

best regards

leon

ok maybe i am not clear in my problem description. i use the backend for creating initial relation ships between the member and the department. example: i have John as contact Basketball as organisation and flevostar as default. now i go to johns personal sumary and click on memberships (initial they ar counted as 0) and i want to ad a membership. Memberships tupes are LID basketball connected to Basketbal organisation and Lid Flevostar connected to flevostar organisation. so in the memberships sumary i want to add johns membership to the basketball organisation with type Lid basketball. However i can not select the organisatiobn Basketball in the drop down hence i can not link Lid basketball type to John i hope this makes sense now

# Answer
> 2 votes
This was too long to be a comment.

Are these people joining up for themselves on your public web pages, or are they being signed up as members by office staff using the "back office" pages?

Also a person has to choose the correct membership type to begin with. If a person is already a member of your default organisation then they will have to join again as a member of a different organisation.

Have you read the Membership section of our User and Admin guide, in particular the chapters online membership and sign up, manual entry of memberships and membership price sets

---
Tags: civimember
---


# Question
Title: Can you assign an owner to an event & can that person later run a report to see info about their events (in particular a list of attendees/wait list)?
I am evaluating civiCRM for a large homeschool coop. Our members teach study groups for the kids. So when we create an event (study group), we want to be able to assign an event owner (aka study group leader) to the event. Then we would like for that person to be able to pull up a list of study groups they are running and see who is registered for it. Having a hard time testing this out on the demo sites since I can't seem to create a login to test things out with a regular kinda member. Thanks.

EDIT: probably would use Drupal if we decided to use civiCRM, since it seems like we would need to use Webform CiviCRM Integration in order to get something else working the way we need.

# Answer
> 2 votes
We did a similar thing for a religious group who were hiring out their facilities and only wanted the hirer to see the event details/participants for their events. This was all achieved using ACL's and groups without any modifications to CiviCRM or extensions. They were a Drupal user too so I shouldn't imagine you would have any issues getting this functionality configured.

---
Tags: civievent
---


# Question
Title: WYSIWYG editor missing from Scheduled Reminders popup window in Civi 4.6.3
I recently upgraded to CiviCRM 4.6.3 from 4.4.XX. Since then, the WYSIWYG editor is missing when creating a new scheduled reminder or editing an existing one. To reproduce the error: 1. Click Manage Events 2. Click Configure an event, and choose Schedule Reminders. 3. Edit or create a new reminder 4. See the editor missing.

However if on step 2, you instead choose Info and Settings, then click Schedule Reminders, the WYSIWYG editor does appear.

I've verified the error with IE, FF and Chrome, and I see the issue 100% of the time. Using Joomla 2.5.28.

Anybody else see this issue?

# Answer
> 1 votes
Answering the question of how to install the TinyMCE editor extension: It's marked as compatible with CiviCRM 4.7+. I'm guessing it relies on functionality that doesn't exist in the current version of CiviCRM - but you could always e-mail Tyrell directly and ask him.

Assuming it works - it's submitted to the CiviCRM extensions directory, but hasn't been approved yet. So first, make sure you have your extensions directory and URL defined (one is in **Administer menu \> System Settings \> Directories**, the other in **Administer menu \> System Settings \> Resource URLs**). Then place the extension in a folder inside the extensions directory (use FTP or git or whatever works for you). At this point, you should be able to go to **Administer menu \> System Settings \> Manage Extensions** and select "Install" for the extension. If it works on 4.6, report back here please!

# Answer
> 1 votes
This is working correctly on the demo site, so may be a bug on your website. You may wish to check the CiviCRM javascript troubleshooting guide, and also try disabling plugins/extensions.

The TinyMCE editor extension is only for CiviCRM 4.7+ so is not applicable to your situation.

---
Tags: joomla, scheduled-reminders, wysiwyg, 4.6.3
---


# Question
Title: What is the significance of event_queue_id in civicrm_mailing_event_delivered table?
I generally find that the *event\_queue\_id* and *id* values are same for all the tuples in the **civicrm\_mailing\_event\_delivered** table. Why do we need a separate event\_queue\_id then? Can two tuples in this table have the same event\_queue\_id?

# Answer
It is a foreign key to the civicrm\_mailing\_event\_queue table. It is in lockstep since all your emails are being delivered etc and thence the two tables are in sync. However there is no guarantee of this and you cannot rely on it, hence the need of the foreign key.
> 1 votes

---
Tags: civimail, cron-job, mysql, gsoc
---


# Question
Title: How to limit number of contacts in a group?
I have a max no of users limit for a group, so whenever someone adds a groupContact using the civicrm dashboard, I would like to present them with an error which prevents adding a new group and stating a message for the same.

I am using a civicrm\_api() but could not figure out how to prevent the creation of groupcontact or provide a validation for the same?

# Answer
> 2 votes
Just to be sure: civi doesn't have any limit on the number of contacts per group, it's a business case you have that introduces that constraint, right?

I didn't find a safe way to prevent an operation (I'm not sure it's a good idea, it might introduce lots of problems later on, the best IMO is to fail the query).

One workaround to get that is to introduce an invalid value in the pre hook (eg set contact\_id or group\_id to null, the query will fail and it will prevent inserting.

# Answer
> 2 votes
You can add a form rule to check the number of contacts in the group and if exceeded, display the error message.

You might also be able to do this via js and the api, but that potentially could be circumvented. If you want to ensure this never happens, you should add a post hook on the civicrm\_group\_contact object and fatally abort if the constraint is violated.

---
Tags: api, hooks, forms
---


# Question
Title: How do I find the mails belonging to a particular mailing by looking at the SQL tables?
I've the dump of **civicrm\_mailing\_event\_delivered** table. It has 3 fields - id, event\_queue\_id and timestamp.

By looking at this table, how do I find the mails belonging to one particular mailing? Why is it wrong to assume that every mail in a mailing is sent at the same time? When I do Administer-\>Settings-\>Schedule Jobs-\> Send Scheduled mailings -\> Execute now, it sends all the mails in the mailing at the same time.

# Answer
Try the civicrm\_mailing\_recipients table - mailing\_id tells you which Mailing they relate to. Is that what you are after?
> 3 votes

# Answer
The event\_queue\_id points to a row in the event queue table which has a job id associated with it. The mailing job table is a join table which matches a job to a specific mailing.

Check the civimail reports to give a better idea of the SQL used to construct the queries and extract useful info from the tables
> 3 votes

# Answer
Mailings are split into batches (jobs). On small mailings, you will have a single job and all emails will be sent at the same time, but that's definitely not going to be the case when you have more than one job.

you can download the ERD from the wiki, but as Lobo was saying event-\>job-\>mailing Alter your query to add the mailing id (lots of join, but on indexes, it won't increase the speed)

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+4.4+ER+Diagram
> 0 votes

---
Tags: civimail, cron-job, database, mysql, gsoc
---


# Question
Title: Activity assignee email not being sent from webform
Emails are not being sent out from a CiviCRM webform to the activity assignee. Not sure why but there is a notice in Drupal: -

Notice: Undefined index: act in wf\_crm\_webform\_postprocess-\>processActivities() (line 1250 of /home/xxxxx/public\_html/sites/all/modules/webform\_civicrm/includes/wf\_crm\_webform\_postprocess.inc).

Can anyone help?

# Answer
Looks like this is due to a mistyped variable name. I've created a bug report for this in the module's issue queue.
> 4 votes

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


# Question
Title: Activities are not showing under Activities tab in contact record
I'm not sure exactly when this happened but the activity list has stopped showing up in the Activities tab for all of my contact records. The number of activities seems to be accurate and I can add activities but they simply do not show up.

I ran patched the Activities.php file and unchecked 'Enable CiviMail to create activities on delivery' as per this page. I also emptied the contents of template\_c and then emptied the Drupal cache but none of the steps helped.

I'm running Drupal 7 and CiviCRM 4.4.3. Any thoughts on what might be happening?

# Answer
> 2 votes
I suggest you start by upgrading to the latest version of CiviCRM 4.4. That one is quite old and has security issues as well.

# Answer
> 0 votes
do you have any JavaScript error? check on the developer console (firebug or the native one from your browser)

But as Coleman suggested: you need to update your civi asap, it is unprotected and you might end up having the list of your contacts hacked and published publicly, I'm sure something you do not want to happen.

---
Tags: activities
---


# Question
Title: Non-administrators unable to tag contacts using Tags tab
More specifically, when they click tag checkboxes they get the message "API permission check failed for EntityTag/create call; insufficient permission: require access CiviCRM and edit all contacts". However, they are able to tag users after clicking the "Edit" button.

The solution offered by the error message (enabling, in Drupal, the ability to edit all contacts) is not practical for me since it also allows them to view all contacts (which is against our internal policy).

A little more info on my permission structure in case it's relevant: My ACLs allow users to view and edit contacts that are members of certain groups. Ex: A user named "Bob" is in the group named "Staff". Those in the group named "Staff" are allowed to view and edit contacts in the group named "Universe".

As admin, I don't have this problem. But when I log in as a lowly user I do.

Drupal version: 7.37. CiviCRM version: 4.6.3. Thanks in advance for any help.

# Answer
I suspect this is because acl permissions is not consistently applied across all aspects of civicrm. In this case the API permission check is a lot more granular.

At this point, I suspect your options are to either live with the status quo and/or (ask your developer if you have one to) take a look at the code to see if you can improve the API to make the permission checking incorporate ACL's also. You can look at the code on the main contact edit page (CRM/Contact/Form/Contact.php) to see how this is done.

You could also consider using the Paid issue queue service offered by the core team if your org has the funding to do so.
> 3 votes

---
Tags: permissions, acl, tags
---


# Question
Title: Adding And Removing Fields To CiviCRM Tables
I had earlier added a new field to the civicrm\_event table called "enable\_tracking". I achieved this by adding a new field to the xml/schema/Event/Event.xml file. After this I ran the regen.sh script. Everything worked fine.

Now I wanted to remove this field from the civicrm\_event table, so I removed the field from the Event.xml file and ran regen.sh again. However I am getting an error when running this script.

```
+ echo 'Populating database with dataset - civicrm_generated.mysql'
Populating database with dataset - civicrm_generated.mysql
+ mysql -udrupalclea_vpj3r -XXXXXXXXXXXXX -h 127.0.0.1 -P 3306 drupalclea_vpj3r
ERROR 1054 (42S22) at line 462: Unknown column 'enable_tracking' in 'field list'

```

One hack would be to manually edit the civicrm\_generated.mysql file. Is there any other way?

# Answer
> 3 votes
I think the civi process works great for adding columns. Dropping columns is not done too often and hence the above error.

I suspect the easiest work-around might be to empty out the civicrm\_generated file:

```
echo '' > civicrm_generated.mysql

```

and then run regen.sh (this basically makes setup.sh load an empty file, and hence avoid the error). Maybe this should be part of the regen.sh script

---
Tags: civievent, database
---


# Question
Title: How to transfer ownership of an extension
Say we have an extension with short-name "fancywidget" which is managed by Company A. The full name of the extension is `com.a.fancywidget`.

Now say Company A drops maintenance of it, and Company B steps up to take over. It's still the "fancywidget" extension, but under new ownership.

Is it safe to rename the extension to `com.b.fancywidget`? What are the implications (e.g. for the extension directory, pingback stats, etc.) of doing so?

# Answer
> 6 votes
There are several places which rely on the full name of the extension:

* *Extension directory*: One must create a new record for the new extension key. Ownership, release-history, etc, will be different.
* *Pingback stats*: The old and new name will have separate stats.
* *Upgrades (downloading new code)*: Upgrades issued in the new name won't be displayed as upgrades on existing installations (which expect the old name).
* *Upgrades (tracking/updating DB schema)*: The schema versions of the extensions are separate.
* *Managed entities*: If the old and new extensions insert managed entities, there could be uniqueness conflicts. (The ManagedEntities manager does *not* impose a global uniqueness constraint, but some specific entities do enforce uniqueness -- eg you can't simultaneously register two payment-processor-types with the same name.)

My recommendation: Don't think of it as renaming an extension; think of it as publishing a new extension (and reusing code from the old extension). The new extension should be designed around the old one (eg using different names throughout and/or migrating data).

Speaking in the abstract without a specific extension, it's not simple to rename or replace a extension. However, for specific extensions, there may be mitigating factors:

* *(No) DB content*: If the extension only adds runtime functionality (via hooks) and does not insert anything into the DB, then it will be easier to rename/replace. If the extension does insert into the DB (eg via hook\_install, via Upgrader, or via managed-entities), then expect some tasks or complications.
* *Private vs public extension*: If the extension wasn't released to the public, then you may be able to hack through conflicts (eg manually changing over DB references), and you probably won't care about the extensions directory, the pingback stats, or distributing upgrades.

---
Tags: extension
---


# Question
Title: How can I limit the participant role choice?
I've been using CiviCRM for a few years now, mostly for basic functions (small NPO organizing events).

I'm trying to use a function that seems common to me but I feel that I'm missing something because I can't find any information about it.

I've tried almost everything within the interface. I have no knowledge or experience in coding script or stuff like this. But I can try following instructions.

Here is my case:

Our NPO set up LARP events for everybody. -Anyone can register and choose a participant role. -We mostly have these possibilities: Player, NPC, Volunteers, Artist, Organizers. -Every participant might have custom field related to his (participant) role -We'd like to let people choose their role properly instead of batch changing it based on the selected price in the set.

BUT: As we also organize other types of event like conferences, where participant roles are not the same.

We would to like to be able to allow registering participants to select a role within a limited list which does not include every role set in CiviEvent (How) can we do this?

PS I can give you any details you might find useful.

# Answer
I don't know if this feature will be released one day but I would find it pretty useful. You could select a role list base on an event type or template.

However this extension just came out a few days after my question, and it could help if anyone is in the same situation.
> 4 votes

# Answer
I believe the only way at this time to do this at this time without using (Drupal) Webform is to write custom code.

For custom code, there are a wide variety of approaches - you can write an extension that uses hook\_civicrm\_buildForm (or hook\_civicrm\_alterContent or hook\_civicrm\_alterTemplateFile, but IMO these are less elegant). Or you can put a .extra.tpl file in your template override folder with a jQuery snippet to hide roles on certain events.
> 2 votes

---
Tags: civievent, registration, roles
---


title: Report UI is broken in 4.6.2 and 4.6.3

text:
# Question
Title: Report UI is broken in 4.6.2 and 4.6.3
We have version 4.6.2 and 4.6.3 installed in different sites, and just noticed that the new Reports tab interface UI is broken. You can click on the tabs but the main body of the report settings - columns, grouping, sorting, filtering, etc - is always visible just as it was in older versions.

I've checked the official demo site, running 4.6.4, and it looks OK there. I also have a dev site on my local machine running 4.6.1 and it's OK there too. Seems unlikely to me that this was broken for 2 whole "dot" releases. I've cleared caches on Civi and Drupal.

Suggestions?

# Answer
> 3 votes
This might be the same issue as reported here: http://forum.civicrm.org/index.php/topic,35596.0.html

Could you check if you have the 'Extended reports' extension enabled? That isn't yet compatible with the new interface, so disabling it should fix the problem.

# Answer
> 1 votes
Sounds like you may have extensions/customizations/tpl overrides on your site that are interfering with the new report UI. Can you try disabling them?

---
Tags: civireport
---


# Question
Title: How to create a statemachine/wizard in a modal/popup?
I wrote an extension with wizardized forms utilizing civi's statemachine. If I call the wizard in js with `CRM.loadForm()` it closes when postprocessing the first form.

As far as I can see `loadForm()` appends `snippet=json` to the url and on next click, the statemachine's `perform()` calls the form's `mainProcess` which directly serves json.

So how can I achieve a modal wizard? Am I missing something?

Thanks in advance // nielo

# Answer
I'm not saying that civi statemachine has been done a decade ago and that it shows, but most of us would rather do something else than trying to use it ;)

How familiar are you with angular? You would end up with a nicer and smoother interface, and angular is now part of the core and with lots of useful helpers to interface with the api.

Look what @totten has done for the new civimail interface on 4.6 for instance for inspiration and an example of modal interface.

He and robin did a session about angular at civicon london that you can watch online: https://london2014.civicrm.org/sessions/using-angularjs-enhance-user-experience
> 2 votes

# Answer
CiviCRM's `CRM.loadForm()` does support multi-step forms. The trick is to inform the modal dialog that you want it to stay open and load the next page. Do so by adding this line to your form's postProcess function:

```
$this->ajaxResponse['status'] = 'redirect';

```
> 2 votes

---
Tags: extension
---


title: Cancelling an A/B test

text:
# Question
Title: Cancelling an A/B test
How do I cancel a scheduled A/B test? I have one scheduled for tomorrow, but found a type post scheduling that our proofreader missed. I know I can no longer edit this, but I want to cancel it and resent it: how can I do this?

# Answer
> 2 votes
I found this, it just took a while to show up! It is under the mailings section, I guess I just need to give the server some time to refresh.

---
Tags: civimail
---


# Question
Title: what is giving the error sites/default/modules does not exist
I have a configuration problem somewhere. My logs give a lot of this: File does not exist: /var/www/drupal-7.34/sites/default/modules. The site has modules located in /var/www/drupal-7.34/sites/all/modules. I'm getting the error in apache logs when I try to configure the 'Organization Address and Contact Info' page. On saving that page I get a dump that starts: backTrace

```
#0 /var/www/drupal-7.34/sites/all/modules/civicrm/CRM/Core/Error.php(182): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
#2 /var/www/drupal-7.34/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
#3 /var/www/drupal-7.34/sites/all/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("php_network_getaddresses: getaddrinfo failed: Temporary failure in name resol...", 0, 16, (Array:2), NULL)
#4 /var/www/drupal-7.34/sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR->raiseError("php_network_getaddresses: getaddrinfo failed: Temporary failure in name resol...", 0)
#5 /var/www/drupal-7.34/sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("maps.googleapis.com", 80, NULL, NULL, NULL)

```

# Answer
> 1 votes
Here are a few other possibilities than Xavier's, which seem on point but not yet solving issue:

1. Check the entries in Administer \> System Settings \> Directories to see if the sites/default/modules directory appears anywhere and adjust as appropriate if it does.
2. Using phpMyAdmin or equivalent, check in the Drupal database in the registry table filename field for a module with a path at sites/default/modules. If you find one, change it to sites/all/modules after ensuring it is there.

# Answer
> 0 votes
The errors don't seem to be about site/defaults/modules, but about connections problems

Are you sure your server can initiate connections to the internet?

You might have a firewall that prevents it to connect to the google map api (for geocoding) and/or to talk to a dns

If you want to remove this specific error, you can disable the geocoding, but probably worthwhile checking what is the connection issue, civi expects your server to be able to connect to the internet at several places (eg check for updates, read your bounce email, geocoding...)

---
Tags: configuration, error-page
---


# Question
Title: Disable certain address location types depending on Contact type?
I would like to disallow certain address location types on Organization contacts—for example I don't want to allow "Home" addresses on an Organization.

I would also like to disallow "Main" address type on the Individual contact types.

Anybody try this before?

# Answer
> 3 votes
The cheapest solution would be to combine "Home" and "Main" into one option that can be used for both individuals and organizations. Just have to come up with a word that has both meanings...

# Answer
> 2 votes
Frankly, CiviCRM core should disable the Home address location for Organizations, and the Work address location for Households.

# Answer
> 1 votes
If the solution suggested by Coleman does not work, you will have to create a little extension that removes some of the options based on contact type in a buildForm hook? Or alternatively validates the selected location type against the contact type in a validateForm hook

# Answer
> 1 votes
I suspect doing this in jQuery via a custom behavior template addition:

https://civicrm.org/blogs/dave-greenberg/now-its-easier-add-custom-behaviors-templates

is probably a lot lighter weight, than an extension

---
Tags: addresses, contact-types, location-type
---


# Question
Title: Changes made to individuals using Contact Editor not showing up
I'm using Wordpress and recently upgraded to CiviCRM version 4.6.3. Since I have the editor for individual contacts has ceased to save changes. When viewing an individual contact, I can edit fields using the in-line editors, but when I click the "EDIT" button and edit from the contact editor and click "SAVE", I get a message saying the contact has been updated but the new information is nowhere to be found! The editor does work for households and organizations though.

I did duplicate this on the demo site.

# Answer
It looks like this problem has already been reported and a bug report has been made. I didn't realize it at first but it is the same problem as Maurice's, edits are not saved using the editor form when "use another address" option is checked. Individuals without that option checked can still be edited. I guess I'm just confirming that the problem exists in Wordpress as well.
> 1 votes

---
Tags: contacts
---


# Question
Title: SSL/ Payment Processor Errors on payment form
I'm having issues with this order form (https://www.aishla.com/myaish/israel-trip-payment-form/#.VXc3Gud4zmE) where people are trying to purchase a trip but when they try to process a card they get the following error:

> Payment Processor Error message 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3\_GET\_SERVER\_CERTIFICATE:certificate verify failed

This is on a WPMU site using 4.5 of CiviCRM hosted on Lunarpages with Authorize.net as the payment processor.

Anuone know what steps I can take to correct this?

# Answer
The issue is that the SSL certificate provided by your transaction processor is untrusted by your OS (or by the certs available to cURL).

The solution for a missing CA is -

* to ensure the presence of correct CA certificates to cURL by installing system CA updates, or
* to retrieve an old copy of the correct CA and make it available to cURL if the one used by your payment processor is invalid (see AGH link below).

Since the error message contains `SSL3_GET_SERVER_CERTIFICATE`, I wonder if this is happening because your payment processor extension is attempting to use SSLv3 (recently deprecated). You might want to check that if there are any references to `CURLOPT_SSLVERSION` in your payment processor, they are not set to `3`. (You can set them to `0` as in this fix or simply remove the line.)

This issue was documented by AGH Strategies recently:

Authorize.NET say that you should make available three root CAs ("production certificate upgrades") link below.

> *"Please contact your solution provider and web hosting company to ensure your solution has these certificates installed and is capable of using them to secure your connection to Authorize.Net. In many cases the certificates may already be installed."*
> 4 votes

---
Tags: payment-processor
---


title: Inconsistent ACL behaviour

text:
# Question
Title: Inconsistent ACL behaviour
We recently started using ACLs to fine-tune access to custom fields. Roughly speaking, our setup is:

* all *authenticated users* can access custom field group 1
* *role 1* can access field groups 2, 3, 4
* *role 2* can access field group 5

The problem is that once in a while, a user with *role 1* can't see fields in groups 2, 3 and 4 when looking at a contact's summary page. Refreshing the page fixes the issue.

Unfortunately, if we are using memcache, refreshing no longer helps (which makes sense).

What would cause Civi to not correctly check ACL permissions once but then work on the second attempt? Of course this appears to happen completely randomly and is impossible to recreate consistently.

Running CiviCRM 4.6.2.

**UPDATE**: Issues appear to start during Drupal's cron run.

/CRM/ACL/BAO/ACL.php:group() returns erratic and inconsistent arrays of custom field group IDs every time it gets called. Seems like drupal's cron wreaks some sort of havoc on the acl cache and civi has a hard time rebuilding it.

# Answer
Ugh. This kind of bug is really hard to diagnose. Good call on noticing that memcache caches this behavior.

Are you on some kind of host with really aggressive caching by default? WPEngine, for example, has caused big problems.

If not, you should report this on issues.civicrm.org. My hunch is that caching/retrieval of the query for visiting the contact summary happens before the ACLs for custom fields are checked.

You may be able to more reliably test this by creating a user *not* in Role 1 and logging in as them. I'd be curious if one or both of the following happen: \- visiting the contact as the non-privileged user causes the privileged user to not see the fields the next time \- visiting the contact as the privileged user causes the non-privileged user to see the fields the next time (if so, a bad security problem)
> 3 votes

---
Tags: acl, cache
---


# Question
Title: Was there a ContributionType.php file in a earlier version
Attempting to get the Vanco Payment Processor working with Drupal 7.37 & CiviCRM 4.4.15.

Currently it reports a Fatal error: require\_once() \[function.require\]: Failed opening required 'CRM/Contribute/DAO/ContributionType.php'(include\_path='/home/honduras/www/www/sites/default/files/civicrm/custom/php/:.:/home/honduras/www/www/sites/all/modules/civicrm:/home/honduras/www/www/sites/all/modules/civicrm/packages:.:/usr/local/php53/lib/php') in /home/honduras/www/www/sites/default/files/civicrm/custom/php/CRM/Contribute/BAO/Contribution/Utils.php on line 66

As a new user/developer working with CiviCRM I am unaware of the changes that occurred between version CiviCRM 4.1.x and CiviCRM 4.4.15.

Can someone shed light on the file ContributionType.php?

# Answer
To answer your exact question - in CiviCRM 4.3+ ContributionType became FinancialType. You might be able to just change the file name.

That said, Xavier is correct - there's likely a newer version of the payment processor. You might want to ask J.C. Grogan. Xavier is also correct that in Civi 4.4+ this code is probably supplanted because of pseudoconstant lookups.
> 1 votes

# Answer
the DAO files are automatically generated based on the database schema. I'm assuming that the goal of including this file is to fetch the list of contribution types. In that case, you should modify the code and use civicrm\_api3() to get it, it takes care of knowing where to fetch it.

Lastly, you shouldn't need these includes anymore, they are mostly done automatically based on the class name now.

I'm not familiar with vanco, but you should check if there isn't a newer version of the payment provider extension, you might have quite a few changes since 4.1
> 0 votes

---
Tags: drupal, payment-processor
---


# Question
Title: Error on merging duplicate contacts, wordpress, civi 4.4.14
Scenario 1: 1. Select last name, email rule, all contacts 2. List of potential dups is displayed 3. Select first pair a) Displays error message at the top of the screen:

: title in /home/cooldavis/www/www/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Merger.php on line 141

Notice: Undefined variable: userRecordUrl in /home/cooldavis/www/www/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Merger.php on line 143 b) select merge and go to next pair:

Notice: Undefined variable: title in /home/cooldavis/www/www/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Merger.php on line 141

Notice: Undefined variable: userRecordUrl in /home/cooldavis/www/www/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Merger.php on line 143

Warning: Cannot modify header information - headers already sent by (output started at /home/cooldavis/www/www/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Merger.php:141) in /home/cooldavis/www/www/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php on line 361

# Answer
While it doesn't seem like it, your problem here is very similar to this. You should check out the advice here and here; notices shouldn't be displayed in a production environment.

As for squelching those notices to begin with - I would see if the problem exists in CiviCRM 4.6 by trying the demo server. If not, I'd say it's fine to just suppress notices using the info in the links above.
> 1 votes

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


title: Batch merge automation of big data set

text:
# Question
Title: Batch merge automation of big data set
We've faced duplicate records batch merge issue while moving big data set (around 140K Individuals as Organisation members and cca. 400 Organisations accordingly) from proprietary CRM to CiviCRM and would appreciate any advice of how to move forward. We've successfully started from importing small records amount both via Import GUI and API calls; however after bigger import we've found that a large amount of nested Organisations have been created via Relationships, so, we have one "main" Organisation with properly filled address, etc, and several members and, say, 400 "phantom" organisations with just name and one member visible at Relationships tab.

* We have tried "Find and Merge Duplicate Contacts" Individual Rules via GUI, however, after leaving it works for a night we ended up with same total Individuals number and an url like this: civicrm/contact/dedupefind?reset=1&action=map&rgid=7&skipped=XYZ&merged=0 (where XYZ was 8175 just before it was stopped); since no status report has been received, guess "merged=0" part of an url shows number of successfully merges.
* api/explorer (Contacts -\> Merge) has almost no parameters to work with, just "$result = civicrm\_api3('Contact', 'merge');" and "Other" as choose parameter option, so it's not quite clear how to use it.
* What really works for us is a multi-step GUI workaround, like:

1. Find all instances of Organisation with same name
    2. Assign search results set to a new group
    3. Apply one of the Find and Merge Organization Rules
    4. Wait (cca. half of an hour, thanks to fine tuned MySQL with 13G innodb\_buffer\_pool\_size and tons of other improvements)
    5. Manually merge several remained records

It works almost great, however it is quite time-consuming since we will have to repeat a process around 400 times. Hope there is alternative/faster way(s), we've no clue where to start from. Please help!

**UPD:** Thank you all for a valuable responses, it gives us some inspiration of how to attack an issue from an another angle(s). I'd accept both replies, however Xavier's approach sounds more easy for us at this stage: we've got some positive experience using api/scripting before, even if this method did not work 100% for us previously, we're going to try it again.

# Answer
> 3 votes
For big imports, I wouldn't use the UI and write either a custom script (using the API), using existing drupal modules (civimigrate or use an ETL (amnesty spain has shared a plugin for pentaho for instance)

It would likely be faster than trying to untangle where you are now.

If you can't start, I wouldn't try to merge the contacts, that is a complex operation, but simply write a script to identify the duplicates and manually update the individual to replace the "empty" organisation by the real record, and delete the empty record.

You can use the api from a php script that you'd run from the shell, it will be **much faster** to run than a "real" dedupe

X+

# Answer
> 2 votes
I can offer two possible approaches.

One is to integrate CiviCRM with Solr for deduplicating. Mark Burdett at the EFF got this working a couple of years ago, so you may want to reach out to him. There's also a Google Summer of Code project to integrate Solr for an interactive/faceted search feature, so you may want to reach out to that student.

Another approach is to use your current approach, but use much faster searches. Parvez from Veda Consulting has customized CiviCRM 4.5+ to do exactly that; this work is expected to make it into core in CiviCRM 4.7+ this fall, but is available now here: http://vedaconsulting.co.uk/civicrm-dedupe-workflow-ui

---
Tags: api
---


title: Renewal not recording activity

text:
# Question
Title: Renewal not recording activity
I'm doing some testing on a CiviContribute page in preparation for implementing CiviMember.

During the course of testing, it seems that renewals aren't creating activity records.

Is there some kind of date differential requirement before it logs?

My current testing involved creating a new membership, but also renewing the same day. This initial "renewal" was also an upsell. I then renewed that using the same level.

I also got the same result when testing a renewal without an upsell.

I'm running Drupal 7.37 with CiviCRM 4.6.3. No extensions are installed.

Any help would be much appreciated!

# Answer
I believe the issue to be as a result of CiviCRM seeing the payment as being a test.

Essentially, I used the PayPal sandbox configuration for the "production" processor. Looking back at the contributions for the membership, it stated the type was 'Member Dues (test)'.

After setting up and using the dummy processor, the contribution stated was just 'Member Dues', and it then recorded the contribution and membership renewal activities.
> 1 votes

---
Tags: civimember, activities
---


# Question
Title: Downgrading CiviCRM to use an older extension
I am trying to use the civicrm document storage extension. It turns out that CiviCRM 4.4 and 4.3 supported this extension. My question is, is there a way to downgrade CiviCRM 4.6.3 to either 4.4 or 4.3 or is there a way that 4.6.3 supports document storage.

PS:I have 4.6.3 installed and is running it on Drupal 7. I have done quite a lot on the site thus can not simply install a new instance of CiviCRM.

# Answer
I think (with @Xavier) a safer path then downgrading would be to upgrade the extension. You need this extension: https://github.com/CiviCooP/org.civicoop.documents and you should certainly speak to @JaapJansma about upgrading it. But I would bet it is an easier job than downgrading CiviCRM?
> 4 votes

# Answer
In the case of many extensions, they may not be marked as "officially" supporting a certain version but still work file. I suggest you manually copy the extension to your server (auto-download won't work with "unsupported" releases) and enable it. Backup your database first!!

If you encounter any errors with this process, this is great feedback to give the extension maintainer. File an issue on the GitHub project page of the extension giving as many details as possible. It will help him to know that

a. Someone is interested in using the extenison with the latest version of Civi.

b. There are specific things to fix.
> 3 votes

# Answer
I don't think civi ever had a document storage in a previous version and then got removed. What you saw might have been an extension.

As for downgrading: you would need to find all the changes in the structure of the databases and in the content, and reverse them.

I had to do it once and it was only a few minor versions. It's not trivial, time consuming and error prone. I would avoid it as much as possible, and if the document storage you have seen need to be upgraded to work with the latest civicrm version, I'd much rather invest my time there rather than trying to downgrade
> 2 votes

---
Tags: extension, upgrade
---


title: Blank Admin Screen WordPress Install

text:
# Question
Title: Blank Admin Screen WordPress Install
When I try to install the WordPress plugin 4.4.15LTS onto our site it says the install is successful but when you navigate to the admin screen it comes up blank. Any help is greatly appreciated. Thank you.

**The following errors are presented in developer tools:**

Uncaught TypeError: CRM.url is not a function admin.php:56

Uncaught TypeError: Cannot read property 'fn' of undefined load-scripts.php1

**I've have checked and tried and following:**

Reinstalled CiviCRM

Uninstalled/Disabled All Plugins

Confirmed Read/Write/Execute Permissions 0777

Configured PHP RAM to 128MB

Created New MySQL Database

**Server Settings**

WordPress 4.2.2

PHP 5.6

MySQL 5.6.25

# Answer
> 4 votes
This WordPress site was created using a Microsoft Azure webapp. I imagine that it was a compatibility issue. After creating a designated IIS server with MySql the problem resolved itself.

---
Tags: wordpress, installation
---


# Question
Title: Creating a public Members directory with CiviCRM in Wordpress using Profiles
I'm trying to create a public Members directory with CiviCRM in Wordpress using Profiles.

First i created a "Smart Group" through Search that lists all the members filtered as i wanted - i've called this Smart group "Members Directory (Smart Group)" and set it's Visibility as "Public Pages".

Then i created a Profile called "Members Directory (profile)" and populated it with a few "Individual" fields like First & last name: each set with Visibility as "Public Pages and Listings", Searchable "YES", In Selector? "Yes". I linked this to my smart group.

Finally i put the CiviCRM shortcode \[civicrm component="profile" gid="14" mode="view"\] on my page.

However when i view my page it says...

```
(i) Permission Denied You do not have permission to view this contact record. Contact the site administrator if you need assistance.

```

See here... http://phils07813188309.esy.es/membership/members-directory-from-profile/

Any ideas what is going on? phil

# Answer
> 6 votes
I assume you are seeing this as an anonymous visitor to the site and it fuctions properly if you are logged in. If this is the case, I think you'll need to add anonymous users as able to see the information for these public profiles. In CiviCRM go to Administer \> User and Permissions \> Permissions (Access Control). Select the 'Wordpress Access Control'.

You can provide anonymous users (all visitors to the website who have not logged in) permissions such as:

* create and edit profiles ( or profile listings and forms)

This is typically on by default, so someone might have turned it off.

See the Book for more details:

http://book.civicrm.org/user/current/initial-set-up/permissions-and-access-control/

Alternatively, if you cannot see the page properly as an authenticated user, or if this permission is given, something else may be amiss.

For a starting point, here are some unresolved forum posts with the same issues:

http://forum.civicrm.org/index.php/topic,34677.15.html

http://forum.civicrm.org/index.php?topic=30429.0

This could be a bigger bug that needs reported/fixed

# Answer
> 3 votes
I'm on WordPress with CiviCRM 4.6.3 and was experiencing a similar issue viewing a page with the profile search shortcode as a Subscriber role. However, it was throwing a different permissions error:

> The requested Profile (gid=43) is disabled OR it is not configured to be used for 'Profile' listings in its Settings OR there is no Profile with that ID OR \>you do not have permission to access this profile.

WordPress Access Control menu in CiviCRM for that particular role had everything in order (profile listings, profile listings and forms) as well.

The issue turned out to be in that particular Profile's Settings. In the "Used For" field, only the "Search View" option was checked. I needed "Standalone Form or Directory" checked as well. I suspect this is because embedding the form with that shortcode is not considered a "CiviCRM Basic and Advanced Search" as the documentation calls it. It's a form that can display search results.

Hopefully this works in your case as well.

Cheers,

Jonathan

---
Tags: civimember, profile, permissions, smartgroups
---


# Question
Title: Missing fields and reports in database after migrating to a new server
What's the best way to migrate CiviCRM to a new a server? I haven't been able to get it to work. I've been following this guide. Here are the steps I've been taking to for the migration.

1.) SQLDump and exclude the flowing tables in old database.

db\_name.civicrm\_domain

db\_name.civicrm\_acl\_cache

db\_name.civicrm\_acl\_contact\_cache

db\_name.civicrm\_cache db\_name.civicrm\_group\_contact\_cache

2.) Setup new CMS (WordPress, Joomla or Drupal) I have tried all three platforms

3.) SQLDump old database into new

2.) Clear cache and rebuild menus

I know that I must be missing steps. Here are some of the problems I'm running into:

1.) There is a problem when trying to run custom reports that repopulate after rebuilding the menu. The message I get is (error: You have tried to access a report that does not exist.) Where do you find custom reports made on the old system? Whats the best way to transfer them, copy paste?

2.) When clicking a a link on the menu or running search I get this (error: DB:no such field).

I'm guessing that when I transfer the custom templates/reports (not sure the proper nomenclature) the database error will resolve itself?

Here is the database error from the CiviCRM error log:

```
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT civicrm_uf_group.id, civicrm_uf_group.title, civicrm_uf_group.created_id, civicrm_uf_group.is_active, civicrm_uf_group.is_reserved, civicrm_uf_group.group_type, civicrm_uf_group.description
                    FROM civicrm_uf_group
                    LEFT JOIN civicrm_uf_join ON (civicrm_uf_group.id = uf_group_id) AND civicrm_uf_group.is_active = 1
                          WHERE civicrm_uf_join.module = 'Search Profile' ORDER BY civicrm_uf_join.weight, civicrm_uf_group.title [nativecode=1054 ** Unknown column 'civicrm_uf_group.description' in 'field list']

```

# Answer
There are a few questions combined here I think. From what you describe there may be other problems afoot, but hopefully these two suggestions may help you make some progress.

**Why do I see the error `DB Error: no such field` with `Unknown column 'civicrm_uf_group.description' in 'field list'`?**

It sounds like your source and destination CiviCRM may be different versions. Check the codebase of your source and destination CiviCRM and if the destination is newer, make them match.

Up to you whether to run the upgrader on the source before migration or on the destination afterwards. *It may be as simple as visiting the CiviCRM upgrade URL on the destination server.*

**Why doesn't the DB migrate when I exclude those tables?**

The docs actually say *If copying an existing install don't skip the cache tables they will not be created automatically*, so you should NOT exclude those tables if you are migrating CiviCRM to a new server.

(It looks like the docs could be improved there, they give different-yet-kinda-identical advice for dumping Drupal and Joomla and don't mention how to deal with WordPress?)
> 3 votes

---
Tags: civireport, database
---