# Question
Title: Blank screen on install, 500 error at set_include_path()
Installing CiviCRM 4.6.10 on WordPress 4.3.1, with few, if any other plugins installed. After uploading the files and enabling the plugin, you go to the installer page, and it's a white screen. Nothing's appearing in the logs.

Debugging in the code shows that everything executes fine until set\_include\_path() gets called. Commenting out the first instance causes it to proceed until the next instance. Finally, after commenting out several, you get an error that a class is not found, which is not surprising: you've removed the places that tell the script where to find it.

Standard cPanel-driven LAMP stack from InMotion hosting.

Why would this installation fail?

# Answer
> 2 votes
This is one of the strangest Civi911 calls we've gotten yet. The problem definitely was set\_include\_path(), but it wasn't consistent with a more common problem with that--that it doesn't take effect.

We actually spent the maximum amount of time and handed it back to the client, telling him that we narrowed it down to set\_include\_path() but didn't know anything more, and we suggested he ask his host about it.

The host said that they have installed the cPanel/WHM Magic User Loader, which allows a user to have its own ~/php directory for PEAR modules installed via cPanel. Enabling the Magic User Loader causes set\_include\_path() to fail (miserably, as we saw). The host disabled the Magic User Loader, and the client ran the installer with no further problems.

# Answer
> 0 votes
Came across this while researching a similar issue. IMH isn't at fault, its a "bug" with cpanel 11.52 looks like it has been "patched" however if not, the homeloader.so file can be commented out in php.ini and resolves the issue.

---
Tags: installation, error
---


# Question
Title: DB Error: no such field in civicrm_api3() (when upgrading to 4.7.1) (Drupal)
After upgrading from 4.6.12 to 4.7.1 (with Drupal 7.42), I get the following message when I go to CiviCRM :

CiviCRM\_API3\_Exception : DB Error: no such field dans civicrm\_api3() (ligne 45 dans /home/parst/public\_html/drupal/sites/all/modules/civicrm/api/api.php).

(in french)

... and cannot access to CiviCRM

# Answer
I forgot to run the Upgrade Script (step 11 of the CRMDOC) When done, everything seems OK. Thank you John, for reminding me.
> 1 votes

---
Tags: upgrade
---


# Question
Title: Unable to upgrade in WordPress from 4.6.12 to 4.7
I have a Civicrm installation that's been running for quite some time. I've never had an issue upgrading until now. I've been able to upgrade to 4.6.12, but then I try 4.7.0 or 4.7.1, all I get is "\[\]" on the progress screen. There's no error log generated. I'm running WordPress 4.4.2 with PHP 5.6.

# Answer
There are a million reasons why this could be happening - you could look in your PHP logs (which, if you're running Apache with mod\_php, will be in your Apache logs). you can also check your CiviCRM log in the ConfigAndLog directory.

I find that if an upgrade isn't working, I'll often have better luck with an upgrade from the command line. Unzip CiviCRM as you would normally, but instead of visiting the upgrade script page, run `wp-cli civicrm upgrade-db`. This presumes you have wp-cli with the CiviCRM extension installed, of course. I'll also get better error messages, in general.

Since you've got a failed upgrade, don't forget to roll back your database - and don't forgot to drop your database before you reload the backup, or you're likely to have more upgrade errors!
> 1 votes

---
Tags: wordpress, upgrade, 4.7
---


# Question
Title: Mail editor defaulting to Ckeditor and text wrap issue
I have a Drupal multisite build and after upgrading to civi 4.6.10 noticed the default text editor for bulk mailings defaults to CKEditor...despite my settings in administor/customise data and screens/display preferences being set to TinyMCE.

If I send individual emails out the editor is TinnyMCE but for bulk mailings it is CKEditor? Despite trying all options in display preferences the bulk email adeitor stays as CKEditor.

Now, even though the template looks ok in mailings, when i send a bulk email the text stretches to either the full page width or the width of the paragraph (whichever is shortest) even if the text is placed inside a table. Using the same template in invididual emails the formatting is correct.

ie. I have a table cell that is set as say 200 px wide if i add text and send as an individual email it is fine but when I send as bulk email the text forces the table cell to stretch to the width of the text or page width.

I've tried to give an example of what it looks like below;

**In individual emails with TinyMCE**

*Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor
incididunt ut labore et
dolore magna aliqua. Ut enim
ad minim veniam, quis
nostrud exercitation ullamco
laboris nisi ut aliquip ex ea
commodo consequat.
*

**The same template in bulk emails stretches to full page width looking something like this**

*Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.*

I am completely baffled by this and any help/advise would be welcome.

Cheers Robbie

# Answer
> 1 votes
I strongly suspect that what you're seeing is a side effect of CiviCRM dropping support for TinyMCE in core. If upgrading to 4.7 is an option, I suspect that you can solve this problem by installing the TinyMCE extension.

Of course, if CiviMail is important to you, then upgrading to 4.7 shouldn't happen until these two bugs are closed in a released version of CiviCRM:

# Answer
> 0 votes
Try with drupal WYSIWYG editor.

---
Tags: civimail, ckeditor
---


# Question
Title: CiviMail Tracked Click Throughs not Redirecting
I am using CiviCRM with Drupal 7 (latest version). After upgrading to CiviCRM 4.7, the Track Click Through links in my mailings have stopped redirecting. They just go to the custom CiviCRM URL's, but don't redirect, leaving simply a white page. Everything worked fine before the upgrade.

As instructed in this post, I have added this code to the .htaccess file in the appropriate block area:

`php_value date.timezone "America/New_York"`

I also tried using the ini\_set command for civicm.setting.php mentioned in the same post.

Help please!

# Answer
> 2 votes
This is a known bug in CiviCRM 4.7.1, and it's been fixed in 4.7.2 - which hasn't been released as of this writing. However, if you're comfortable applying the patch, the fix has been released. See https://issues.civicrm.org/jira/browse/CRM-17953 for details.

# Answer
> 0 votes
If you have access to the server's php.ini file you could try adding the directive there:

`date.timezone="America/New_York"`

With our host Media Temple, you can include additional directives for the php.ini from within the server UI rather than the command line (in our domain's PHP settings).

---
Tags: civimail, drupal, 4.7, tracked-links
---


title: Online registration: Drupal+CiviMember

text:
# Question
Title: Online registration: Drupal+CiviMember
we are really new to CiviCRM and Drupal (and this forum). We're trying to setup an online member registration: we want an anonymous user to become a Drupal user filling a registration form with a membership payment. The user account will stay blocked until the payment is received.

We've read the membership documentation (also profiles and civimember sync) but we're still missing the general idea.

If anynone can shed some light on the workflow to achieve this or recommend a good reference, it would be great for us.

Thanks in advance!

# Answer
> 3 votes
Most of what you're describing is handled automatically. Here are some key elements that may help:

* You must create the membership form as a contribution page. Go to **Contributions menu \> Manage Contribution Pages** and create a new page. Be sure to fill out the "Membership" section.
* A good reference can be found here.
* To allow the user to become a Drupal user as part of signup, create a profile from **Administer menu \> Customize Data and Screens \> Profiles**. In the profile settings, under "Advanced Settings", there is an option to allow someone to create a Drupal account while filling out the profile. Once you've created the profile, add it to the contribution page from the "Include Profiles" tab.
* You can decide whether or not to take either online (e.g. credit card) or offline (e.g. mailing in a check, aka "pay later") payments or both for your registration form. If someone pays online, and the transaction is successful, they'll automatically receive a membership. If you allow a "pay later" option, a membership will be created with a status of "pending". It will not be counted as a membership for most purposes. When you mark the contribution as complete, the membership will activate.

# Answer
> 3 votes
A couple of other thoughts.

You can use the CiviCRM Membership roles sync module so that only paid up members get a special Drupal Role. I.e. you would let all people signing up get a Drupal account but with no special permissions, and then when they are paid the module can set them as Members role and hence gain access to members-only stuff.

Or if you really only want Drupal accounts for paid up members, and you are wanting something a bit more automated, you could look at Drupal Rules (and CiviCRM Entity module) to create (or unblock) the account based on some civi criteria.

---
Tags: drupal, civimember, registration
---


# Question
Title: How do I use the joins feature of the new API
4.7 lists the ability to use joins for API queries, but I can't find anything in the docs or in the API Explorer. Can someone point me to documentation or examples?

# Answer
The JIRA Issue for this feature https://issues.civicrm.org/jira/browse/CRM-17795 reads

> This adds support for joins in api.get operations to fetch information from more than one table.
>
> It also adds ACL enforcement to the Contact and related (email, address, phone, etc) apis for get, create & delete actions.

The JIRA issue links to a couple of pull requests; **pull request 7565 includes a comment that has screen shots and descriptions (and one join example)**.
> 4 votes

# Answer
4.7.1 explorer includes the Join options and is reasonably intuitive. (4.7.0 did not.)
> 1 votes

---
Tags: api, 4.7
---


title: Strange characters on CiviCRM dashboard

text:
# Question
Title: Strange characters on CiviCRM dashboard
CiviCRM 4.4.7 on Pantheon (CiviCRM starter kit).

When I go to the dashboard page, I see strange characters that look like white checkmarks in a circle with a green background.

# Answer
It might be that the css of your theme clashes with the css of civi (there is a style rule to avoid repeating that icon, that might be overwrited by one in your theme).

As a quick test, can you switch to the default drupal theme and see if it's still an issue?

If not, you will need to modify your theme to add a rule so the background image for the icons doesn't repeat. Not complicated, but likely specific to your theme, so hard to give you a generic advice without knowing the specifics
> 1 votes

---
Tags: dashboard
---


# Question
Title: Creating your own tokens page content gone
Has anyone else noticed the content of this post no longer shows?

https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit

I'm trying to write a token to use the contribution note as a smarty variable but would like to review the tutorial. ..

# Answer
At a minimum, here is some information (and example code) pulled from the blog post.

http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens

**Update**: here is a link to the cached version of the blog post that has the content: http://webcache.googleusercontent.com/search?q=cache%3Ahttps%3A%2F%2Fcivicrm.org%2Fblogs%2Fcolemanw%2Fcreate-your-own-tokens-fun-and-profit&oq=cache%3Ahttps%3A%2F%2Fcivicrm.org%2Fblogs%2Fcolemanw%2Fcreate-your-own-tokens-fun-and-profit&aqs=chrome..69i57j69i58.7385j0j4&client=ms-android-verizon&sourceid=chrome-mobile&ie=UTF-8
> 1 votes

# Answer
The blog post is back and alive:

https://civicrm.org/blogs/colemanw/create-your-own-tokens-fun-and-profit

Happy coding
> 1 votes

---
Tags: tokens
---


# Question
Title: CiviCRM error on Joomla 3.x - There are no public mailing list groups to display
After a successful backend installation on latest Joomla platform CiviCRM does not seem to work when I try to publish any page. i get this same error message on all pages:

> \
 \ \
 \\ \Sorry but we are not able to provide this at the moment.\ \
There are no public mailing list groups to display.\
 \
\Return to home page.\\
 \
 \
 \

Can anyone tell what this is and how to remedy it? here are links to the other pages with the same message:

# Answer
> 1 votes
Check your directory and resource URL in the Administer CiviCRM section. Make sure your permissions are correct for the user. Clear the cache folders in Media TemplateC Make sure your going to http:// or https:// not to http://.www

---
Tags: joomla, error, installation
---


title: What is the price of CiviCRM?

text:
# Question
Title: What is the price of CiviCRM?
Can i know the price for this CRM? I'm planning to get a CRM application for our organization and this look like a perfect match. Appreciate if you can let me know the cost for the full implementation

# Answer
CiviCRM is open source, so the software itself is free to download. So depending on your skills and availability of hosting it could be free.

In practice, hosting costs (a bit of) money. It will cost your organisation time to learn to use CiviCRM. And if you would want extra help you would pay it to one of the CiviCRM Partners you could hire. (The Partner list can be found here: https://civicrm.org/partners-contributors.)

If your organisation starts using CiviCRM you could help support the CiviCRM community by a (yearly) donation or by becoming a CiviCRM member (https://civicrm.org/become-a-member).

But all that is voluntary and completely under your own control.

When you like CiviCRM at first sight you can get more hands on experience by looking at http://demo.civicrm.org.

After that you could try to download and install it (https://civicrm.org/become-a-member).

Let us know if you need more information.
> 11 votes

# Answer
* CiviCRM licence: $0
* For the rest: how long is a piece of string?

How much it cost depends a lot of the specifics of your organisation, if you have the time to install and configure, if you need custom development, if you need more training and advices, if you need consultants to help migrating the data from various legacy systems...

In my experience, it is cheaper than closed source systems, and more importantly, it's more sustainable, as you keep more control on your CRM, however, don't expect it to be free unless you have time (or someone in the team/a volunteer) to learn and configure it.

I would recommend you to go to a meetup with other users and providers in your area (there is one coming soon) http://wiki.civicrm.org/confluence/display/CRM/CiviDay+2016, they might help you gauge better how much help you might need and share their experience
> 8 votes

# Answer
If you are a DIY type you just need a good hosting account not the $4-10 type but more like a $20-40 VPS style account and you can go from there. It is good to have a transactional mail service such as Mandrill which is free if there is not a lot of volume. But it will make huge URL's. Pair it with your favorite CMS Joomla, Drupal, or blogging tool Wordpress.
> 1 votes

---
Tags: installation, evaluating-civicrm
---


# Question
Title: Our CMS is Expression Engine. Does this mean we can't use CiviCRM?
Is it possible to use CiviCRM when we have a website built with Expression Engine rather than Joomla, Drupal or WordPress?

Thanks

Karen

# Answer
You would not be able to have *direct* interaction between Expression Engine and CiviCRM like Drupal, WordPress or Joomla allows, **but** you could certainly install CiviCRM on a subdomain of your current website along with one of those three and use it on the subdomain. See https://civicrm.stackexchange.com/a/9385/105 for some great thoughts regarding this.

If you had developer support (your own or hired) you could use CiviCRM's API to have certain information from CiviCRM available on your current website.
> 3 votes

---
Tags: evaluating-civicrm, compatiblity
---


# Question
Title: Filter Mailing List report for unsent mails
I have a mailing list with 788 recipients. When run, the hosting server choked at 520 records because of server limitations. When I run the sent/scheduled mailings report I can generate the delivery summary and can get a .csv of both the intended recipients and the successful deliveries. The list of "intended recipient" contacts has one of two entries in the Delivery Status field: Successful and Unknown.

What I need to do is filter the original recipients list for delivery status=Unknown, but that I can't find a method to accomplish that.

I've solved the host resource limitations issue by using Mailchimp and the Joomla Mailchimp extension. Now I want to resend the email only to the 228 people the server never got to. Is there any way? I have tried custom searches, filters, various reports, but no luck.

Any help would be appreciated. Thanks.

# Answer
> 1 votes
Since this is a one time issue (now that you've resolved with MailChimp), **I would use that CSV to 're-import' those intended recipients with an Unknown status**. The CSV should have email address as a field, so you can use that to match up your contacts. See Importing Data and Importing Data - CiviCRM Wiki for reference.

When you import the contacts, use the Update or Fill option for "For Duplicate Contacts" option (and they should all match if your dedupe rule uses email address). **In one of the last steps of the import, you can add them to a new group. Use that group as the recipients for your re-sent mailing.**

---
Tags: civimail
---


title: Cron job with shared hosting CPanel

text:
# Question
Title: Cron job with shared hosting CPanel
I've tried different ways to setup cron jobs.

When using that cron job, the file is not able to read the parameters (like key, etc.)

> /usr/bin/wget -O - -q -t 1 http://www.site.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXXX&pass=XXXX&key=XXXXX

The e-mail I received says: ERROR: You need to send a valid key to execute this file.

When using those cron jobs, they are not running:

> /usr/bin/wget -O - -q -t 1 'http://www.xxxx.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXXX&pass=XXXX&key=XXXXX'
>
> /usr/bin/wget -O - -q -t 1 "http://www.xxxxx.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXXX&pass=XXXX&key=XXXXX"

When working with php-cli:

> php /home2/xxx/public\_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -s xxxxx.org -u XXXX -p XXXXX -e Job -a execute

The PHP error log says:

> PHP Fatal error: cli.php can only be run from command line. in /home2/xxxxx/public\_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php on line 91

When submitting the link directly in the browser, it works well.

**PHP 5.4.43 CiviCRM 4.6.7 Wordpress 4.4.1**

# Answer
> 3 votes
Thanks for helping. Looking at the log showed that everything after & was getting truncated.

There should be "backslash" () sign before "and" (&) sign.

> /usr/bin/wget -O - -q -t 1 http://www.site.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=XXXX\\&pass=XXXX\\&key=XXXXX

# Answer
> 3 votes
You may want to try creating a wgetrc file that contains all your values. Check the man page for wget as a reference.. Here's a wgetrc of mine:

```
post-data=name=civicron&pass=<password>&key=<sitekey>
output_document = -
quiet=on
timeout=1

```

Also - check your Apache/nginx logs for the actual URL that was requested that corresponds to a wget that resulted in a "You need to send a valid key" error. Maybe something is getting truncated; the web server log can help determine this.

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


# Question
Title: Can members login and then search membership database?
I'm assuming this is the case, but I wanted to confirm. Would members of my organization have the capability of logging in to our membership database and viewing other members information?

# Answer
> 1 votes
Yes, there are a few different ways to accomplish this. One tutorial for a members-only directory is available on the CiviCRM wiki: Creating a website member directory

If you are on Drupal, you could also use Views to create something similar.

---
Tags: civimember
---


# Question
Title: Invalid argument supplied for foreach in Report.php on line 264
I'm setting up some scheduled jobs to email csv reports on a regular basis. I set up the job in scheduled jobs and whether I select "execute now" or run it through a cron job, I get this error: Warning: Invalid argument supplied for foreach() in //www/www/wp-content/plugins/civicrm/civicrm/CRM/Report/Utils/Report.php on line 264

I can go into Report.php and add a code check if the arguments sent to "foreach" are arrays (i.e. (is\_array($rows)) ), and then it runs without any warning. But, I don't want to be administering a system that I have to go in and modify Report.php. I don't see anyone else with this error. Any ideas why I'd be getting it?

# Answer
> 0 votes
The "Constituent Details" report template is not designed for export to csv, so if that is wanted it is better to select "Constituent Summary" template to create the desire contact report. In this case, the csv is produced and emailed properly.

In my case, I still receive some run-time errors while the report is running, but it does not negatively affect the output that I need.

---
Tags: reports, scheduled-job
---


# Question
Title: How can we have more than 3 file attachments per note?
How can we have more than 3 file attachments per note?

CiviCRM 4.7.1

Thanks,

# Answer
> 6 votes
Go to Administer/System Settings/Misc...you should see an option for the maximum number of attachments?

---
Tags: attachments
---


title: is a certain report available?

text:
# Question
Title: is a certain report available?
I am the Treasurer of small not-for-profit organization and we use CIVI for our donations database. I see that CIVI has a "Repeat Contributions" report that can show a comparison of total $$ donated amount by person for two consecutive years. This is good; however, I would like to see ONE report that lists the total donations for each person for our 5 years; that is, think ....column A has the name, and Columns B,C,D,E,F shows the annual contribution amount for that year. Can this be done? and if so, how? Thank you - Mary - (Treasurer)

# Answer
> 3 votes
The Aggregated Household Contributions extension by Allen Shaw at Emphanos will get you close. It creates a report template for the Contribution Aggregate by Relationship report. The report will show up to 5 years of history by year (you can choose to show less) and a total if you want it. However by default it groups contacts into households, shows the contributions for the individuals in the household, and then shows the total for the household by each year (which is actually a really nice thing to have). If someone is not in a household, it will just show the individual giving history. If you don't know how to load extensions, you can reach out to your sys admin or post another question.

# Answer
> 2 votes
Mary, I do not think there is a standard report that does that. You could create a customized report (or ask a CiviCRM partner to do it for you) that shows the data like you explain. And I agree with the suggestion that petednz made about Drupal Views.

---
Tags: reports
---


# Question
Title: How to see who the individual is who registers multiple people for a paid event
Where in Civi can I see who paid for/registered themselves and multiple other people for a paid event? In other words, if Joe registers and also registers his two friends Gary and Bill for the same event how do I see that Joe paid for/registered Gary and Bill?

CiviCRM v4.5.8 with WP 4.2.2

# Answer
Results from CiviCRM demo (4.5 on Drupal)

* Additional participants do not have a contribution source, so they can be identified on a Event Participants List Report (you will need to select the Contribution source in the report criteria)
* Click view on the participant and "Registered By" will be shown.
* Clicking the "Registered By" participant will take you the that person's registration showing all the people he/she registered.
> 2 votes

# Answer
You can't get a report, per se, but you can do an Advanced Search and view the search results as participants. You can then export the search results and select the 'Registered By ID' as one of the export fields. You should be able to use a pivot table to group the data accordingly.
> 0 votes

---
Tags: civievent
---


title: Birthday only Month and Day

text:
# Question
Title: Birthday only Month and Day
We only have month/day data for most people. How can I change the format for the constituent profiles to just do month/day?

# Answer
When we just have the month/day for the birthdate we set the year to a generic year like 1900. You still are able to get your birthdate notifications and run all the reports you want. It's just that the calculation of the contact's age will be wrong. We use a year that would make the person VERY old so that we know that the year is not known. It has worked for us without any issues.
> 5 votes

# Answer
You only want to store the month and day and not the year of the Birth Date?

In that case you actually do not want to store the Birth Date. That is not a change in format, that is a different kind of information.

My suggestion is to create 2 custom fields for it: an integer field for the month and a second integer field for the day.
> 0 votes

---
Tags: contacts
---


# Question
Title: After Import to group, individuals in that group not showing up as recipients to in CiviMail.
OK, this is a new one to me. I'm running CiviCRM 4.6.6 on WordPress 4.3. For the individual contacts I added manually, CiviMail works awesome. But here's where things get weird.

I just finished importing a list of contacts into a new group (not a big list, just 104, that were exported from a previous CiviCRM install). I made sure to select only basic fields to import. Imported them into a new group. Import seemed to go fine. Changed the group setting to Mailing List.

But then when I tried to use CiviMail to send a mail to that group, CiviMail says "No Recipients."

So I added an previously entered contact into the new group, and when I tried CiviMail again, it says "1 recipient" (even though there are 101 showing up in the group).

What gives?

# Answer
> 2 votes
When you look at Groups tab for one of the imported contacts, is the status of the Group "Added"? My suspicion is that the status is "Pending" and thus it will be excluded from use.

Pending is used by CiviCRM to allow permission by end users to use the email address and is used when the Group is set as "Public Pages".

You should make sure the group is set as "User and User Admin Only" which should remove the permissioning component. (I think you need to reimport the contacts, or at least re-add them to the group once the setting is fixed.)

More on this can be found in the Visibility section here: http://book.civicrm.org/user/current/organising-your-data/groups-and-tags/

# Answer
> 1 votes
This looks like it may be related: When sending mailing incorrect amount of contacts displayed

In short, for CiviCRM 4.6 and earlier, imports may set the "Is Deceased" value to NULL instead of explicitly setting it to 0. These people are excluded from mailings so you need to set that field correctly. (e.g. `UPDATE civicrm_contact SET is_deceased = '0' WHERE is_deceased IS NULL;`)

This was fixed in 4.7.

---
Tags: civimail, import, groups
---


# Question
Title: Is it possible to set a sophisticated price set for events, like in this example?
I am trying to facilitate a event but price sets are bit complicated, just wondering if anyone can give a clue how to sort it out please?

The "Early bird" pricing structure:

```
Single person -£285 pp

Couples - £240 pp

Family with kids - £220 pp (kids free under 2; £100 2-4yrs; £150 4-11yrs; over 12 £220)

We will be asking for 50% deposit upfront to secure their place and the remainder 50% within one month

```

Complication I am facing to give option for 50% deposit. Is it possible to do in civicrm 4.6.12?

# Answer
> 2 votes
I do not think this is possible with off the shelf CiviCRM. You should certainly have a play with the CiviDiscount extension: https://civicrm.org/extensions/cividiscount if you have not already installed it. But even then I think your requirements would mean a specific extension. As you know you can develop an extension yourself or get a CiviCRM partner or expert to develop one for/with you.

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


# Question
Title: Show different events to different user groups
I have users in different groups; depending on the group they are in, when they see the events listing, I'd like them to only see events that are relevant for them based on the group(s) they are in.

For example, let's say I have users in 3 groups: Employee, Manager, Contractor. Manager gets to see events for all groups. Contractor only gets to see Contractor events. Employee gets to see events for Employee and Contractor.

Right now I am just using the basic CiviEvent listing: https://mysiteurl/civicrm/event/ical?reset=1&list=1&html=1.

One option I have thought of is to use the "Event Type" as a filtering mechanism because you can then use URLs like https://mysiteurl/civicrm/event/ical?reset=1&list=1&html=1&type=XXX. So then for event display I would create my own event listing page and embed iframes. I would still need to find a way to identify programmatically what group the user is in and only display the iframe for that user. The problem with this option is that it does not show the events in date order: it would show the Employee events in date order, then in a separate section the Manager events in date order, and in a third section the Contractor events in date order. I feel this would become confusing for people. I'd rather show them just one single event list that is in date order and only shows events that are relevant to them.

I guess it might be possible to use views? But I don't know much about views.

So I'm looking for advice or help. I haven't been able to find any plugins or sample code that might do this but it seems like it would be a super common use case?

THanks!

PS: I am on Drupal 7 and Civi 4.6.X.

# Answer
I solved this by:

* Enabling the PHP module that comes as part of Drupal 7 core but is disabled by default. Enabling this module creates a new text format called "PHP Code"
* Creating a new page and setting the text format of that page to "PHP Code". I called the page "Calendar of Events".
* Putting the following code in the body of that new page:

> `<?php
>  $role = user_role_load_by_name('My Role');
>  if (user_has_role($role->rid)) {
>  header("Location: https://mysite/civicrm/event/ical?
>  reset=1&list=1&html=1&type=7"); /* Redirect browser */
>  exit();
>  }
>  ?>`

This solution requires you to have a separate Drupal role for each group of users you want to show different events to. It also requires that you have defined different event types. So for example, users in the group Managers would see events that have event types such as "Manager Meeting", "Employee Meeting", and "Very Secret Meeting". You define the event types in CiviCRM's Administer menu for CiviEvent. The `&type=X` is what defines what event types will be displayed; the X value comes from the event type list in CiviCRM's CiviEvent administration. You can comma separate the `&type=X,Y,Z` for example to show one user role multiple event types.
> 1 votes

---
Tags: civievent, groups, drupal-views
---


title: Anonymous Users Cannot Contribute

text:
# Question
Title: Anonymous Users Cannot Contribute
I have set up a donation page linked to Paypal. (https://contacts.network211.com/civicrm/contribute/transact?reset=1&id=6)

* When I attempt to use the contribution form as a non-logged in user, I enter my donation amount and email address. When I hit Confirm Contribution, ***the system returns to the contribution form with all fields empty.*** No error message or indication of what is going on.
* The contribution works if I am logged into civi as an authenticated user.

Settings

* I am not asking the user for any additional information, ie. not using a profile
* The form is set as active/online
* Under drupal permissions, I have CiviContribute: make online contributions selected
* I have looked in both Drupal and Civi logs and don't see anything that seems to point to the problem.

This is very frustrating!

(I asked the same question earlier with no resolution. How to allow contributions from non-members This link also yields no answers Why can't anonymous users make contributions?)

# Answer
Further investigation on my site, which was exhibiting the same issue as that noted by Keith Sorbo, showed that there was no 'user 0' record in the Drupal users table.

This page - https://www.drupal.org/node/1029506 \- offers various options about how to reinstate a 'user 0' record in the Drupal database.

Once I had a 'user 0' record the CiviCRM contribution page worked as expected.
> 3 votes

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


title: Contribution page in a loop?

text:
# Question
Title: Contribution page in a loop?
I have a contribution page set up that I'm sending users to using a link from a webform, which includes the cid and checksum so that the contribution page is prefilled with the user's data.

when the user submits the page, having selected the relevant payment options, the page is simply re-presented to them rather than taking them off to the payment processor, Paypal standard in this instance.

If I use the page as a logged in user, it works without a problem.

Running D7 and Civi 4.6.10 currently, although about to update to current 4.6.x. Is this a known issue?

Looking at Firebug, I can see that in the case where the user is not logged in, I'm seeing a 404 on a JS file (/sites/default/files/js/jquery.min.map;) which I don't get when logged in.

I'm thinking this may be theme-related?

Any ideas on how to debug or workaround?

# Answer
Turns out the problem was caused by the fact that there was no 'user 0' record in the Drupal database. Reinstating that, the problem was resolved.
> 1 votes

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


# Question
Title: Why are edits not saved on custom field profile?
Drupal 7.41 Civi 4.6.9

I've inherited this site recently and see an issue with custom field profiles that I haven't seen before.

Custom field set is tied to contacts with corresponding profile.

When editing the custom field set from the contact page, edits are saved correctly.

However, when I edit them from the profile, nothing is saved.

There are no errors that I can see in any logs.

I've cleared the templates\_c folder to no avail.

All users have access all custom data permission.

After more research, if I add a built-in Civi field (like last name) to the profile and edit it, the last name edit is saved but no custom field data is saved.

Any ideas?

# Answer
In this case the error was due to contacts that were tied to disabled sub-types.

They had created a few sub-types some time ago, added individuals of that type and then disabled the sub-type.

Once I enabled them, they were able to edit using the custom field profiles.

Since they weren't using them, I created a profile to bulk edit their sub-type and pretty quickly cleaned things up.
> 1 votes

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


title: How to import notes?

text:
# Question
Title: How to import notes?
This might be a silly question - how do I import notes into existing contacts? I tried importing data to the Note field with the related `Contact ID`, which results in the following warnings - with no visible alterations to the records I'm trying to update. I can import memberships and activities but can't find the option for Notes anywhere.

> > Warning: Illegal string offset 'code' in /wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php on line 969
> >
> > Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php:969) in /wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 895\*

# Answer
The issue was due to unexpected multiple contact types in the same import file. Resolved by splitting import files by contact type.
> 1 votes

---
Tags: import, 4.7
---


title: Joomla timezone mismatch

text:
# Question
Title: Joomla timezone mismatch
For some reason Civi is using UTC and not the Joomla time. The system, and php and mysql times are reporting correctly (Brisbane) . For Mysql I have run the following to get its time;

SELECT NOW() AS 'NOW';

For PHP I ran this

echo 'PHP date: ' . date('Y-m-d H:i:s');

Both report correct time. I also set the time zone in a local php.ini file and php is picking this up and reporting this correctly.

The error that Civi displays shows PHP as having the wrong time.

I see a timezone table in the database which is empty. Can I hardcode it in there? What else might be going on?

# Answer
> 1 votes
It turns out joomla on the cpanel install in question linux reads the php.ini file from the /administrator directory not site root. I had put one in the root dierctory and had checked if php was reporting it correctly and it was. So now fixed.

---
Tags: joomla, php, mysql, timezone
---


# Question
Title: How to install Wordpress/CiviCRM on arvixe hosting server
I am running WP 4.4.2 trying to install CiviCRM 4.7.1. I get to the point where I enter the URL to run the install script then get a message that I do not have sufficient permsissions to access this page. The CiviCRM instructions say that this could be due to the fact that I deactivated CiviCRM before running the script, but I did not do that. It is activated.

# Answer
> 1 votes
If you've just upgraded CiviCRM for Wordpress and you see this error, check that you've restored the `civicrm.settings.php` file from your previous codebase as per steps 2 & 3 of Upgrading CiviCRM for WordPress

* In step 2 of the upgrade, you make a copy of `wp-content/plugins/civicrm/civicrm.settings.php`
* In step 3 of the upgrade, you restore this copy to `wp-content/plugins/civicrm/civicrm.settings.php`

Omitting this, or having a `civicrm.settings.php` which is unreadable to the webserver, may lead to the "you do not have permissions to access this page" error.

---
Tags: installation
---


title: search for two relationships at once

text:
# Question
Title: search for two relationships at once
is it possible to search for two relationships at once?

Until now I search for relations like \- search \- advanced search \- relationships \- choose the desired relationships

thx.

# Answer
> 1 votes
I would do it using search builder, not advanced search.

---
Tags: contacts, search, relationships
---


# Question
Title: Drupal views integration ContactID inserts commas into number
Within Drupal Views integrations creating a view of contacts, the Replacement Pattern "\[id\] == CiviCRM Contacts: Contact ID" inserts commas when a contact\_id is greater than 999 - surely this is incorrect behaviour? Does anyone have a work around for this?

# Answer
When you pull the contact ID as a field in the view (even before you replace it), to what is the thousands marker field set? I believe the default setting is comma (see http://screencast.com/t/8tiEiqVOBG ) - you might check that and change it to "none" if that is the case, to see if that makes a difference.
> 2 votes

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


title: Civimail Plain text unwanted <p> tags

text:
# Question
Title: Civimail Plain text unwanted <p> tags
I get an unwanted pair of paragraph tags at the top and bottom of my plain text messages. Any ideas how to get rid of this?

John Civi 4.6.10 Drupal 7.41

# Answer
> 3 votes
I figured it out. I had a "blank" header and footer selected by default. When I removed them... problem solved.

---
Tags: civimail
---


# Question
Title: How to start contributing for GSoc 2016?
Hi I am new to CiviCRM and I would like to ask how I could start contributing to the org. Also is there a list of project ideas I could refer to?

# Answer
> 6 votes
Thanks for your interest.

As one of the admin for this year, I'm going to try to explain a bit more the process.

So right now, we are in the process of applying to be selected as one of the organisations Google supports, until this is done and if we are chosen again, you will then need to wait a bit more before being able to apply to the GSoC and propose a project with CiviCRM

For the detailled timeline: https://developers.google.com/open-source/gsoc/timeline

As a student, you will need to show us that you are interested by our organisation, are motivated and have the skills -or will get them quickly- and work well with your mentor and the community at large.

So definitely, doing things like participating here and asking or answering questions, hanging out in IRC or in the GSoC part of our forum are all good steps, you are on the right track!

This year, we will be stricter on the selection process, both because we want to get students that have a high chance of succeeding their project and because we want them to have a positive first experience contributing to an opensource project and hopefully stay after the summer... and who knows, find a job thanks to that summer once they finish their studies.

So we will expect the students

* to have installed civicrm (the development version)
* being able to use git to modify files and create pull requests
* being able to report daily on what they have done and where the need help
* having good contacts with their mentors, and weekly update

We will want that reporting and communication as light as possible, but not lighter.

We will test these points, we will have tests around the git workflow, and you will need to work with your mentor to prepare the project proposal and have something both the student and us feel will be doable in the timeframe and useful.

Right now, we have a discussion with other organisations that participated to GSoC and are compiling the best how-to and processes, we should publish our own version tomorrow.

Stay tuned...

---
Tags: gsoc
---


# Question
Title: Control content access in larger Wordpress site using Civicrm credentials
We would like to make a portion of our site accessible to members only. Is it possible to tie certain parts of the larger Wordpress site to Civicrm membership?

In otherwords, if a user sets up an account in the Civicrm portion of the site, can that membership be used to access other pages in the site (that are not necessarily within Civicrm?

# Answer
A quick google found this blog describing the CiviMember Role Sync Plugin for WordPress. Does that deliver what you need?

EDIT - Christian is recommending this plugin instead
> 1 votes

---
Tags: civimember
---


# Question
Title: Restricting access to a group of contacts
I've done some searching, but can't seem to hit the right keywords. I'll pick on the major donor group for this question, though it would apply in other ways.

Most of our users should have access to almost all of the contacts. However, there is a small group who deal with major donors. This group is only group who should be able to see the major donors.

Currently we are using a group for major donors, and a smart group for anybody who is not in the major donor group. The majority of users are in a user group that allows them to edit anyone in the unrestricted contact group. This works great, except when adding a new contact.

When the new contact is not in the major donor group, the majority of users still can't see the new user until the cron job runs to rebuild the smart group cache. This messes with people's process and they loose where they are and what they are doing.

Is there a better way to restrict the group? Can I set an ACL so that it's looking at anything that's NOT a part of a group, rather than a part of a group? Anybody else doing something similar with a better way of doing this? Can I set all new contacts to automatically be a part of the unrestricted smart group by default?

# Answer
> 2 votes
No, ACLs are about including groups you can see, not about excluding the ones you can't.

What we did for a case like you was to automatically add any new contact into a "visible by everyone" group and remove it if/when they are added to the "VIP" group. So what you do with smartgroups, but because we add/remove directly, it was faster as no need to wait for the cache to rebuild. It was a very long time ago, so probably nothing I can share anymore, but with two hooks in a small extension, it should be possible

Have a look at civirules, it might even be possible to do it without code.

---
Tags: wordpress, contacts, smartgroups, acl, cron
---


title: CiviCRM Ajax API - Searching by Tag

text:
# Question
Title: CiviCRM Ajax API - Searching by Tag
I'm working with the CiviCRM API and it's been great--I've been able to make a very useful tool for our team. However, I've encountered a problem.

I would like to do a search on contacts based on a tag. However, whenever I make a call to the database asking for a particular tag, I get an error. The following is an example I used on the demo site:

```
CRM.api3('Contact', 'get', {
  "sequential": 1,
  "tag": "Company"
}).done(function(result) {
  // do something
});

```

I receive the following error in the response:

```
{
  "error_code": "no such field",
  "tip": "add debug=1 to your API call to have more info about the error",
  "is_error": 1,
  "error_message": "DB Error: no such field"
}

```

Now, I receive a *different* error in test use on my own site, but is it possible in some way to do a search in the API for a contact based on tag?

# Answer
> 6 votes
you are almost there: instead of using the tag name, use the tag id (eg 5 for Volunteers)

```
CRM.api3('Contact', 'get', {
  "debug": 1,
  "sequential": 1,
  "return": ["tag"],
  "tag": "5"
}).done(function(result) {
  console.log(result);
});

```

And for performance reasons, we recommend to always set the return param with the list of fields you actually need (by default, it returns way too many that you don't need)

Otherwise, yes, it should work with the name of the tag instead of the id, but given that tags are one of the few entities that don't have an internal name that only the dev can change, I'd rather rely on the id rather than on the visible name that your users can alter

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


# Question
Title: How to start with CiviCRM and creating an extension to add Contact Tab in PCP
I'm new to CiviCRM. I tried to create an extension for CiviCRM to add a tab in PCP and access CiviCRM from the videos on youtube and the document. But I failed to start. I'm trying to create a Contact Tab in CiviCRM which displays a list of the personal campaign pages that a contact has created.

The tab should show the personal campaign page title (with a link to the page), status, contribution page or event that it is funding for, no of contributions, amount raised, target amount and a link to the edit page form.

Which approach should I follow to get acquainted with CiviCRM and thus able to create an extension. I'm using CiviCRM on Drupal.

# Answer
> 2 votes
You can find instruction on how to create an extension in the CiviCRM documentation here: https://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension

I would recommend you first think about:

---
Tags: civicontribute, civicrm-home
---


# Question
Title: Is there a way to alternate between different outbound mail servers?
I would like to be able to use different mail servers to send different emails, for instance:

* all transactional emails (contribution receipt, event registration...) sent by our mail server, all mass mailing sent using mandrill
* all the emails sent by media@example.org are pushed through mandrill, but those sent by member@example.org via our own mail server
* do A/B testing between two different mail providers to see if mailjet or mailchimps provide better deliverability

I do think it would need some coding, either as extension or to modify civicrm core, but would love to be proven wrong.

Assuming we need to add this feature, would it be useful for you too?

# Answer
My proposal is using CiviCRM Extension like this one Alternate Mailing Server.

Assumptions:

* each alternate server has own setting `mailing_backend_alternate[1-9]`,
    + first at `mailing_backend_alternate1`,
    + second at `mailing_backend_alternate2`,
* in session variable is stored which server will be used,
* server is changed by `hook_civicrm_alterMailer()`.
> 2 votes

---
Tags: civimail, developer
---


# Question
Title: Replace default Datatables script to most recent [custom buit] one
How do one properly replace default 3-rd party packages without loosing changes after updates?

Namely, in need of Datatable CVS File Export, we've grabbed a custom DataTables built with all bells&whistles included from Download Builder page https://datatables.net/download/ and have just replaced stuff in \civicrm\packages\jquery\plugins\DataTables\media\js\

However, changes will be obviously lost after civicrm core update. Is there any recommended technique to handle such things?

Thanks!

# Answer
OK, answering my own question again. So, there are essentially 2 ways to achieve this:

1. Override \civicrm\CRM\Core\Resources.php (copy it to your custom php directory first, in order to keep control on changes). It contains (quote) *List of core resources we add to every CiviCRM page.*
2. Use hook\_civicrm\_coreResourceList(&$list, $region) {}

*(!! Attention: methods of adding 3rd-party resources, described at that page doesn't always work; we've ended up using drupal\_add\_js. Datatable initialization script has to be wrapped into drupal.behaviors than).*
> 0 votes

---
Tags: api, upgrade, developer, javascript
---


title: Example of membership sign up?

text:
# Question
Title: Example of membership sign up?
We're considering Civicrm for our membership database, but my client would like to see an example of what the look/feel would be for a new member signup. Is there an example/demo that someone can point me to?

# Answer
There is the generic CiviCRM demo, but that only shows the back-office part (see https://civicrm.org/demo). I assume your client would be interested in the outside facing web part, and that entitely depends on what you can do with Drupal, Wordpress or Joomla. It will be hard to show you one example that gives you an idea of what the new member sign up looks like not because they are not there but because there are so many!
> 1 votes

# Answer
Logged out you can see an example membership page here but what you would see would entirely depend on your theming and there is much that can be done via js to manipulate the page to look very different.

A couple of more extreme examples are here (NZ Greens) and here (Aus Greens) (actually the latter is only donation currently but just trying to give you an idea that what comes out of the box, and what you can get built with time/skills/budget is vastly different)
> 1 votes

---
Tags: civimember
---


# Question
Title: How to show Users their Membership status so that even users without a membership status get to see the block
We have a client we would like to show the current logged in users membership status in a Drupal View alongside other contact fields. As the user may not have a membership yet at all then this can't be a CiviMember based View.

Instead we wanted to use a Smart Group in CiviCRM based on the membership status. Then in a standard CiviContact based View show details about the logged in user including the status of the smart group. But it looks like smart group data isn't available to Views. I found a few old posts about this, does anyone know if this is still the case?

Olly

# Answer
> 5 votes
I believe you can connect your civiContact view to the membership fields without using that smart group.

I have had success (in views 3) in the past with a civiContact based view using a relationship *civiCRM Contacts: Drupal ID* and a contextual filter *User: UID* that is configured to provide a default value from the logged in user when none is available.

Then you can put in civiCRM member status field with a relationship to the logged in Drupal user with your other contact fields and filters and configure the no results behavior from there.

# Answer
> 1 votes
From what I can tell, this stale issue in JIRA is as far as it went towards integrating Civi Smart Groups into Views.

If you are able to pick it up from there, please submit a new patch on that thread.

# Answer
> 0 votes
As far as I know this is still the case.

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


# Question
Title: Mailing appears to have sent, but still "Running" after several hours
I have a mailing that's went out at 10:00am to about 1300 people.

My CiviCRM Mailer Settings say to batch every 100, and the cron job is set to run every 5 minutes. Under these conditions, I'd expect it to take no more than a couple hours to send all the emails.

When I look at the Report for the mailing, I can see a high percentage of successful deliveries, and a number of bounces that take us very close to 100%.

So I think the mailing has sent, but has not been marked Completed yet.

# Answer
> 4 votes
After talking with josephmurray in IRC, he told me to (a) look for "stuck processes" and (b) to try and manually "Execute Now" the job from the CiviCRM cron page.

The latter didn't do anything more than my cron job which was set to run every 5 minutes.

As it turns out, the stuck process was the cron job itself. A "ps ax | grep php" showed the CiviCRM cron job running.

I wanted to know how long it was running so I ran 'ps -p 29753 -o etime=' (where 29753 was the pid of the process from the ps ax command above). It showed that that one cron job had been running for a number of hours. I deduced it was clearly "stuck."

So, the thing to note is that even if your cron job is set to run frequently, the log will show it running and finishing... but if your CiviCRM Mailer settings only allow 1 cron job to run (as mine do), then you're basically only seeing the cron job start, detect that another is already running, then shut down.

For me, the solution was to "kill 29753" - then the next time cron ran normally, it marked the mailing job Completed.

# Answer
> 0 votes
In case anyone has the same symptoms with CiviCRM 4.7 or 4.7.1 or 4.7.2 (mailing stuck at "running" without actually sending, but will send using Execute Now), this is apparently a bug without a fix (yet). See here and here. I spent a day trying to find the problem before I came across the bug report, so hopefully this post will save others some time.

---
Tags: civimail
---


# Question
Title: Mailings are started but not sent - What is the difference between a scheduled job and "Run it now"?
Our scheduled mailings have stopped working. We upgraded to 4.7, but I'm not sure this has got anything to do with it. So I'll paint the picture, and the reason why I'm asking about jobs.

Mailings that we create are started by they job scheduler as the should. I.e mailing status is changed from Pending to In Progress. But no mailings are sent out.

However the following does sent a batch of mailings:

* manually running the "Mailings scheduler" job from "Administer-\>Scheduled jobs"
* calling the mailer function from a web call ("index.php&option=com\_civicrm&task=civicrm/mailing/queue&reset=1")

Test mailings from mailing composer also works. So mail sending as such definitely works.

The "Mailings scheduler" job reports no errors. And the status change of the mailing is done by the "Mailings scheduler" as it should.

So I've been trying to figure out what is different between the two ways of running the "Mailings Scheduler" job. Why does dispatching from the job scheduler not work but running manually does, even though the scheduler says there are no problems?

In summary, if I create and schedule a mailing, with a cronjob that runs every 5 minutes:

* the mailing is started correctly by the mailing job
* no mails are actually sent
* the mailing job reports OK on every invocation
* a manual run of the "Mailings Scheduler" job from "Scheduled Jobs" sends one batch of mails correctly

It seems similar to this question, which has no accepted answer so far.

# Answer
> 4 votes
It seems that there is a bug in CiviCRM 4.7, 4.7.1 and 4.7.2 which causes these symptoms (scheduled mailing stuck at "running" without actually sending, but will send using Execute Now). See here and here. I spent a day trying to find the problem before I came across the bug report, so hopefully this will save others some time looking for a misconfiguration of the mailer.

Edit: The problem has been fixed in 4.7.3.

# Answer
> 1 votes
The main difference is what is the user that runs the command to process.

In one case (the run it now), it's you, so likely an admin, with all the permissions in the world.

If you do it from the cron, are you using the user as when you log in?

It seems that the bin/cli.php way of running the cron has been broken in 4.7 and that the core team is working on it.

You can follow the progress on the issue tracker https://issues.civicrm.org/jira/browse/CRM-17968 X+

# Answer
> 0 votes
It's a bit of a wild guess, but can you try to change the "-s default" to "-s www.#domain#.#tld#"?

The difference between manual and via cli.php is that the manual method does know the exact domain, and the cli method might not. (especially if you have some sort of multisite configuration)

---
Tags: mailing, scheduled-job
---


# Question
Title: How can I preserve changes to civicrm.css when civicrm is updated?
How can I preserve changes to civicrm.css when I update civicrm?

For example the combo box for Event Fee(s), Registration Fee is too narrow - the amounts are cutoff on the right. I want to preserve my width setting of 20em.

# Answer
If you use a custom CSS style sheet, you avoid the scenario you mention of losing modifications to your CSS upon upgrade. From the top menu, go to `Administer > System Settings > Resource URLS` and use the Custom CSS URL field. Its help text reads:

> You can modify the look and feel of CiviCRM by adding your own stylesheet. For small to medium sized modifications, use your css file to override some of the styles in civicrm.css. Or if you need to make drastic changes, you can choose to disable civicrm.css completely.

You can put the file anywhere you'd like (so you would put it outside of the file structure that will get replaced when you upgrade CiviCRM; just specify its location in the field). That custom CSS file gets loaded *after* `civicrm.css` so as long as you've selected the proper components with your IDs, classes, etc. your custom CSS will take precedence over Civi's.
> 4 votes

---
Tags: wordpress, css
---


# Question
Title: CiviCRM installation on Ubuntu via package manager
CiviCRM for Drupal 7 is packaged for Ubuntu in the Universe repository.

However, the CiviCRM installation documentation does not list installation via the operating system's package manager (e.g. `apt-get`) as a recommended installation route.

Is that just because this installation route hasn't been documented yet, or is it because this installation route causes problems that are avoided by following the recommended route? If the latter, which problems are caused by using the OS's package manager?

*I do not currently have an Ubuntu system available on which to evaluate the stability/bugginess of those packages myself, hence my asking here.*

# Answer
This is very new work - CiviCRM was recently packaged for Debian by a Debian developer. It's in Debian sid now, and Ubuntu seems to be pulling it in from there.

In short - it's not documented yet because it's new, and it's hard to say if there are issues with this approach because not many folks are using it yet.
> 3 votes

---
Tags: drupal, installation
---


title: Upgrade to 4.7 breaks custom php

text:
# Question
Title: Upgrade to 4.7 breaks custom php
After upgrading to 4.7.2 from 4.6.11 I no longer can load any of my custom\_php reports or searches. The custom folder location is not inserted into the include path

> Fatal error: require\_once(): Failed opening required 'CRM/Report/Form/Member/NWTAByUnit.php' (include\_path='.:/home/mysite/public\_html/test/sites/all/modules/civicrm:/home/mysite/public\_html/test/sites/all/modules/civicrm/packages:.:/home/mysite/public\_html/test/sites/all/modules/civicrm:/home/mysite/public\_html/test/sites/all/modules/civicrm/packages:/home/mysite/public\_html/test/sites/all/modules/civicrm/vendor/phpseclib/phpseclib/phpseclib:.:/usr/lib/php:/usr/local/lib/php:/usr/local/php56/lib/php') in /home/mysite/public\_html/test/sites/all/modules/civicrm/CRM/Core/Controller.php on line 451

The location is set at `/home/mysite/public_html/test/sites/all/modules/files/civicrm/custom_php`

Running Drupal 7.41 and PHP 5.6. Everything else in the upgrade seemed to work fine. All custom data is available and the extensions directory is working correctly.

I've tried to set the path both via the settings files and the web interface. The web interface does accept the path as valid and sets it correctly.

# Answer
This does appear to be a legitimate issue, so I've created a bug in the tracker here: https://issues.civicrm.org/jira/browse/CRM-18079

Generally it's better *not* to use this folder for maintainability reasons - it is better to use an extension - but since it is an advertised piece of functionality, it should work as intended!

Thanks for reporting this.
> 5 votes

---
Tags: drupal, 4.7, custom-reports
---


title: Altering form values

text:
# Question
Title: Altering form values
I have a Custom Group with two custom fields: Field A is a view only input field (ID: custom\_32) Field B is a select with a few options (ID: custom\_33).

When the user selects one option from Field B and hits save I would like to add a value to Field A based on the selected option.

Which hook shall I use for this?

I tried civicrm\_preProcess, civicrm\_postProcess and civicrm\_validateForm.

My aproach to the problem is to alter the submitted (empty) value in the form object but it doesn't seem to work.

```
function insert_value_for_b($formName, &$form){
    //determine $newValue
    //other business logic
    $data = &$form->controller->container();
    $data['values']['CustomData'][$customIDforB] = $newValue;
}

```

Could someone advise please?

# Answer
> 2 votes
View only fields can only be updated via the API, see: https://issues.civicrm.org/jira/browse/CRM-17843

So you could use one of the hooks (eg: hook\_civicrm\_pre) to 'detect' when that field has changed, and read the value, and then use the API to set the other value. \_pre might be more reliable than the form hooks, as the field might be set by other methods than by submitting a form.

For example:

```
function foo_civicrm_pre($op, $objectName, $id, &$params) {
  if ($objectName == 'Contact' && empty($params['custom_xxx'])) {
    // make an API call to set custom_yyy
  }
}

```

---
Tags: wordpress, hooks, forms
---


# Question
Title: Is CiviCRM available with German admin interface?
Looking at using CiviCRM in an office based in Germany with German-speaking staff. Is there a localised version available, e.g. admin interface in German?

# Answer
> 4 votes
Yes there is, for more information about downloading translations please see: https://civicrm.org/download-translations

The installation instructions for localized versions vary depending on the CMS you will be using. But full information can be found here: https://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades

# Answer
> 4 votes
You can changed the language by including `l10 packages` under directory;

civicrm/l10 and with following;

```
Administer->Localization->Language,Currency,Location

```

I addition;

Also you can set the Default Language`,`currency`,`country and states

---
Tags: localisation
---


title: Alias for chained API calls?

text:
# Question
Title: Alias for chained API calls?
I have a query in which I need to chain `api.Contact.getsingle` twice, given that the entity I'm querying is linked to two different contacts for which I need to fetch the data.

The problem is that, given that both chained calls have the same name, it seems that the last one overrides the first.

Basically I need to do this:

`$result = civicrm_api3('MyEntity', 'get', array(
 'sequential' => 1,
 'api.Contact.getsingle' => array('id' => "\$value.contact_id"),
 'api.Contact.getsingle' => array('id' => "\$value.manager_id"),
));` but with the ability to "alias" each chained call so that they don't get overridden

Is it possible to do it? If not, what a different approach would look like?

Thanks!

# Answer
> 2 votes
I believe there is a notation for issuing multiple chains by appending ".2", ".3", etc. For example, in api/v3/examples/Contact/ChainTwoWebsites.php, it uses:

```
'api.website.create' => array(
  'url' => 'http://civicrm.org',
),
'api.website.create.2' => array(
  'url' => 'http://chained.org',
),

```

As far as I know, there is no way to do aliases.

Note: The class which handles chaining is ChainSubscriber. In skimming that code, I don't see anything which explicitly processes the ".2" suffix as a number. It would be worth a try to use a prettier/symbolic suffix (e.g. `api.Contact.getsingle.self`, `api.Contact.getsingle.manager`) -

---
Tags: api, chaining
---


title: Signing petitions and data entry

text:
# Question
Title: Signing petitions and data entry
I have a survey which I am asking people to sign on line. The fields are activities and it is a campaign petition.

I also have a bunch of surveys filled in offline on paper.

I can upload the activities - which I have done but these people don't show up as having signed the petition. I have to do two separate searches - one for the activities and one for the petition.

Has anybody got any idea how I can have this data in one place. I can't just sign the petition for multiple people because civicrm is too clever for that (or so it seems to me!)

Ideas very welcome!

# Answer
> 1 votes
I was able to achieve this using webform in drupal

---
Tags: civicampaign, civipetiton
---


# Question
Title: Extending "get" action with custom WHERE clause
Is it possible to define a new api (v3) endpoint which has a specific WHERE clause but that still leverages the flexibility of the "get" action in terms of defining parameters, options, pagination, chained api calls etc?

What I'm trying to achieve is to define an endpoint that returns all records that match a WHERE clause which looks something like this

`(entity.field1 = 1 AND entity.field2 = 'a') OR
(entity.field1 = 2 AND entity.field2 = 'b') OR
(entity.field1 = 3 AND entity.field2 = 'c')"`

but at the same time I still want the endpoint to be able to accept all the parameters and options that the "get" options accept, because a consumer of this endpoint would want to further filter the records or to sort them, paginate them, etc.

It doesn't seem that the built-in actions have support for `OR` clauses, so this endpoint would have to be a mix of api methods and a manually built SQL query (if it's even possible?)

# Answer
The options depend on the version of Civi.

In v4.5/4.6, most API's correspond to a BAO class (e.g. Activity API ==\> `CRM_Activity_BAO_Activity`). You can define a function `setApiFilter()` which examines $params and mixes in arbitrary bit of SQL.

The query-builder used there had several weaknesses, so v4.7 uses a different approach. We had some drafts/discussions which would have made this more hookable, but the hook ultimately went a different direction.

As it stands, to do this as an extension in v4.7, I think you'd have to make custom API (`Myentity.mycustomget`). The API would then pass-through the request to `_civicrm_api3_basic_get()`. `_basic_get()` is the engine which drives query-building in the majority of APIs. You can find ~100 examples by grepping for `_civicrm_api3_basic_get`. Loosely, the code would look like:

```
function civicrm_api3_myentity_mycustomget($params) {
  return _civicrm_api3_basic_get($bao_name, $params, $returnAsSuccess, $entity,
    $sql, $uniqueFields)
}

```

Note that one of those parameters, `$sql`, can be a fragment of arbitrary SQL (WHERE, JOIN, GROUP BY, etc), e.g. let `$sql` be:

```
CRM_Utils_SQL_Select::fragment()
  ->where('(start_date >= CURDATE() || end_date >= CURDATE())');

```
> 1 votes

---
Tags: api
---


title: First date of first membership?

text:
# Question
Title: First date of first membership?
We have a system with multiple membership types - at renewal, people can switch between different membership types.

Is there a query or feature available to show the date of FIRST membership irregardless of the membership type that can be displayed within Drupal Views?

The "Create Date" doesn't work for us as people can register for events (before they become members) and therefore, this would not actually reflect first date of membership.

# Answer
There may be a smarter way to do this in Views, but the short version is: I would create a View that shows memberships, then create another view that shows contacts and in the latter pull in the former using Views Field Views (ie you can say, show me the results of the first view based on a match for the contact id in the second view. and set it to show only a single result per contact sorted by oldest first, and that 'should' get you what you want. Hopefully I haven't missed out too many critical steps.
> 1 votes

---
Tags: civimember
---


# Question
Title: Form no longer entering into CiviMember for free memberships
**CMS**: WordPress 4.4.2

**CiviCRM**: 4.7.1

After upgrading from 4.6.6 to 4.7.1, when someone submits our contribution form for a free membership, the membership is not recorded in the contact record nor in the CiviMember area.

The contact makes it in the Contacts area and database OK but wondering why the connection to CiviMember was severed. We can manually attach a membership to the contact fine, but long-term this is not a solution.

Any ideas?

**Edit:** What's worse is that these contacts have no record of their "contribution" (they came from a contribution form). So, they aren't displaying in "Find Contributions" either. Our memberships are free, so there is no paid transaction happening.

# Answer
> 1 votes
I think the problem in your demo example is that you did it as a Test, which therefore doesn't show. If you go to Find Members, and set 'is test' to YES I then see the membership for a-test f-test if that is your example

also i did it for user = demo and did a 'pay later' option and that fired through fine.

so this may not be an answer to your original question but does answer your 'this is wrong on demo too' i believe.

# Answer
> 1 votes
This seems to be a glaring issue with CiviCRM's latest 4.7 release. I have posted this as a critical bug on CiviCRM's issue tracker here: https://issues.civicrm.org/jira/browse/CRM-18071

Per the comments in my question, I was able to reproduce this issue on CiviCRM's official sandbox installation.

---
Tags: civimember, contacts, contribution-page, 4.7
---


# Question
Title: Authorize.net not recording processor fees
I noticed today that Authorize.net is not recording the payment processor fees. Is there a way to get the civiCRM payment processor to record such a fee so that we can record the data? I have found some information for paypal, but nothing for Authorize.net

I found this odd since the Authorize.Net is a core supported payment processor.

# Answer
Authorize.Net doesn't return this information, which is why it's not available in CiviCRM.

One of the fields returned in the PayPal API documentation is `transaction_fee`. Authorize.Net's API documentation has no equivalent in the "Response" section.

The reason is that Authorize.Net *can't* tell you the transaction fee based on a single transaction, because their calculations are more complicated than PayPal's. PayPal charges a high amount on every transaction, so they can give you a simple pricing structure. Authorize.Net gives, e.g., variable rates based on volume, which can't be calculated until your month is over.
> 1 votes

---
Tags: civicontribute, payment-processor, authorize.net
---


# Question
Title: Number format with SMS Clickatell provider
I set up a clickatell account and configured it in Civi. It only works if the phone number has a 1 in front for the country code. None of our numbers have the country code, is there a way around this?

# Answer
> 2 votes
I just faced (and fixed) this problem three days ago for a client by patching the Clickatell extension to prepend the "1" where it doesn't already exist.

In short - someone already wrote this patch, but it only works if you don't have contacts you want to text outside the US and UK. The patch is referenced on CRM-14160 \- or just find it here.

If you're not a developer, but you feel comfortable installing an extension from a zip file, I just made a Github repo here with the patched extension. That said - I don't want to post it as the "new" Clickatell extension, because it makes some country-specific assumptions.

You can see that I updated the CRM-14160 ticket with what I think is the ultimate solution - which is for CiviCRM to know the country code associated with each country. Then the Clickatell extension could check for whether it's present or not - and if not, then prepend it.

# Answer
> 1 votes
Update your numbers to include a country code.

This will vary based on the format you've input data, but the below works for the sample dataset used on the demo sites.

```
-- a couple of formats including area code and local number
UPDATE civicrm_phone SET phone = CONCAT('+1 ', phone)
 WHERE phone LIKE '(___) ___-____';
UPDATE civicrm_phone SET phone = CONCAT('+1 ', phone)
 WHERE phone LIKE '___ ___-____';

-- local numbers get your assumed area code prepended also
UPDATE civicrm_phone SET phone = CONCAT('+1 555 ', phone)
 WHERE phone LIKE '___-____';

```

When doing this, make sure to make backups and work on test data so you avoid loss.

There is a trigger `civicrm_phone_before_update` which will handle updating the `civicrm_phone_numeric` column.

---
Tags: sms
---


title: What version am I running?

text:
# Question
Title: What version am I running?
The latest version of civicrm no longer prints the version in the footer. Is this correct? How do I find the version I am running?

# Answer
> 5 votes
If you have CiviCRM 4.7 then from the top menu:

> Administer \> Administration Console \> System Status

Your version number will be in the CiviCRM Up-to-Date section.

\[side note: the demo version of Wordpress CiviCRM does have the version number in the footer -- not sure why you're not seeing it.\]

# Answer
> 6 votes
You can also check the version from the file: `civicrm-version.php` in the downloaded folder of civicrm.

File path : `civicrm/civicrm-version.php`

# Answer
> 4 votes
If you have access to your DB you can look in the civicrm\_domain table for field= version

# Answer
> 3 votes
Another way from the API (4.7 onward) is to use the System.check API:

```
$result = civicrm_api3('System', 'check', array(
  'name' => "checkVersion",
));

```

to get something like

```
Array
(
    [is_error] => 0
    [version] => 3
    [count] => 1
    [id] => 5
    [values] => Array
        (
            [5] => Array
                (
                    [name] => checkVersion
                    [message] => CiviCRM version 4.7.2 is up-to-date.
                    [title] => CiviCRM Up-to-Date
                    [severity] => info
                    [severity_id] => 1
                    [is_visible] => 1
                    [icon] => fa-cloud-upload
                    [id] => 5
                )

        )

)

```

# Answer
> 2 votes
From the API, you can also do System.get, which returns something like:

```
Array
(
    [is_error] => 0
    [version] => 3
    [count] => 1
    [id] => 0
    [values] => Array
        (
            [0] => Array
                (
                    [version] => <3-part version number>
                    [uf] => <CMS type>
                )

        )

)

```

---
Tags: wordpress, 4.7
---


# Question
Title: Mailings -> New mailing gives 404 Not found (NGINX)
We've nginx installed as a proxy. While attempting to start New Mailing `civicrm/mailing/send?reset=1` browser tries to reach `civicrm/a/#/mailing/new` url, ending with **404 Not Found** nginx error. Nginx error log says *"httpdocs/civicrm/a/index.html" is not found*

It sounds pretty much the same as this question: 'Unknown path' error when trying to access New Mailing with version 4.6.2 , and we've no any modules installed.

However, solution mentioned in first comment works for us. This is it:

> After changing line 56 in file civicrm/CRM/Mailing/Controller/Send.php like below, it now works.

```
- CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/a/', NULL, TRUE, '/mailing/new'));
+ CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/a', NULL, TRUE, '/mailing/new'));

```

But the question still is: do we need to perform something at NGINX configuration ( since pure Apache setup doesn't have this issue ) or it's a bug in the core, which should be reported / fixed?

Drupal 7.40 + Civicrm 4.6.9

# Answer
> 1 votes
You have an error with the configuration of your nginx that doesn't properly redirect to drupal /civicrm/a/ but does it for /civicrm/a.

What configuration did you choose for your drupal/nginx? I started with that one and whitelisted a few more urls (in extern/ folder) https://github.com/perusio/drupal-with-nginx and it works fine

---
Tags: civimail, drupal, nginx
---


# Question
Title: Issue in sections of civicrm that use /civicrm/.*/#/.* using LEMP
So civicrm case and extensions like simple donate use a path that includes the # character. When running on apache these work fine, but when I moved the site over to nginx, they stopped working. so I am assuming that I need a specific nginx location directive to handle this, but haven't been able to figure out what.

# Answer
I'm not sure it's an issue on nginx (as the information after the # is never sent to the servers anyway).

It's more likely an issue of a url that is incorrect, for instance if the url of extension isn't properly defined

Do you have a javascript error? (using firebug or your favourite debugger)
> 1 votes

# Answer
You have an error with the configuration of your nginx that doesn't properly redirect to drupal your url in error (assuming the url is correct, cf my other answer).

What configuration did you choose for your drupal/nginx? I started with that one and whitelisted a few more urls (in extern/ folder) https://github.com/perusio/drupal-with-nginx and it works fin
> 0 votes

---
Tags: drupal, civicase, best-practice, nginx
---


title: smart groups and relations

text:
# Question
Title: smart groups and relations
I want to build a smart group with 3 relationships. Is it possible to search for 3 relationships in one step?

I have tried with advanced search, search builder and custom search. But I havent found any solution.

I have CiviCRM 4.5.2

thx

# Answer
> 1 votes
A solution would be to create a smart group per relationship type and then another smart group that contains all 3 groups.

I am not sure why in advanced search you can only select one relationship type and not more at the same time.

---
Tags: contacts, relationships, smartgroups
---


# Question
Title: Dashlets on Dashboard displaying Not Found error
Following an earlier question about a missing field in Views 3 I opted to go down the route of creating a completely custom report.

With this done and working correctly, I attempted to place it on the CiviCRM dashboard to be presented with a Not Found error (from my apache server). Expanding the dashlet opens the report correctly, oddly.

All dashlets are displaying a Not Found error. As this is the first time we have actively used this I cannot be certain if this ever worked, though I remember the default CiviCRM News dashlet having the same issue after the upgrade several months ago.

Is there anything anyone can suggest to get the dashlets working correctly? Thanks

# Answer
Not sure if this is solved, but we had the same issue running on a Debian server and the host was resolving the DNS name to the legacy site (we were testing). So to resolve the 404 errors on the dashlets, we had to enter a host entry in /etc/hosts to point the DNS name to the local IP address (instead of it resolving on the net to the existing legacy server IP).

If on windows, you'll need to do this in C:\Windows\System32\drivers\etc\hosts
> 2 votes

---
Tags: civireport, dashboard, dashlet
---


# Question
Title: Why can I not enable Online Registration on Events?
Running D7 and Civi 4.6.10. When I create an Event and go to enable Online Registration it will not save. It sits and spins. If I refresh the page it will give an error that says Profile is not assigned to this event. I've tried all different configurations on the Online Registration screen but nothing will allow it to save. Any ideas as to what is causing this?

The error I kept getting is below. I disabled CiviRules and it works like it's supposed to. I have the CiviRules master from 10-15-15 installed.

```
CiviCRM_API3_Exception: "id is not a valid integer"

#0 /home/mydomain/civicrm_extensions/org.civicoop.civirules/CRM/Civirules/Utils/CustomField.php(25): civicrm_api3("CustomField", "getsingle", (Array:1))
#1 /home/mydomain/civicrm_extensions/org.civicoop.civirules/CRM/Civirules/Utils/CustomDataFromPre.php(37): CRM_Civirules_Utils_CustomField::isCustomFieldMultiselect("pre")
#2 /home/mydomain/civicrm_extensions/org.civicoop.civirules/CRM/Civirules/Utils/CustomDataFromPre.php(19): CRM_Civirules_Utils_CustomDataFromPre::setCustomData("Event", "pre", "18", "id")
#3 /home/mydomain/civicrm_extensions/org.civicoop.civirules/civirules.php(133): CRM_Civirules_Utils_CustomDataFromPre::pre("edit", "Event", "286", (Array:38))
#4 /home/mydomain/sites/all/modules/civicrm/CRM/Utils/Hook.php(215): civirules_civicrm_pre("edit", "Event", "286", (Array:38))
#5 /home/mydomain/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(87): CRM_Utils_Hook->runHooks((Array:166), "civicrm_pre", 4, "edit", "Event", "286", (Array:38), NULL, NULL)
#6 /home/mydomain/sites/all/modules/civicrm/CRM/Utils/Hook.php(282): CRM_Utils_Hook_DrupalBase->invoke(4, "edit", "Event", "286", (Array:38), NULL, NULL, "civicrm_pre")
#7 /home/mydomain/sites/all/modules/civicrm/CRM/Event/BAO/Event.php(92): CRM_Utils_Hook::pre("edit", "Event", "286", (Array:38))
#8 /home/mydomain/sites/all/modules/civicrm/CRM/Event/Form/ManageEvent/Registration.php(850): CRM_Event_BAO_Event::add((Array:38))
#9 /home/mydomain/sites/all/modules/civicrm/CRM/Core/Form.php(345): CRM_Event_Form_ManageEvent_Registration->postProcess()
#10 /home/mydomain/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(166): CRM_Core_Form->mainProcess()
#11 /home/mydomain/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(133): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Event_Form_ManageEvent_Registration), "upload")
#12 /home/mydomain/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Event_Form_ManageEvent_Registration), "upload")
#13 /home/mydomain/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_ManageEvent_Registration), "upload")
#14 /home/mydomain/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("upload")
#15 /home/mydomain/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
#16 /home/mydomain/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Event_Form_ManageEvent_Registration", "Event Online Registration", NULL)
#17 /home/mydomain/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:14))
#18 /home/mydomain/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#19 /home/mydomain/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM_Core_Invoke::invoke((Array:4))
#20 [internal function](): civicrm_invoke("event", "manage", "registration")
#21 /home/mydomain/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#22 /home/mydomain/index.php(21): menu_execute_active_handler()
#23 {main}

Sorry but we are not able to provide this at the moment.
id is not a valid integer

```

EDIT: This issue was reported to the github issue qeue and I did verify that it's occurring on the demo version at http://dmaster.demo.civicrm.org. The response I received was that it wasn't happening on the developers site and so they weren't concerned with fixing it unless someone paid them.

# Answer
> 2 votes
Did you included any profile for event registration page?? If yes then check profile is active or not. It will be help if you provide snapshot of the error as well as configuration page.

# Answer
> 1 votes
It was CiviRules. See orginal question for details.

# Answer
> 1 votes
I have fixed this issue in the Civirules module. So if you experience this issue it might be worth upgrading civirules to the latest version.

See also: https://github.com/CiviCooP/org.civicoop.civirules/issues/55

---
Tags: civievent, civirules
---


# Question
Title: How can we add Batch information to the Bookkeeping report?
Batch name/title information does not show up in the columns available to the Bookkeeping report. Is there a way to add this?

As an alternative, we would also be open to creating a new bookkeeping "report" using Drupal Views, but I don't believe batch information is available to Views either.

Is there any way to include batch info in a bookkeeping report with available tools or will it require a custom report?

# Answer
> 2 votes
I examined the code of the report and there is nothing batch-related in there. I have made some edits in the core Bookkeeping report that allow display of the Batch name/title on this report. I will file a JIRA ticket and link to the Github PR so it can be reviewed and if approved, added to core.

---
Tags: civireport, drupal-views, reports, batches
---


# Question
Title: Changing template for event/contribution forms
The wordpress site is setup with a 2 column template as the default. But this doesn't work for event/contribution forms. If I forget to set the template to full width I get a sidebar. If I set the template to full width, I get the sidebar inserted at the bottom of the forms pages. I think there is a way to set the default template for a form but can't find it.

# Answer
Add the following snippet to your theme `functions.php` replacing `page.php` with the template you want to use.

**Note:** you have to be using \>= v4.6 of CiviCRM in order to use this.

```
add_filter('civicrm_basepage_template', 'my_base_template');

function my_base_template($template){
    return 'page.php';
}

```
> 1 votes

---
Tags: wordpress
---


# Question
Title: How do I set up a cronjob to run scheduled jobs?
I have a Joomla 3.3.3 installation with CiviCRM 4.6.10 and Siteground is my host. I have never set up a cronjob before. I have tried to use Sitegrounds Cronjob tool in cPanel which uses Linux commands which I am also unfamiliar with.

The support staff helped me create a command string - /usr/local/php53/bin/php-cli /home/ashguild/public\_html/home/administrator/components/com\_civicrm/civicrm/bin/cron.php - but I get the following

ERROR: You need to send a valid user name and password to execute this file

I haven't been able to find out how to include the username/password in the string or even if that's really the problem. As you can tell, I am very inexperienced and would appreciate any help I can get. Thanks.

# Answer
you should add directly after cron.php

```
?name=username&pass=password&key=site-key

```

so it will be in your case:

```
/usr/local/php53/bin/php-cli /home/ashguild/public_html/home/administrator/components/com_civicrm/civicrm/bin/cron.php?name=username&pass=password&key=site-key

```

The site-key is generated during install and can be found in civicrm.settings.php.

For your joomla you should be able to find it in /home/ashguild/public\_html/home/administrator/components/com\_civicrm/civicrm.settings.php
> 2 votes

---
Tags: joomla, cron-job
---


# Question
Title: I want to hire a CiviCRM (Joomla) expert to fix a problem
I have an immediate need (Contribution Form fails; bounces to Home Page or timeout error) and ongoing needs as well, for multiple client sites. This is urgent. Thanks!

# Answer
> 4 votes
The best source for finding partners is https://civicrm.org/partners-contributors

There you can search on country and the services they provide.

---
Tags: civicontribute, error
---


title: Civievent Confirmation Url Exit Page

text:
# Question
Title: Civievent Confirmation Url Exit Page
Hello is there a way I can have people redirected to a specific url after they register for an event. It seems in the civi event registration I can only specify text and email. It seems this would be an important feature to track registrations through Google analytics. Any help would be great. Thanks!

# Answer
> 1 votes
Happy CiviDay (well in NZ it is)

take a look at the Front End Page Options extension that Fuzion developed previously.

Note the requirement for the Entity Setting extension

Let us know how you get on and which Civi version you try it with.

---
Tags: civievent
---


title: CiviCRM CSS outside of CiviCRM

text:
# Question
Title: CiviCRM CSS outside of CiviCRM
We've got some CiviCRM status messages displayed outside of CiviCRM (Drupal pages), but they come as a default browser JS alerts, not as a fancy CiviCRM-styled status messages. We've **$manager-\>addCoreResources();** included via hook\_page\_build(&$page); guess it's not enough though.

There is a documentation at https://wiki.civicrm.org/confluence/display/CRMDOC/Resource+Reference which says:

*If you are working outside of CiviCRM core or extensions (such as a Wordpress plugin), you can still use the Resource Manager but will need to construct the urls yourself*

with `addScriptFile, addScriptUrl, addStyleFile and addStyleUrl` methods available; the question is, which exactly CSS files contains fancy pop-ups formatting?

Also, it's a bit unclear, how exactly **css** should be loaded? Normally, it should use addStyleFile / addStyleUrl, but an example given at documentation page states:
CRM\_Core\_Resources::singleton()-\>add**ScriptUrl**('http://example.com/**bar.css**' (mean, use addScript to load CSS Style file) which is a bit confusing..

Thanks for any hint!

# Answer
Wrong question was asked; fancy CiviCRM stuff works almost, if properly called via CiviCRM own jQuery methods; pretty strange **CRM.alert** in Chrome pops up a default JS alert() message though, so it might be better to use **CRM.status** with appropriate parameters

This page helps a lot: https://wiki.civicrm.org/confluence/display/CRMDOC/Notifications+and+Confirmations

*Additional reading:*
> 1 votes

---
Tags: drupal, css, resource-urls
---


# Question
Title: Where are civicrm profile custom fields stored in the DB?
I have a contribution form with profile with custom fields, I want to know where the custom fields data is stored in the DB for every new contact.

# Answer
> 4 votes
Quote from CiviCRM data architecture:

> When you add custom data to a CiviCRM object, you first create a custom data group and then add custom data fields. At the database layer, what you are doing is creating a new table for the custom data group and adding columns for the fields.

If you crate a custom data group called ***My Custom Data*** with a field ***Name***, Civi will create a new table in your database like this: `civicrm_value_my_custom_data_1`, **1** being the group id. The table has an id column (primary key) an entity\_id column (fk to the entity, ie. contact\_id, contribution\_id, etc), and one column per each field you have created, in this case would be `name_1`.

Field ***Name*** for contact\_id 50 in sql would be: `select name_1 from civicrm_value_my_custom_data_1 where entity_id=50;`

Hope is clear.

---
Tags: civicontribute, wordpress
---


# Question
Title: Embedding CIVICRM calendar extension output in a Drupal page
I have the event calendar extension installed in CIVICRM within a Drupal installation. It works fine, but I would like to be able to embed the calendar within a Drupal page, so that I can add preceding text as well as some content after it. I've tried using iFrames, but that includes all of the particular page including menus, headers, etc. and all I want to include is the calendar itself. I'm not sure whether I should be asking this here or in the Drupal forums, but thought I'd check here first. Thanks!

# Answer
> 2 votes
I can't help you in terms of the extension - but this blog tells you how do this directly with Views - and provides a starter one too.

Note you need the CiviCRM Entities module and of course the Calendar module

Happy Civi Day

---
Tags: civievent
---


# Question
Title: How does CiviEvent Facebook "like" works?
I was testing the behavior of the "FB like" in the event subscription form. It seems not to work, and anyway, how can it point the event page if there is not in the DB the data keeping the FB event URL? Looking at the page source. the link is the following:

https://www.facebook.com/plugins/like.php?app\_id=240719639306341&href=http.....

But this does not help me, I am very confused on how it can work. Can someone show me the light?

Thanks

Marcello

# Answer
> 1 votes
the facebook like embed a widget from facebook in the page, that (beside spying on your visitors, or anywhere that contains that button) knows on which page it's embedded and therefore what to like

What do you mean by it doesn't work?

it has nothing to do with the event you might have created on facebook, it's only about the civicrm page on your website that describes the event

---
Tags: civievent, facebook
---