# Question
Title: 'invalid key sent' while cron script is executed
in civicrm.settings.php I have if (!defined('CIVICRM\_SITE\_KEY')) { define( 'CIVICRM\_SITE\_KEY', '2e554f49c9fc5c47548da5C24da64681b77dca08');

When I use the following URL to start manually all cron jobs, I see that jobs get executed, so the URL seems ok to me. http://xxxxxx.yyy/sites/all/modules/civicrm/bin/cron.php?name=civimail&pass=xxxxxxxx&key=2e554f49c9fc5c47548da5C24da64681b77dca08

The script to start all cron jobs is defined as follows:

# !/bin/sh

GET 'http://xxxxx.yyy/sites/all/modules/civicrm/bin/cron.php?name=civimail&pass=xxxxxxxx&key=2e554f49c9fc5c47548da5C24da64681b77dca08'

However, when this script is run, I got this message through mail:

ERROR: Invalid key value sent.

So to me the key seems correct, but even after changing the key to something else both in civicrm.settings.php and in the script, I continue to get this error message. I'm using the latest 4.7.2 civicrm version on drupal 7. For now I'm using easycron, but I'd like to find out if there is an error in this configuration, or if it's a bug.

Any suggestions for further testing ?

thanks Wim

# Answer
> 2 votes
problem found... it was a confusion between 2 scripts

/home/sitename/www/www/private/civicron.sh /home/sitename/private/civicron.sh

After adapting the correct script it seems okay.

---
Tags: cron
---


title: Update Credit Card info Permissions

text:
# Question
Title: Update Credit Card info Permissions
I don't believe that I am accomplishing a task correctly, and I'm afraid that I've opened things up too much.

I have given Subscriber level WordPress users access to CiviCRM: access CiviCRM. This allows access to the Dashboard: https://example.org/civicrm/?page=CiviCRM&q=civicrm/user&reset=1

Once there, then they can see and edit their donations, but only after giving access to CiviContribute: edit contributions.

The Dashboard seems to be a very useful feature, but I feel like I'm giving too much access in the ACL's. With the above scenario, if I have access to the back end of Civi, I can now search for other people and change their contributions also, right? How should I be doing this? I feel like I'm missing something in the documentation, but can't seem to hit the right keywords.

Wordpress 4.2.2, CiviCRM 4.7.3

# Answer
Is it possible to sign up as a subscriber without admin approval? If so ***remove the access CiviCRM permission right now!!!*** There is no way that with a publicly available account that I should be able to get any level of access to CiviCRM.

Apologies if I misunderstood and all subscribers need to be approved. Your case may be an instance where you want a custom portal - lots of orgs do this. Even then, they generally (is my understanding) allocate what can and can't be accessed without the access CiviCRM permission.

John
> 2 votes

---
Tags: wordpress, civicontribute, permissions
---


# Question
Title: CiviCRM and PayPal Pro's Transparent Redirect
We are looking into PayPal Payments Pro for payment processing. PayPal mentions "Simplified PCI Compliance" as a benefit and explains that the client can use Transparent Redirect to help with PCI compliance.

The Payflow Gateway Developer Guide and Reference explains the Transparent Redirect this way:

> PayPal Payments Pro and Payflow Pro merchants who want PCI compliance while maintaining full control over designing and hosting checkout pages on their website can use Transparent Redirect. Transparent Redirect posts payment details silently to the Gateway server, so this sensitive information never goes through the merchant’s website.

Per Eileen in CiviCON Denver- Adventures in Payment Processing: 360 View from around the Globe, it sounds like there is a way to get Civi to allow for transparent redirect. Per this comment, it sounds like transparent redirect was being worked on for 4.7.

**How would one implement Transparent Redirect in CiviCRM for PayPal Pro?** Do the recent payment processing changes in 4.7 allow for it?

I've looked at PayPal Website Payments Pro and Express Configuration, but didn't see anything in there. I've checked the demo for 4.7 to see if there is a setting in there, but didn't see anything in the payment processor setup.

We use Drupal and are currently on Civi 4.6.6, but looking to upgrade to 4.7 within a month or so.

Thanks!

# Answer
So far there is some support for transparent redirect in the Omnipay extension but not in the core codebase, as it requires an extra form in the process.

It's likely that at some point Omnipay will ship with core - so developing it in this context is fine. However, although there is an Omnipay library for Paypal its not currently in the extension
> 1 votes

# Answer
From brief research, these are adjustments to the form that displays the payment information. You would most likely need to override the core file, including the SILENTTRAN=TRUE request parameter.

I've no idea if it's already implemented or not on someone's machine, but a search for "SILENTTRAN" on the CiviCRM GitHub repo doesn't turn up anything.

If you want someone to custom develop this for you I'd be more than happy to take a closer look at it - please contact me at john@civifirst.com.
> 0 votes

---
Tags: civicontribute, payment-processor, paypal, pci-compliance
---


# Question
Title: Newsletter Signup CiviCRM Thinks Anonymous is Admin
I'm using CiviCRM 4.4.20 with Drupal 7.43.

I created a profile to use for newsletter sign-up. Instead of a person signing up being set to "pending" and getting an email, the person is directly signed up and no email confirmation is being sent.

One clue to the problem is that it says "Added by Admin." I would have expected it to say "Pending (by email). Note that I am logged out when running this test.

How can I get CiviCRM to set the sign-up to "pending" and receive an email with a link to confirm?

Ideas?

# Answer
Problem solved. What I had done was, in the "Advanced Settings" section of the profile's general settings, I had selected, "Add contact to Group" and then selected the mailing-list enabled Group I wanted to use on the form. This method totally circumvents the opt-in email.

What I have done since is leave that advanced section alone. Instead, I've added a field to the profile for "Group(s)." Now the opt-in email is sent.
> 2 votes

---
Tags: email
---


title: Change Column Name in a report

text:
# Question
Title: Change Column Name in a report
Where would I go to change a column name in a report? I need an event summary report. There are 2 columns that list out the Registered/Attended/Pending etc. Those column names are very long and I would like to use this report on our dashboard. It would be nice if I could just say Participant Count.

# Answer
There are a couple of ways to do this - but the easy no-coding way is to use the "Word Replacements" function. Go to **Administer menu \> Customize Data and Screens \> Word Replacements** and put in the phrase you want to replace, along with what to replace it with. Don't forget to check "Enabled", and next time you reload that report page, you should see your change.

For the official documentation, check here: http://gitbook.civicrm.org/initial-set-up/customizing-the-user-interface.html
> 1 votes

---
Tags: civireport
---


# Question
Title: How do I add additional information to a contribution page? PROFILE OPTION NOT WORKING
In my contribution page, there is not an option to add a profile:

The dropdown menu doesn't work (doesn't exist) and even if I type in the name of a profile that I have created, it doesn't actually do anything. We have PayPal Standard and because we have that set up as a payment instrument thru CiviCRM, it isn't a button that we can add settings to from PayPal, so PayPal doesn't collect that information for us. We need to be able to collect donor addresses to send them their donation receipts. If the donors are already in our database, I can pull a report from CiviCRM but if they aren't all we have is a name and email address.

Is there a workaround? Or am I doing something wrong? I have several profiles on CiviCRM--some of the standards and some that I've created and none are available.

I looked at the suggestions here but none worked. My page (here) is on WordPress. Also, I am a total novice at coding, so the more info you can give if suggesting going into the code, the better. Thank you!

# Answer
> 1 votes
I had this problem last month and also posted my question on Stack Exchange - though I realize that most people who looked at my question and yours wouldn't think they were the same! Check it out: Backbone isn't loading on Civi 4.6.11/WP 4.4.1

If you pull up your Developer Console (press F12 in your web browser when viewing this page, then check the "Console" tab, you should see the same errors I reference in my question. If so, the answer is the same.

In less-technical terms - CiviCRM uses a pre-built package called "Backbone" to build the profiles on the page you're viewing. Some Wordpress themes also use Backbone, and sometimes they conflict, which causes what you're seeing. If you switch to a theme without this problem (for instance, the twentyfifteen theme), you should see the problem go away.

To fix my problem, you can use a different theme, or you can try to hack your theme. I took the latter route; I created a child theme (there's lots of Wordpress documentation on that), and I overrode the objectionable code with my own code.

# Answer
> 0 votes
It's basically civicrm cache issue, to fix this issue you need to clear the cache and delete civicrm temporary folder (**../files/civicrm/templates\_c**). If it will not help you then you need to check java script console error.

---
Tags: wordpress, civicontribute, backbone
---


title: CiviCRM Managing Contacts in a Group

text:
# Question
Title: CiviCRM Managing Contacts in a Group
I face difficultly validating individual contacts to a group who must be a member of its parent group. For Example I have groups such as *sales executive-north, sales executive-east,sales executive-west*. All these have *Sale Executives* as there parent group.

Case 1 : Whenever I add new individual contact to any of the three subgroups, the system have validate/notify that the contact have to a member of *Sale Executives* group first.

Case 2: Whenever I remove a member from *Sale Executives* group then they have to be removed from its subgroups also.

Is there way to control this through Civirules ?

# Answer
If I understand you correctly, parent groups work the other round to the way you are trying to use them: you don't add someone to the parent and then to a child group; but instead you add them to a child group and they are regarded as a member of the parent group.

In your case, by adding someone to the Sales Executive-North group, they are automatically part of the Sales Executive parent group. Similarly when you remove them from the child group, they are no longer part of the parent group (unless they were also in another child group).

As an alternative to parent groups you could use smart groups.
> 1 votes

---
Tags: groups, evaluating-civicrm, civirules
---


# Question
Title: CiviCRM component pointing to different database than Joomla CMS
We have a little bit of a strange issue and could use some input.

We are using CiviCRM on Joomla. Started on Joomla 1.5 years ago, then upgraded to J2.5/CiviCRM 4.4 a couple years ago, then a few weeks ago upgraded to J3.4/CiviCRM 4.7.1.

Somehow, somewhere along the way over the past couple years during multiple Joomla and CiviCRM upgrades, the site got configured so that Joomla was using one database (deafhhny\_jmlprod) and CiviCRM was using a different database (deafhhny\_jmlnew). It seems to have been working fine all this time and nobody noticed. Then during the latest upgrades, the CiviCRM config file got updated to point to the same DB Joomla uses (deafhhny\_jmlprod). We noticed in the CiviCRM dashboard that we were missing the last couple years of data. I poked around and figured out that the data is in the deafhhny\_jmlnew database, and that the civicrm.settings.php file had changed during the upgrade.

Before I just change the CiviCRM config file to point to the deafhhny\_jmlnew database like it was before, I wanted to check with the community to find out if there could be any adverse effects to doing that.

If not, then I should be able to just update the database strings in civicrm.settings.php to point to deafhhny\_jmlnew like it was before, right? Although, I'm not sure if that DB got upgraded during the 4.4 to 4.7.1 upgrade process or what will happen if I point CiviCRM to it now. Any ideas?

If there are potential issues with pointing to a different DB, can I get some help with how to get the data from the \_jmlnew database into the \_jmlprod database properly without breaking anything?

Thanks.

# Answer
First - everything I suggest, do on a dev site, and make backups!

You SHOULD be able to just change `civicrm.settings.php` to point to @deafhhny\_jmlnew@, then run the upgrade script, which upgrades the database to match the installed version. Make sure you're logged into Joomla before you do this - going so many versions ahead, you're likely to be unable to do pretty much anything in Joomla/Civi (including log in) except go to the upgrade script page.
> 1 votes

# Answer
I would be really surprised if nothing changed in the DB schema between 4.4 and 4.7, although I don't know for certain. 4.2 to 4.4 had some quite dramatic changes WRT activity storage, for instance.

My suggestion would be to move the data across, as much as you can. Use PhpMyAdmin (or similar) to download the data in the DB as a CSV, and then use CiviCRM's import feature. Failing that directly insert the rows into the table.
> 0 votes

# Answer
I tried out Jon G's suggestion in a dev environment and it seems to have worked well. I made sure I was logged into the Joomla admin panel, changed the civicrm.settings.php files in both admin and component directories to point to the separate CiviCRM database, and then pointed my browser directly to the CiviCRM database upgrade URL. The DB upgrade went smoothly and now I can see the correct data.

I'm about to follow the same process in the live website environment. Assuming it works the same way there, I think I'll just leave it like that rather than trying to import the data into a single database.

Thanks for the help.
> 0 votes

---
Tags: joomla, upgrade, database
---


# Question
Title: Warning message on member signup form page
On our Contributions page for membership signup: http://www.essp-ny.org/membership-sign-up.html there is a warning displayed: "Warning Some of the profile fields cannot be configured for this page."

Any ideas how resolve this?

# Answer
> 1 votes
I figured out what was causing the warning message...one of the fields in the profile being used. Not sure what is wrong with the field, but disabling the field cleared the warning.

# Answer
> 0 votes
There are two places this information might be generated:

1) By your CMS (which is your platform),

2) By CiviCRM - go to Administrator Menu (then, different depending on your version, a submenu), then error & debugging. Hit "Hide all errors" or similar.

It may be worth hiring a consultant to examine why this error occurs though...

---
Tags: civicontribute
---


title: How can i merge custom fields?

text:
# Question
Title: How can i merge custom fields?
I would like to merge some custom fields in my database. I have a set of custom fields and in this set i have a custom field with multiple options, I will like now to merge some option fields for this custom field.

example: option field A = tomato|tomato , option field B = apple|apple , option field C = fruit|fruit ,

I want to merge A and B to C, note that both A, B and C have data.

Is this possible and how can i accomplish this without loosing any data? Civi version 4.5.5 and Drupal

# Answer
First create a Temp table with same structure and move all the data to the temp table. And then create a new column X and merge both the column A and B together and insert the values into the new column X

And once you are happy with the merge column X move the same against custom table matching with the entity ID - Job done

Please refer to the below link for Example http://www.tutorialspoint.com/mysql/mysql-concat-function.htm
> 1 votes

# Answer
Ramesh's answer is good, but you have to be very careful to be aware of the VALUE\_SEPARATOR character - which by default is Unicode 0x0001. In multi-option fields, there's a separation character at the beginning, end, and in between each option recorded in the database. Most text editors won't render it, so it's easy to miss.

This thread on the old CiviCRM forums discusses this issue: https://forum.civicrm.org/index.php?topic=24477.0

I have a response on that thread that gives good advice for how to work with that character in MySQL: https://forum.civicrm.org/index.php?topic=24477.msg103328#msg103328
> 0 votes

# Answer
A non-db solution for others who might read this would be to do an export of the contact-id (assuming these are contact fields), then in a spreadsheet use a CONCAT or CONCATENATE formula to get all the data in to a single cell with commas inbetween - don't worry if you end up with 2 commas adjacent etc, so the resulting cell might look like

apple,banana

apple,banana,carrot

apple,,carrot

Then, if you have added the new options to your field, you should be able to import this to 'update' the existing data in the field that you want the combined data to be stored in
> 0 votes

---
Tags: custom-fields, duplicate-contacts
---


title: Find contacts who haven't donated

text:
# Question
Title: Find contacts who haven't donated
We are an organization that has donors ("constituents") and potential donors (also referred to as "constituents"). We would like to run a query that identifies potential donors--i.e. "constituents" who have never made a donation. How would we do this?

# Answer
Create a group of your donors, and then run a Custom Search of Include/Exclude.

One option is to create a group (preferably a smart group) using "Advanced Search" or "Find Contributions": the only search condition is a Contribution Status of Completed. This will put all of your donors into a group (if you use a smart group, the group will continually be updated).

Then use a Custom Search that comes with CiviCRM - Include/Exclude. Do a search that EXCLUDES the group of donors you just created. You now have your constituents who have not yet donated.

Additional: From that Excludes custom search, you could then create another smart group -- this time, it would be a smart group of those people who haven't donated.
> 4 votes

# Answer
Use Search Builder. Search Contribution-\>Contribution ID -\> is Null

That will bring up all potential donors.
> 2 votes

---
Tags: contributions, search
---


# Question
Title: Why do I get a security alert AFTER installing 4.6.14?
I just installed 4.6.14 on a test system, and still get the security alert popup message at the top right of the screen, and on the last line of the screen. Is this an error? I cleared caches (Civi & Drupal) but still get the message. I know I can suppress them but I don't think they should be appearing at all.

# Answer
There is an open issue on this: CRM-18156.

This logic is implemented in `CRM_Utils_Version:: checkBranchForNewVersion()` -

**Update: Now fixed, cause was identified as data in the pingback / version check feed on CiviCRM.org. See JIRA issue CRM-18156 for details.**
> 8 votes

# Answer
4.6 will alert you if there is a security release of a higher version number. This includes all 4.7 security releases.

Beginning with 4.7 Civi will check for security release only on their current fork.
> 2 votes

---
Tags: security-advisory, 4.6.14
---


# Question
Title: Drupal Views - Show "Contribution" + Drupal User fields
A client requires one of their reports include information from both CiviContribute, but also Drupal user fields (such as login name).

We're trying to build this as a View.

However, when creating the view, and the "Show" dropdown, we select "CiviCRM Contribution", but cannot get access to the "Users" fields.

Anyone have a solution for this?

# Answer
> 5 votes
Nevermind, figured it out - had to create a Relationship to CiviCRM Contacts: Drupal ID. Issue resolved.

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


# Question
Title: After upgrade to 4.7, Activity dashlet and Activity list in Contact not showing any activites
I'm still having this issue and I've upgraded to 4.7.2. I've searched everywhere and can't find a cause. I'm not getting any error the activities just don't show in the list.

I upgraded to 4.7 without any issues. The Activity dashlet doesn't show any activities nor do activities show under the contact tab. I did a search a found there was some error causing this and it was marked as fixed. It was related to running php 5.3 but I'm running php 5.5.29 on civihosting.

What's causing this?

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

I do not get a datatables error. I get no error at all. If you look at the screen grab, notice it says, Showing 1 to 11 of 11 entries but no activities are showing.

Also see the screen grab for the Activities tab in the Contact.

# Answer
> 1 votes
This is a bug related to recurring activities. Issue filed https://issues.civicrm.org/jira/browse/CRM-18165

---
Tags: upgrade, error, dashlet
---


title: Activities pane on Manage Case page

text:
# Question
Title: Activities pane on Manage Case page
Does anyone know how to make the Case activities in the activities pane display in **ascending** order by default (earliest first)? At the moment, they appear in descending chronological order (latest first). I'm happy to do a bit of tweaking, if someone could point me in the right direction for finding the relevant file(s) to edit. Thank you.

# Answer
> 3 votes
OK, I found the answer\*. The file is civicrm/templates/CRM/Case/Form/ActivityTab.tpl, and the display settings for the activity tab are in line 77. Change 'desc' to 'asc'.

In the same line, you can also change the default number of lines displayed (change to one of the preset values 25, 50 or 100).

The details of this answer refer to CiviCRM 4.7.3, Joomla version. Not sure if there may be a difference with other platforms.

---
Tags: civicase, activities, sort-order
---


# Question
Title: Can I customize the contact relationship tab to show custom fields?
I have a relationship type with some custom fields. Is there any way to customize the relationship tab under a contact, to display those custom fields? Instead of the default Start/End/City/State/Email/Phone? I have looked at the templates used, and ultimately the data to populate the oTable seems to come from an ajax call to civicrm/ajax/contactrelationships

I'm pretty sure I'm at a dead end, but figured I'd ask here before giving up. Thanks!

# Answer
> 2 votes
Which CiviCRM version are you using? If 4.4, then it looks as though this extension may do what you want:

Custom Contact Relationships Tab

If you're using a more recent CiviCRM version, it may be worth contacting the maintainer of that extension to see whether they are working on support for more recent versions.

There was some discussion of this feature on the old Civi forum in 2013: Changing relationship fields on the relationship tab. But please continue the discussion here rather than there. :-)

# Answer
> 0 votes
You **can** do this in 4.6 - if I understand what you mean correctly. I added a custom set to a particular relationship type, and those custom fields show up when you click 'View' on one of the relationship items.

---
Tags: custom-fields, relationships
---


title: CiviCase - Having issues

text:
# Question
Title: CiviCase - Having issues
When trying to add a record in case, I get the above screen.

I was originally having an issue with editing Case Types. Even trying to enable or disable wasn't working. Since updating to 4.7.3 the enable and disable seems to be working.

This is running on Joomla v3.4.8

# Answer
> 1 votes
As the error message says, you seem to have deleted the "case coordinator" relationship type, yet one or more of your case types depends on it. Either restore that relationship type, or remove it from the case type configuration.

---
Tags: civicase
---


title: General Error 2006

text:
# Question
Title: General Error 2006
I get the following error in various situations, detailed below.

`SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
DB Error: unknown error`

I get it consistently when trying to enter the duplicate merging dialog; and I've gotten it occasionally when importing data, deleting events (without participants), and other routine tasks. It displays the message twice when the error happens (three times if watchdog is on). It's happening on multiple CiviCRM sites on the same server.

The Googled consensus seems to be to increase max\_allowed\_packet in my.cnf but this hasn't helped in my case (it was 24M and is now at 64M). Restarting mySQL and the server itself have also not resolved the issue. Any suggestion is welcome.

Backtrace when trying to enter the duplicate merging dialog:

0 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/Error.php(182): CRM\_Core\_Error::backtrace()

1 internal function: CRM\_Core\_Error::handle(Object(DB\_Error))

2 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/PEAR.php(931): call\_user\_func((Array:2), Object(DB\_Error))

3 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/DB.php(976): PEAR\_Error-\>PEAR\_Error("DB Error: unknown error", -1, 16, (Array:2), "\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...")

4 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/PEAR.php(564): DB\_Error-\>DB\_Error(-1, 16, (Array:2), "\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...")

5 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR-\>raiseError(NULL, -1, NULL, NULL, "\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...", "DB\_Error", TRUE)

6 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/DB/mysql.php(895): DB\_common-\>raiseError(-1, NULL, NULL, NULL, "2006 \** MySQL server has gone away")

7 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/DB/mysql.php(328): DB\_mysql-\>mysqlRaiseError()

8 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/DB/common.php(1216): DB\_mysql-\>simpleQuery("\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...")

9 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/DB/DataObject.php(2442): DB\_common-\>query("\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...")

10 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/DB/DataObject.php(1634): DB\_DataObject-\>\_query("\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...")

11 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/DAO.php(325): DB\_DataObject-\>query("\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...")

12 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/DAO.php(1192): CRM\_Core\_DAO-\>query("\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...", TRUE)

13 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(207): CRM\_Core\_DAO::executeQuery("\nSELECT\n table\_name,\n column\_name\nFROM information\_schema.key\_colum...")

14 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(166): CRM\_Dedupe\_Merger::cidRefs()

15 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(1102): CRM\_Dedupe\_Merger::getActiveRelTables("19986")

16 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Contact/Form/Merge.php(193): CRM\_Dedupe\_Merger::getRowsElementsAndInfo("19985", "19986")

17 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/Form.php(455): CRM\_Contact\_Form\_Merge-\>preProcess()

18 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(94): CRM\_Core\_Form-\>buildForm()

19 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM\_Core\_QuickForm\_Action\_Display-\>perform(Object(CRM\_Contact\_Form\_Merge), "display")

20 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML\_QuickForm\_Controller-\>handle(Object(CRM\_Contact\_Form\_Merge), "display")

21 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML\_QuickForm\_Page-\>handle("display")

22 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(115): CRM\_Core\_Controller-\>run()

23 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM\_Utils\_Wrapper-\>run("CRM\_Contact\_Form\_Merge", "Merge Contact", NULL)

24 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM\_Core\_Invoke::runItem((Array:13))

25 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM\_Core\_Invoke::\_invoke((Array:3))

26 /home/domainname/public\_html/subdomainname/sites/all/modules/civicrm/drupal/civicrm.module(489): CRM\_Core\_Invoke::invoke((Array:3))

27 internal function: civicrm\_invoke("contact", "merge")

28 /home/domainname/public\_html/subdomainname/includes/menu.inc(519): call\_user\_func\_array("civicrm\_invoke", (Array:2))

29 /home/domainname/public\_html/subdomainname/index.php(21): menu\_execute\_active\_handler()

30 {main}

# Answer
After a long back and forth with support, we narrowed it down to corrupted CiviCRM tables. The corrupted tables weren't even in the same CiviCRM database that was having trouble, and they were causing phpMyAdmin to lose the DB connection in certain cases. Here's the process I used to fix things:

1. Set your site to offline
2. Go to a command line (I used Putty).
3. Enter `mysqlcheck databasename_civicrm` to get a status report on all tables.
4. The process may halt with an error message (or if no error message it'll tell you which are/aren't corrupted). In my case, when it halted, I assumed that the first unlisted table (alphabetically) was the problem table and dropped it (Important: Dropping means you're deleting it. It's a big deal. You'll want to have a backup ready and think about the implications for related tables).
5. Drop the offending table(s). I used phpMyAdmin for this.
6. Restore the offending table(s) from a viable backup.
7. Enter `mysqlcheck databasename_civicrm` again to get a status report on all tables. Repeat the drop/restore process if necessary.
8. Assuming you're in the clear, put your site back online.

After I did this, all the processes that formerly gave the error no longer did so I consider it fixed.
> 2 votes

# Answer
This is an extremely generic error, which basically means "MySQL froze up", and you'll need to check your MySQL and system logs rather than/in addition to CiviCRM for answers. Check your server's system logs to see if perhaps oom-killer decided to kill MySQL because you're out of memory.
> 1 votes

---
Tags: error, mysql
---


title: Webform Price Sets

text:
# Question
Title: Webform Price Sets
I have a ticket page using a Civi Contribution page and a webform. Is there a way to allow price sets in a webform? What I am looking to do is have a series of options, ($5, $10, $20) and then have a donation amount where they can enter any amount in.

# Answer
You can accomplish this by:

* Installing the webform select or other module.
* Changing the price field's widget to a select (by default it is a textfield) and enabling the options you wish plus the "other" feature provided by the above.
> 6 votes

# Answer
CiviCRM pricesets cannot be integrated with webforms, but you should be able to create various contribution ammounts within the webform which may be sufficient depending on your use case. You may find some interesting information on the topic in this forum post and as well as in the civicrm wiki.
> 2 votes

# Answer
Which versions of Civi / Drupal are you on?

I'd have thought you could do this through the webform integration api? Under the CiviCRM tab if you enable "contribution", is there an option for price set there?

Incidentally, why use webform here, and not the CiviCRM contribution page (sorry if I misunderstood)?
> 0 votes

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


title: Can field names be wordwrapped?

text:
# Question
Title: Can field names be wordwrapped?
Using CiviCRM 4.7.1 Some of the field names in our registration form are so long that, on the form the attendees use, they are truncated. Also on the confirmation messages. Either truncated or overtyping the data. Can the field names be wrapped? The field names shown are "SS Dance Class - 1st choice" and "... 2nd choice", etc.

# Answer
> 2 votes
I would recommend either: 1) Using Drupal Webform to capture the data (are you on Drupal?) 2) Adding a custom template for this profile 3) Using a custom theme for this page 4) Report this as a bug to be fixed in future versions of Civi.

# Answer
> 2 votes
CiviCRM inherits most of its look and feel from the CSS code in your CMS's theme - in your case Joomla. By default, CiviCRM's labels won't do this. Your Joomla web designer should be able to modify their CSS to prevent this happening.

---
Tags: civievent, forms
---


# Question
Title: Can we control what contact name links to on reports?
We have a lot of "Contact Reports" set up and in some of them the contact name links to the contact record but in others it links to another report.

I can't see what it is that influences this. Is it configurable?

# Answer
> 0 votes
Sounds like the ones that are linking to others are Summary reports which then take you through to the Detail report. You could try to rewrite the ones that don't click through, and which you want to do so, as Detail rather than Summary reports

# Answer
> 4 votes
This is not configurable out of the box - but I really don't like when clicking on a name in a report doesn't bring you to the contact record. For that reason, I've written an extension called "No Drill Down", which modifies any report that would normally bring you to a Contact Detail or Contribution Detail, and instead brings you to the contact record. You can find it here.

---
Tags: reports
---


title: Coding Custom Report

text:
# Question
Title: Coding Custom Report
I'm having some trouble coding a custom report. I found the following tutorial which was helpful, but I'm having trouble with the actual coding as I am still new to civiCRM developing, and I haven't figured out all of the civiCRM classes. https://alastaira.wordpress.com/2011/03/17/civicrm-creating-a-custom-report/

Essentially, I want a report that does exactly what the Bookkeeping report does, except at the bottom I want a summation of the amount grouped by the financial account code.

I have copied the Bookkeeping.tpl and Bookkeping.php to new files. Yet, I'm having some troubles on how exactly to change the statistics section of the php file to reflect my desired changes.

```
public function statistics(&$rows) {
$statistics = parent::statistics($rows);
$tempTableName = CRM_Core_DAO::createTempTableName('civicrm_contribution');
$select = "SELECT {$this->_aliases['civicrm_contribution']}.id, {$this->_aliases['civicrm_entity_financial_trxn']}.id as trxnID, {$this->_aliases['civicrm_contribution']}.currency,
           CASE
             WHEN {$this->_aliases['civicrm_entity_financial_trxn']}_item.entity_id IS NOT NULL
             THEN {$this->_aliases['civicrm_entity_financial_trxn']}_item.amount
             ELSE {$this->_aliases['civicrm_entity_financial_trxn']}.amount
           END as amount
";

$tempQuery = "CREATE TEMPORARY TABLE {$tempTableName} CHARACTER SET utf8 COLLATE utf8_unicode_ci AS
              {$select} {$this->_from} {$this->_where} {$this->_groupBy} ";
CRM_Core_DAO::executeQuery($tempQuery);

$sql = "SELECT COUNT(trxnID) as count, SUM(amount) as amount, currency
        FROM {$tempTableName}
        GROUP BY currency";
$dao = CRM_Core_DAO::executeQuery($sql);
$amount = $avg = array();
while ($dao->fetch()) {
  $amount[] = CRM_Utils_Money::format($dao->amount, $dao->currency);
  $avg[] = CRM_Utils_Money::format(round(($dao->amount /
    $dao->count), 2), $dao->currency);
}

$statistics['counts']['amount'] = array(
  'value' => implode(', ', $amount),
  'title' => 'Total Amount',
  'type' => CRM_Utils_Type::T_STRING,
);
$statistics['counts']['avg'] = array(
  'value' => implode(', ', $avg),
  'title' => 'Average',
  'type' => CRM_Utils_Type::T_STRING,
);
return $statistics;
}

```

I see in the code that the $sql is grouped by currency, so I essentially just need to change it so the $sql instead is grouped by financial code. However, I don't know the class name for the financial code to place in the following line of code to replace currency:

```
$select = "SELECT {$this->_aliases['civicrm_contribution']}.id, {$this->_aliases['civicrm_entity_financial_trxn']}.id as trxnID, {$this->_aliases['civicrm_contribution']}.currency,

```

# Answer
> 2 votes
I suggest you install the extended reports extension and see if one of those reports does what you want. The extension provides many reports and is well maintained.

If it doesn't provide what you want, perhaps reviewing the code of extended reports that do group by financial account code will help you find the answer to your problem. (Sorry I am not a coder, so can't provide any help with that.)

Also are you sure you need the information on the individual transactions and the account code totals in the same report. My understanding is that often it easier to do one or the other on a given report, rather than both. That is why there are summary and detail pairs of reports. (eg for Donor Details and Event Income).

# Answer
> 0 votes
For myself, I've always found making reports a bloody nightmare!

Far easier is to build an extension that spews out the data. Unless you 100% definitely need the flexibility the form provides and you have a great example to work from, I'd recommend extension development.

---
Tags: civireport, php
---


title: Forum Link instead of SE Link

text:
# Question
Title: Forum Link instead of SE Link
Where would I put a "bug report" about a link pointing to the old forums, rather than here? It's on the Wordpress demo page, at the very bottom of the page.

http://wpmaster.demo.civicrm.org/

# Answer
> 2 votes
Asking here is a good step. I forwarded the info to someone on the core team who should know who to pass it on to. thanks for reporting it

---
Tags: wordpress, documentation, demo-site
---


# Question
Title: Unable to add membership types dropdown field to registration form
I have created a Registration form using "Profiles", however when I add the membership types I get this message on the frontend: "Profile search, view and edit are not supported for Profiles which include fields for more than one record type.". The field is type "Membership", the other fields are type "Contact" (as seen on the screenshoot) What am I missing, what is the approach for adding a membership type dropdown?

# Answer
the only way membership types can be used is via contribution pages
> 1 votes

---
Tags: wordpress, civimember
---


# Question
Title: Buildkit - amp test fails - incorrect response received
The setup ran smoothly until *amp test* which says:

```
$ amp test

Expect response: "response-code-SoYwxYyBvx"
Received incorrect response: "<?php
// This is a simple script which outputs "OK" if it
// executes correctly and connects properly to a database.

if (isset($_SERVER['HTTP_CLIENT_IP'])
  || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
  || !in_array(@$_SERVER['REMOTE_ADDR'], array(
    '127.0.0.1',
    '::1',
  ))
) {
  header('HTTP/1.0 403 Forbidden');
  exit('Connection must originate on localhost');
}

$config = require 'config.php';
$errors = array();

// ---------- Test HTTP inputs ----------

if (!isset($_REQUEST['exampleData']) || $_REQUEST['exampleData'] !== 'foozball') {
  $errors[]= "Error: Expected GET or POST value 'exampleData=foozball'";
}

// ---------- Test database ----------

try {
  $dbh = new \PDO($config['dsn'], $config['user'], $config['pass']);
  $dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
  foreach ($dbh->query('SELECT 99 as value') as $row) {
    if ($row['value'] == 99) {
      // ok
    } else {
      $errors[] = "Error: Bad query result <br/>";
    }
  }
  $dbh = NULL;
} catch (PDOException $e) {
  $errors[] = "Error: " . $e->getMessage() . "<br/>";
}

// ---------- Test file permissions ----------

$dataFile = $config['dataDir'] . '/example.txt';
if (FALSE === file_put_contents($dataFile, "data")) {
  $errors[] = "Error: Failed to write $dataFile";
}
if (FALSE === unlink($dataFile)) {
  $errors[] = "Error: Failed to remove $dataFile";
}

// ---------- Wrap up ----------

if (empty($errors)) {
  echo "response-code-SoYwxYyBvx";
}
else {
  echo implode("\n", $errors);
  die();
}"
Tip: Try running "amp config" and/or restarting the webserver.

```

I believe I have set up `amp config` correctly. I even edited *apache2.conf* and included the line it asked to. But no matter how much I restart and test, it doesn't work.

My `amp config`:

```
mysql_dsn : mysql:civicrm:civicrm@localhost:8000
perm_type : linuxAcl
perm_user : www-data
httpd_type : apache24

```

And I included this line `Include /root/.amp/apache.d/*.conf` in *apache2.conf* file.

# Answer
The problem was PHP files weren't being processed. I reinstalled PHP module using the following commands and it worked.

```
sudo /etc/init.d/apache2 stop
sudo apt-get remove --purge apache2 php5
sudo apt-get remove --purge libapache2-mod-php5
sudo apt-get install php5 apache2 libapache2-mod-php5
sudo /etc/init.d/apache2 start
sudo a2enmod php5
sudo /etc/init.d/apache2 force-reload

```
> 3 votes

---
Tags: civicrm-buildkit
---


# Question
Title: How do I determine how many active members there were on a date in the past?
I've been asked to mine CiviCRM to determine how many active members we had on a particular date in the past, i.e. How many active members did we have on Dec 31, 2015? Is there a search or report that will show me this?

# Answer
> 2 votes
I think you can do this via Find Members since to be an Active Member on that date you need

* a start date before that date AND
* an end date after that date

---
Tags: civimember, search, reports
---


# Question
Title: How to disable one checkbox in a group based on text box having value
I have the webform module installed on Drupal 7.41 with CiviCRM 4.7.2. I'd like to make an event registration form. This event spans a few days. If the person filling out the form has an organization membership id, they need to be able to enter that, and membership options need to be enabled for the days they wish to attend.

For example. The event is Monday and Tuesday. There is also an "All Days" option. There will be a Member option for each day, a normal price for each day and a retire price for each day. Above the checkboxes there will be a text box where they can enter their membership ID. If that text box is empty I want to disable the membership options. Currently I can only disable to whole checkbox group.

In addition, if any of the All boxes are checked, the remaining boxes need to be disabled.

Thoughts on how I could do this? Thanks!!

# Answer
You can use jQuery in the webform to hide/display the checkboxes based on the contents of the membership id box. A simple implementation could just check whether the membership box is blank, but then any random stuff would show the member options. A next step would check the membership id is of the right format. Even better would be using the API to check the validity of the id entered.

That will let you display what you want but does not prevent a determined user displaying the hidden options so you should probably add a validation rule as well.

Also, if the person filling out the form is an existing contact, you could use the auto-populate feature for existing contacts to get the webform to display the membership number directly.
> 3 votes

# Answer
Definitely time to use the Webform Conditionals here - I think it's in Webform but it may be a separate module. Google for a tutorial :)
> 0 votes

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


# Question
Title: how do I exclude blank or null in a report
I'm currently trying to set up a simple report for bookkeeping transactions for the last month. It's was great except for the fact it is also including paypal fees on top of the full transaction amount (this makes it look very much like we collected the full transaction amount (including the paypal fee), plus we collected the paypal fee as well.) I though it would be simple enough to filter these out, they are easily identifiable by the fact that they don't have a payment method or a financial type at all. I don't seem to be able to filter out null/blank values though: I have to select a value from the list, null/blank is not an option.

I have found I can exclude them based on account codes and this solves my immediate problem. I would, however, like to know if there is a way to exclude items with blank or null values. I could see it being very handy in the future.

It would also be nice to have the pay pal fees subtract their values in a report rather than add them? Possible at all?

Using civiCRM version 4.7.3 right now.

# Answer
> 4 votes
Workaround -

Select operator as `is not one of` and multi-select all the values in the dropdown. Result shown will be the record not having the selected values.

For Eg - Financial Type -\> is not one of -\> all the values in the dropdown -\> Preview Report

Can that work for you?

---
Tags: civireport, reports
---


# Question
Title: Does civiCRM support RequiredIf validation for Profile fields
I have dropdown with option1, option2 ... Other. I want if user selects "Other" another text field appears (slideDown) underneath the dropdown AND this text field is Required. Is it possible with civiCRM?

# Answer
> 2 votes
This was proposed as a feature for CiviCRM, but it never really got any funding: 'Other' option for custom fields

As Ben says, if you are (or have access to) a developer, it's not too hard to write this extension. Add both the dropdown and the "Other" field to your profile, then use jQuery to hide the "Other" field. Toggle whether it's hidden based on the value of the dropdown.

Use hook\_civicrm\_validateForm to set "Other" as required if the dropdown value matches the "Other" option. By default it should not be required.

# Answer
> 1 votes
Not natively, although it would make a great extension.

# Answer
> -1 votes
Are you using Drupal? If so I think webform will support this.

---
Tags: wordpress, civimember
---


title: Status of form/profile usability

text:
# Question
Title: Status of form/profile usability
Could someone give an update on the status of creating more usable form/profiles without using Drupal's Webform? (Especially iin regards Wordpress but preferable CMS agnostic)

I'm certain I'm not the only WP user struggling with form creation that is annoyed with the 'use Webform' response to nearly every form/profile question. It seems obvious to me that this is a major usability issue with CiviCRM that has been avoided for years due to the crutch of Webform.

And yes, I have heard also of a mysterious gravity forms plugin (with a big annual fee to use it), but this just perpetuates one of the main flaws in your otherwise amazing system.

/rant.

# Answer
More usable forms/profiles is a major goal of CiviCRM 5.0.

Creating a form creator that's flexible enough to meet the varied needs of many constituencies is a lot of work. Unfortunately, while CiviCRM is free to use, it's not free to write. Most of the folks who complain aren't willing to fund (or do) the work. Using Webform is certainly a crutch, but in a world without unlimited developer resources, you can understand why someone wrote the CiviCRM-Webform integration rather than try to do it all from scratch.

I have no way of knowing which camp you fall into - but for everyone with this same question who hasn't contributed, please consider the many ways in which you can help make more usable forms/profiles a reality.
> 1 votes

---
Tags: profile, webform-civicrm, forms, cms-integration, usability
---


# Question
Title: Refresh page after closing modal opened by .crm-popup outside of CiviCRM
We've a page (in Drupal) outside of CiviCRM for "editors" (mean, users with restricted permissions) to perform some civicrm tasks.

From this page civicrm forms is being opened in modal frame via **.crm-popup** class added to form open links. There are also hooks being used (\_pre and \_postProcess) for these forms.

Drupal page should be refreshed after form submit (in order to show editors their edits); but each form submit summons a js status message `CRM_Core_Session::setStatus(ts('Your information has been saved.'), ts('Thank you.'), 'success');` from `civicrm\CRM\Profile\Form\Edit.php`.

And we're lost in how (mean, **where would be a right place**) to add something like **location.reload** which, ideally, should be fired right after status message close. Or, may be, it should be added at hook\_postProcess level via "header(refresh)" (we've made some attempts doing this and failed though)?

Any clue form true js / jquery experts, please!

# Answer
If you want the entire page to refresh during a popup form submission, then essentially you want to disable the ajax submit. You can do so in your \_pre hook by writing:

```
$form->preventAjaxSubmit();

```
> 1 votes

# Answer
Here is a code for copy&paste, in case anyone wants it:

```
 $('#main-content')
    .on('click', 'a.LINK_CLASS_or_ID', CRM.popup)
        .on('crmPopupFormSuccess', 'a.LINK_CLASS_or_ID', function() {
 // Die, default CRM.alert!! I was looking how to kill you for weeks
        CRM.alert= function() {};
// Attaching civicrm magic to any page element
       $('#ELEMENT_ID_to_REFRESH').crmSnippet();
  // Here we go
       $('#ELEMENT_ID_to_REFRESH').crmSnippet('refresh');
  // Let us tell users what we are doing
       CRM.status('Success! Refreshing a corresponded piece of content', 'Success', 'success' );
        });

```
> 1 votes

---
Tags: drupal, hooks, ajax, javascript
---


# Question
Title: Membership sets to Cancelled when Contribution Fails. Why?
I have a situation where the Contributions are being set to **Cancelled** when the user contribution **fails** (payment processor fails the transaction). So, the user is blocked to try a new contribution until an administrator excludes that Membership with **Cancelled** status.

I took a look at documentation and understood that Membership **Cancelled** status would only be set manually, so I can't figure out why this situation is happening. I assured that "Override status" is not checked in the Membership edit panel, so it looks like something in the system is setting the **Membership to Cancelled** status. I wonder why and I need to fix it. Any clues?

Ps: The Payment processor IPN could be doing this?

PS2: I'm using Joomla! and the Payment Processor is PagSeguro.

# Answer
This is the expected behavior in CiviCRM, when you have a Contribution related to a Membership, and you set its Contribution status as **Cancelled** (manually or automatically through a ipn payment processor) it will cancel the Membership too. You can take a look to source code (4.6.x) where this is happening

https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Contribute/BAO/Contribution.php#L1512

You can patch civicrm core to avoid Membership to be Cancelled when Contribution around this line:

https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Contribute/BAO/Contribution.php#L1484

```
if (!$baseIPN->validateData($input, $ids, $objects, FALSE)) {
  CRM_Core_Error::fatal();
}

// ## Patch Begin ## Fix to not update membership status when updating contribution status
$memberships   = array(); //&$objects['membership'];
// ## Patch End ##
$participant   = &$objects['participant'];
$pledgePayment = &$objects['pledge_payment'];

```

There is a forum thread discussing this:

http://forum.civicrm.org/index.php/topic,34082.msg154608.html#msg154608
> 3 votes

# Answer
I believe there is some incorrect logic here and have opened a JIRA issue and am hoping client will fund.

If an existing user goes to renew a membership, makes an error with their CC - and hence has a Failed contribution, then there is no reason that i can think of why their existing membership should be set to Cancelled. Currently it means they are prevented from trying to renew again.

Outcome, imo, should be that if a Membership exists, and a payment Fails, then the membership status should be left how it was.
> 2 votes

# Answer
Whenever a transaction fails in payment processor the corresponding contribution gets cancelled. This is done by IPN.

But this shouldn't restrict the user from making a payment again or login (I guess you are using WordPress and SagePay).

If this happens, you should be checking the user permissions (roles) and you should be providing access for cancelled membership, saying if the member has a cancelled membership we should still allow the member to login.
> 1 votes

---
Tags: civicontribute, civimember, contributions
---


# Question
Title: Civimail produces saving error when sending test
CiviCRM 4.6.8

I was editing an email when the "Send test" button triggered the message...

```
Error: Sorry an error occurred and your information was not saved

```

Unable to replicate in demo site since there's no outgoing email (saving the email doesn't actually produce the error, despite the error's wording).

# Answer
I went in and submitted a test mailing that I wasn't able to preview. This caused the cronjob to spit out the error:

```
<br />
<b>Fatal error</b>:  Call to undefined function mb_strtoupper() in <b>/home/ourbase/public_html/sites/all/modules/civicrm/packages/html2text/rcube_html2text.php</b> on line <b>703</b><br />

```

The key there is the function mb\_strtoupper() \[that's "string to upper"\]. To fix this, you need to enable "mbstring" on your php/apache build. In my case, this was done through the WHM interface as follows:

1. Go to EasyApache
2. Customize the current profile
3. On Step 3 (?) click on "Exhaustive Options"
4. Check the checkbox for MBString
5. Build & Compile (takes a while), and wait until it's done.

If you don't have access to that solution, consider one of these lesser temporary solutions while you wait for someone to resolve it: 1. Remove all `<strong>` and/or `<b>` tags or... 2. Manually put text in the plain text box
> 3 votes

# Answer
I received this message because my Firewall (CSF) was improperly configured to block the outgoing mail port. When I resolved that, the error disappeared.
> 1 votes

---
Tags: civimail
---


title: Civicrm Removing AngularJS url

text:
# Question
Title: Civicrm Removing AngularJS url
I'm trying to create a tab on the contact page that calls an AngularJS Url. However, civicrm removes the `#` and everything after it.

I've tried drupal's url() function, still doesn't work. Please let me know if there is a way to do this.

```
function contactcampaign_civicrm_tabset($tabsetName, &$tabs, $context)
{
    /* Ensure it's the contact view tabset */
    if ($tabsetName != "civicrm/contact/view")
    {
        return;
    }

    /* Add a new tab */
    global $base_url;

    $tabs['personal_campaign_pages'] = array(
        'title' => ts('Personal Campaigns'),
        'url' => '/civicrm/a/#contact/campaign/all',
    );
}

```

# Answer
> 3 votes
I don't think that is possible, but not for the reason you think. The problem is not whether or not the link gets rendered correctly, the problem is that AngularJS expects to launch a single-page-app, not load an html snippet into a tab. If you need to link to an angular page, you will need to do so as an actual link, and it will have to take the user away from the contact summary page and over to the angular page.

---
Tags: drupal, contacts, civicampaign
---


# Question
Title: Is there a way to accept inbound SMS from contacts not in your database?
I have a client who has a service they'd like to merge into CiviSMS. Strangers (i.e. not in the database) can send a text with a keyword; ideally it should create a contact with their phone number. Using reports/Views, staff will review new incoming messages and respond to the contacts accordingly.

Is that possible with CiviSMS?

# Answer
Jaap Jansma at CiviCoop has developed two extensions that do this for us. It is connected to a Norwegian sms provider, but the code is available on github.

He used a trick... To automatically create a contact with no name, but only email(as Civi requirements for creating a contact). A contact with cell phone number 123456789 would then get an email like this: 123456789@mobile.sms

This is again easy to search for or make a report for back office staff to go through. (Email adresses containing @mobile.sms)

Norwegian sms provider PSWincom

Sms autoreply
> 3 votes

---
Tags: sms
---


title: How do I duplicate a mail template

text:
# Question
Title: How do I duplicate a mail template
I have an existing email template I have made and now I want to repurpose it for another use while keeping the basic layout. How can I duplicate my original template please?

# Answer
You can click on the button to display the source code and then copy all.

Open a new template, click on the (same) button to display the source code, and paste what you have copied. Then click on the button again, and voilá, you have copied an email template!
> 1 votes

---
Tags: civimail, message-templates, custom-templates
---


# Question
Title: CiviCRM Architecture - CiviCRM directory structure
Can anybody help me understand the architecture and directory structure of the civicrm. I found this post written in 2006 which doesn't seems to be valid for newer version.

# Answer
> 1 votes
this is still mostly valid, with the addition of the api folder that contains, you guessed it, the api goodness.

You might have several folders missing depending on how you install it. eg all the test and xml folders are only there if you install a full/development environment, not if you download the pre-packaged production version

What is missing or unclear?

---
Tags: api, architecture
---


title: GSoC 2016: Social Media Integration

text:
# Question
Title: GSoC 2016: Social Media Integration
I'm a third year student studying B Tech in Computer Science and Engineering and Social Media Integration project caught my interest. I have an experience in Social Login integration on a PHP website. So, I believe this project is right for me.

I have already setup a local server and setup buildkit in it. And I have started to look into documentation. Further guidance on project specifics would be a great help. :)

# Answer
> 1 votes
Part of the job is to try shaping more precisely what your project will be, and discuss it with your mentor and the community.

Have you contacted directly the potential mentors? our irc channel is a good place to hang out and have more interactive discussions

In general, the more active you are in the community (eg trying to ask or answer specific questions, see what issues are left and looking for fix, being on irc...), the easier and faster it's going to be up to speed (and in your specific case, that your candidacy and project is selected)

---
Tags: gsoc, civicrm-buildkit
---


title: Upgrade 4.5.6 > 4.6.1

text:
# Question
Title: Upgrade 4.5.6 > 4.6.1
Running my upgrade stalls at the upgrade page. The buttons are not working and do nothing.

According to the debugger in Firefox, there is an illegal character in noconflict.js and CRM.$ is not a function in runner.

# Answer
Solved via Facepunch. This time, my own.

http://forum.civicrm.org/index.php?topic=34797.0
> 2 votes

# Answer
I'm getting the same error on a site of ours: - CRM.$ is not a function

I've checked the .htaccess file and taken out any lines compressing Javascript or CSS.

It simply hangs on the upgrade screen.
> 0 votes

---
Tags: upgrade
---


# Question
Title: Pay later option on 4.7.2 using Stripe doesn't work - throwing error
Have events set up - working fine in 4.6.x updated to 4.7,2

Getting the following error - when hitting continue on event registration Payment Error Response: Error: The card object must have a value for 'number'.

Thoughts - Suggestions ?

Drupal 7.4.3

# Answer
The problem is with the Stripe payment processor.

The javascript file in stripe needs to be updated because the name of the payment processor changed in 4.7 from "payment\_processor" to "payement\_processor\_id".

The Stripe Extension does not yet have a 4.7 branch to push these changes to.
> 1 votes

# Answer
I did test the same against http://dmaster.demo.civicrm.org

It went alright. But, with an higher version of CiviCRM 4.7.4 So, Please try to upgrade to Civicrm 4.7.4 version and give a test

Also for you reference please try the below link - which works fine http://dmaster.demo.civicrm.org/civicrm/event/info?reset=1&id=7&noFullMsg=true
> 0 votes

---
Tags: upgrade, payment-processor, 4.7, stripe
---


title: Possible reasons for ACLs to fail

text:
# Question
Title: Possible reasons for ACLs to fail
We manage a site for a charity working with victims of domestic violence.

They work in 5 separate locations , and the organisation's preference is for staff working in a given area only to be able to access contact records (for staff and clients) in that area.

(In the past they have had to deal with relatives of offenders who have become staff members in different locations in order to access victim's details from their system).

Initially they worked across 3 locations and ACL's worked fine. As there work expanded and more projects came on line, the number of ACL roles and number of extra groups to give access to has expanded. Additionally some staff work across more than one project/ ACL role.

Intermittently the ACL rules fail, and staff members can see fewer contacts within a group than are in it. ie. Location Contact group has 729 members, when Staff Member A views that group from a find contacts search she see's 149 contacts.

(I've checked this using the Drupal Masquerade module).

It seems to me that multiple ACL roles are conflicting with one another, and restricting the number of contacts the staff member can view.

I've fixed this in the past, by deleting ACLs and rebuilding from scratch. Eventually this falls over and we need to do that again.

Has anyone experienced anything like this?

Any ideas what may be causing this intermittent problem?

Drupal 7.39 Civi 4.4.21

# Answer
Craig - I can't comment on why you might have conflicting ACLs, but want to mention the Permissioned Relationships as ACLs which we built and contributed to provide another solution for multi-level permissioning. You can read about it via the link, but it may suit your need and deals easily with the situation of Staff Member Q needing to access the contacts in two regions, but giving Q a relationship with Region A and Region B, and therefore seeing all those contacts that the Region A and B have permission to access.
> 1 votes

---
Tags: contacts, acl
---


title: Custom search settings

text:
# Question
Title: Custom search settings
I'm trying to set up a new custom search but when I try to run it I get told the search does not exist and " Please verify your custom search settings in CiviCRM administrative panel." I can't seem to find said settings though, where are they?

# Answer
You didn't mention how you were making the Custom Search! Assuming it's in an extension:

1) Look in Joomla's and CiviCRM's logs for more information.

2) Try clearing CiviCRM's cache.

3) Check the extension's file permissions.

4) Did you rename some parts of your extension, i.e. files, object names, after creation? If so, there may be a piece missing... try regenerating the extension from scratch and copying the functionality over.
> 1 votes

# Answer
Can you get to https://\[yourdomain\]/civicrm/admin/options/custom\_search?reset=1
> 0 votes

---
Tags: custom-search
---


title: 4.7.3 Vs 4.6.14

text:
# Question
Title: 4.7.3 Vs 4.6.14
I am a complete CiviCRM noob I am the ICT adviser to a small non-profit Paramedic service. We are going to be using CiviCRM to replace a ancient filemaker database.

I thought I was doing the right thing and installing the latest version of CiviCRM but it seem that just about none of the extension are compatible with 4.7.3

Am I missing something should I have installed 4.6.14 instead, if so is there a way to downgrade without having to start again?

I would not be to concerned but much of the features we are looking for are only covered by extensions

thanks in advance

Zeak

# Answer
In general, 4.7 is a "development" release. 4.6 is a "long term support (LTS) release". Most people would recommend 4.6 (or even 4.4!) for very stable websites, and only using 4.7 if you need the latest features or are developing for the future.

As an extension contributor myself, there's a reasonable functionality jump between 4.6 and 4.7, so it may be some time until every extension is on there, and some may never get there. It depends on the extension and the developers who maintain them.

Unfortunately, there is no way to "downgrade". Your best options are to:

1) Manually download and install the extensions, put them in the extensions directory, and then test them. They will probably mostly work, but you will need to do this testing yourself.

2) Contact the developers of the key extensions, asking them for a timeframe of when they will be supporting 4.7

3) Hire a freelancer or agency to update them to 4.7 for you. I would be more than happy to do this - http://civifirst.com, or you could look for a partner agency at http://civicrm.org/partners-contributors.

4) If you do decide to move to 4.6, you can easily export and import your configurations and data. If you find yourself needing to do this, do ask here in a different thread.
> 3 votes

# Answer
In terms of Extensions, and we (Fuzion) have contributed a fair few of them, I think it is fair to say that in our case, since all our clients are still on 4.6.x, we simply have not had cause to see what breakages might happen with 4.7.

We build extensions with the long-term in mind and since Eileen is very much part of the team outside of core that is helping with that long-term view (and building API etc) i would expect our extensions to be as future-proofed as was possible at the time of the original build.

It can be really helpful to the community if you and others can help push these community assets forward by doing some testing of Extensions on 4.7 and reporting back via their git repository as to how much the fail/succeed.
> 2 votes

---
Tags: upgrade
---


title: Membership Structure Help

text:
# Question
Title: Membership Structure Help
I have some questions about structuring our memberships, we have two branch locations, is there a way in the membership reporting to show the reports on each location? or do I have to create types such as "Family Location 1" & "Family Location 2"

In addition to this we also have tier memberships based on normal incomes and low income in each location.

Here is a screen shot of what we currently have, we are in development so this is not live yet.

Any help would be much appreciated

Zeak

# Answer
it seems quite a simple solution to simply have an extra pair of Membership Types, eg Individual Locality A, and Individual Locality B. That would ensure that the 'location' data was always immediately available to you when look at membership data. anything else is likely to require some customisations in order to show that information in the membership context.
> 1 votes

---
Tags: civimember
---


# Question
Title: Which SMS Gateway / Service providers are available?
We are an NGO that would like to use SMS to send out reminders for events and feedback tool. Which providers are supported by CiviCRM?

# Answer
Out of the box, you have two possible providers, clickatell and twilio.

Both seems to work fine, you should check directly on their website because the cost depends on your location, the location of your recipients and the volume you want to send.

https://wiki.civicrm.org/confluence/display/CRMDOC/Setting+up+a+SMS+Provider+for+CiviSMS

X+
> 3 votes

# Answer
Besides Twilio and Clickatell, folks have written extensions for other gateways - but of course they may be out of date. I know of these offhand:

MySMSMantra: https://github.com/osseed/com.osseed.sms.mysmsmantra/blob/master/README.md

PSWinCom: https://github.com/CiviCooP/org.civicoop.pswincom
> 2 votes

---
Tags: civievent, civimember, civireport, sms
---


# Question
Title: How do you restrict a CiviContribute page using roles
I have a CiviContribute page which was intended to only be accessed by people renewing a specific type of membership.

We have found though, that it appears on a Google search and indeed a completely random person has signed up for the membership.

I have a Drupal Role for this membership type and also have a Group which we use as a mailing list; so would it be better to build it into a webform controlled by Access Control?

# Answer
> 0 votes
Idea for a possible workaround:

* Create a group and role for the non-eligible users
* Set up a Drupal block that only shows on this page and only for this role
* put no visible content in the block, but create some JavaScript functionality to prevent non-eligible users to access the form

---
Tags: civicontribute, civimember
---


title: Event Reporting

text:
# Question
Title: Event Reporting
I am trying to create an Event Report using the Event Summary template. What I need is a summary based on the fee level. I see the fee label, but not the fee level. Is there any report out there using this field? If not I see where I can create a custom php and template file. I did create that, but I am having an issue figuring out how/where to add the code to get the fee level. Any help would be greatly appreciated!

# Answer
> 1 votes
There are a couple of extensions you can check out that offer more advanced reporting on fee levels:

Eileen's extended reports: https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport

Line item report extension: https://civicrm.org/blogs/jproffitt/announcing-the-line-item-report-extension

I hope these are helpful?

---
Tags: civievent, civireport
---


title: Is CiviCRM 4.6.x compatible with PHP 7?

text:
# Question
Title: Is CiviCRM 4.6.x compatible with PHP 7?
Is CiviCRM 4.6.x compatible with newer version of PHP, 7?

# Answer
> 5 votes
No, it is planned for 4.8, but could use some help (with funding or investigating issues).

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

# Answer
> 0 votes
It is possible to help to identify the to-do's for CiviCRM to become php7 compatible in question: What are the minimum and recommended changes to CiviCRM to support PHP 7?

Please do so, so at least an initial scope will become clear.

---
Tags: php, compatiblity, php7
---


# Question
Title: Group Type is set to empty while updating Group
On ManageGroup page, if group description is updated or if I enable/disable group, the value of GroupType gets updated to an empty value. Ideally, GroupType value must not be updated, it should retain its original value.

# Answer
This isn't a question, it's a bug report ;)

For bug reports, could you use jira, ideally with a patch to fix the behaviour.
> 1 votes

---
Tags: groups
---


# Question
Title: How to pass custom variables to BillingBlock.tpl?
I found that the `BillingBlock.tpl` is included in `Main.tpl` file and all the variables are assigned to this templates using `Main.php` file. I can hardcode the variable there but I am worried about if there is another core update. So I am trying to override the `Main.php` file from my custom extension but it's not happening.

My question is how do I override the `Main.php` file in civicrm from custom extension ( custom payment processor ) or if there is other method built in civicrm with which I can pass variable to `Main.tpl` or `BillingBlock.tpl`.

P.S. I followed the same directory structure as of core.

```
customextension
├── CRM
   └── Contribute
       └── Form
           └── Contribution
               └── Main.php

```

# Answer
To Override Main.tpl file - you can try using Main.extra.tpl which should work

But Please try using - custom File - because if you are overriding the same file in some other extension it might not work sometime

```
function hook_civicrm_buildForm($formName, &$form) {
$templatePath = realpath(dirname(__FILE__)."/templates");
CRM_Core_Region::instance('billing-block')->add(array(
    'template' => "{$templatePath}/custom/custom.tpl",
));
}

```

and add your coding in the custom.tpl

Also please note that for billing address all the fields are hard coded in the core also same for validation -

If you need more help please let me know - thanks
> 1 votes

---
Tags: extension, payment-processor
---


# Question
Title: REST API - how to write new options for a custom field with select type?
Using the contact - getoptions method you can read the list of options for a custom field with select type.

> /civicrm/civicrm/extern/rest.php?entity=Contact&action=getoptions&api\_key=userkey&key=sitekey&json={"sequential":1,"field":"custom\_5"}

But how can I create new options using the API?

# Answer
Use CustomField - get method to get data for the select custom field who's options you want to edit. Note down the "option\_group\_id" value.

Then use the OptionGroup and OptionValue API methods with the Option Group you just noted. With this you can add new options.
> 1 votes

# Answer
As james mentioned, it's entity=optionvalue and action=create

However, as opposed as what you shared for the getoption, it isn't possible to have the values you want to create as a get parameter, they have to be in post (for security reasons).

So the easiest is to use post for everything, it works and avoid the issue of knowing if it's a destructive operation or not that you want to perform in the api.

and depending of the language you use, we might already have a wrapper that hide all these details and take care of calling the right url with the right params
> 0 votes

---
Tags: api, custom-fields
---


# Question
Title: Fatal error when exporting accounting batch to CSV in 4.7
Using Civi 4.7.2 (and then on 4.7.3; I thought I needed to upgrade to fix) with Drupal, I get the following error when I try to export an accounting batch to CSV:

> Fatal error: Call to undefined method CRM\_Financial\_BAO\_ExportFormat\_CSV::exportACCNT() in C:\xampp\htdocs\test\sites\all\modules\contrib\civicrm\CRM\Financial\BAO\ExportFormat\CSV.php on line 68

I then tried both the Drupal and Wordpress 4.7 demos from demo.civicrm.org. I added three of the demo contributions to a new batch and tried to export to CSV. Both the Drupal and Wordpress demos white-screened.

I tried the Drupal 4.6 demo at d46.demo.civicrm.org and it successfully exported the CSV.

Did something happen between 4.6 and 4.7 for this function? Is this a bug that needs to be reported at https://issues.civicrm.org?

# Answer
It was indeed a bug (filed here: issues.civicrm.org/jira/browse/CRM-18169). This will be corrected in Civi 4.7.4 by this pull request: https://github.com/civicrm/civicrm-core/pull/7942
> 0 votes

---
Tags: issues, export, accounting, batches
---


# Question
Title: Membership signup/renewal erroneously reports missing fields after upgrade to 4.7.3
Recently upraded to CiviCRM 4.7.3 on this site: http://oaem.ca/

After the upgrade, the membership signup and renewal process is broken in the following way.

The signup/renewal form at https://oaem.ca/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1 now includes an additional "Organization Details" form, which is not set in any profile, and which is not wanted. It appears to conflict with the membership data that I want to collect, and which is collected using a custom contribution profile.

Filling in both forms appears to work at first, but when the user reaches the confirmation page, they see this report:

```
Please correct the following errors in the form fields below:
Organization Name is a required field.
Phone (Main) is a required field.
Email (Main) is a required field.
Street Address is a required field.
City is a required field.
Postal Code is a required field.
Country is a required field.
State/Province is a required field.

```

So the additional data on the 1st screen does not get passed to the final screen.

This persists even if I switch off the the custom profile form in an attempt to use the 'default' form which is being added.

This is what the screen used to look like (compare with current page)

Any suggestions as to what is wrong and how to fix it very gratefully received.

# Answer
> 1 votes
This may all be stuff you already know.

If you have a look on the Title and Settings for that page eg

civicrm/admin/contribute/settings?reset=1&action=update&id=1

you should see that you have 'allow individuals to contribute 'on behalf of' an organisation' ticked. And below that it should specify the Organisation profile in use. You can either Edit it via that page, or go direct to Profiles.

NOTE: at civicrm/admin/uf/group?reset=1 it may be on the Reserved Profiles tab, which might be why you aren't seeing it.

on the page at https://oaem.ca/civicrm/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=1 I do not see the 'on behalf of' checkbox which I do see on your old screenshot - is that because you have now made it required?

---
Tags: civicontribute, civimember, custom-fields
---


# Question
Title: Can a person inside a group be granted ACL Access to the group?
I've been trying to set up ACL's for a number of different chapters in a national organization's civicrm. The idea is that the secretary for each chapter would be able to access members in that chapter and update their information.

So I 1.) Keep track of who is a member in the chapter through relationships between the members and the organization contact record for the chapter. 2.)Created a smart-group that generates a list of members who have an active relationship with the organization's contact. 3.) Created an ACL group and added the chapter's secretary 4.) Created an ACL Role for the Chapter 5.) Assigned the ACL group for the chapter to it's ACL role. 6.) Created several rules (view the group (which in this case is the smart-group based on the relationships), edit the group, edit custom fields)

However whenever I login as the secretary for that chapter, I am unable to view the members of the chapter, or my own civicrm contact page.

When I do the same with a 'test' login, it works.

I suspect that there is something weird happening because the contact for the chapter's secretary is in the smart-group that I am assigning them to have these ACL rules over.

Has anyone else had this problem? Am I just doing it wrong, or is this some kind of bug?

Thanks, Matt.

# Answer
> 1 votes
Ah, ok. So I had to enable the " CiviCRM: view my contact" and "CiviCRM: edit my contact" fields under Drupal People -\> Permissions. Then if they are in the smart group I'm giving access to, they can see themselves.

# Answer
> 0 votes
In case you need to find an alternative recipe, this one is based on Relationships so does not involve making ACL Groups.

Download the Permissioned Relationships extension (and read instructions about its dependency on CiviCRM Entity Settings).

When the above extensions are enabled, on any Relationship Type you should now see a new field saying Always Permission A to B (and vv). And at civicrm/admin/setting/misc?reset=1 you should see an option for 'Allow second-degree relationship permissions' (ie so A can see B, and if B can see C, D and E, then A can see C, D and E).

Make a Relationship Type xxx and set it to be 'always permissioned.

Make a CMS role that does not have "view/edit ALL contacts"

Give Joh that role, and set him as a 'xxx of' for MYORG, and set MYCO as a permissioned relationship of 'yyy' for Mary and Bob and Jane.

Then John will be able to only see Mary and Bob and Jane, and not other contacts who do not have that relationship to MYCO

---
Tags: smartgroups, acl
---


# Question
Title: Can't make new profiles, or edit settings
When I try to create a new civicrm profile, or to edit the setting of an existing one, there is just a blank space with no buttons or fields. See the attached screenshots. I'm using civicrm 4.6.10 and Drupal 7.41

# Answer
One of my groups' other tech people figured out that it was the file permissions in the CiviCRM template\_c and ConfigAndLog directories. Weird.
> 0 votes

# Answer
I have tested the same against CiviCRM Version 4.6.10 and it works perfectly. So please try to reinstall CiviCRM or try to install an fresh copy of CiviCRM and do the testing - Thanks
> 0 votes

# Answer
There are a few things you can try, most of which are detailed here: Troubleshooting JavaScript in CiviCRM. Please update your questions with what you've tried if you still need help!

Also, please edit your question to specify your CMS. Try switching your CMS's theme to Bartik (for Drupal) or twentyfifteen (for Wordpress). Does this change the behavior?

Finally - please check your CiviCRM logs and PHP logs. If you post your CMS version and web server software, someone can help you find them.

UPDATE: Now we're getting somewhere! $.browser is a major clue. CiviCRM doesn't use $.browser (it's deprecated, and removed as of jQuery 1.9). So my guess is another module. Are you running the "jQuery Update" Drupal module? If so, set it to a version \< 1.9 and see if it fixes the problem. You might also want to find the module that's calling this outdated jQuery construct and see if you actually need it. You can search your codebase for "$.browser", or just shut off all your non-core extensions and turn half of them on at a time until you've figured out which one causes the error.
> 0 votes

---
Tags: profile
---


# Question
Title: Is there an easy way to increase the width of the list of options for a custom field in the pull down?
We have a custom field that has a number of options. The descriptions of a few of them are long and wrap funny in the pull down, which, sigh, apparently is confusing to some people. Is there an easy change the width of this pull down?

# Answer
Well, I ended up needing to figure this out. So in a file mysite.css I put this:

```
#select2-drop {width: 350px !important;}

```

Then in Administer =\> System Settings =\> Resource URL, I put the path and file name the file in the Custom css URL. (All the other places to put URLs on the page want just a directory. Custom css URL also needs the file name.)
> 2 votes

---
Tags: custom-fields
---


title: Reporting Drupal 8 Bugs

text:
# Question
Title: Reporting Drupal 8 Bugs
Are we at a stage where we can be reporting Drupal 8 bugs?

If so, where should they go? Should they go on the Jira somewhere, or maybe a mailing list?

# Answer
> 3 votes
i think the current approach is via JIRA - you can see the existing list here

https://issues.civicrm.org/jira/browse/CRM-17652?filter=23012

If you add new ones label them drupal-8

---
Tags: drupal-8
---


# Question
Title: Is there an update safe way to disable smarty security in templates for CiviMail?
I'm using CiviCRM 4.6.14 and I want to write a Template for CiviMail using the smarty templating engine.
I need to add some PHP code to that template, but obvious the security setting is set to true for CiviMail so I get errors.
My temporary solution is to change the settings in the file "Smarty.class.php", but that file will be overwritten at the next update.
So is there a way, to disable the security setting in the template or any other update safe way, to disable that setting?

Thanx in advance

# Answer
> 1 votes
It was hard to finish reading all of your post due to the sirens that go off in my head whenever someone talks about disabling security settings.

Nevertheless, is there really something here that you can't do with a token or a hook? Please could you describe your use case a bit more?

In general, the update safe way is to overwrite core files in a custom templates extension - put it in sites/default/files/civicrm, next to extensions. (That path assumes Drupal, it'll be different in Joomla. You will need to update your resources folder in the Administer menu.

Once you've done that make sure to replicate the folder path in the templates folder. You will likely need to update this file on each CiviCRM update as part of the update procedure (if it changes in core that is).

Good luck!

---
Tags: civimail, security, smarty
---


# Question
Title: Is membership by relationship charged for?
I've created an organisation membership and set a cost. I've also made a relationship so employees inherit that relationship. I can't find out anywhere if someone inherits that membership are they also charged?

# Answer
As far as I'm aware only the organisation is charged but the employees are able to receive the benefits of membership. The employees don't get charged separately for that membership.

You can find more information about membership in the book: Defining memberships
> 3 votes

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


title: Page Load Slow Due to JS Issues

text:
# Question
Title: Page Load Slow Due to JS Issues
I am using CiviCRM 4.7.3 on Joomla 3.4.8. I have noticed when going to the user dashboard that it is taking 30-45 secs to load that page. All other pages are loading in less than 3 secs. To explore the issue, I used Firefox with FireBug to see the Net loading. I found that nearly 50 items are listed as shown in the picture. These items only show when going to a CiviCRM related page. Any help would be most appreciated. Thanks!

# Answer
> 4 votes
I found the solution. I needed to manually set the URL Resources paths. Although it had the variable set during setup, it was not the absolute path.

---
Tags: civimember
---


# Question
Title: Dedupe rule for organization always firing on membership signup form
Our unsupervised rule for organizations is Organization name with a weight of 10 and the Postal Code length of 3 with a weight of 10 and a weight threshold of 20. We wanted to test behavior on a Membership signup form with the 'On behalf of my organization' option. For the organization data section, we entered different organizations with the same organization name but different postal codes first 3 characters and different emails. Everytime the organization data was updated. We thought it was supposed to recognize they were separate organizations create new records but it didn't.

We looked around and listened many times to the Civiteacher tutorials on dupes but it looks we are missing something.

In our project we have teachers buying reading clubs memberships for their classes on behalf of a school. It does occur that accross Canada we have different schools with the same name, but their postal code will differ. In that case we want to have different organization records created when people use the membership sign up form.

Are there references around that could explain what we are not understanding well or doing wrong?

Using CiviCRM 4.7.1 with Drupal 7.

# Answer
> 0 votes
@benoit.dubuc can you please test by applying patch from https://github.com/JMAConsulting/civicrm-core/commit/2eeb15fc142355f6e64e3b156f3e78e2e252b37e

# Answer
> 2 votes
@benoit.dubuc as discussed on phone you've identified a bug. I've replicated this and created an issue for it https://issues.civicrm.org/jira/browse/CRM-18163. Thanks for offering to fund fixing it and creating an automated test to ensure it doesn't reappear.

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


# Question
Title: Settings values not showing up. Cache issue?
I am experiencing a strange issue with my CiviCRM (4.7.3) installation on Joomla (3.4.8) with MySQLi 5.6.28-76.1-log and PHP 5.6.18.

If I change some of the settings in one of the administration pages, they are correctly updated on the database, but if I get back to that page I don't see the setting anymore. It seems like values for the settings pages are not retrieved correctly from the database.

It's seems like a cache problem, but I've tried to clean the followings to not avail: \- browser cache (tried different browsers as well) \- joomla cache \- siteground supercacher

Problem still there. Any ideas?

First screenshot is from a working CiviCRM installation (http://sandbox.joomla.civicrm.org/). If you check any of the settings pages (ie. Administer \> Localization \> Languages, Currency, Locations) you can see that the options have values according to what is in the database. Radio buttons are correctly valorised. If you change the option, save and get back to the page you can see the option you choose. This is the normal behaviour.

Second screenshot is from our CiviCRM installation (http://omphalospg.org/). If you check any of the settings pages (ie. Administer \> Localization \> Languages, Currency, Locations) you can see that some of the options don’t have values according to what is in the database. Radio buttons in particular are not correctly valorised. If you change the option, save and get back to the page you cannot see the option you choose, even though the option is correctly saved in the database. This is not a correct behaviour.

# Answer
> 2 votes
I reviewed the problem carefully and found that it is caused by the jSGCache plugin that comes preinstalled on all Joomla sites installed via Softaculous. When the plugin is enabled, it adds a special cookie to to prevent caching the admin panel. This seems to conflict with CiviCRM and results in the problem you reported.

---
Tags: database, settings, administer
---


title: Settings values not showing

text:
# Question
Title: Settings values not showing
I am experiencing a strange issue with my CiviCRM (4.7.3) installation on Joomla (3.4.8).

If I change some of the settings in one of the administration pages, they are correctly updated on the database, but if I get back to that page I don't see the setting anymore.

It seems like values for the settings pages are not retrieved correctly from the database.

Any ideas?

# Answer
> 2 votes
I reviewed the problem carefully and found that it is caused by the jSGCache plugin that comes preinstalled on all Joomla sites installed via Softaculous. When the plugin is enabled, it adds a special cookie to to prevent caching the admin panel. This seems to conflict with CiviCRM and results in the problem you reported.

# Answer
> 2 votes
Could be that the setting is being cached - I've seen this happen on previous versions. Do you have memcached set up? You can normally wait for memcached to refresh, or manually restart it via the command line - 'service memcached restart', on ours.

# Answer
> 1 votes
I wonder if this is a browser cache issue. Also, does Joomla! cache? If so, try clearing that.

---
Tags: database, settings
---


title: Merging case types in CiviCase

text:
# Question
Title: Merging case types in CiviCase
I would like to consolidate the case types that I have created for CiviCase.

Is there a way to merge two or more case types into a broader category so that the cases once assigned to these more narrow case types can assume the new, broader case type?

# Answer
> 3 votes
I don't think there's a way in the user interface but if you're comfortable with directly accessing the database and don't need to update any timelines/activities you can do something like:

```
UPDATE civicrm_case SET case_type_id = CONCAT(CHAR(1), '8', CHAR(1)) WHERE case_type_id = CONCAT(CHAR(1), '1', CHAR(1));

```

This would take the ones who have case type 1 and convert them to 8. You'd have to look and see what the existing numbers are:

```
select ov.label, ov.value from civicrm_option_group og inner join civicrm_option_value ov on (ov.option_group_id = og.id and og.name = 'case_type');

```

And of course do this on a test site first, and make a backup.

---
Tags: civicase
---


title: Were they a member last year?

text:
# Question
Title: Were they a member last year?
We are trying to come up with some reports that show retention rates over the years. I had thought that I would be able to do a include/exclude search where I include members from 2015 and exclude members from 2016 to show who had dropped out, but the 2015 members are problematic. For example, we have a member who joined in 2012, and did not renew until 2016. With a start date of 1/1/2012 and an end date of 12/31/2016, there is no data point which shows whether they were an actual member in 2015. In addition, many of our memberships are free, so there is no transaction to query.

Any idea how to do this?

# Answer
Memberships have three primary dates, the join date (member since), start date and end date. The join date is the date the contact first signed up for a membership with your organisation. Unless it is altered manually it will never change from that first value. The start date is the date the current continuous period of membership began. The end date is the last day of the current membership.

Examples for a 12 month membership:

* Mary joined on 1/1/2011 and has always paid her annual membership fees when they are due She will have a **member since** date of 1/1/2011 and a **start date** of 1/1/2011 as she has been continuously financial since 1/1/2011.
* Peter joined on 1/1/2011. At the end of 2011 he let his membership lapse. He rejoined on 1/1/2014 and has paid his membership fess regularly since then when they are due. He will have a **member since** date of 1/1/2011 but a **start date** of 1/1/2014 as he has been continuously financial only since 1/1/2014.

So your member who joined in 2012 (presumably for 1 year) but didn't renew until 2016 should have **member since** = 1/1/2012 and **start date** = 1/1/2016.

The exact search filters you need to use depend on the duration of your memberships, whether they are fixed or rolling (rolling makes it much more difficult) and what hapens if they join on, say, 1 October rather than on 1 January.

Assuming a fixed 12 month membership that always start on 1 January you can find all **contacts** who joined previously, are currently financial(2016) but weren't financial last year (2015) by using Advanced Search with membership filters: \- **member since** "To" date of 1/1/2014 (no need to set "From" date) \- **start date** "From" date of 1/1/2016 (no need to set "To" date)

This won't work if you have modified the membership settings somehow (perhaps by setting **member = yes** for the expired membership status), or if this is a new CiviCMR install and the old membership data wasn't imported correctly.
> 7 votes

# Answer
This data for each individual membership purchase is stored in the `civicrm_membership_log` table - which I don't think is exposed by any of the CiviCRM UI. My recollection is that you're a coder - so you should be able to query that table, instead of `civicrm_membership`, which is what the CiviCRM UI uses.
> 3 votes

---
Tags: civimember, search, reports
---


# Question
Title: Including discount codes in membership imports
We offer a discounted membership to graduates of affiliated training programmes - to minimise the processing work, the course administrator fills out a template spreadsheet and sends it to us, and deposits the fees in bulk. We tidy the file, save it as csv then run a contacts import followed by a member import.

Although we initially used a separate membership type with a lower fee, the problem of having to manually change membership type after one year led us to switch to applying standard individual memberships and creating a discount code.

However, I can't find discount code anywhere in the field matching for either membership or contributions imports. How can I apply the discount so that contribution records do not show the full price?

# Answer
> 3 votes
I am not sure why you need to import a discount code. A discount code is needed for online transactions so that civi knows to charge a reduced price yet still create a membership. Here the transaction has already taken place offline.

Import the contributions for the actual amount paid, with a contributions source of, say, Student (or student discounted price if you think you might forget the student price was discounted). Then import the memberships. There is no link between contributions and memberships when they are both imported, so the membership "won't care" how much money was paid for it.

---
Tags: civimember, import, cividiscount
---


title: Unable to download CiviCRM

text:
# Question
Title: Unable to download CiviCRM
Unable to download from site http://www.civicrmfr.org/

"The requested URL /civicrm-{{stable}}-joomla.tar.gz was not found on this server."

But OK on Sourceforge. Cheers.

# Answer
I would suggest that you download CiviCRM from the official download page:

https://civicrm.org/download
> 2 votes

---
Tags: error, installation
---