# Question
Title: Membership Expiry Date not advancing after membership payments
I have a page where the membership payment and different contribution amounts are displayed through a price set to collect member dues for one month.

I was using civicrm 4.0.5 previously and now I am using civicrm 4.7.17

Everything worked perfectly fine on civicrm 4.0.5.

However, in civicrm 4.7.17, after the payments are made the Membership expiry dates do not advance.

So I wrote my own code to advance the membership expiry date to the last day of the next month. Here is the code:

```
//get the membership dates for the cid
  $membership_get_params = array(
    'version' => 3,
    //specify the membership type id
    'membership_type_id' => $membership_type_id,
    'contact_id' => $objectRef->contact_id,
    'filters' => array(
      'is_current' => 1,
    ),
  );
  require_once 'api/api.php';
  $membership_get_result = civicrm_api( 'membership','get',$membership_get_params);
  $membership_get_result = $membership_get_result['values'][$membership_get_result['id']];

  // Find date of next month
  $end_date = $membership_get_result['end_date'];
  $end_date_array = explode('-', $end_date);
  $year = $end_date_array[0];
  $month = $end_date_array[1];
  $day = $end_date_array[2];
  if (in_array($objectRef->contribution_page_id, $one_month_contribution_page_ids)) {
    $next_month = $month + 1;
  }

  if ($next_month > 12) {
    $year = $year + 1;
    $next_month = $next_month - 12;// Get next month if payment for member dues goes beyond the current year
  }
  $date = $year . '-' . $next_month . '-1';
  $next_month_end_date = new DateTime($date);
  $next_month_end_date = $next_month_end_date->format( 'Y-m-t' );

  $excludeIsAdmin = false;

  $calcStatus = CRM_Member_BAO_MembershipStatus::getMembershipStatusByDate( $membership_get_result['start_date'], $membership_get_result['end_date'], $membership_get_resul\

```

t\['join\_date'\], 'today', $excludeIsAdmin );

```
  // Save expiry date for membership for contact
  $membership_create_params = array(
    'id' => $membership_get_result['id'],
    'contact_id' => $objectRef->contact_id,
    'membership_type_id' => $membership_type_id,
    'start_date' => $membership_get_result['start_date'],
    'join_date' => $membership_get_result['join_date'],
    'end_date' => $next_month_end_date,
    'status_id' => $calcStatus['id'],
    'version' => 3,
  );

  Logger::debug_var("membership_create_params", $membership_create_params);

  require_once 'api/api.php';
  $result = civicrm_api( 'membership', 'create', $membership_create_params );

```

Is this the optimal solution??

If not, please suggest.

Thanks in advance.

# Answer
Have you confirmed that the Scheduled Job which updates Membership Status is enabled. You have made a bit jump in civi versions and I don't think Scheduled Jobs was around in 4.0.x
> 0 votes

---
Tags: civimember
---


title: CiviBooking Installation

text:
# Question
Title: CiviBooking Installation
I have tried to load CiviBooking extension in the Demos. They install fine and are enabled, yet I cannot access anything that resembles elements of a booking extension.

# Answer
The problem is most likely that you need additions CMS permissions and won't be able to set them via the Demo sites.
> 1 votes

---
Tags: extension, civibooking
---


# Question
Title: premium gift reports not showing size ordered
we set up a premium gift ( a t-shirt) for a donation. now i can't find a report that tells me what size of t shirt they wanted. I have downloaded contribution reports but it's not there. need to know the size so i can mail them out

# Answer
There are a couple of extensions that give more detailed reporting on line items

One of these may be helpful
> 1 votes

# Answer
You can use the 'Contribution and Membership Details' report from the 'Membership Reports' section.

That lets you show the premium, premium option and fulfilment date although it does not allow you to filter on those values.
> 0 votes

---
Tags: reports
---


# Question
Title: Log / report for emails sent using Events > Find Participants?
I sent a dozen or so emails using Events \> Find Participants \> Email - Send now. At least some of them arrived successfully (recipients are responding), but I can't find a log or report in CiviCRM that can confirm that they were all sent. Is there one?

# Answer
> 1 votes
This new Transaction Mail extension that Fuzion published won't help your specific problem but would help in the future in as much as it would report back on Bounces for those.

---
Tags: civievent, email
---


# Question
Title: Use Email Templates instead of Automated Messages
Need your help...I'm trying to send a custom email automatically when a contact is created via the 'Sign Up' page...I'm using a profile in the page with 'Add To Email Group' enabled and I've also enabled the Double Opt-In to send an email back to the newly signed up contact....I see that the message comes from the Automated Messages section...I want to use an email template instead so that I can include the Contact information in the email...Is there any way I can do this?

# Answer
Have you looked at the CiviRules Extension?
> 0 votes

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


# Question
Title: CiviMail - Unable to select group, getting error of No recipients
After update from 4.7.23 to 4.7.24 Unable to select group, getting an error of No recipients, under Wordpress 4.8.1.

My steps: Create new mailing Mailings\>New Mailing The new mail opens. Click on Recipients, the dropdown is empty, no groups listed.

This no problem in WP demo site.

I've read a lot of similar bugs posts with no solutions. I have several mailing groups, I can manage in other places in CiviCRM.

With the update get some exception on my CiviCRM, caused by wrongly set permissions on files and folders (writable by groups).

This can be caused by other wrong permissions?

# Answer
> 1 votes
Because you update so frequently, it's easy to track down the potential issues. I see two relevant changes to CiviMail's recipient list: CRM-20521 and (maybe) CRM-21070.

In non-technical terms: Prior to Civi 4.7.24, all the mailing groups were loaded onto the mailing form when you selected "New Mailing". For sites with many groups, that made things slow. In 4.7.24+, the list is loaded after the page is loaded, in a more efficient way.

First, look at the screenshot on CRM-21070: Does your "Recipients" box look like this? If the box is present, but has no data, the issue is related to CRM-20521.

If this is caused by CRM-20521, then you have a JavaScript problem. That could be a bug, but more likely means your Resource URLs are incorrect. Please consult troubleshooting JavaScript in CiviCRM \- in particular, check your browser's dev tools Network/XHR tab for errors - and you should find your solution. If you find an error but you're not sure what to do, please edit this question with the errors you find.

# Answer
> 1 votes
I switched back to 4.7.23 to send mailings.

The problems not as in CRM-21070, the box exist. Maybe the Recipient.js not firing up.

Thanks for your help. If I have more time, I will update CiviCRM in next week, and update this post.

Another try, no success, but helped more to figure out more details. it is a CRM-20521 related. The field is filled by database query results, the query stops by DB error: Syntax error.

From my log:

Sep 24 16:54:34 \[info\] $Fatal Error Details = Array ( \[callback\] =\> Array ( \[0\] =\> CRM\_Core\_Error \[1\] =\> exceptionHandler )

```
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => REPLACE INTO       I_4041 (email_id, contact_id)

                SELECT      civicrm_email.id as email_id,
                                    civicrm_contact.id as contact_id
                FROM                civicrm_email
                INNER JOIN          civicrm_contact
                        ON          civicrm_email.contact_id = civicrm_contact.id
                INNER JOIN          civicrm_group_contact
                        ON          civicrm_contact.id = civicrm_group_contact.contact_id
                INNER JOIN          civicrm_mailing_group
                        ON          civicrm_group_contact.group_id = civicrm_mailing_group.entity_id
                            AND     civicrm_mailing_group.entity_table = 'civicrm_group'
                LEFT JOIN           X_4041
                        ON          civicrm_contact.id = X_4041.contact_id
                WHERE
                                   (civicrm_mailing_group.group_type = 'Include')
                    AND             civicrm_mailing_group.search_id IS NULL
                    AND             civicrm_group_contact.status = 'Added'
                    AND             civicrm_contact.do_not_email = 0
                    AND             civicrm_contact.is_opt_out = 0
                    AND             civicrm_contact.is_deceased <> 1
                    AND             (civicrm_email.location_type_id = )
                    AND             civicrm_email.email IS NOT NULL
                    AND             civicrm_email.email != ''
                    AND             civicrm_email.on_hold = 0
                    AND             civicrm_mailing_group.mailing_id = 549
                    AND             X_4041.contact_id IS null
                    GROUP BY civicrm_email.id, civicrm_contact.id
                ORDER BY civicrm_email.is_bulkmail, civicrm_email.is_primary [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
                    AND             civicrm_email.email IS NOT NULL
  ' at line 22]

```

In demo civicrm's no such errors.

---
Tags: civimail
---


# Question
Title: User to view/change own membership as well as address details etc
I want users to be able to login and see/change their address etc as well as at least see their membership type (one of four available) and preferably change the membership. I got the login sorted, I got the profile I want but when one meets the other this message: "Profile search, view and edit are not supported for Profiles which include fields for more than one record type."

How do I get around this? Or is it not possible for members to see/edit their membership type on CiviCRM?

On Wordpress btw.

Thanks

# Answer
1. Create a profile with all the information you want the user to edit. (I would not let a user change membership type, but as you wish.)
2. Create a new page on Wordpress - call it View Profile - or whatever you want. Then embed the CiviCRM shortcode by clicking the insert civicrm content button, choose profile, choose the profile, choose view, and don't over ride.
3. Create a new page on Wordpress - call it Edit Profile - or whatever you want. Then embed the CiviCRM shortcode by clicking the insert civicrm content button, choose profile, choose the profile, choose edit, and don't over ride.
4. Create links to those pages for users to access.

Optionally use the members plugin and restrict the content of those pages to only members or whatever configuration you want.
> 2 votes

# Answer
An alternative for letting users see their membership info (and contributions etc) is to give them access to their own Contact Dashboard. You can specify what should show on the Dashboard, eg Groups, Related Contacts as well
> 0 votes

---
Tags: civimember, profile
---


# Question
Title: Import – match to contact by email without creating duplicate email address
Is it possible to use the import function for contacts and match by email, without creating duplicate email addresses for existing contacts?

Example: We organize frequent webinars with participation in the hundreds per event. After the webinar is over, we import the email addresses of those who participated back from the webinar platform into CiviCRM, so that we can set their event status accordingly in CiviCRM. We don't have the CiviCRM IDs to import, so we need to do the matching by email. However, this seems to create a duplicate email record in matched contacts. This would not be much of an issue for the occasional import, but as many contacts have participated in dozens of webinars, they consequently also have dozens of email addresses in their CiviCRM record.

Do you know if there is a way around this when importing? Both "Update" and "Fill" has the same problem. With "Skip", it says it has added the imported contacts to a group, but in fact it hasn't...

Note: As our contacts will have different location types set for their primary email address, I am matching by primary address rather than a specific location type.

# Answer
As far as I understand, provided you are importing to the same Location Type then the match should occur without adding a new email address.
> 2 votes

---
Tags: import, duplicate-contacts, data-import
---


title: Online Walking List

text:
# Question
Title: Online Walking List
I am running a campaign for political office and the one thing we want to avoid is entering data after canvassing a neighborhood. What we want is to be able to have the same data that would be on a printed walking list available on the phone or a tablet. The volunteer should be able to update their entire interaction with the voter right from their phone or tablet and have it update the CiviCRM database.

Has anyone ever done this? How difficult would it be to customize something like this? Is there a plugin/add on available anywhere that already does this?

# Answer
> 2 votes
You can definitively do this; my favourite solution for this (on Drupal) is Webform CiviCRM; It will let your canvassers run through forms collecting data on the go; You can even sell Memberships or add people to an Event - or a Group; or a Relationship; a Donation; etc all on the go! And all into your CiviCRM live;

---
Tags: evaluating-civicrm, civicrm-home
---


# Question
Title: Cannot get the import of employer-employee relationship to work
I have successfully imported all my organisations and I'm now trying to import my contacts which are employees of these organisations. I've read the relevant sections in the CiviCRM cookbook and the CiviCRM online manual, but I can't get it to work.

I can import all contacts without a problem (around 3000 but have been playing and testing with just 10) but the relationship to the employer is never okay. Though i always checked "employee of" " organisation name match to contact".

\*I get this error too when importing: \*"Warning: explode() expects parameter 2 to be string, array given in CRM\_Contact\_Import\_Parser\_Contact-\>import() (line 854 of /home/kasomk/www/www/sites/all/modules/civicrm/CRM/Contact/Import/Parser/Contact.php)."\**

I've tried everything, been at it all (sun)day. So please help me! Who has a comprehensive step by step guido on how to import relations? Which fields need to be imported on which import, which duplicate checking should I do and how can i successfully import the relationships?

Kind regards Stefan

# Answer
> 1 votes
Stefan - in order to rule out it being a bug with your set up I would recommend you take an equivalent file and test on the Demo Site.

I just created a file with 3 cells

Peter | Davis | Acme

I had already created Org = Acme in http://dmaster.demo.civicrm.org/

The import ran as expected.

Acme now has an 'employee' called peter Davis

---
Tags: import, relationships
---


# Question
Title: DB Error: syntax error when using custom profile to inut a new contact
I'm running CiviCRM LTS (4.6.31) on Drupal 7.56 and a MySQL DB.

i built a custom profile to simplify Contactcreation. Each time i add my custom tags to that form i get the DB Error: syntax error when saving a new contact. It'sstil created though. Contactcreation using der builtin form is working fine (even when setting tags)

This is the error from the drupla log:

```
$Fatal error details = ARRAY ( [callback] => ARRAY ( [0] => crm_core_error [1] => handle ) [code] => -2 [message] => db error: syntax error [MODE] => 16 [debug_info] =>
                              SELECT    contact_a.id                                           AS contact_id,
                                        contact_a.gender_id                                    AS `gender_id`,
                                        contact_a.first_name                                   AS `first_name`,
                                        contact_a.last_name                                    AS `last_name`,
                                        civicrm_note.id                                        AS note_id,
                                        civicrm_note.note                                      AS `note`,
                                        `1-location_type`.id                                   AS `1-location_type_id`,
                                        `1-location_type`.name                                 AS `1-location_type`,
                                        `1-email`.id                                           AS `1-email_id`,
                                        `1-email`.email                                        AS `1-email`,
                                        `1-phone`.id                                           AS `1-phone_id`,
                                        IF ( `1-phone`.is_primary = 1, `1-phone`.phone, NULL ) AS `1-phone`,
                                        `1-address`.id                                         AS `1-address_id`,
                                        `1-address`.state_province_id                          AS `1-state_province_id`,
                                        `1-address`.street_address                             AS `1-street_address`,
                                        `1-address`.postal_code                                AS `1-postal_code`,
                                        `1-address`.city                                       AS `1-city`,
                                        `website--url`.id                                      AS `website--url_id`,
                                        `website--url`.url                                     AS `website--url`,
                                        `website--url`.website_type_id                         AS `website--website_type_id`
                              FROM      civicrm_contact contact_a
                              left join civicrm_address `1-address`
                              ON        (
                                                  `1-address`.contact_id = contact_a.id
                                                  AND `1-address`.is_primary = 1 )
                              left join civicrm_email `1-email`
                              ON        contact_a.id = `1-email`.contact_id
                                        AND `1-email`.is_primary = 1
                              left join civicrm_phone `1-phone`
                              ON        contact_a.id = `1-phone`.contact_id
                              left join civicrm_location_type `1-location_type`
                              ON        ( (
                                                            `1-email`.location_type_id = `1-location_type`.id )
                                                  OR (
                                                            `1-phone`.location_type_id = `1-location_type`.id )
                                                  OR (
                                                            `1-address`.location_type_id = `1-location_type`.id ) )
                              left join civicrm_note
                              ON        (
                                                  civicrm_note.entity_table = 'civicrm_contact'
                                                  AND contact_a.id = civicrm_note.entity_id )
                              left join civicrm_website `website--url`
                              ON        (
                                                  `website--url`.contact_id = contact_a.id
                                                  AND `website--url`.website_type_id = )
                              WHERE     (
                                                  contact_a.id = '2968' )
                                        AND (
                                                  contact_a.is_deleted = 0 )
                              ORDER BY  `contact_a`.`sort_name` ASC,
                                        `contact_a`.`id` [nativecode = 1064 ** you have an error IN your SQL syntax;CHECK the MANUAL that corresponds TO your mysql server version FOR the right syntax TO USE near ') WHERE ( contact_a.id = '2968' ) AND (contact_a.is_deleted = 0) ORDER BY ' AT line 7] [TYPE] => db_error [user_info] =>
                            SELECT    contact_a.id                                           AS contact_id,
                                      contact_a.gender_id                                    AS `gender_id`,
                                      contact_a.first_name                                   AS `first_name`,
                                      contact_a.last_name                                    AS `last_name`,
                                      civicrm_note.id                                        AS note_id,
                                      civicrm_note.note                                      AS `note`,
                                      `1-location_type`.id                                   AS `1-location_type_id`,
                                      `1-location_type`.name                                 AS `1-location_type`,
                                      `1-email`.id                                           AS `1-email_id`,
                                      `1-email`.email                                        AS `1-email`,
                                      `1-phone`.id                                           AS `1-phone_id`,
                                      IF ( `1-phone`.is_primary = 1, `1-phone`.phone, NULL ) AS `1-phone`,
                                      `1-address`.id                                         AS `1-address_id`,
                                      `1-address`.state_province_id                          AS `1-state_province_id`,
                                      `1-address`.street_address                             AS `1-street_address`,
                                      `1-address`.postal_code                                AS `1-postal_code`,
                                      `1-address`.city                                       AS `1-city`,
                                      `website--url`.id                                      AS `website--url_id`,
                                      `website--url`.url                                     AS `website--url`,
                                      `website--url`.website_type_id                         AS `website--website_type_id`
                            FROM      civicrm_contact contact_a
                            left join civicrm_address `1-address`
                            ON        (
                                                `1-address`.contact_id = contact_a.id
                                                AND `1-address`.is_primary = 1 )
                            left join civicrm_email `1-email`
                            ON        contact_a.id = `1-email`.contact_id
                                      AND `1-email`.is_primary = 1
                            left join civicrm_phone `1-phone`
                            ON        contact_a.id = `1-phone`.contact_id
                            left join civicrm_location_type `1-location_type`
                            ON        ( (
                                                          `1-email`.location_type_id = `1-location_type`.id )
                                                OR (
                                                          `1-phone`.location_type_id = `1-location_type`.id )
                                                OR (
                                                          `1-address`.location_type_id = `1-location_type`.id ) )
                            left join civicrm_note
                            ON        (
                                                civicrm_note.entity_table = 'civicrm_contact'
                                                AND contact_a.id = civicrm_note.entity_id )
                            left join civicrm_website `website--url`
                            ON        (
                                                `website--url`.contact_id = contact_a.id
                                                AND `website--url`.website_type_id = )
                            WHERE     (
                                                contact_a.id = '2968' )
                                      AND (
                                                contact_a.is_deleted = 0 )
                            ORDER BY  `contact_a`.`sort_name` ASC,
                                      `contact_a`.`id` [nativecode = 1064 ** you have an error IN your SQL syntax;CHECK the MANUAL that corresponds TO your mysql server version FOR the right syntax TO USE near ') WHERE ( contact_a.id = '2968' ) AND (contact_a.is_deleted = 0) ORDER BY ' AT line 7] [to_string] => [db_error: MESSAGE = "DB Error: syntax error" code = -2 MODE = callback callback = crm_core_error::handle prefix = "" info = "SELECT contact_a.id as contact_id, contact_a.gender_id as `gender_id`, contact_a.first_name as `first_name`, contact_a.last_name as `last_name`, civicrm_note.id as note_id, civicrm_note.note as `note`, `1 - location_type`.id as `1 - location_type_id`, `1 - location_type`.name as `1 - location_type`, `1 - email`.id as `1 - email_id`, `1 - email`.email as `1 - email`, `1 - phone`.id as `1 - phone_id`, IF (`1 - phone`.is_primary = 1, `1 - phone`.phone, NULL) as `1 - phone`, `1 - address`.id as `1 - address_id`, `1 - address`.state_province_id as `1 - state_province_id`, `1 - address`.street_address as `1 - street_address`, `1 - address`.postal_code as `1 - postal_code`, `1 - address`.city as `1 - city`, `website--url`.id as `website--url_id`, `website--url`.url as `website--url`, `website--url`.website_type_id as `website--website_type_id` FROM civicrm_contact contact_a LEFT JOIN civicrm_address `1-address` ON (`1-address`.contact_id = contact_a.id AND `1-address`.is_primary = 1) LEFT JOIN civicrm_email `1-emai] )

```

Any ideas how to fix this?

Thx

# Answer
> 0 votes
You should test against the latest release (4.7.24) - it is likely fixed there

# Answer
> 1 votes
This seems to be related to an incorrect `website` join in the query. Is there any `website field` in your custom profile?

If yes, you can try disabling/deleting it and check if you still find an issue.

You can also raise a bug in JIRA with some info of replicating the same.

---
Tags: profile, tags, lts
---


# Question
Title: How to disable Drupal's module update check for CiviCRM?
A previous question asked about the "No available releases found" warning that Drupal shows in the Modules Update page. An answer said that this is caused by the fact that CiviCRM doesn't use Drupal's release infrastructure.

Previous thread

In any case, Drupal still emails me with the warning that "There was a problem checking available updates for your modules or themes."

Given that I like my sites to run without errors, the OCD part of me cringes at this. How might I correct this so that Drupal and I are happy?

Thanks.

# Answer
> 4 votes
There are a few options:

* CiviCRM could use Drupal's infrastructure to ship CiviCRM downloads. Current CiviCRM / Drupal development process prevents this, and that's a much bigger topic and best discussed outside of this SO question!
* CiviCRM could somehow suppress the update notifications from the Drupal update status page. This would hide the warning, but arguably be a worse outcome. I don't think this would deliver what you want.
* CiviCRM could supply a project feed to match the existing Drupal.org infrastructure, so that Drupal can check that alternate feed URL for updates.

IMO the last option is the best balance of outcomes - it could provide accurate update notifications to Drupal-oriented administrators who might not see the in-app warnings in CiviCRM. There's a JIRA proposing this over at CRM-15769.

---
Tags: drupal
---


# Question
Title: How to add a column in a membership report for a secondary email?
I need to run a report which has a column for a secondary email.

# Answer
Which CMS are you using? If Drupal, then one approach might be to use Views instead of CiviReport. See Selecting location type or multiple email/phone fields in Reports.
> 1 votes

---
Tags: civireport, email, column
---


# Question
Title: How to style contribution and event registration pages?
I want to style totally different a contribution page, not even having the general website header, no left menu with the login, nothing. Just to use its functionality, but create new html for an event registration form, or for a contribution page.

# Answer
One approach in Drupal would be the ThemeKey \+ ThemeKey CiviCRM modules. There's a Drupal 7 version of ThemeKey CiviCRM. This allows you to use a different theme for specified Civi pages. So you could create a minimal theme and use that for the desired pages.
> 2 votes

---
Tags: civievent, civicontribute
---


# Question
Title: Where do I find the saved filed mapping I saved in Step 3 of 3 when saving export of participants list?
In Find Participants I have selected the fields I would like to export At Step 3 of £ to give the options to Save the Mapping with a Name and Description which I have done and suggests "If you want to use the same export setup in the future, check 'Save this field mapping' at the bottom of the page before continuing. You will then be able to reload this setup with a single click" But where do I now find this saved mapping to run this again? Sorry very new to CIVICRM and not a techie

# Answer
The next time you export participants, on step 2 of 3 choose "Select fields for export". A drop-down list should appear, labelled "Use Saved Field Mapping", where you can select the mapping that you previously saved.
> 2 votes

---
Tags: civievent
---


# Question
Title: Unable to enable CiviCase - Definer v Invoker problem maybe
Drupal 7, Civi 4.7.24 \*******Updated at bottom\*********

I am unable to enable CiviCase. All other civi components are enabled. I was running 4.7.21 and attempted to enable it and got the following error:

```
CiviCRM_API3_Exception: "A fatal error was triggered: Could not create the MySQL views for CiviCase. Your mysql user needs to have the 'CREATE VIEW' permission"

#0 /www/www/sites/all/modules/civicrm/CRM/Admin/Form/Setting.php(200): civicrm_api3("setting", "create", (Array:1))
#1 /www/www/sites/all/modules/civicrm/CRM/Admin/Form/Setting/Component.php(111): CRM_Admin_Form_Setting->commonProcess((Array:3))
#2 /www/www/sites/all/modules/civicrm/CRM/Core/Form.php(447): CRM_Admin_Form_Setting_Component->postProcess()
#3 /www/www/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#4 /www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Setting_Component), "next", "Next")
#5 /www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Setting_Component), "next")
#6 /www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Setting_Component), "next")
#7 /www/www/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
#8 /www/www/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#9 /www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(284): CRM_Utils_Wrapper->run("CRM_Admin_Form_Setting_Component", "Enable CiviCRM Components", NULL)
#10 /www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#11 /www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#12 /www/www/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#13 [internal function](): civicrm_invoke("admin", "setting", "component")
#14 /www/www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#15 /www/www/index.php(21): menu_execute_active_handler()
#16 {main}

Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
A fatal error was triggered: Could not create the MySQL views for CiviCase. Your mysql user needs to have the 'CREATE VIEW' permission

```

I have verified that the user does have all the privileges. I'm hosted with CiviHosting and I asked Hershel to check it. He found the following:

```
There indeed appears to be a problem with CiviCRM. We edited the code briefly to determine
the precise error and the message CiviCRM gives is indeed not precise. The View in
question was created, but it's not usable. When we run this query:

SELECT count(id) FROM civicrm_view_case_activity_upcoming LIMIT 0, 25

MySQL gives this error:

 #1356 - View 'saintfran_civicrm.civicrm_view_case_activity_upcoming' references invalid
table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

which is more complicated and does point to a possible bug in CiviCRM. Not sure offhand
how to fix this, but one idea would be to manually remove the View, upgrade CiviCRM and
try again.

```

So I deleted the View, upgraded, and attempted to enable again with the same result. Any others have this issue or know how I might go about fixing it?

\****UPDATE: I investigated the actual view in phpmyadmin. I copied the SQL code and just ran it directly and it worked without error. So I went back to the view and Experimented by changing the SQL Security field to INVOKER instead of DEFINER. The view ran without error. I went back and tried to enable CiviCase but got the same error. Checked the view and it had changed the SQL Security back to DEFINER. I have no idea what the DEFINER/INVOKER does or the implications but that seems to be the issue. Where in Civi Code does it create this view and do a check when enabling the civicase component?

# Answer
So the issue was not with CiviCRM it was with a security issue with MySQL. Here is the response from the hosting provider.

The issue is caused by some specifics how the MySQL privilege system works. In MySQL a user account consists of both the user name and a host definition component. Access to databases can also be restricted to specific hostnames.

The problem is that remote connections are enabled for the saintfran user to the saintfran\_drupal database. Therefore, the user is stored as `saintfran`@`%` (% is a wildcard for all hostnames). This is also how the VIEW was created:

CREATE ALGORITHM=UNDEFINED DEFINER=`saintfran`@`%`

However, remote connections are not enabled for the saintfran\_civicrm database. Access to this database is only allowed from localhost. Therefore, only VIEWS with saintfran@localhost as definer can be executed. Unfortunately, the wildcard does not work in this case.

There are several solutions:

1) We recommend the one you have already found - use INVOKER instead of DEFINER. 2) Make sure that the user has no remote connections enabled when creating the VIEW. 3) Enable remote connections for the saintfran\_civicrm database.
> 2 votes

---
Tags: civicase, error
---


# Question
Title: Can't find HTML Snippet in Profiles (Joomla)
I'm trying to add a newsletter sign-up form to an external\* (Joomla) website. The guidance I've found online says that I should go to Customize » CiviCRM Profile, then click 'More' on right and select 'HTML Form Snippet', but it isn't there.

Does anybody know where it is?

\*The CiviCRM installation is under a different Joomla site to the public one where the form's going.

# Answer
You need to enable remote profiles. **Administer menu » System Settings » Misc**. Unfortunately, from your screenshot I see that you're running Civi 4.7.14. That version has a known bug, where remote profile setting can't be changed.

I would recommend upgrading to the latest 4.7 (this is a good idea anyway; 4.7.14 has known security bugs), then enable remote profile submission.
> 0 votes

---
Tags: profile, joomla, newsletter, form-snippets
---


# Question
Title: How can I customise the presentation of custom field in events?
I want to have some additional data as part of my CiviCRM events, that is structured and available to Drupal Views, so I've added a couple of custom fields for Events, and I'm using those. On the public facing event information page, the default rendering of these fields is the same as in the back office, and so they look pretty out of place.

If I edit the EventInfo.tpl file it looks like it is simply pulling in the custom data with the line (line 225 in CiviCRM 4.7.24)

```
    {include file="CRM/Custom/Page/CustomDataView.tpl"}

```

I'm assuming that if I edit/override that template file it may well affect the presentation of all custom data fields right across CiviCRM.

So I guess the question is: what's the optimal way to modify the way that just these two custom fields are presented on the public facing event information page without impacting on other custom field presentation elsewhere?

As a linked supplementary question, one of these custom fields is for an event image that I can then present via a Drupal View (all my events have an image associated, and although I can of course simply include one inline through the event description field I can't subsequently access that file in Drupal Views and display itinerary a block, for example, elsewhere on the site. I'm thinking that I can't be the first person to want to re-use a CiviCRM Event image in this way. How do other people approach this?

# Answer
In newer versions of CiviCRM (around 4.7.20 and higher) you can mark a custom field set as not public. This will hide the custom field set from your event page. Then you could use a buildForm hook to include a template of your choice; see the CiviCRM dev guide Resources Reference for details.
> 3 votes

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


title: Error: Cron Not Running

text:
# Question
Title: Error: Cron Not Running
For several months we have been seeing the error "Cron Not Running". I have repeatedly configured crontab for the `root` user, and currently have the following:

```
0 * * * * wget -O - -q -t 1 https://<redacted>/cron.php?cron_key=<redacted>
0 * * * * drush -r /var/www/html/drupal -l https://<redacted> civicrm-api -u <redacted> job.execute

```

I have followed the Managing Scheduled Jobs documentation each time, but still cannot figure out what I am doing wrong.

What might I check to make sure Cron is configured correctly?

# Answer
> 2 votes
I may have solved this with the following steps.

1. create a drush alias for the site
2. configure crontab using the drush alias

# Drush alias (~/.drush/example.aliases.drushrc.php)

```
<?php

    $aliases['example.com'] = array (
        'uri' => 'example.com',
        'root' => '/path/to/drupal',
    );

?>

```

# Crontab

```
0 * * * * drush -u 1 @example.com civicrm-api job.execute auth=0 --out=json

```

# Answer
> 0 votes
This works for me in Cpanel, including the wget:

wget -O - -q -t 1 'http://mysite.org/drupal/sites/all/modules/civicrm/bin/cron.php?name=myusername&pass=mypassword&key=123456789abcdefg'

Note the single quotation marks at start and end of syntax - after wget string

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


# Question
Title: Relationship disabled by end date but still enabled?
Scheduled **Disable expired relationships** has run succesfully according to the date/time I see in the Scheduled job table. I see a relationship in the disabled relationship section that has an End date older than today, so that seems to work. What I don't understand is that it is still marked "Enabled" in view and edit.

Also when I do an api call on the relationship mentioned before it returns it as an active relationship even though it is expired:

```
$result = civicrm_api3('Relationship', 'get', array(
  'sequential' => 1,
  'is_active' => 1,
  'id' => 56276,
));

```

Response:

```
    {
    "is_error": 0,
    "version": 3,
    "count": 1,
    "id": 56276,
    "values": [
        {
            "id": "56276",
            "contact_id_a": "24943",
            "contact_id_b": "20992",
            "relationship_type_id": "14",
            "start_date": "1995-01-01",
            "end_date": "2004-01-01",
            "is_active": "1",
            "description": "Support Branch",
            "is_permission_a_b": "0",
            "is_permission_b_a": "0",
            "custom_24": "Res",
            "custom_71": {
                "S": "S"
            },
            "custom_71_26513": {
                "S": "S"
            },
            "custom_24_26513": "Res"
        }
    ]
}

```

How should I understand this? As a bug or a feature? What does the "Enabled" tick box in fact mean? Should I understand it as separate from the start and end date as kind of "override" function?

CiviCRM version is 4.6.27. In case it was a bug, has it been fixed meanwhile?

# Answer
> 3 votes
The "Disable expired relationships" scheduled job should set the is\_active field to 0 for relationships with a past end date.

> A bit of history: Civi has always treated both past and disabled relationships as "inactive" however there were inconsistencies in some of the code (reports maybe) that were not doing so. I believe Fuzion contributed the scheduled job to remedy this

(From a comment on issue CRM-18561. See also this forum post for some discussion.)

So it looks to me as though the scheduled job has failed in this case. If you view the job log for this job, are any errors shown? Or anything at the relevant time in the CiviCRM log file in files/civicrm/ConfigAndLog/ ?

Could you test whether the problem occurs on the 4.6 demo site?

---
Tags: relationships, scheduled-job
---


title: Quote for set up and on-going

text:
# Question
Title: Quote for set up and on-going
We are a charity interested in CRM and I wondered if you could please provide me with some information:

1. A brief outline of what is on offer with your CRM package
2. How we could use it – the benefits
3. How much it would cost (initial set up and on-going)
4. Any difficulties in implementing the system

Many thanks,

Alice

# Answer
CiviCRM is indeed a good CRM for most charities in my experience :-)

There is actually no such thing as `your CRM package`. CiviCRM is community based and open source, and getting started works in a different way. There is no sales organization in CiviCRM itself, the software is community developed and based. Most people answering posts here are CiviCRM users and/or experts answering questions as community members in their own time, like me.

As there is no license cost involved, there is also nothing (and everything) `on offer`.

Your best first step to get your questions answered would be to contact a CiviCRM partner that is close to you. You can find a list here. One of the partners will be able to help you with some of your questions.

A brief outline of what is on offer can be found in the User Guide. That might help you to get an idea. I would strongly recommend you to outline what you would want to achieve though, rather than focus on what is *on offer*.

As far as the costs go, please check this similar post.

Good luck setting the first steps!
> 4 votes

# Answer
The best place to start would probably be some of the case studies here: https://civicrm.org/case-studies

And then try contacting a few of the partners near to you: https://civicrm.org/partners-contributors

CiviCRM is used by a lot of charities and non-profit organisations. It also has a large number of extensions so can usually support your use-cases. Without understanding your requirements a little better it is difficult to offer more advice.
> 4 votes

---
Tags: evaluating-civicrm
---


title: How much does it cost?

text:
# Question
Title: How much does it cost?
I want to know how much it costs. Why is there no mention on your website of how much it costs to get staRTED. Advice, please.

# Answer
> 3 votes
There is no advice because it depends on what you want to do :-) We have projects with our customers ranging from 5000 euro to 250,000 euro, depending on their needs.

As you probably noticed the software itself is free, that means you do not have to pay license costs nor yearly maitenance costs. However, there are other costs that you have to take into account:

* hosting your website. The costs depends on what your needs are. There is a list of CiviCRM specialized hosting here.
    + any customization required? If so, you need to pay for the development of those customizations. To find out if you need any, it is probably a good idea to talk to a CiviCRM partner. You can find a list of experts here. You can elect to do it yourself, that would mean you need to install CiviCRM in a CMS and then prototype the processed you want to be supported.
    + migration of data? Do you have data in old systems that need to be transferred?

As you can probably understand, no one will be able to give you the costs without having a clear understanding of what you want to do and what your needs are.

# Answer
> 2 votes
My go to answer is "how long is a piece of string?". Beside erik's suggestion, you can install and maintain the software by the persons in your organisation. If your needs are already covered by the existing features, it's "simply" a matter of installing and configuring.

However, you will be faced with several ways of managing your contacts, for instance the simple question of how to segment them? Do you use group, tags, contact subtypes, custom fields... Lots of options, and without knowing what your organisation does and the pros and cons of each option, it might be more time consuming and complicated. They are several workshops and training, if you don't go the consultant path, I would suggest you to attend one, to get you faster in the right direction and know what features would serve you best.

Good luck!

---
Tags: evaluating-civicrm
---


title: How to echo "Hello World" in civicrm?

text:
# Question
Title: How to echo "Hello World" in civicrm?
I need to echo "hello world" in civicrm how to do this in any page in civicrm? i'm trying to do this using hooks\_civicrm\_post but there is no result.

# Answer
> 2 votes
The civicrm\_post hook performs stuff after a database update, and does not necessarily just echo stuff on a page.

If you want to customize CiviCRM I strongly recommend you read the Developer Guide carefully, and possibly check if you can follow a CiviCRM developer training somewhere.

I assume you do not actually really want to echo "hello world" on any page, so perhaps it will help if you tell us what you really want to do?

---
Tags: drupal, webform-civicrm, php, hooks, civicrm-home
---


# Question
Title: Why is OpenStreetMaps in Civi 4.7.24 rendering a featureless grey map?
I've just upgraded a site that was running Civi 4.6.30 to 4.7.24. I use OpenStreetMaps as the Mapping provider. My maps are now appearing as featureless grey maps rather than what I'd expect.

The same seems to be true when I test it on http://dmaster.demo.civicrm.org

My old site continues to render the map in full colour.

The template concerned (CRM/Contact/Form/Task/Map/OpenStreetMaps.tpl) certainly looks very different between the two versions of Civi that I've upgraded from/to.

# Answer
> 2 votes
As Graham has noted in a comment, the change in map reflects a change in terms of use and distribution methods in July 2016 that necessitated the removal of direct links to MapQuest tiles.

The plain map you are seeing is the Carto Light basemap from Carto, which was adopted as of 4.7.19.

On our sites, we do not use the built-in maps for the public, but a Leaflet implementation for Drupal Views. Thus, this change only affected internal users who use the mapping, which does not occur often in our use cases. But for those who do, you can override this choice by adding a custom `OpenStreetMaps.tpl` template, with the URLs appropriate to your tile provider of choice.

I am not sure if any Carto tiles other than the basic light and dark (with or without labels) are licensed for this kind of use, however. The OSM wiki does provide a list of tile servers where you can explore alternatives.

---
Tags: map
---


# Question
Title: "Record Membership Payment" under "Edit Membership" not working after upgrade to 4.7.22
Screenshot of results of checking "Record Membership Payment" on upgraded site:

How it should look:  We recently upgraded to 4.7.22. Now, if I click "Record Membership Payment", under "Edit Membership", the payment options do not show up. The same thing happens for members that already have a membership, and I click "Update Payment Status". I attached a picture of what the screen looks like after checking the checkbox. I looked in the logs, and do not see any errors. We are using Drupal 7.56

# Answer
There is some complicated logic in CiviCRM related to memberships and payments, especially auto-renewing memberships, and it depends on the payment processor as well.

On one of my 4.7.22 installs for example, it doesn't offer me the opportunity to record a membership payment at all on the edit membership screen, even for non-auto-renewing ones.

My guess is that the upgrade has tightened some of the cases that it thinks shouldn't be used (e.g. an auto-renew membership shouldn't allow you to run an administrative payment via the membership edit screen).

If you can provide details about your payment processor, and also try editing memberships for both auto-renewing and non-auto-renewing, you might get some more useful clues.

On the other hand, the fact that it's giving you that checkbox, but not providing an opportunity to input details when you check it, should be considered a bug.
> 1 votes

---
Tags: civimember
---


title: administrative checklist on multisite

text:
# Question
Title: administrative checklist on multisite
We have a multisite on WP that shares one db.

I am unclear if some settings are universal or if some are unique to each site. I'm referencing: administer \> administrative console \> configuration checklist.

So for instance, do I need to configure search or display settings for each site or will they inherit the network level site? And also for things like recaptcha and USPS address standardization.

Thanks!

# Answer
All of those settings are set per-site.

If you're more comfortable looking at things at the SQL level, you can check out everything stored in `civicrm_setting`. Note the presence of a `domain_id` field; each domain ID corresponds to one of the sites (see `civicrm_domain` to map them).

It's pretty safe to use SQL to copy those settings if you need to bulk change them. There used to be an extension that let you change the settings in bulk; the name escapes me right now, but it doesn't work with modern CiviCRM anyway.
> 2 votes

---
Tags: wordpress, configuration, multisite
---


# Question
Title: Custom Top Donors (Contributions) report with the name of Relationship Managers
Followed the instructions on civix and built an extension, copied the Top Donors report and set up the new template. Now I see the original report. Need to modify the php so that I can pull in the name of the Relationship Managers from Relationships. Any pointers on this? Thanks much.

# Answer
> 3 votes
Ok here's what I do when faced with situtations like this: check how Eileen does it:

https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport

At times I'll extend one of her extended reports; it's a very well written extension.

---
Tags: drupal, extension, developer, custom-reports
---


# Question
Title: How to extract field from an array returned from an API3 call
I am trying to extract a custom field from a contact record. The API returns an array of the following form:

```
Array (
    [0] => 0
    [1] => 3
    [2] => array (
        [0] => array (
            [value 1] => 123
            [value 2] => 456
            [value 3] => 789
)))

```

Using php how can I extract value 1, 2 or 3?

**Later information**

This is the actual array

```
Array (
[0] => 0
[1] => 3
[2] => 1
[3] => 2911
[4] => Array (
    [0] => Array (
        [contact_id] => 2911
        [civicrm_value_aru_data_1_id] => 2586
        [custom_64] => 2014848
        [id] => 2911

```

)))

and I want to extract the value of custom\_64. I am using:

```
$rugby_id = $arrayvariable[4][0][custom_64];

```

which returns nothing and I can't see where I am going wrong.

**Even later information**

I am still struggling with this issue. In an attempt to simplify things I have changed the CiviCRM API call to 'getsingle' and stored the result as follows:

```
$results = print_r($result, true);
echo $results;

```

which leads to the following:

```
Array (
[contact_id] => 2911
[civicrm_value_aru_data_1_id] => 2586
[custom_64] => 2014848
[id] => 2911
)

```

If I now try to extract the value of custom\_64 using:

```
$rugby_id = $results['custom_64'];

```

The value returned is 'A'. I have researched this to death but have not found the cause of the problem.

# Answer
> 1 votes
In the example you have given the way you would is

`$arrayvariable[2][0][value 1]` etc etc.

You can see an example here for usage from CiviCRM API v3 https://docs.civicrm.org/dev/en/latest/api/options/#sequential

# Answer
> 0 votes
I solved this problem by using a different CiviCRM API3 call so that I did not need to extract a value from an array. Instead in the API Explorer I selected the entity 'contact' and action 'getvalue'. I then selected the field that I wanted and that returned a single value which I was able to use without the need to use any array processing. In essence I walked around the issue.

---
Tags: api, php
---


# Question
Title: Email Outgoing Configuration - Failed to connect to the SMTP server
We are having trouble with setting up our SMTP server.

We have confirmed that the username, password, and port are correct but still get the following message:

# Answer
The error in red shows 'Name or service not known' so the problem is related to the server name 'smtp.touchingbase.org'. There is no public DNS record for that. Did you enter the wrong name?
> 2 votes

# Answer
Hello all and thank you for the responses!

Ultimately we figured out that our SMTP server was, indeed, not correct. We found the correct one by going into our Outlook email application and copying the correct SMTP server from there.

SUCCESS!

Thanks again!
> 1 votes

---
Tags: error, smtp
---


# Question
Title: DAO,BAO files are not reading in custom folder
I am very much new in the `CiviCRM` . I want to create a custom component , For that I have not tauch the CRM folder I have created my own CTM inside civicrm folder the module name with related `BAO`, `DAO`, `FORM`, `PAGE`,`XM`L, `info.php`, `config.php` and `pseudoconstant.php`. I have loaded CTM\_ call to the class loader. My Form folder .php files is working and its loaded the .tpl file also, But DAO,BAO folders .php fils are not loading. can anyone help me out with this problem. I have created my CTM folder inside `sites>all>module>civicrm>CRT`.

# Answer
> 1 votes
If you want to create customizations for CiviCRM you should do so in extensions. You can read more about customizing CiviCRM and creating extension in the CiviCRM Developer Guide.

You could also check if there is a CiviCRM partner near you on this list to find out if they are organizing CiviCRM developer trainings you can follow.

---
Tags: extension
---


title: Invoicing button missing

text:
# Question
Title: Invoicing button missing
I'm are trying to get the "Tax and Invoicing"(civicontribute) te work. I used these.

It works fine when I select one or more contributions and use the action pull down. But opening the details of an specific contribution doesn't show the Print Invoice of E-mail invoice button, as shown in CiviCRM Userguide:

I use Civicrm 4.6.22 and 4.7.11 and php 5.6.

Any ideas?

# Answer
> 1 votes
Try clearing your caches: administer -\> system settings -\> Cleanup Caches and Update Paths;

---
Tags: civicontribute, invoice, button
---


# Question
Title: Push Custom Report to Multiple Sites via API, Programming, or SQL
I oversee dozens of CiviCRM sites running on the same server (each with its own DB) and want to push out custom reports to all of them. I would like to be able to register the report and create a new report template.

Is there a way to automate this without having to use the UI?

Thanks!

# Answer
Wrap this custom report up into an extension -\> then make that extension available in all your sites.
> 3 votes

---
Tags: custom-reports
---


# Question
Title: Paypal Payment Processor not connecting with CiviCRM
We used the Paypal Pro Payment Processor with Civi. It has worked well in the past (including last month). After the last update they are no longer working properly. However, the payment processor is taking the actual payment.

For example I went through our donation page and donated $1.11. On hitting submit I received this error  On the CiviCRM End I received this error failing to update database.  However, on the Paypal end the payment went through. I received a notification from Paypal indicating I received a donation of $1.11.

So, something is happening on the Civi end of things but I don't know how to fix this error.

Here are the errors:

```
CRM_Core_Exception: Failed to update contribution in database in /var/www/html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php on line 2336
Exception trace
#
Function
Location

0
CRM_Contribute_Form_Contribution_Confirm->completeTransaction(Array, 99)
/var/www/html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php:2336
1
CRM_Contribute_Form_Contribution_Confirm->processFormSubmission('6')
/var/www/html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php:716
2
CRM_Contribute_Form_Contribution_Confirm->postProcess()
/var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php:447
3
CRM_Core_Form->mainProcess()
/var/www/html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php:1314
4
CRM_Contribute_Form_Contribution_Main->skipToThankYouPage()
/var/www/html/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Main.php:1048
5
CRM_Contribute_Form_Contribution_Main->postProcess()
/var/www/html/sites/all/modules/civicrm/CRM/Core/Form.php:447
6
CRM_Core_Form->mainProcess()
/var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:169
7
CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution_Main), 'upload')
/var/www/html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:136
8
CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution_Main), 'upload')
/var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203
9
HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Main), 'upload')
/var/www/html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103
10
HTML_QuickForm_Page->handle('upload')
/var/www/html/sites/all/modules/civicrm/CRM/Core/Controller.php:351
11
CRM_Core_Controller->run(Array, null)
/var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:310
12
CRM_Core_Invoke::runItem(Array)
/var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:84
13
CRM_Core_Invoke::_invoke(Array)
/var/www/html/sites/all/modules/civicrm/CRM/Core/Invoke.php:52
14
CRM_Core_Invoke::invoke(Array)
/var/www/html/sites/all/modules/civicrm/drupal/civicrm.module:448
15
civicrm_invoke('contribute', 'transact')
unknown:unknown
16
call_user_func_array('civicrm_invoke', Array)
/var/www/html/includes/menu.inc:527
17
menu_execute_active_handler()
/var/www/html/index.php:21
18
{main}

 Sorry but we are not able to provide this at the moment.Failed to update contribution in database
Return to home page.

```

# Answer
Solved:

It turns out that the CiviCRM logs contained error messages that indicated a missing database column, specifically a CiviCRM custom field. It's not clear why the column was missing, and the CiviCRM admin continued to display the field. An attempt to edit and save the custom field, in the CiviCRM admin, resulted in the same error as occured when submitting the donation form, which appeared to confirm that the custom field was the culprit. Sure enough, once this column was rebuilt, the problem was solved.
> 2 votes

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


# Question
Title: Events link outside of civicrm admin area does not work in wordpress
I installed wordpress in a directory that is not root. I later installed Civicrm. From within the admin area I am able to access the events without any issue. when I use the test link to access an event it works. However when I use the live link, it goes to the wrong address. What do I need to change to get the live links to work outside of civicrm admin area?

Example: Working link http://akhawaty.org/aiw/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Finfo&id=7&reset=1

Nonworking link http://akhawaty.org/aiw/civicrm?page=CiviCRM&q=civicrm/event/info&reset=1&id=7

# Answer
> 0 votes
I believe that installing CiviCRM with WordPress in a different directory is not fully supported.

See this answer: 404 errors for loading CSS on Event pages (Wordpress)

The list of issues are documented on this page in the Wiki: WordPress installed in its own directory issues

If possible, I would suggest that you install WordPress in the root directory.

---
Tags: wordpress, civievent
---


# Question
Title: Blocking specific email users from registering for events
We have had a particular email address used for registering a number of different participants for workshops in CIVIEVENT - and subsequently cancelling - that we believe is an immigration scam. Wondering if there is a way to disable this particular address from registering.

Thanks!

# Answer
> 1 votes
Did you check your log files to see if the fraudulent Event registrations originate from the same IP (or similar)?

If so then block that IP (or entire subnet) so that it can no longer access your server.

For those using iATS Payments there is another handy anti-fraud measure: you can block credit cards originating from certain BIN countries to go through;

# Answer
> 0 votes
It's hard to answer this question without more information, but I'll give it a shot.

My first approach would be to write a CiviCRM extension using hook\_civicrm\_validateForm. This would give a result similar to if someone left out a required field - it would reload the page with an error.

If your goal is instead to allow them to register (and it's a free event) but not see the results, Michael M's suggestion of a CiviRule to delete the event after it's created may work.

If your goal is something else - e.g. to fake a successful event - you'd have to give more details, but is likely to be more difficult.

---
Tags: email, user
---


title: Event Participant invitation

text:
# Question
Title: Event Participant invitation
We have created an event with on-line registration.

How do we send the 'event' to contacts within a group in CiviCRM?

# Answer
> 4 votes
Search for Contacts w/ specific criteria (if you like to narrow things down) -\> then add the resulting Contacts to a Group; make sure in Manage Groups that the Groups is a mailing group; Then go to CiviMail and email this Group your Event details + link to registration page.

If you have fewer than 50 Contacts you can also send Email from the Result of the Contact search screen; over 50 you'll need to use CiviMail;

If you want to get really fancy -\> embed a checksum token in your Email message to your Contacts -\> that way when they get to the Event registration page existing information (already in your CiviCRM) - will be filled out for them;

The details on how to use this would depend on your CMS -\> but here's an example for Drupal (where IDNUMBER is the ID of your Event)

http://www.myorganization.org/civicrm/event/register?reset=1&id=IDNUMBER&{contact.checksum}&cid={contact.contact\_id}

When using checksum tokens -\> they only have limited lifetime (for security reasons) -\> you may need to visit Administer -\> System Settings -\> Misc -\> and change the Checkum Lifespan (7 days is default);

---
Tags: civievent, civimail
---


title: Multiple entries showing on a report

text:
# Question
Title: Multiple entries showing on a report
For some reason, a particular report shows multiple entries for some users. These users have ACLs applied, so I wonder if that's causing the problem?

When I masquerade as a user with limited access, I don't see a problem, but I've just had this screenshot (photo!) sent to me:

# Answer
It could all be the same report -\> but users could have selected different columns, filters and group by settings;
> 0 votes

---
Tags: civireport
---


title: Campaigns, surveys, custom fields...?

text:
# Question
Title: Campaigns, surveys, custom fields...?
Scenario: based on a set of custom fields, we want to send a invite out to individuals for them to join a research study (set up as a group in civi).

I thought the way to go was to create a profile with the custom fields we need updating and then send it out via a campaign/survey. But cannot link the custom profile and the survey.

Do i have to have a campaign in order to set up a survey? Are the custom fields on the correct entity (currently on entity contact).. should it be on activity instead? and then select the activity 'survey'... going round in circles on this!

Or am i looking in the wrong place using survey for this? we would not be using any of the functionality on releasing/reserving respondents as they would be filling the data direct themselves.

Using campaigns/survey looks ideal in terms of getting an overview on individuals/engagement index etc

......... alternative simpler question to the above.. **how do you add custom questions to a survey which the target contact completes** (not a door knocking interviewer)

# Answer
> 1 votes
Take a look at petitions. I have accomplished something similar using a petition. The documentation is here: https://docs.civicrm.org/user/en/latest/petition/what-is-civipetition/

Hope this helps

---
Tags: profile, civicampaign, civisurvey
---


# Question
Title: Illegal characters in email signature field
For some reason we sometimes get an error when trying to save contact information after editing. An error pop-up appears with **Illegal characters in input (potential scripting attack)** when trying to save. It turns out that this can be solved by deleting the contents of the Email signature field (even though there are no visible contents). So I assume that there must be some invisible character in this field, but how did it get there (we never use this field)? And how can I suppress the signature field, so that this problem doesn't happen again? Thanks.

Edit: Civi 4.7.3 (but also happened in earlier versions). Joomla 3.4.8. MySQL 5.5.47 PHP 5.6.18 Centos 6.6.

# Answer
> 1 votes
I *think* that you have a **browser plugin** installed which is interfering with CiviCRM.

For example, this page suggests that it may be a Firefox addon called "YouTube Auto HD".

### Troubleshooting

For troubleshooting purposes, I'd suggest trying each of these to gain more info:

* Try with a different web browser (i.e. Chrome vs Firefox).
* Try the same browser, but with all extensions/plugins/addons disabled.
* Try clearing your browser cache.

### Diagnosing

Hopefully the above steps allow you to learn more about the root cause of the problem. So if disabling all your browser plugins did the trick then you could try disabling them one-by-one to find the culprit.

### Fixing

*Then* if you do find that one plugin is giving you trouble with CiviCRM *and* keeping that plugin installed is important, then I'd suggest either:

* contacting the plugin author to complain about its behavior
* finding a suitable replacement plugin that doesn't have the problem

In theory you *could* submit a bug report to CiviCRM, but given the behavior you've described, I think it's unlikely that we'd be able to easily change CiviCRM to make it compatible with a browser plugin like this.

# Answer
> 0 votes
The problem has appeared again, so I checked the page source. In the email signature field (which appears blank), there is:

```
<p>  <br></p><!--{cke_protected}%3Cscript%20charset%3D%22UTF-8%22%20src%3D%22chrome%3A%2F%2Fhdv%2Fcontent%2Fhdv.js%22%20type%3D%22application%2Fjavascript%22%3E%3C%2Fscript%3E-->

```

Anyone know where this comes from, and if it could be cause the "illegal characters" error? Thanks.

---
Tags: contacts
---


title: How to disable link tracking in emails?

text:
# Question
Title: How to disable link tracking in emails?
We are having a problem with the click through links in the email templates. I need to see if it works if link tracking is disabled. Where can I turn that off?

Thank you

# Answer
It's hard to answer this without knowing your CiviCRM version - but in 4.6+, there should be a "Tracking" tab when you go to **Mailings » New Mailing**. See screenshot below. You can uncheck *Track Click-Throughs*. Note that this is a per-mailing setting!
> 3 votes

---
Tags: links
---


title: SMS not working in 4.7.23

text:
# Question
Title: SMS not working in 4.7.23
When attempting to send an SMS in 4.7.23 no text area appears in the dialog for entering the message. I DO get the 'From', 'To', 'Name; and 'Template' widgets. If I press send SMS I get the error 'Please provide Text message.'

This was working last time I used it (maybe 4.7.21?)

I have tried this with different browsers and different SMS providers to no effect. The problem arose with v2 of the clickatell extension and upgrading to version 3 made no difference.

Suggestions appreciated

# Answer
Searched the www directory for files containing 'editMessageDetails' (grep -inr "editmessagedetails" /var/www/) and compared the result for two different civi installations. Faulty installation had many files with this string in templates\_c and the tmp directories. Cleared these & problem vanished.

This can be achieved by:

* Clearing the cache via CiviCRM UI - docs in wiki
* Executing same via CLI, eg `cv api System.flush` (or equivalent `drush`, `wp-cli` commands)
* Manually removing the directories and files beneath `templates_c` (and `tmp`?) directories.
> 1 votes

---
Tags: 4.7, civisms
---


# Question
Title: CiviCRM installer reports Warning: CRM_Core_ClassLoader message
I'm trying to set up a new CiviCRM install (4.7.24 plus Drupal 7.56) on a subdomain but I keep getting an error message.

I tried to install using the Drupal 'add a module' but after about a minute it just brings up a blank screen, and when I check the files online, nothing has been uploaded.

Then I tried to (slowly) ftp the files, but then when I run .../sites/all/modules/civicrm/install/index.php I get an error message along the lines of:

Warning: CRM\_Core\_ClassLoader::require\_once(./vendor/autoload.php) \[crm-core-classloader.require-once\]: failed to open stream: No such file or directory in /var/sites/t//public\_html/sites/all/modules/civicrm/CRM/Core/ClassLoader.php on line 107

Fatal error: CRM\_Core\_ClassLoader::require\_once() \[function.require\]: Failed opening required './vendor/autoload.php' (include\_path='.:/usr/local/lib/php') in /var/sites/t//public\_html/sites/all/modules/civicrm/CRM/Core/ClassLoader.php on line 107

I'm not sure what I'm missing - is it because I'm installing on a subdomain? Can I get around this?

# Answer
I think I may have found the cause? I've just noticed under the Drupal modules list a message to say the PHP version is insufficient (see screenshot). I presume this would hinder the install.
> 1 votes

---
Tags: installation
---


# Question
Title: How to control which activity types options appear in dropdown when creating new activity in WP version
Vers. 4.7.16. When I go to create a new activity in the WP user interface, the choices in the Activity Type dropdown are limited to 4 options. I want to create more activity types and when I go to Activity Types under Administer, I see lots of existing Types. How do I indicate which of these types (or a new type I create) appear in that New Activity form's activity type dropdown?

# Answer
> 2 votes
Certain activity types are reserved by the system for certain purposes. You cannot directly create an "Inbound Email" activity, for example, because those are created by the email processor in CiviCRM.

You can add new activity types by going to **Administer -\> Customize Data & Screens -\> Activity Types** in the menu.

# Answer
> 1 votes
I think this may be a bug. There should be an option on the Add Activity or the Edit Activity dialogue box that allows you to assign the the Activity to a Civi Component. But that option is not showing in my WP site or in the online demo.

---
Tags: activities, admin
---


# Question
Title: HOWTO create full list of Contacts in ON HOLD status
I may be missing something, but I'm trying to exclude (from a contact export list) all contacts that have a "ON HOLD" status for their primary email, particularly if it's an Opt-Out, but Bounce would be useful as well. Using Advanced Find, I could find those contacts who set an Opt-Out on their own by checking Opt-Out in one of our mailings. Also, I can find some of these under Contacts \> Contact Reports \> Constituent Detail by filtering that report on "Do not bulk email" or "Do not email". However, it does not seem to pick up folks who have requested me personally to opt them out, which I've done manually. Any help for the COMPLETE list of contacts with "On Hold Opt Out" status, whether set by email response or by a CiviCRM admin, would be appreciated.

# Answer
> 1 votes
Actually, the answer lies in the **Export**, *not* the filter to create the list. I just added 3 Individual contact columns to the Export: (i) "No Bulk Emails (User Opt Out)", (ii) "Do Not Email", (ii) "On Hold: Primary". It evidently worked. The "Primary-On Hold" column set to 1 with the other two blank grabs the Bounces. The first 2 columns provide Opt-Out and Privacy settings, no matter whether set via email response or manually by admin. Even though the answer was simple, I hope this helps someone else looking to do the same.

---
Tags: contacts, email, opt-out
---


# Question
Title: CiviCRM (on WordPress) runs too slow to be useful
Just installed WordPress and then CiviCRM on my Hostmonster.com hosted website. CiviCRM runs too slow to be useful. Is there w way to make it run without 1-2 minutes for each option selected, with timeout errors (504). Is there a fix?

# Answer
> 7 votes
The problem isn't WordPress, but Hostmonster. Shared hosting makes its money on sites that don't need any CPU or memory - simple WordPress sites, for instance.

CiviCRM is a much more resource-intensive program than your typical CMS (like WordPress). If you have *good* shared hosting - which is hard to come by! - then you can sometimes run a very small CiviCRM instance. Say, 500 contacts.

Consider a VPS instead. Hostmonster offers a VPS service, but there are cheaper VPS vendors available. If you're committed to shared hosting, there's a list of hosting providers available - but if you have the resources to support a VPS, you'll be much happier.

# Answer
> 3 votes
Upon advice from Jon G, I moved from Hostmonster to Siteground hosting. CiviCRM runs great, now. Thanks for the assist! Tom R

---
Tags: wordpress, error, installation
---


# Question
Title: How to make an Event registration form where you can choose which event you are registering for?
Let's say I want to make 3 Webinars, I want a registration form where people can enter their contact info and then select the Webinar (which is an event) and than click submit. I can do it with custom fields and bypass the events altogether but I want to define a maximum number of participants and automatically close the registration for a particular Webinar once the number has been reached.

Is this doable?

# Answer
You can create a Price Set (used for Event) with a Price Field for each Webinar (Input Field checkbox). You can set a Participate Count and Max Participants for each Price Field. When you create your event, under the Fees Tab, Enter the Price Set name. You can charge a different amount for each webinar or $0 for all of them. I know this does not create 3 separate events in your reports, but it does give you the ability to automatically close registration when full. You can filter your reports by Price set boxes.
> 1 votes

---
Tags: civievent, profile, forms, civicrm-home
---


# Question
Title: WordPress Cron Events for running scheduled jobs on CiviCRM
Need your help...I'm new to CiviCRM and I'm trying to create a cron job for automatically running all the CiviCRM scheduled jobs..I was wondering if it's possible to do this through the WordPress Cron Events Tool?

# Answer
> 0 votes
In CiviCRM go to Administer \> System Settings \> Scheduled Jobs

https://docs.civicrm.org/user/en/stable/initial-set-up/scheduled-jobs/ https://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

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


# Question
Title: Civimember Add Membership Type drop down list not available
From Administer, Civimember got to Membership Types screen, then click on 'Add Membership Type'. Click any field with a drop down and the drop down list does not show. Close the screen and the contents of the drop down list, from the 'Add Membership Types' screen, is visible. It aseems that the drop down list may be appearing in a lower layer. What do I have to do to get them upfront and available for selection? The drop down lists are populated, were available and functioned correctly when system was installed and three types were added. Since then the lists have not been available for selection. I am not sure but I suspect the original 'Add Memberships Types' screen was different to the current screen that is avaiable. At the top of the Memberships Types screen is the guide ' CiviCRM » Administer CiviCRM '. I am sure the first time it was used that guide had a third title such as ' CiviCRM » Administer CiviCRM \>\> Add'. That third title does not appear anymore when the Add screen is opened. Using Firefox 55.0.3 on Windows 10 Many thanks in advance

# Answer
> 0 votes
Sometimes there can be issues that are 'hidden' due to using pop ups.

use right click so it loads as a page, not a pop up.

if that makes a difference then try using your browser inspector for any js errors

---
Tags: civimember
---


title: Option Values with problematic Values

text:
# Question
Title: Option Values with problematic Values
I'm getting this status message:

> The Following Option Values contain value fields that do not match the Data Type of the Option Group

It references an Option Group and a option value of "No". The actual option value is 0 (zero) and the label is "No". The table looks ok. The field is defined as an int(11) and all of the records have values of 0, 1, 2, or Null. This option group is shared by another custom field, but no warning about that one. I haven't had any issues entering or displaying data.

# Answer
I believe we solved this. The option group in question is a multiple choice integer (radio buttons) with values 0, 1, and 2 representing "No", "Yes",and "Retest". Nulls are allowed. All values in the table matched. Other than the warning, we never experienced any issues.

We noticed that standard Yes/No option groups used 0 and 1 values, but other multiple choice integer option groups used non-zero positive integers. We reset all of our "No" records to value 3 and changed the Option Group to match. The warning immediately stopped.
> 3 votes

# Answer
I would check to just make sure that there are no option values that aren't an Integer. That check was put in due to issues where option values were being added to option groups that were used in some parts of the system where they were expected to be an Integer but there was not data check on the option value adding / edit screens

Regards

Seamus
> 1 votes

---
Tags: custom-fields
---


# Question
Title: System status notice about option value 0 in number field
I'm getting this System Status notice:

```
The Following Option Values contain value fields that do not match the Data Type of the Option Group

```

It references an option group with 0 as one of the values. The group is used for a custom field of type Number. I went into the mysql database and saw that the option group had type String, so I changed that to Integer, also tried Float - nothing got rid of the error.

Is it a spurious error due to a bug or am I not understanding something about how option groups and values work?

# Answer
We finally poked around and noticed standard option groups with integer values did not use zero. We had used value zero to represent "No". We changed "No" to value 3 and updated the existing records. Once all zeroes were gone, the warning disappeared. Later, we noticed that other radio button option groups use Alphanumeric data type even if the values are integers. Ours had been configured as an Integer (INT11 in the database). I can't say whether either of these conditions are the root of the warning, but avoiding zero appears to have worked. See also:

Option Values with problematic Values
> 1 votes

---
Tags: custom-fields, option
---


# Question
Title: CiviMail click through links and Browse Site button not working.
We are running Civi 4.7.22 on WordPress 4.8.1. We are having a problem with CiviMail. I have included a link to a MP4 demo video to highlight what is happening. Please watch for what happens when I click the "Browse Server" button and when I run the Preview and click the link in the preview. We have contacted our host and they assured us that nothing in the server is blocking or restricting those php functions. I suspect it is a path issue, but I don't know where to look or how to resolve it.
Please see link to video below.
Thank you

http://meatcuttersclub.org/demomp4.mp4

# Answer
Problem solved with much much back and forth with our host. I noticed this issue is all over the forum with no solution, so finally here is the solution: If anyone runs into this issue in the future, check your permissions for /wp-content/plugins/civicrm/civicrm/extern/url.php The permissions should be 755. For some reason, ours was 775. As soon as we changed it to 755 the problem was solved.
> 1 votes

---
Tags: civimail, click-through
---


title: Update Membership Statuses

text:
# Question
Title: Update Membership Statuses
I am using civi on wordpress 4.8.1

I just need to check something.

If I have a membership that expires tomorrow and *Update Membership Statuses* is not enabled to run Daily, will that person's profile still have an "**Active**" status when it expires tomorrow?

On the other hand, if I do enable *Update Membership Statuses*, will that person's membership profile status change to "**Expired**" tomorrow?

I am asking because the description for this job says "***WARNING****: Membership renewal reminders have been migrated to the Schedule Reminders functionality, which supports multiple renewal reminders.*", so I not sure I should enable it at all.

Thank you

# Answer
the warning is about how Reminders are managed. In terms of the Scheduled Job - yes you need that enabled if you want to have the Membership Status automatically updating (and it would a rare situation you would not want this happening)
> 2 votes

---
Tags: scheduled-job
---


# Question
Title: Early Bird Registration by Membership Type
How can we give early access to registration forms to certain members, based on their membership status/role?

For instance,

Premium Members can access 2 weeks early and register. Regular 1 weeks early. Non-members on regular timing.

CiviCRM 4.7 / Drupal

# Answer
There are two approaches you can take.

One is to use the Group-Based Pricing extension with price sets to enable members-only price sets.

You could also use a custom extension - about 10 lines of code should get you there. See Are private contribution pages a thing?
> 3 votes

# Answer
Here's a third one: webform civicrm; combined with drupal member role sync and access permissions; no code required; Just check add one checkbox every week (who can submit webform);
> 1 votes

---
Tags: civievent, civimember
---


# Question
Title: Network error unable to reach the server when view contract with CiviHR
I have installed CiviHR (extension) version 1.6.11 on wordpress. When I view the Job Contract in the Contact Information, I got the error message "Unable to reach the server. Please refresh this page in your browser and try again." Check the console of the browser, I saw the browser received 500 Server error when request to address

> http://192.168.0.121/wordpress/wp-admin/admin.php?page=CiviCRM&q=civicrm/contact/view/hrjobcontract&cid=205&snippet=json

The detail in the image below:

Please help me to fix this problem. Thanks you very much.

# Answer
> 1 votes
I have detected the issued. I open apache log and saw the error

> PHP Fatal error: Call to undefined function file\_upload\_max\_size() in /var/www/html/wordpress/wp-content/uploads/civicrm/ext/hrjobcontract/CRM/Hrjobcontract/Page/JobContractTab.php on line 46

So I go to the directory and edit that. Because the default value for max size when upload contract file is 10MB. So I change that. Every thing work well now.

---
Tags: civihr
---


# Question
Title: Wordpress user registration only through CiviCRM
We have our site set up so that folk join our group through a Civi profile which then sets up a Wordpress user account. This is as it should be. However we occasionally get registrations directly through the /wp-login.php form which bypass the additional data we want in civi. These are invariably spam registrations that need manually deleting.

We've experimented with plugins Theme My Login and WPS Hide Login but things get complicated without actually resolving the issue of preventing 'back door' registrations.

Is there a simple way to ensure registrations are via CiviCRM?

# Answer
Here's how we resolved it.

1. Installed Theme My Login with security option and checkbox to disable wp-login.php and ReCaptcha options.
2. Deleted the ‘Register’ page that TML created and set up redirects for /register and for /login/\\?action=register.\* to go to the /join page that has the CiviCRM signup page.

So, /wp-login.php brings up a 404 page not found, selecting register option opens the CiviCRM joining page. No spam registrations since doing this. Result!
> 0 votes

# Answer
It looks like you could do the following:

* Disable registrations in WordPress entirely (instructions in this SE question), OR
* Add a WordPress hook implementation in a custom module which prevents WordPress registration via the regular methods (instructions in this SE question), then
* Use that hook to ensure that only the CiviCRM registration flow is allowed. (Use variables unique to only the CiviCRM workflow or WordPress registration workflow to identify whether the user has followed the desired path, and reject otherwise.)
> 2 votes

# Answer
If you're not using /wp-login.php, is there any harm in just renaming it?

We have problems with attacks pingback stuff, and since it's low utility for the victims, we just move the xmlrpc.php file to nope-xmlrpc.php, and that's the end of that.

You might need to know the renamed file for the sake of admin logins, but it's a small price to pay for eliminating a nuisance like that without needing Akismet.
> 1 votes

# Answer
I found the easiest solution was to hid the elements.

```
 function custom_login_css() {
    echo "<style>

#login > p[id='nav'] {
    color:transparent;
}

body[class^='login login-action-login'] > #login > p[id='nav'] > a:nth-child(1) {
    display:none !important;
}

body[class^='login login-action-lostpassword'] > #login > p[id='nav'] > a:nth-child(2) {
    display:none !important;
}
</style>";

}
add_action('login_head', 'custom_login_css');

```
> 1 votes

---
Tags: wordpress, registration
---


title: Can't view transactions

text:
# Question
Title: Can't view transactions
We just launched a new Drupal website and implemented our old CiviCRM database. Everything seems to be going fine and transactions are going through, but when we try to view one, as admin or any other user, we get a network error.

> Network Error Unable to reach the server. Please refresh this page in your browser and try again.

Admin user has all permissions and is still having the issue.

CiviCRM 4.7.15, Drupal 7.x

Edit: apparently I can't go back and edit payment processors either.

Edit2: apparently it works with the old, pre-launch URL. I ran 'drush cc civicrm' to no avail. I also updated file paths and cleared caches in CRM.

It's possibly related to an issue where some transactions are coming in incomplete.

Drupal error log is showing this possibly related message:

```
Sep 19 16:27:28 prod drupal: https://prod.fosterclub.com|1505838448||access denied||68.116.xx.xx|https://prod.fosterclub.com/civicrm/contact/view/contribution?reset=1&id=5816&cid=121483&action=view&context=dashboard&selectedChild=contribute&snippet=json|https://www.fosterclub.com/civicrm/contribute?reset=1|0||civicrm/contact/view/contribution

```

Furthermore, when I hover over the link to view the transactions, it is showing prod.example.com instead of www.example.com, which was the correct URL before the DNS change and launch.

# Answer
> 2 votes
If it's showing the wrong URL, you should:

* Confirm your `$BASE_URL` is correct in `civicrm.settings.php`;
* Check your URLs in **Administer menu » System Settings » Resource URLs**;
* Clear your cache;
* Delete `templates_c`.

# Answer
> 0 votes
I forgot to update the URL in `civicrm.settings.php` from `prod.` to `www`.

That's all it was.

---
Tags: drupal
---


# Question
Title: How long does the cache in the template_c folder last
I use civicrm on WPEngine hosting which does not allow php files to be generated on their live environment (if you are not logged in as admin). Because of this I generate the php files in the template\_c folder while logged in as admin (for the frontend civicrm pages). This means every time a php file in the template\_c folder has to be re-generated a frontend civicrm page will crash.

Can someone give me a clue how long the generated php files in the template\_c folder last so I can eventually re-generate them manually and avoid frontend civicrm page crashing? (or give me a better idea how to handle this).

# Answer
It's actually compiling Smarty templates, not PHP pages. There is no timeout on how long they are valid, as the underlying templates don't change.
> 2 votes

---
Tags: wordpress, cache
---


title: New Fields Won't Save

text:
# Question
Title: New Fields Won't Save
```
I'm using civicrm 4.7.17 on drupal 7.54.  Logged in with administrator rights.

When I try to add a new field, (admin -> customize data and screen -> custom fields) everything works fine.  I create a new set, no problem, but then when I add a new field to the set, and click on save, it just hangs, loading forever.

This seems to be a new thing as I've created lots of custom fields before.

```

Any ideas?

# Answer
OK, so the civirules 1.2 extension was causing the problem. The problem is documented a bit here: https://github.com/CiviCooP/org.civicoop.civirules/issues/132

Luckily I hadn't set up at civirules stuff so it was easy to just disable it. Maybe in the future I'll use an updated version of it.
> 1 votes

---
Tags: custom-fields
---


# Question
Title: Gravity Forms/CiviCRM add on - adding record to groups
I am using the Gravity forms to CiviCRM plugin. http://shop.civivip.com/civi-plugins/gravity-forms-integration/

It is passing the data but not seeing where it actually will specify what group you want data to send to. Just has Groups but can't select which one.

Have others successfully sent gravity form data into CiviCRM groups?

# Answer
Can you tell me what version you are running? We added support for groups and tags in our latest version. On the contact feed it looks like this.  If you're wanting to add to different groups based on their selection then you would create one feed per group and make the feed conditional based on that criteria.
> 1 votes

---
Tags: groups, forms, integration, plugin
---


# Question
Title: Editing ACH info for recurring contributions - iATS
CiviCRM 4.6.14, Drupal 7.43, iATS Payments extension 1.5.3

Should admins be able to edit ACH info (e.g., change the routing and account number) for recurring contributions? This is available for recurring contributions paid by credit card (view, edit, and process links are available), but not for recurring contributions paid by ACH (only view links are available). Is this by design or is there possibly another issue?

Thanks.

# Answer
You are correct - you can not Edit ACHEFT Card on File via the CiviCRM interface: (left: ACH/EFT; right is Credit Card):

To Edit the Routing + Account Number associated with the ACHEFT recurring series go to iATSpayments.com -\> Virtual Terminal -\> Customer Database -\> Find the record -\> hit Edit -\> and make Edits to the Payment Information section. This will change the Account Number (or Credit Card) that is attached to the token that is already associated in CiviCRM with the recurring series; Remember to leave your Recurring Payment Settings to OFF here -\> otherwise your donor/member will be processed twice -\> once triggered from CiviCRM and once triggered from iATSPayments.com
> 4 votes

---
Tags: civicontribute, recurring-contributions, iats
---


# Question
Title: Call to undefined function mysql_error() when install extension CiviHR for CiviCRM
I'm using Joomla 3.7.5 and CiviCRM version 4.7.12. I access to "CiviCRM » Administer » System settings » Extensions » Add new" to install CiviHR extension but CiviHR not in the native list. So I do it manually, I downloaded CiviHR and upload to civicrm directory. When I install it, I got the error. The first, I click "install"  And I got the error  Do you have any suggest for me to fix this? Thanks you very much.

# Answer
It sounds like CiviHR is still using the php-mysql extension not php-mysqli. You can try installing php-mysql, or asking your hosting provider to do it, but if they're running a fairly recent server they may not be able to.
> 1 votes

---
Tags: extension, error, mysql
---


# Question
Title: Using an External (custom) Table in a Custom Report
I have several custom tables that I have created for use with extensions that I have built.

I would like to use those tables in a custom report. What is the best approach for this? I checked the documentation and did not see anything clear.

I appreciate any direction for this!

# Answer
> 3 votes
Check out an example here - this is a report that joins tables the extension creates/maintains with other civicrm core tables to produce this report:

https://github.com/jake-mw/CDNTaxReceipts/blob/master/CRM/Cdntaxreceipts/Form/Report/ReceiptsIssued.php

# Answer
> 0 votes
There shouldn't be anything special you need to do. In your report code you just reference them the same way you do in your extension.

---
Tags: civireport, database, mysql, custom-reports
---


# Question
Title: How to use Find Contribution to find folk who Donated via a line item on a Membership Price set
Scenario:

(FT = Financial Type)

A price set is created using eg Member Dues FT and Donation FT. Contribution page is submitted (which is FT = Member Dues).

A person submits the form above so have paid for Membership and made a Donation

Admin want to use Find Contributions to search for all folk who made a Donation. And from their perspective the person above should be listed, but they don't because Donation was a 'line item'.

Thoughts?

Could be an option be added to the Find Contribution interface to 'search by line item'? Other, probably better ideas?

# Answer
Seems like the old chestnut about storing financial type on contribution, where it originated, vs line item, where it later appeared, leading to the sort of issue you've described. There was talk a while back of retiring financial type on contribution, which would seem to require changing contribution search to check financial type on line items instead, in the way you describe.

You've specified Find Contributions but as a workaround for now, does the Bookkeeping Transactions report provide what's needed?
> 1 votes

# Answer
How about using Fuzion's Extended Reports extension - the LineItem one? It's a great Extension
> 1 votes

---
Tags: civicontribute, search, line-items
---


title: help on wordpress for send mailling

text:
# Question
Title: help on wordpress for send mailling
I want to send mailling with civcrm and it doesn t work

i resume : i install wordpress, i install civcrm for wordpress extension and i install mosaico extension too ok no problem

in wordpress -\> i try to send a mail : Menu \> contacts \> New mail ... it's ok no problems the mail be sended but when i try : menu : Mailings \> New Mailing ... don't work

can you explain me the process please

thanks

# Answer
You mention installing the Mosaico extension - assuming you're installing Mosaico 2.0, you also need to install the FlexMailer and Shoreditch extensions. Please install those and try again.
> 1 votes

---
Tags: wordpress, civimail, mosaico
---


# Question
Title: How can I collect custom contribution data in an event registration form?
People register for events. As part of that registration I want to collect some data that will be stored as part of their participant record. No problem.

I'd also like to collect information that will be stored as part of the contribution record linked to the event registration, but there seems to be no way to do this, as I can't access the profile containing the custom contribution fields in the online registration set-up for the event.

Am I missing something, or is the only way to do this by using a Drupal webform.

# Answer
> 1 votes
IMHO you cannot achieve this using a default event registration page. As you have mentioned, Drupal Webforms may be an option as well as using CiviRules or another extension/custom function that does some "magic".

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