title: launch custom profile from Edit button?

text:
# Question
Title: launch custom profile from Edit button?
Civi 5.9.1. WordPress 5.0.3

I built a profile for my organization's staff to use when adding an Individual with a specific subtype ("Farmer"). I created a New Farmer menu item under Contacts\>New Individual in the nav bar, and linked it to the Farmer profile's URL. I used the Contact Summary Layout extension to show only the fields from that profile when viewing details for an Individual of subtype Farmer. But when a user clicks the Edit button from there, the default Individual contact template appears, instead of my custom Farmer profile.

Is there any way to change this, so that editing an existing Individual of a certain subtype launches the profile created for that subtype? (I framed the question generally because we'll eventually have a few more subtypes with their own profiles that also will differ substantially from the default and from each other. But for now I'm setting aside the question of whether and how an Individual's subtype can change over time.)

While I have no coding experience outside of SQL (at which I'm fairly expert), I'm open to suggestions that go beyond the CiviCRM UI.

Many thanks!

EDIT: I'd also be keen to learn if there's a way to hide or disable the Edit button on the Contact Summary page, even if it can't be done based on subtype. Users would still have recourse to the pencil icons on that page, which should work fine given that it matches the custom profile.

# Answer
You can do it with a link but I'm not sure how to get the link to display somewhere without some customization. For example if the contact id is 2 and the profile id is 3 then this url will open the profile to edit the user:

https://your-website/civicrm/profile/edit?cid=2&gid=3&reset=1

The profile id is what you see in the url when you're on the admin page where you created the profile, and you hover over the Fields or Settings link, e.g. in this example it's the gid=3 part: https://your-website/civicrm/admin/uf/group/field?reset=1&action=browse&gid=3

EDIT: There is a way to get to the desired page just using the UI but it's a couple steps:

1. Go Search - Find Contacts. Pick some criteria that will find your contact.
2. In the results list check the checkbox on the left next to the contact.
3. From the actions dropdown at the top of the results list, choose Update Multiple Contacts.
4. It will then redirect to a page where you pick the profile.
5. Then on the next page it will present a version of the edit form.
> 1 votes

---
Tags: profile, custom-templates, contact-types
---


# Question
Title: CiviCRM - Installing on Wordpress Hosted in AWS DB Error
I was testing out CiviCRM as part of a project I am working on and decided to host it in AWS on a WordPress site. After downloading the newest version (5.10.4), I then uploaded the Zip file to my site. I activated the plugin and proceeded to install CiviCRM accordingly.

To make my life easier, I created a new user with admin permissions and created a separate database for CiviCRM. So far, so good. I kick off the installation and everything shows up as good and the message you get post install pops up letting you know about settings, etc. Shortly after this message appears, I get the dreaded db error message due to a syntax issue.

I looked at the logs and noticed that there is a fatal error that is one part syntax and another part where the actual tables don't seem to be within the database that CiviCRM created during installation. I have tried a few different variants, such as older versions of CiviCRM, some cases where I did not create the separate database and user which spun off different errors, but there seems to be a theme of some type of syntax error **(Mind you, I am not writing this SQL, the application is generating it)**. Also, the tables this is referencing, don't seem to be anywhere in the MySQL database, which is confusing to me. See below for a snip of the log file with what I am receiving. Any assistance or advice you all can give as to why this is occurring and how I can possibly remedy it?

Thank you in advance!

```
Mar 02 23 : 46 : 59 [info] Creating canary TABLE Mar 02 23 : 47 : 05 [info] $FATAL Error Details = Array([callback] = > Array([0] = > CRM_Core_Error [1] = > handle) [code] = > - 2 [message] = > DB Error: syntax error [mode] = > 16 [debug_info] = > SELECT v.label AS label, v.name AS value, v.grouping AS grouping FROM civicrm_option_value v
    ,civicrm_option_group g WHERE v.option_group_id = g.id
    AND g.name = 'languages'
    AND g.is_active = 1
    AND v.is_active = 1
    AND (
        v.component_id IS NULL
        OR v.component_id IN (
            SELECT id
            FROM civicrm_component
            WHERE name IN (
                    "CiviEvent"
                    ,"CiviContribute"
                    ,"CiviMember"
                    ,"CiviMail"
                    ,"CiviReport"
                    ,"CiviPledge"
                    )
            )
        ) ORDER BY v.weight [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 'grouping FROM   civicrm_option_value v, civicrm_option_group g WHERE  v.o' at line 1] [type] = > DB_Error [user_info] = > SELECT v.label AS label, v.name AS value, v.grouping AS grouping FROM civicrm_option_value v
    ,civicrm_option_group g WHERE v.option_group_id = g.id
    AND g.name = 'languages'
    AND g.is_active = 1
    AND v.is_active = 1
    AND (
        v.component_id IS NULL
        OR v.component_id IN (
            SELECT id
            FROM civicrm_component
            WHERE name IN (
                    "CiviEvent"
                    ,"CiviContribute"
                    ,"CiviMember"
                    ,"CiviMail"
                    ,"CiviReport"
                    ,"CiviPledge"
                    )
            )
        ) ORDER BY v.weight [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 'grouping FROM   civicrm_option_value v, civicrm_option_group g

```

# Answer
Is it mysql 8? Grouping is a reserved word in mysql 8 and civicrm doesn't officially support it yet.
> 2 votes

---
Tags: wordpress, aws
---


# Question
Title: Membership Renewal from CiviCRM user dashboard error
Civi 5.10.4 - Wordpress 5.1

We have set up that when users login, they are automatically forwarded to a wordpress page called User Dashboard - where we embedded a shortcode for their CiviCRM dashboard to populate. There is a link on that civicrm dashboard page to "renew now" for those with expired memberships- but it links to a contribution page that we no longer use for membership.

```
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.The page you requested is currently unavailable.

```

The default membership contribution page is setup correctly too. This seems to only happen to those users that became members with the old contribution page - if they go to the new contribution page to process their membership renewal - it works out fine.

Is there anyway to redirect links to the old contribution page to the new contribution page?

# Answer
> 3 votes
This extension may sort out part of your problem - Disabled Page Redirect

# Answer
> 1 votes
You can do redirects at the web server level - e.g. with `mod_rewrite` if you're using Apache. I would assume that the Redirection plugin for WordPress would also work.

---
Tags: wordpress, civicontribute, civimember, user-dashboard
---


# Question
Title: Create Case using API via REST - no "Open Case" activity created
I'm using the REST interface and the create case API to create a new case. The case is created, but no activities. In particular, no "Open Case" activity is created as I would have expected. No entry is created in the civicrm\_case\_activity table. As a consequence (or maybe this is just a coincidence), the Case does not show up in search results. If I edit the case, then a Change Case entry is created in the civicrm\_case\_activity table and the case then appears in search reports.

Do I need to explicitly create an Open Case activity? For example by chaining api.Activity.create json on to the Case create json? Thanks.

CiviCRM 5.10.4 Joomla 3.9.2 PHP 7.0.33

# Answer
You probably do not have an Open Case activity configured for your case type.
> 2 votes

# Answer
Answer (thanks to @ErikH and @Demerit): the problem was that the case type did not have an Open Case activity in its standard timeline (presumably I had deleted it). Anyway, I added the Open Case activity to the standard timeline, and subsequently-created cases have been fine.
> 4 votes

---
Tags: api, civicase, activities, chaining
---


title: Updating a Case Activity using API

text:
# Question
Title: Updating a Case Activity using API
With case activities, the Activity Create API seems to create a new revision of the activity. Is there a way of using the API to update a case activity without adding a new revision?

My code currently looks like this:

```
   foreach ($acts as $act) {
     $result = civicrm_api3('Activity', 'create', [
      'return' => ["contact_id", "subject"],
      'id' => $act['id'],
          'custom_114' => $var1,
          'custom_115' => $var2,
     ]);
   }

```

I just want to overwrite the contents of custom\_114 and custom\_115 in each existing activity record, but it seems to create a new revision of each activity, containing the updated values.

API v3
CiviCRM v. 5.10.4
Joomla

# Answer
There is also a setting which AFAIK prevents adding a new revision. The setting is under **Administer\>System Settings\>CiviCase\>CiviCase Settings** and is called **Enable Embedded Activity Revisions**
> 3 votes

# Answer
CiviCase was originally designed with HIPPA and related requirements in mind, so it tracks changes.

You could have your code delete the original after making a new one.

You can also turn on advanced logging under admin - system settings - misc. I believe a future goal is to have that logging system, based on triggers, completely replace revisions. I'm not sure if it completely does that yet.
> 1 votes

---
Tags: api, civicase, activities
---


# Question
Title: How to obtain user input from an API call
This may be a stupid question - sorry if so. I am writing an API function to create a new case, and I want it to pre-fill the New Case form with field contents based the case source contact and two or three parameters obtained from the user. Of course I could create a new form in order to collect the user input before displaying the New Case form, but I wondered if there is a way that the API function can interrogate the user in real time to obtain the input parameters? Thanks.

# Answer
> 1 votes
I'm assuming you're on Joomla otherwise I'd say try civicrm webform. One option is define custom fields for cases and then use them during hook\_civicrm\_postProcess. Another is to add some javascript/jquery to the form via hook\_civicrm\_buildForm or .extra.tpl to pop up a dialog box to get the input, but that seems awkward - your original idea of having another form that comes before seems better.

# Answer
> 0 votes
API functions can be called in different contexts (eg via API Explorer, command line, in extension code etc) so prompting for user input is not practical but they can require specific parameters. You could write your API function to require parameters and then figure out how you're going to get the parameters from the user.

That said, I'm not sure an API function is really what you need here. `hook_civicrm_buildForm` to add extra bits to the new case form, and `hook_civicrm_postProcess` for processing the form when it is submitted may be enough.

---
Tags: api, civicase, forms, user-interface
---


# Question
Title: Couldnt see Civicrm plugin when logged in as wordpress subscriber/editor and other roles
I created different users for my wordpress page. When logged in as Administrator , I am able to access CiviCRM, but when logged in as subscriber or editor or other roles, I am not able to view civicrm link at all. where the settings should be changed?

# Answer
> 2 votes
You need to set the ACL permissions for the specific roles in CiviCRM. Go to 'Administer\>Users and Permissions\>Permissions (access control)' then click on 'WordPress Access Control'. Here is where you can set specific permissions for user roles. The permission to provide access to CiviCRM in the back end is 'CiviCRM: access CiviCRM'. You will probably need to set many other permissions for these users depending on what you want them to have access to.

# Answer
> 0 votes
In more recent releases of CiviCRM this core 'access CiviCRM' permission is now called, somewhat confusingly: "CiviCRM: access CiviCRM backend and API".

---
Tags: wordpress, civicrm-home, settings, default-settings
---


# Question
Title: Can't print participant's image in name badge
I'm trying to use the Name Badges feature to create badges for an NGO I work as a volunteer. So far I was able to set up the badge with the fields I need. Everything seems to be ok but, when I click to generate the PDF with the badges all the fields are there but the contact (participant) image. Even the QR Code is generated and printed.

I tried to debug in all the ways I know and found that, at /wp-content/plugins/civicrm/civicrm/CRM/Badge/BAO/Badge.php the imageURL has indeed the correct image path and file name.

The strange part is that even with the imageURL being correct, the image doesn't show up in the PDF. However, when I tried making imageURL a fixed value the image was printed (obviously, the same image for all participants).

As I ran out of options, would someone point me to any other way to figure out why this happens and how to fix it?

Any help is much appreciated. Thanks!

CiviCRM 5.10.4

Wordpress 5.1

--- x ---

Thanks to a user's insight in lab.civicrm, I did some additional investigation and found that in db the imageURL is stored as

http://domain.org/civicrm?page=CiviCRM&amp ;q=civicrm/contact/imagefile&amp ;photo=0008\_51c4b981d854da8af05e187aa199952b.jpeg

with &amp ; (I've added the *space* here because of the editor) instead of just &

I manually updated one record and the badge was generated with the image.

I can't say this was introduced as part of the update process or not, but a script to fix imageURL will make it work while the root cause is investigated.

# Answer
> 4 votes
Image URLs were the subject of a security release in CiviCRM 5.10.3. My guess is that you've uncovered a bug related to this, especially if they printed in the past.

My recommendation would be to take your test site (I hope you have one!) and revert it to CiviCRM 5.10.2 to see if it resolves the issue. If so, I would use the test site to print the badges, and report the bug on https://lab.civicrm.org, referencing this Stack Exchange question.

---
Tags: civievent, contact-image
---


# Question
Title: Trying to create a custom field that works similar to "Contact is Deceased" function
One of the organizations we work with is defunct now and I'm trying to create a field to capture this info. It would be great to have similar functions as the Contact is Deceased button (ie, "Deceased" in red by name, taken out of mailings, etc).

Is that even possible? What are other ways folks have captured this info?

Thanks.

# Answer
You can certainly create a custom group for the contact type "organization" with two custom fields: a yes/no type for defunct and a date type for date defunct. I think that would be your solution.

If you need more information on how to create custom fields read the user guide here: https://docs.civicrm.org/user/en/latest/organising-your-data/creating-custom-fields/
> 1 votes

# Answer
Some thoughts.

Since 'is\_deceased' is a field on the contact table i wondered what would be the effect of assigning a '1' to an Org.

The record does now show with DECEASED in red after the Display Name

The contact does show up if i search for is\_deceased via Adv Search

I then also set an Individual to Deceased.

Neither of them showed email as On Hold nor Comm Pref as Do Not Mail.

When I went to print a PDF records for the Deceased (both Org and Ind) were printed

I got a whitescreen when I tried to do an export using " Exclude contacts with "do not mail" privacy, no street address, or who are deceased."

Some of the above does not gel with my Answer at What is effect of marking contact as deceased? but I haven't compared with dmaster.

I suspect an extension could make the is\_deceased field show for an Organisation and based on above I sense that it would then operate similarly for both Ind and Org (though clearly my testing above didn't give me the outcome i expected for Ind in some cases)

Above was all done on 5.10.3 (ish)
> 2 votes

---
Tags: custom-fields
---


# Question
Title: WkhtmlPDF issues with the path in CiviCRM
This is my first time trying to sort out wkhtmltoPDF. I'm having issues in civiCRM when trying to make mailing labels from the membership database. When clicking on make mailing labels the next page is a blank URL.

Someone suggested that it could be to do with wkhtmltopdf needing to be installed. I have unpacked a .rpm for wkhtmltopdf to my server. I have also put in the URL path for this folder. But I am coming up with a blank as to why it won't accept the path.

Does anyone have any experience on fixing this? The server environment is Cpanel.I have attached a screen shot of the issue with the path for someones attention.

Thanks in advance,

Aaron

# Answer
> 1 votes
You need to give it the FULL path, and include the actual executable file, e.g.

`/usr/local/bin/wkhtmltopdf`

The path you have in the screenshot has 3 problems:

* it's missing the wkhtmltopdf executable at the end
* it's not absolute, i.e. starting from the very top level / directory
* it would be really unusual to have usr/local/bin under public\_html. Your installed executables shouldn't be under public\_html (security risk) and I doubt an rpm would put them there unless you manually put them there. When you say "unpacked" do you mean installed (rpm -ivh) or just extracted the files inside and put them under public\_html?

---
Tags: mailing, pdf, address-labels
---


# Question
Title: Session key error after updating from 5.8 to 5.10
I just updated Civicrm from 5.8 to 5.10.4. I also upgraded Wordpress from 4.x to 5.1. After the update, whenever a **new user** submits a membership form, the following error is shown (note this happens after they click *confirm* to submit their payment):

```
Sorry but we are not able to provide this at the moment.
We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.

Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.

Error type: Could not find a valid session key.

```

Information that is hopefully helpful:

* Civi 5.10.4
* Wordpress 5.1
* All Civi extensions and WP plugins are at the latest version
* URLS match in Wordpress `wp-config` and `civicrm.settings.php` and are not altered in the resource URLs space. Both are https.
* Using Wordpress plugin `CiviCRM WordPress Member Sync`
* Using Stripe as payment processor with CiviCRM Extension. Payments are successfully completed by Stripe even when this error page is shown.
* Disabling Stripe as payment processor and selecting the "Pay Later by check" option still result in this same error
* I am also using these additional extensions: `Event Additional Signup, API v4, CiviDiscount, Mailchimp`

The error message has not been helpful in diagnosing the issue and I was not able to find a past solution that helped, although this error has been asked about in several previous posts.

---

Update: Backtrace:

```
Apr 01 06:50:40  [info] $Fatal Error Details = Array
(
    [message] => We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.
    [code] =>
)

Apr 01 06:50:40  [info] $backTrace = #0 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(381): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(833): CRM_Core_Error::fatal("We can't load the requested web page. This page requires cookies to be enable...")
#2 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(853): CRM_Core_Controller->invalidKeyCommon()
#3 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Controller/Contribution.php(74): CRM_Core_Controller->invalidKeyRedirect()
#4 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(312): CRM_Contribute_Controller_Contribution->invalidKey()
#5 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(204): CRM_Core_Controller->key("CRM_Contribute_Controller_Contribution", TRUE, FALSE)
#6 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Controller/Contribution.php(55): CRM_Core_Controller->__construct("CiviContribute", "null")
#7 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(304): CRM_Contribute_Controller_Contribution->__construct("CiviContribute", TRUE, "null", NULL, "false")
#8 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15))
#9 /[root]/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#10 /[root]/wp-content/plugins/civicrm/civicrm.php(1243): CRM_Core_Invoke::invoke((Array:3))
#11 /[root]/wp-content/plugins/civicrm/includes/civicrm.basepage.php(365): CiviCRM_For_WordPress->invoke()
#12 /[root]/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#13 /[root]/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#14 /[root]/wp-includes/plugin.php(531): WP_Hook->do_action((Array:1))
#15 /[root]/wp-includes/class-wp.php(750): do_action_ref_array("wp", (Array:1))
#16 /[root]/wp-includes/functions.php(1105): WP->main("")
#17 /[root]/wp-blog-header.php(16): wp()
#18 /[root]/index.php(17): require("/[root]/wp-blog-header.php")
#19 {main}

```

# Answer
> 1 votes
I feel like I've seen similar & the suggestion has been to upgrade Stripe

---
Tags: wordpress
---


# Question
Title: "Post Code Suffix" in Reports is the same as "Postal Code"
I'm running CiviCRM 5.10.4 on top of Drupal 7.63 on Debian, with localisation.

My contacts have UK-style postcodes with the first half (e.g. "M19") stored in "Postal Code" and the second (e.g. "3JD") in "Post Code Suffix".

I am trying to get a list of my members, with full postcode data, as a CSV. I generate the built-in "Membership Report (Detail)" which is at `/civicrm/report/instance/20` for my instance. I then add the "Postal Code" and "Post Code Suffix" columns (among other address ones). The data displayed in "Post Code Suffix" is identical to that in "Postal Code", e.g. they are both "M19". This is also the case in an exported CSV of the report.

The correct data is in the database - clicking on any "Contact Name" from the report takes me to the individual "View Contact" screen, where the Post Code & Suffix are correct (e.g. "M19" "3JD").

Any idea what's going on here or how I can fix this?

# Answer
You have discovered a bug in the Membership Details report.

The first step in a situation like this is to see whether anyone else has reported the issue on the CiviCRM issue tracker. A link to the issue tracker is at the bottom of every CiviCRM screen.

As of this posting, it doesn't look like anyone has created an issue, so you can write one up. You could pretty much paste in the description you've written in your question here.

To actually get the bug fixed, you may need to engage a CiviCRM service provider.

In the meantime, if you just need to export a CSV of your members' contact information, including postal codes, try using Search \> Find Memberships, and in the search results choose the "Export Members" action.
> 1 votes

---
Tags: civireport, export, postcode
---


title: Adding Image using javascript

text:
# Question
Title: Adding Image using javascript
I am trying to insert a new image using an extension and I am put that image into images directory (under the extension directory);

```
CRM.$(function($){
   cj("#civicrm-menu").prepend('<li class="menumain"><span class="menumain-label"><img src=""></img></span></li>');
});

```

> I tried to put like this

```
src ="images/myimg.png"

```

But it is not working.

How to give a src path of that image ?

# Answer
> 0 votes
I looked in `CRM.config` to see if there was a helpful variable, but there isn't. I think you need to add this variable via PHP.

From the CiviCRM Javascript Reference on Server-Side Variables:

In PHP:

```
$config = CRM_Core_Config::singleton();
CRM_Core_Resources::singleton()->addVars('myNamespace', array('extensionsUrl' => $config->extensionsURL));

```

In JS:

```
src = CRM.vars.myNamespace.extensionsUrl + "/images/myimg.png"

```

---
Tags: extension
---


# Question
Title: How do I force a reload after a CiviCRM summary action?
In our CiviCRM instance, the value of a some contact custom field can be retrieved by calling an external API.

So I implemented hook\_civicrm\_summaryActions. If the user clicks on a custom action I added, a popup form appears with the generated result (or error messages). The external API is called, and the result is saved in our custom field.

If the user then clicks 'OK', the form disappears, so the contact summary is shown again, but the value in the custom field is not updated until the user reloads the page in his browser.

Is anyone aware of a way to make the 'calling' page refresh after the user clicks 'ok'? Another option would be to replace the popup form by an ordinary full screen form (anybody knows how to do that for a summary action?), and redirect after the form has been submitted. Or maybe there are better ways to achieve my goal than with summary actions.

Any suggestion is much appreciated.

Thx, Johan

# Answer
> 1 votes
I know this is like two years later but I just went through a really similar problem and there's no answer here yet...

First off Coleman posts a good answer here for lots of situations: Can I update/requery a custom field that got changed via another field on the same page?

I couldn't get this to work with certain ajax-y elements like the "disable" button under the relationships tab (we had a tab of custom fields that calculate values from other contacts based on relationships, when those relationships aren't active the data recalculates and we want it to display current values).

I worked around this by adding a JS file in `hook_civicrm_summary`, where the JS asks our custom data to reload every time you click the tab, so you always get current values at a slight performance cost. I'd imagine you could do this with an inline header as well:

```
  CRM.$(function($) {
    $('#ui-id-22').click(function(){
      CRM.refreshParent($('#Site_Demographics_1_2760'));
    });
  });

```

Where '#ui-id-22' was our tab link and '#Site\_Demographics\_1\_2760' was the panel we wanted to update.

---
Tags: forms, user-experience, actions
---


# Question
Title: Upgrading Mosaico without losing templates
I have a client using Mosaico beta 3 (WordPress 5.1, Civi 5.7.5). I want to upgrade them to Mosaico beta 4, but they have a number of templates already built and I don't want to lose them when I upgrade. If I uninstall Mosaico beta 3 and install Mosaico beta 4, I will lose them. Anyone know if I can save the templates during the upgrade, and if so, the best way to do so?

# Answer
@mattwire helped me out. Disable the Mosaico extension, replace the mosaico directory in the extensions directory with the new version, refresh the extensions page in app, enable Mosaico, and run an extensions database upgrade. In this case there were no db upgrades necessary, but there could be depending on the versions.
> 3 votes

---
Tags: mosaico
---


# Question
Title: Why is my Contribution Detail Report (native CiviCRM Core report) not accurate?
**Version:** CiviCRM 5.7.4/5 (patched for Contact images)

A Donor sent in a chq for $100 - Staff entered originally as a Donation. Then Edited the Contribution to make it a Memoriam Donation. CiviCRM generates the three entries - see below:

**Issue:** in Contribution Detail Report this Donor is listed as having donated: $300 - please see below. So somehow sums up the absolute value of the three amounts/financial account transactions that are linked to the single Contribution.

**Question:** why? Columns checked: Donor Name, Donor Email, Donor Phone, Financial Type, Payment Type, Check Number, Transaction ID, Date Received, Amount, Credit Card Type, Country

Update: there are no soft credits on this Contribution and the report is configured to pull Contributions only

# Answer
> 4 votes
Ok figured it out: the report is fine if I remove the column ‘Credit Card Type’. Then I see $100 in the report!

So if you select column ‘Credit Card Type’ a non-credit card contribution like this chq are aggregated over the number of financial transactions associated with the contribution, b/c the field ‘Credit Card Type’ lives in the Financial Tables.

So this is definitively a different bug from the one referenced here as well; this bug is related to (unnecessary) financial transactions.

# Answer
> 3 votes
There is a known bug (https://lab.civicrm.org/dev/core/issues/655) in the Contribution Detail report right now that will multiply gifts by the number of soft credits.

---
Tags: civicontribute, financial-accounts
---


# Question
Title: CiviCRM Security Patch Needed warning still exists from older Civicrm Version?
I've moved a CiviCRM installtation from 5.7.3 (LTS) up to 5.10.4 \*latest.

However CiviCRM still gives the 'Security Patch Needed warning' which displayed when it was on 5.7.3.

Database updates, cache clear and cron have all run so bit unsure why this still displays?

Thanks in advance for any advice!

# Answer
> 2 votes
Not 100% on the outcome however it may have been a cached message. Not sure on the process for these being cleaned up after an update.

I had previously cleared caches / run cron but didn't help.

---
Tags: upgrade, security
---


# Question
Title: Search Builder Smart Group with Latitude, Street Address criteria 1292 Truncated DB Error
CiviCRM 5.9.1. Issue has occurred since an upgrade from version 4.7.17. The Smart Group/Contact Group in question is built on two simple search builder criteria:

* Contacts Primary Street Address is NOT EMPTY
* Contacts Primary Latitude IS EMPTY

We can edit the criteria, and go to the initial list of contacts. But trying to run the search/query, view the contacts, or update the group creates a hard DB error. I have attempted to re-create the group and encountered the same exact issue.

This is the query in question (FYI the ID of the group is 58):

```
CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache1621 (
    SELECT 58 as group_id, contact_a.id as id
    FROM civicrm_contact contact_a
    LEFT JOIN civicrm_address ON (
        contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1
    )
    WHERE((
        (NULLIF(civicrm_address.geo_code_1, '') IS NULL)
        AND(NULLIF(civicrm_address.street_address, '') IS NOT NULL)
    ))
    AND (contact_a.is_deleted = 0)
    AND contact_a.id NOT IN (
        SELECT contact_id FROM civicrm_group_contact
        WHERE civicrm_group_contact.status = 'Removed'
        AND civicrm_group_contact.group_id = 58
    )
);

```

The resulting error is:

```
[nativecode=1292 ** Truncated incorrect DOUBLE value: '']

```

However, when I run the SELECT query alone in PhpMYAdmin without the "CREATE TEMPORARY TABLE" bit, the query works fine and displays results.

EDIT: When I try to run a Search Builder with the same criteria outside of a group, I am actually able to retrieve the results, yet the LOG is still showing a DB Error:

```
Ignoring exception thrown by nullHandler: -1, DB Error: unknown error

```

And I can't get a query in the logs because they are hidden in the traceroute.

EDIT: I put this in the answer as well, but I find it somewhat important to note now that whenever I attempted to edit this existing Smart Group's search criteria, I always had to re-select the operator.

# Answer
Am I allowed to answer my own question? lol.

I was able to resolve the DB error for this specific smart group by changing the Operator criteria from "Empty" to "Null". So "IS EMPTY" became "IS NULL" and "NOT EMPTY" became "NOT NULL".

Also, I find it somewhat important to note now that whenever I attempted to edit this Smart Group's search criteria, I always had to re-select the "operator", so I wouldn't be surprised if the root of this issue has to do with the "Empty" operators.

EDIT: There is an open GitLab issue now: https://lab.civicrm.org/dev/core/issues/786
> 3 votes

---
Tags: contacts, error, database
---


title: Track URL containing tokens in CiviMail

text:
# Question
Title: Track URL containing tokens in CiviMail
Is it possible for CiviMail to track embedded URLs? For eg, I've a URL which contains contact id and checksum tokens in it. I need to check how many users have clicked the URL from the email.

URL to track - `https://site-name/info?cid1=<contact_id_token>&cs=<contact_checksum>`

Currently, the code in CiviMail don't consider such tokenized URL from tracking and don't insert it in `civicrm_mailing_trackable_url` table.

There is a similar question on SE - Tracking links that have been added via tokens but it seems to provide different track links for each tokenised URL which is a pain when number of recipients is large in number. Eg 10k contacts would have 10k trackable links and will considerably increase the size of the database.

Our thought now is to cut the URL till a token is reached and consider this for tracking. For eg, if the original URL is `https://site-name/info?cid1=<contact_id_token>&cs=<contact_checksum>`, we need to modify the functionality to track only `https://site-name/info` and if such url is hit by the user, the click counter should be incremented.

To proceed with the above, we can store the partial link in `civicrm_mailing_trackable_url` table and replace the main html URL with the trackable link. Now, when the user hits this url in the mail, the main problem arises as we don't have any data of what should be appended to the partial URL to navigate user the original page.

Is there any another solution possible?

# Answer
We've accomplished this by modifying the core function `getTokenData()` to track non-tokenised part of the URL string. For eg. with the url posted in the question -

`https://site-name/info?cid1=<contact_id_token>&cs=<contact_checksum>`

* Grab the main URL before the `?` (`https://site-name/info`) and get the trackable url of this string from `CRM_Mailing_BAO_TrackableURL::getTrackerURL()` function.
* This enters the URL in `civicrm_mailing_trackable_url` table.
* Replace the HTML with this trackable URL so that main URL that is sent is in the form - `http://site-name/sites/all/modules/civicrm/extern/url.php?u=13&qid=17&cid1=<contact_id_token>&cs=<contact_checksum>`, i.e, trackable url + query string from the original URL string.
* When the user clicks the link in the mail, user gets navigated to trackable URL and is redirected to the original URL from `civicrm_mailing_trackable_url` table.
* The extra query string automatically gets appended to the main URL.

The above is working correctly for us and tracks each click when the URL `https://site-name/info` is loaded.

Overriden the file in an extension. Sample Code diff looks like -

```
$ git diff CRM/Mailing/BAO/Mailing.php
diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php
index 3a0f08048c..f2501a0b91 100644
--- a/CRM/Mailing/BAO/Mailing.php
+++ b/CRM/Mailing/BAO/Mailing.php
@@ -1348,6 +1348,21 @@ ORDER BY   civicrm_email.is_bulkmail DESC
       elseif (preg_match('/^href[ ]*=[ ]*\"/', $url)) {
         $url .= '"';
       }
+      if (!empty($token_a['embed_parts'][0])) {
+        $string = ' ' . $token_a['embed_parts'][0];
+        $start = 'http';
+        $end = '?';
+
+        $ini = strpos($string, $start);
+        if ($ini != 0) {
+          $ini += strlen($start);
+          $len = strpos($string, $end, $ini) - $ini;
+
+          $partialLink = "http" . substr($string, $ini, $len);
+          $trackableLink = CRM_Mailing_BAO_TrackableURL::getTrackerURL($partialLink, $this->id, $event_queue_id);
+          $url = str_replace("{$partialLink}?", "{$trackableLink}&", $url);
+        }
+      }
       $data = $url;
       // CRM-20206 Fix ampersand encoding in plain text emails
       if (empty($html)) {

```
> 6 votes

# Answer
I wrote this actiontracker extension a few months ago, but I have to admit that I do not use it often, so your mileage may vary.

It generates tracking URLs for every link in the email that has a checksum. It has only been tested with flexmailer.
> 0 votes

---
Tags: civimail, tracked-links
---


# Question
Title: What's the problem with API V4 update to 4.3?
I just (rashly) installed API V4.3 extension & can no longer browse contacts!!? After a search and clicking the contact I got the following screen. Rather fundamental! I've raised this as an issue here I removed the updated extension (had to disable contact layout extension first) and re-installed 4.2. OK after that. Civi is at 5.10.4 (Drupal).

# Answer
Here's a timely answer I just got from Eileen McNaughton. "Contactlayouteditor 1.4.1 is compatabile with the latest apiv4 - so try upgrading that as well (it has been marked as needing CiviCRM 5.11 as that is the one that ships with the latest apiv4)" So better to wait for 5.11 before upgrading this extension?
> 3 votes

# Answer
Andy's answer is correct. Also, you can temporarily disable the Contact Layout Editor (**Administer menu \> System Settings \> Extensions**) to temporarily work around the problem.
> 0 votes

---
Tags: drupal, api, 5.10.x
---


# Question
Title: How to fix it? By pressing "Print Summary", there are extra 2 blank pages printed
By pressing "Print Summary", there are extra 2 blank pages printed. One of them is before the content and the other is after. How can I make them disappear? I'm using CiviCRM version 5.10.4. Thanks.

# Answer
I have added some pictures to show the problem.
> 0 votes

---
Tags: drupal, search, debugging
---


# Question
Title: View uploaded documents without having to download them every time - Wordpress
I am not a developer, just a charity volunteer so bear with me please!!...

I would like to find a way to simply view files uploaded to contacts (for example under Activities, or Notes) without downloading them every time.

Example, I want to save a PDF of a letter under a Note. But every time I want to view the PDF, it downloads it, clogging up my PC....

How do I get around this problem??

Thank you and apologies if this is a super duper easy question...

Thanks

Anna

# Answer
As Pradeep implies, this isn't a CiviCRM issue but a web browser configuration issue.

I'm not sure what web browser you're using, but in Firefox, when I click on a PDF in an activity (see "1" below), I get a pop-up where I can select "Open With" (2) and "Do this automatically for files like this from now on" (3). I imagine similar options exist for all the major web browsers.
> 6 votes

# Answer
To view pdf rather downloading locally you will need to install a PDF preview "add on" in Chrome.

Or you can turn off PDF download from chrome settings

Navigate to Settings \>\> Advanced \>\> Content Settings \>\> PDF Documents. Turn off 'Download PDF files instead of automatically opening them in Chrome'.

HTH

Pradeep
> 3 votes

# Answer
In the latest version, if you customize `civicrm/file` link to have `download=0` query string parameter in it, the file will be opened in a new tab instead of downloading. For eg, if the URL is

```
https://site-name/civicrm/file?reset=1&id=400&eid=622&fcs=<file_hash>

```

Adding download parameter will open the pdf/image in the new tab of the browser.

```
https://site-name/civicrm/file?reset=1&id=400&eid=622&fcs=<file_hash>&download=0

```
> 1 votes

---
Tags: wordpress, upload
---


# Question
Title: Details des imports contact evenement et activité
Bonjour,

Où peut on trouver la dicumentation qui détaillent les dfférence entre les champ d'import pour les contact activiy et

# Answer
Documentation est ici: https://docs.civicrm.org/user/fr/latest/common-workflows/importing-data-into-civicrm/

Le plupart concernent l'import des contacts, mais il y a instructions pour activites et evenements a la fin.

*Please excuse my french*
> 1 votes

---
Tags: import
---


# Question
Title: How do I center images or align text via CKEditor? Can I add more functionality?
I am trying to center images and align text via CKEditor but the options aren't there - why? I want to have access to more functionality with CKEditor.

# Answer
A frustration I have had with CiviCRM has been the inability to center images or align text without modifying source code. This frustration was recently resolved by visiting

Administer -\> Customize Data and Screens -\> Display Preferences -\> Configure CKEditor

At the top of that page you will notice you can customize the skin (I recommend Moono-Lisa) and to the right of that - Plugins. You can search for CKEditor plugins and add them to CKEditor. You can also customize each toolbar for CiviMail and Events - or choose to have them mirror the default.

In order to justify text - I recommend the Justify plugin and the Image2 plugin. Now you should be able to justify text and images as you like.

There are other plugins that provide other functionality, but do your research before adding them. the CKEditor site has explanations of each plugin.

Note: you will likely have to clear your local cache in order to see these changes.
> 8 votes

---
Tags: civievent, ckeditor, editor
---


title: Broken SMTP after switching to PHP 7.2

text:
# Question
Title: Broken SMTP after switching to PHP 7.2
Recently I updated CiviCRM to version 5.10.4 and while I was at it updated Drupal to 7.64 (using drush). Everything appeared fine. Then I noticed in the CiviCRM System Status report that PHP 7.1 which I had been using was no longer recommended and that I should upgrade PHP to 7.2. When I did that, the CiviCRM System Status reported "PHP Missing Extension 'mcrypt'". Not knowing that mcrypt could reek havoc on my server, I dutifully went to add it. Long story shortened, right now I'm feeling very confused and SMTP isn't working either in Drupal (not a big deal since I only use Drupal as a platform for CiviCRM) or in CiviCRM (a very big deal). Just to be clear, everything was working fine before I did the upgrades.

My inclination is to nuke PHP and reinstall it. I'm seeking advice as to whether this could work, or is there an easier way to solve my problem. I'm running Ubuntu Server 18.04. If I tried something like:

apt purge ^php\*

Would that completely remove PHP from my system? A bit of background that may be relevant, when I first set up the server (apache2) I had installed three versions of PHP, 7.1, 7.2, and 7.3. I'm pretty sure that somewhere I've missed some configuration files and that some of my problems come from version issues. When I went to do a PECL install of mcrypt it successfully created the module but PHP complained that it was compiled against a different API.

# Answer
The old warning was actually just dealt with yesterday (https://github.com/civicrm/civicrm-core/pull/13770).

If you can remove mcrypt, you can get smtp working again by going to the admin screens in civicrm to reenter and resave your password. My understanding is it will be stored unencrypted in the database, but at least will work.
> 3 votes

# Answer
OK, so I restored my server from a backup (hurrah for backups) before I did the upgrades and the problem persists so it is NOT due to mcrypt or anything to do with PHP 7.2.
> 1 votes

---
Tags: php
---


# Question
Title: Getting problem while installing of my extension
I was trying to install my created extension. First time it worked. After I was trying to install then it shows me the following error.\[I am working on windows and Linux platform. But this problem occurred on Linux platform\].

> Error Field: `name` must be unique. An conflicting entity already exists - id: 96

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.
Field: `name` must be unique. An conflicting entity already exists - id: 96

# Answer
To debug this problem, it helps to turn on debugging and backtrace (**Administer menu » System Settings » Debugging and Error Handling**). This will give more detailed errors. You can also check the log in the ConfigAndLog folder.

It also helps if you can post your code on Github with a link so folks can see problems. In your comments you say that you're using the API to create your records. However, you must also remove those records on uninstall. Using `hook_civicrm_managed` instead of the API will handle this for you.

To resolve this problem for now, manually delete the records your extension creates, then add an uninstall routine and you should be good.
> 2 votes

---
Tags: extension
---


# Question
Title: Profile error on existing Contribution Page
We have an existing contribution page that had two profiles included (one for top of page, one for bottom). I'm not sure when this broke, but currently (v 5.10.3), the bottom profile now appears to NOT be selected, and when you first click on the "profiles" tab, you briefly see the following warning:

> The selected profile is using a custom field which is not assigned to the "Membership" being configured.

The profile doesn't appear in the dropdown at all. I can see the fields if I preview or edit from this screen. If I choose another profile and save, the error does not show again, but the profile I need does not appear in the list, so I have no way of selecting it.

I'm not sure what this error means. How do you assign a custom field to a membership?

I have seen some posts here with similar-sounding errors, but they all seem to be related to issues that have long since been fixed.

Thanks for any guidance!

# Answer
It sounds like the Profile that you are using has a field in use that may be a field that is set to only function for certain Membership Types, and that the Contribution page that you are showing it on does not offer that Membership Type.

I suggest you

* go to Admin \> Customise \> Profiles and find the Profile in question
* examine the fields in use on that Profile
* go to Admin \> Customise \> Custom Fields and find the Field set that contains the field(s) in question
* examine the Field set (via Edit) and see what entities eg Memberships it is set to operate with
> 0 votes

---
Tags: civicontribute, profile
---


# Question
Title: CiviReport widgets show access denied on CiviCRM Dashboard
I've recently migrated a site to another host and pretty much everything is working except that when I go to /civicrm, the dashlets on the dashboard all show Access Denied and a login form. They are being provided by CiviReport according to their respective breadcrumbs.

In addition, I noticed that I could not disable CiviReport or any of the other CiviCRM Components. When I click Save on that page, it just bumps me back to /civicrm/admin with no error message. Going back into civicrm/admin/setting/component just shows the modules still enabled.

I'm still a CiviCRM noob, so it could be something simple.

# Answer
Check your `civicrm.settings.php`, and make sure that the `CIVICRM_BASE_URL` matches your site url.

My site was redirecting `http://domain.com` to `http://www.domain.com`, but `civicrm.settings.php` had the version without the `www`, which was screwing things up.
> 3 votes

# Answer
Check that you are using `https://...` or `http://...` consistently and not mixing them. (Preferably `https`!)

I have seen that where you have a mismatch between the URL you are logging in with and the resource URL's (configured at `Administer > System Settings > Resource URL's`). For example, if your Resource URL's are `https://...` but you log in as `http://`

I usually redirect any `http://...` requests to `https://...` in `.htaccess`
> 1 votes

---
Tags: civireport, dashlet
---


title: Free option on a paid event

text:
# Question
Title: Free option on a paid event
We're running 5.10.4 on Drupal. We have an event where some folks will be requesting a scholarship and therefore need to be able to choose a $0 option. We also have an optional field where people can put in the amount they want to donate towards the scholarships. However, people cannot submit the page unless they have at least $1 in event fees.

https://www.zendust.org/civicrm/event/register?reset=1&id=283

# Answer
You have the value ‘1’ in the minimum amount field of the price set that you are using.

Visit the settings section of the price that’s being used and remove this value. It’s not mandatory.
> 3 votes

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


title: Credit Card Icons Missing after Upgrade

text:
# Question
Title: Credit Card Icons Missing after Upgrade
I upgraded CiviCRM from 5.6.1 to 5.9.0 and later tried 5.10.4. Both time the credit card icons on our contribution and registration pages were missing after the upgrade (see image). I had to revert back to 5.6.1 (edit: icons are the same as the security code icon).

I was able to successfully upgrade our test site. I also copied the production database to the test site (CiviCRM 5.10.4) and ran the database upgrade. The credit card icons were present. This tells me that the production database is OK. What could be wrong? What should I try next?

We use Wordpress and PayPal Standard.

Added 3/6/2019

I duplicated the problem on a new test site that is a near copy of our production site (copied all the website files and the CiviCRM database). I noticed that the HTML code for the credit card icons on the malfunctioning contribution page doesn't match that of a good page (see code below).

**Bad HTML Code**

```
<a href="#" title="[object Object]" class="crm-credit_card_type-icon-Visa"><span>[object Object]</span></a>

```

**Good HTML Code**

```
<a href="#" title="Visa" class="crm-credit_card_type-icon-visa"><span>Visa</span></a>

```

# Answer
> 1 votes
I played around with the test site and the Credit Card Icon are now present. I can't say why. I upgraded the production site again to 5.10.4 and the icons were present. I was to make a test-drive contribution on both sites.

There's one remnant of this problem. When I hover over the credit card icon it says \[object Object\] instead of Visa, Master Card, etc.

# Answer
> 0 votes
We have had this reported on a couple of sites for them, we suspected and it proved to be a local caching issue, in their case with Firefox. I don't presume that is the same issue, but in case it is this could help

https://superuser.com/questions/173210/how-can-i-clear-a-single-site-from-the-cache-in-firefox

---
Tags: civievent, civicontribute, payment-processor
---


title: How to bulk renew membership

text:
# Question
Title: How to bulk renew membership
We are a trade union with several hundred members paying their dues on a monthly basis. They pay via their bank or through check-off from their employer. We have to keep their contributions and membership status up to date.

We have membership status rules set up so that we know who is a financial member and who has lapsed.

**My question is this:** ***how to bulk import contributions in a way that will automatically renew the membership?***

Batch data entry seems to achieve this - but it requires putting in the names one at a time.

Importing a *csv* file enables bulk import of contributions, but does not seem to automatically renew membership.

Using profiles does not seem to renew membership either.

So ... suggestions would be much appreciated.

# Answer
We've done this sort of thing in our Direct Debit extensions. From memory if there is a recurring record and the membership is set to auto renew then it works fine i.e. renews the membership as needed. If you are a techie you could take a look at the code.
> 5 votes

# Answer
What I have done for similair puprose is to create a custom extension witch a scheduled job which runs daily and renews all memberships which should be renewed on that day.

See for an example: https://github.com/SPnl/nl.sp.renewmembership this example contains a bit more organisational specific logic.
> 2 votes

# Answer
It may be worth noting that the fuzion csv GUI import to API extension opens up many new doors for importing via the UI that were previously not available so worth considering as an option.
> 1 votes

# Answer
I have exactly the same issue as Dave Smith with regular bank payments via the bank. They are standing orders not direct debits so Parvez Saleh's answer doesn't help. The way I think I will do it for now, is to use the contribution imports and give each batch a source such as "Bank Feb 2019". Then I can do an advanced search on memberships matching contributions with this source and use a profile to bulk update the membership end dates.

This means a lot less typing and risk of errors than typing everything into a contribution/membership batch, but is far from perfect. What I would really like is the ability to upload a contribution/membership batch. Whilst I expect much of the code already exists to do contribution upload and batch processing, the data checking would be quite complicated and its beyond my competence to produce this.

Dave - what solution did you find?
> 0 votes

---
Tags: contributions, civimember
---


# Question
Title: Sync WordPress users to Organizations instead of Individuals?
We're using the WordPress integration of CiviCRM.

When we create a new WordPress user, civiCRM creates a new Contact - Good.

However, when it does this is creates an **Individual** type Contact. I want civiCRM to create **Organization** type Contact when I create a new WordPress user.

Is this possible? If not, am I able to convert **Individuals** into **Organizations**? I've seen an extension for it on the site but didn't know if it worked well or if there were alternatives.

Thank you for any advice

# Answer
I have used the Contact Editor extension to change households to individuals. It should change individuals to organizations but I have never tried this.

I can't speak towards changing CiviCRM contacts synced to WordPress users. This could have an adverse effect so I would proceed cautiously.
> 1 votes

---
Tags: wordpress, contacts, contact-types, organization
---


# Question
Title: CiviEvent: missing are Total Fees, Payment Method
First screen capture is from test drive. Second screen capture is from live. Total Fees missing, Payment method missing. Civi 4.7.8 on Joomla 3.5.1.

# Answer
Go to Administer / Systems Settings / Resource URL's Change CiviCRM Resource URL from using URL variable to absolute path, i.e. replace \[civicrm.root\] with the specific path for the site. \** This is a specific issue to Joomla sites only.
> 2 votes

# Answer
Ann - the symptoms you describe here all point to an issue with JavaScript not being loaded properly.

General recipe for trouble shooting this is to check your Browser's console for Error messages: in Firefox - you could do this by installing Firebug plug-in on Chrome you can launch the Developer Tools.

Here's an excellent write-up on troubleshooting JavaScript errors by one of the core team member's: https://forum.civicrm.org/index.php?topic=35850.0
> 2 votes

---
Tags: civievent, registration, paylater
---


# Question
Title: Bug with WordPress CiviCRM 5.10.3 Remote Profiles HTML Form Snippet Form Action URL
Version: CiviCRM 5.10.3

Type: Bug

CMS: WordPress

With the update to CiviCRM 5.10.3, I noticed the form action URL in the HTML Form Snippet generated for Remote Profile submissions has changed, breaking the form submission functionality for anonymous users with all newly generated HTML Form Snippets.

***This is the first time I have noticed this bug, which was definitely introduced sometime after version CiviCRM 5.7.2, the last time I generated an HTML Form Snippet that was used with a Remote Profile.***

Previously, the HTML Form Snippet generated code with a form action URL that posted to the "create profile" URL, allowing form submissions from anonymous users:

```
<form  action="https://wpmaster.demo.civicrm.org/civicrm/?page=CiviCRM&q=civicrm%2Fprofile%2Fcreate" method="post" name="Edit" id="Edit" class="CRM_Profile_Form_Edit" >

```

After the update, the code generated by the HTML Form Snippet includes a form action URL that posts to the default "admin group":

```
<form  action="https://wpmaster.demo.civicrm.org/civicrm/?page=CiviCRM&q=civicrm%2Fadmin%2Fuf%2Fgroup" method="post" name="Edit" id="Edit" class="CRM_Profile_Form_Edit" >

```

With the above form action URL, anonymous uses see the following error when the user clicks the "Submit" button:

> > You do not have permission to access this content.

Manually changing the code in the HTML Form Snippet to use a form action URL with the previous "create profile" version restores the functionality.

This bug is specifically related to the generate HTML Form Snippet code as Profiles work properly for anonymous users when inserted using the "Add CiviCRM Public Pages" button within WordPress, which inserts the code that includes the correct "create profile" form action URL.

I tested both WordPress and Drupal 7 demo sites and was able to replicate the bug with ONLY the WordPress demo site:

https://wpmaster.demo.civicrm.org/ https://dmaster.demo.civicrm.org/

---

Steps to Reproduce Bug with WordPress CiviCRM 5.10.3+:

1. Login
2. CiviCRM \> Administer \> System Settings \> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)
3. For the "Accept profile submissions from external sites" option, select "Yes" and then click "Save"
4. Administer \> Custom Data and Screens \> Profiles
5. For any Profile, generate the code by clicking: more \> HTML Form Snippet
6. The code generated by the updated version includes a "post" action URL to the "admin group"

# Answer
> 1 votes
I have the similar problem with the "thank you" page for donations. It started to displayed the same message instead of "thank you" page. We noticed, that URL is not correct: problem is caused by "&amp" string in URL. When it is replaced with just &, it works fine and "thank you" page is displayed correctly.

---
Tags: wordpress, profile, bug-reporting
---


title: Event fees not showing correctly

text:
# Question
Title: Event fees not showing correctly
I have to work an a website with CiviCRM. The client noticed that on the event registration mail, there seems to be happening something strange. In the picture you can see that there is a price in yellow. I don't know where this price comes from, but it shouldn't be shown, only the €50 total amount should be shown. I have 2 system workflow messages that I think create this mail: Events - Registration Confirmation and Receipt offline and online. Below is the code for the online one. Any help is appreciated

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title></title>
</head>
<body>
{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
<center>
 <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
  <!-- BEGIN HEADER -->
  <!-- You can add table row(s) here with logo or other header elements -->
  <!-- END HEADER -->
  <!-- BEGIN CONTENT -->
  <tr>
   <td>
    <p>{contact.email_greeting}</p>
    {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
     <p>{$event.confirm_email_text|htmlize}</p>
    {/if}
    {if $isOnWaitlist}
     <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
     {if $isPrimary}
       <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
     {/if}
    {elseif $isRequireApproval}
     <p>{ts}Your registration has been submitted.{/ts}</p>
     {if $isPrimary}
      <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
     {/if}
    {elseif $is_pay_later}
     <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
    {else}
     <p>{ts}Please print this confirmation for your records.{/ts}</p>
    {/if}
   </td>
  </tr>
  <tr>
   <td>
    <table style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse; width:100%;">
     <tr>
      <th {$headerStyle}>
       {ts}Event Information and Location{/ts}
      </th>
     </tr>
     <tr>
      <td colspan="2" {$valueStyle}>
       {$event.event_title}<br />
       {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
      </td>
     </tr>
     {if $event.participant_role neq 'Attendee' and $defaultRole}
      <tr>
       <td {$labelStyle}>
        {ts}Participant Role{/ts}
       </td>
       <td {$valueStyle}>
        {$event.participant_role}
       </td>
      </tr>
     {/if}
     {if $isShowLocation}
      <tr>
       <td colspan="2" {$valueStyle}>
        {if $location.address.1.name}
         {$location.address.1.name}<br />
        {/if}
        {if $location.address.1.street_address}
         {$location.address.1.street_address}<br />
        {/if}
        {if $location.address.1.supplemental_address_1}
         {$location.address.1.supplemental_address_1}<br />
        {/if}
        {if $location.address.1.supplemental_address_2}
         {$location.address.1.supplemental_address_2}<br />
        {/if}
        {if $location.address.1.city}
         {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}<br />
        {/if}
       </td>
      </tr>
     {/if}
     {if $location.phone.1.phone || $location.email.1.email}
      <tr>
       <td colspan="2" {$labelStyle}>
        {ts}Event Contacts:{/ts}
       </td>
      </tr>
      {foreach from=$location.phone item=phone}
       {if $phone.phone}
        <tr>
         <td {$labelStyle}>
          {if $phone.phone_type}
           {$phone.phone_type_display}
          {else}
           {ts}Phone{/ts}
          {/if}
         </td>
         <td {$valueStyle}>
          {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
         </td>
        </tr>
       {/if}
      {/foreach}
      {foreach from=$location.email item=eventEmail}
       {if $eventEmail.email}
        <tr>
         <td {$labelStyle}>
          {ts}Email{/ts}
         </td>
         <td {$valueStyle}>
          {$eventEmail.email}
         </td>
        </tr>
       {/if}
      {/foreach}
     {/if}
     {if $event.is_public}
      <tr>
       <td colspan="2" {$valueStyle}>
        {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
        <a href="{$icalFeed}">{ts}Download iCalendar File{/ts}</a>
       </td>
      </tr>
     {/if}
     {if $email}
      <tr>
       <th {$headerStyle}>
        {ts}Registered Email{/ts}
       </th>
      </tr>
      <tr>
       <td colspan="2" {$valueStyle}>
        {$email}
       </td>
      </tr>
     {/if}
     {if $event.is_monetary}
      <tr>
       <th {$headerStyle}>
        {$event.fee_label}
       </th>
      </tr>
      {if $lineItem}
       {foreach from=$lineItem item=value key=priceset}
        {if $value neq 'skip'}
         {if $isPrimary}
          {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
           <tr>
            <td colspan="2" {$labelStyle}>
             {ts 1=$priceset+1}Participant %1{/ts}
            </td>
           </tr>
          {/if}
         {/if}
         <tr>
          <td colspan="2" {$valueStyle}>
           <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
            <tr>
             <th>{ts}Item{/ts}</th>
             <th>{ts}Qty{/ts}</th>
             <th>{ts}Each{/ts}</th>
             {if $dataArray}
              <th>{ts}SubTotal{/ts}</th>
              <th>{ts}Tax Rate{/ts}</th>
              <th>{ts}Tax Amount{/ts}</th>
             {/if}
             <th>{ts}Total{/ts}</th>
       {if $pricesetFieldsCount }<th>{ts}Total Participants{/ts}</th>{/if}
            </tr>
            {foreach from=$value item=line}
             <tr>
              <td>
        {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
              </td>
              <td>
               {$line.qty}
              </td>
              <td>
               {$line.unit_price|crmMoney}
              </td>
              {if $dataArray}
               <td>
                {$line.unit_price*$line.qty|crmMoney}
               </td>
               {if $line.tax_rate != "" || $line.tax_amount != ""}
                <td>
                 {$line.tax_rate|string_format:"%.2f"}%
                </td>
                <td>
                 {$line.tax_amount|crmMoney}
                </td>
               {else}
                <td></td>
                <td></td>
               {/if}
              {/if}
              <td>
               {$line.line_total+$line.tax_amount|crmMoney}
              </td>
        {if  $pricesetFieldsCount }
        <td>
    {$line.participant_count}
              </td>
        {/if}
             </tr>
            {/foreach}
           </table>
          </td>
         </tr>
        {/if}
       {/foreach}
       {if $dataArray}
        <tr>
         <td {$labelStyle}>
          {ts}Amount Before Tax:{/ts}
         </td>
         <td {$valueStyle}>
          {$totalAmount-$totalTaxAmount|crmMoney}
         </td>
        </tr>
        {foreach from=$dataArray item=value key=priceset}
          <tr>
           {if $priceset || $priceset == 0}
            <td> {$taxTerm} {$priceset|string_format:"%.2f"}%</td>
            <td> {$value|crmMoney:$currency}</td>
           {else}
            <td> {ts}No{/ts} {$taxTerm}</td>
            <td> {$value|crmMoney:$currency}</td>
           {/if}
          </tr>
        {/foreach}
       {/if}
      {/if}
      {if $amount && !$lineItem}
       {foreach from=$amount item=amnt key=level}
        <tr>
         <td colspan="2" {$valueStyle}>
          {$amnt.amount|crmMoney} {$amnt.label}
         </td>
        </tr>
       {/foreach}
      {/if}
      {if $totalTaxAmount}
       <tr>
        <td {$labelStyle}>
         {ts}Total Tax Amount{/ts}
        </td>
        <td {$valueStyle}>
         {$totalTaxAmount|crmMoney:$currency}
        </td>
       </tr>
      {/if}
      {if $isPrimary}
       <tr>
        <td {$labelStyle}>
        {if $balanceAmount}
           {ts}Total Paid{/ts}
        {else}
           {ts}Total Amount{/ts}
         {/if}
        </td>
        <td {$valueStyle}>
         {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
        </td>
       </tr>
      {if $balanceAmount}
       <tr>
        <td {$labelStyle}>
         {ts}Balance{/ts}
        </td>
        <td {$valueStyle}>
         {$balanceAmount|crmMoney}
        </td>
       </tr>
      {/if}
       {if $pricesetFieldsCount }
     <tr>
       <td {$labelStyle}>
   {ts}Total Participants{/ts}</td>
       <td {$valueStyle}>
   {assign var="count" value= 0}
         {foreach from=$lineItem item=pcount}
         {assign var="lineItemCount" value=0}
         {if $pcount neq 'skip'}
           {foreach from=$pcount item=p_count}
           {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
           {/foreach}
           {if $lineItemCount < 1 }
           assign var="lineItemCount" value=1}
           {/if}
           {assign var="count" value=$count+$lineItemCount}
         {/if}
         {/foreach}
   {$count}
       </td>
     </tr>
     {/if}
       {if $is_pay_later}
        <tr>
         <td colspan="2" {$labelStyle}>
          {$pay_later_receipt}
         </td>
        </tr>
       {/if}
       {if $register_date}
        <tr>
         <td {$labelStyle}>
          {ts}Registration Date{/ts}
         </td>
         <td {$valueStyle}>
          {$register_date|crmDate}
         </td>
        </tr>
       {/if}
       {if $receive_date}
        <tr>
         <td {$labelStyle}>
          {ts}Transaction Date{/ts}
         </td>
         <td {$valueStyle}>
          {$receive_date|crmDate}
         </td>
        </tr>
       {/if}
       {if $financialTypeName}
        <tr>
         <td {$labelStyle}>
          {ts}Financial Type{/ts}
         </td>
         <td {$valueStyle}>
          {$financialTypeName}
         </td>
        </tr>
       {/if}
       {if $trxn_id}
        <tr>
         <td {$labelStyle}>
          {ts}Transaction #{/ts}
         </td>
         <td {$valueStyle}>
          {$trxn_id}
         </td>
        </tr>
       {/if}
       {if $paidBy}
        <tr>
         <td {$labelStyle}>
          {ts}Paid By{/ts}
         </td>
         <td {$valueStyle}>
         {$paidBy}
         </td>
        </tr>
       {/if}
       {if $checkNumber}
        <tr>
         <td {$labelStyle}>
          {ts}Check Number{/ts}
         </td>
         <td {$valueStyle}>
          {$checkNumber}
         </td>
        </tr>
       {/if}
       {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
        <tr>
         <th {$headerStyle}>
          {ts}Billing Name and Address{/ts}
         </th>
        </tr>
        <tr>
         <td colspan="2" {$valueStyle}>
          {$billingName}<br />
          {$address|nl2br}
         </td>
        </tr>
       {/if}
       {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
        <tr>
         <th {$headerStyle}>
          {ts}Credit Card Information{/ts}
         </th>
        </tr>
        <tr>
         <td colspan="2" {$valueStyle}>
          {$credit_card_type}<br />
          {$credit_card_number}<br />
          {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
         </td>
        </tr>
       {/if}
      {/if}
     {/if} {* End of conditional section for Paid events *}
     {if $customPre}
      <tr>
       <th {$headerStyle}>
        {$customPre_grouptitle}
       </th>
      </tr>
      {foreach from=$customPre item=value key=customName}
       {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
        <tr>
         <td {$labelStyle}>
          {$customName}
         </td>
         <td {$valueStyle}>
          {$value}
         </td>
        </tr>
       {/if}
      {/foreach}
     {/if}
     {if $customPost}
      <tr>
       <th {$headerStyle}>
        {$customPost_grouptitle}
       </th>
      </tr>
      {foreach from=$customPost item=value key=customName}
       {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
        <tr>
         <td {$labelStyle}>
          {$customName}
         </td>
         <td {$valueStyle}>
          {$value}
         </td>
        </tr>
       {/if}
      {/foreach}
     {/if}
     {if $customProfile}
      {foreach from=$customProfile item=value key=customName}
       <tr>
        <th {$headerStyle}>
         {ts 1=$customName+1}Participant Information - Participant %1{/ts}
        </th>
       </tr>
       {foreach from=$value item=val key=field}
        {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
         <tr>
          <td colspan="2" {$labelStyle}>
           {if $field eq 'additionalCustomPre'}
            {$additionalCustomPre_grouptitle}
           {else}
            {$additionalCustomPost_grouptitle}
           {/if}
          </td>
         </tr>
         {foreach from=$val item=v key=f}
          <tr>
           <td {$labelStyle}>
            {$f}
           </td>
           <td {$valueStyle}>
            {$v}
           </td>
          </tr>
         {/foreach}
        {/if}
       {/foreach}
      {/foreach}
     {/if}
     {if $customGroup}
      {foreach from=$customGroup item=value key=customName}
       <tr>
        <th {$headerStyle}>
         {$customName}
        </th>
       </tr>
       {foreach from=$value item=v key=n}
        <tr>
         <td {$labelStyle}>
          {$n}
         </td>
         <td {$valueStyle}>
          {$v}
         </td>
        </tr>
       {/foreach}
      {/foreach}
     {/if}
    </table>
   </td>
  </tr>
 </table>
</center>
</body>
</html>

```

# Answer
I'd copy the current code and save it in a file. Then Revert to Default the message template and see if this gives you the results you want. Then you can edit the code to anything custom that they want. For me, I find it easier sometimes to start fresh then to try to figure out someone's custom work (especially not knowing what they wanted the custom code to do). Civi may have changed some things in the backend since the custom was written, so it no longer behaves per the clients desired outcome.

Also, reverting the code will show you if this is the template being used. You might be barking up the wrong tree with any edits to that template. You could add some simple html at the bottom to test this part out if you do not want to Revert to Default. Add `<p>Can you see me now?</p>`

If that does not do the job, answer back with what they need the custom code to accomplish. The Fee structure for the event might also be helpful. You can always put the current code back in later and be right back where you are now.
> 3 votes

---
Tags: civievent
---


# Question
Title: Activity Separation field- set an option as default
When you record an activity with multiple target contacts, the Activity Separation option appears. When it first shows it is not immediately obvious that this is a required field.

One of our clients regularly records activities with multiple targets, and by and large only want to record one activity for all.

Would it be possible to set one activity for all- as the default option for this field? And if so, where would I do that?

Also. What are the potential drawbacks of doing this?

# Answer
> 2 votes
The change was introduced at https://issues.civicrm.org/jira/browse/CRM-21419, and it gives the reasoning. As with a lot of things probably 50% of people would disagree.

If you want a quick hack (which would get overriden on upgrade though): Change line 137 in CRM/Activity/Form/Activity.php from

`protected $supportsActivitySeparation = TRUE;`

to

`protected $supportsActivitySeparation = FALSE;`

# Answer
> 0 votes
You could add some jQuery via an extension to select the default value.

---
Tags: activities
---


# Question
Title: Failed loading "ioncube_loader_lin_7.2.so" Cron Error after CiviCRM & WordPress Upgrades
I very recently upgraded from CiviCRM 5.6.1 to 5.10.4 and WordPress 4.9.9 to 5.1. Since then I get the following Cron error.

Failed loading /usr/local/ioncube/ioncube\_loader\_lin\_7.2.so: /usr/local/ioncube/ioncube\_loader\_lin\_7.2.so: undefined symbol: zend\_empty\_string

In spite of the error, the CiviCRM scheduled jobs are executed successfully. What is going on? Should I be worried about this? It's annoying to get emails every half-hour about this error.

\** Added 3-11-19

Here's my cron code. We use CiviHosting.

```
/usr/local/bin/php.cli /home/phoenix/www/www/wp-content/plugins/civicrm/civicrm/bin/cli.php -u username -p password -e Job -a execute

```

# Answer
Were there any php changes as well? I've seen this when there's multiple versions of php installed and cron is using a different one than the web server. Give the full path to php in your cron task for the version you want it to use, and/or check the hosting control panel to make sure php is the one you want.
> 1 votes

# Answer
As suggested I opened a ticket with CiviHosting and the fixed it. Here's what they did.

The /home/phoenix/private/CiviCron.sh cron job was configured to work with PHP 5.6, but you have configured the account to use PHP 7.2 as the default PHP interpreter. To fix the cron job, we changed the PHP line in it from php to php7.cli.
> 0 votes

---
Tags: cron
---


title: re: events and printed "tickets"

text:
# Question
Title: re: events and printed "tickets"
I just made my first events in CiviCRM, and am wondering about whether the purchaser can print a "ticket".

I assume they get a confirmation email which they could print, but is there an option to print a "ticket"?

My events can be found here: http://www.keysunitedway.org/civicrm/event/info?id=7&reset=1 http://www.keysunitedway.org/civicrm/event/info?id=8&reset=1

Thank you!

# Answer
Edit the Workflow Message for the event receipt template to include a ticket at the bottom. You can style it with html/css to look like you want. In order to have the ticket always be at the bottom of the page, you can use nested tables.

Here is a similar question (How) can I add a footer fixed to the page of a message template for printing a pdf?
> 1 votes

---
Tags: civievent, confirmation
---


title: Could not establish connection

text:
# Question
Title: Could not establish connection
I am using CiviCRM for 6 months now and suddenly, since a couple of weeks when I try to enter or change an address I get a pop up saying "*Netwerkfout Geen verbinding met de server. Ververs deze pagina in uw webbrowser en probeer het opnieuw.*" The web-console reports "*Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background-index.js:1 createSyncMiddleware moz-extension://51240b76-34de-491a-a81e-3e49bd7d7805/background-index.js:1:623946*". I can change other member fields, though.

I followed all instructions on https://docs.civicrm.org/dev/en/latest/tools/debugging/ , and also tried different browsers, with plug-ins switched off.

I am still running CiviCRM 4.6.38, and I notice that my provider is still running MySQL v5.0.95 (and not very willing to upgrade). Latest WordPress version.

Any hints on how I could solve this problem?

# Answer
Invalid geocoding settings were the problem.
> 1 votes

---
Tags: wordpress, error, addresses, javascript
---


# Question
Title: Beyond provide a profile of an instance's stack, what is the purpose of Connections?
I am seeking information about the Connections admin area (Administer\>System Settings\>Connections):

I have seen in one instance that there is something that can be set up here to generate a site profile that provides info about the instance without exposing sensitive info like filepaths. I can see how this is useful but it seems oddly placed and like there could be more to it.

Is there anything else that can be set up using this function? I have searched in documentation and not found any info. I am very curious (on behalf of a client) about what this is and what its uses are.

# Answer
> 3 votes
It is described a little bit here: https://issues.civicrm.org/jira/browse/CRM-16173

Seems like the intent is a generic framework. I believe this link is a reference implementation of how to write a service that would interact with this framework: https://github.com/civicrm/cxnapp

Maybe others know of some real services that do implement this.

---
Tags: settings, admin, administer
---


# Question
Title: Change Member Listing Layout in Worpress
I was wondering what the best approach would be to change the layout of a member listing. I'm using wordpress, and have inherited the maintenance of this association website - and believe civiCRM could really help with their internal processes, but a key to this is a public searchable list of members. I've mocked up in wix (don't judge me :) the sort of layout/styling and functionality I was hoping for.

https://sirbrad.wixsite.com/iakpproposal/IAKPPractitioner/find

I'm still getting my head around wordpress, and civicrm, and am not sure of the best practice/approach for creating something like this? Would this be an 'extension' that I would need to create? Or should I work out how to create a wordpress page that uses ajax to call the civicrm methods to retrieve the data and display it using javascript or something?

Any tips, or suggestions as to further reading would be much appreciated.

Warmly

Brad

# Answer
@Brad that's a pretty broad question - I'm not sure anyone would be able to give you a complete guide here. However, a good first step would be to see if the CiviCRM Directory plugin fits your needs. It's not very well documented, but you should visit its Settings page (where you need to fill out API keys if you want mapping) and explore the "Directories" content type which the plugin creates.

Each "Directory" will allow you to use a CiviCRM Group as the source for the listings. Layouts can be templated in the usual WordPress manner of placing files in your child theme's directory to override the default markup. In combination with some CSS in your child theme, you should be able to get a long way towards your goal.
> 4 votes

---
Tags: wordpress, civimember, profile
---


# Question
Title: Your Organization Profile for CiviCRM - Survey - To help us make an educated decision
We are really hesitant on moving toward CiviCRM because of our size (40k donations per year and \> $5M in income with 150k contacts). We have put together this survey below...what is the best way for me to connect with other similar sized organizations to help me get answers to these questions? We are coming from BlackBaud Raiser's Edge.

Last year we priced other options based on our record count and everything that would work will cost us $30-50k annually. Enter CiviCRM...We have the tech skills to implement it, but it may not be a viable solution since its not one of the "big players" in the Donor DB world - you know the $30-50k/yr ones. Thanks for any help. I really want to give CiviCRM a whirl, but need to make sure

1. What is the income/donation-size of your organization ($10k, 100k, 1M, 10M, 100M)?
2. How many donor records do you currently have (1k, 10k, 100k, 1M, 10M)?
3. What are your top 2 donor Metrics and Key Performance Indicators (KPIs) you track within the CiviCRM reporting capabilities?
4. What are the top 2 strengths you experience with CiviCRM?
5. What are the top 2 weaknesses?
6. How much time per month do you spend customizing reports inside of and outside of CiviCRM, if applicable?
7. How long have you used CiviCRM to date?
8. What CRM database did you use before?
9. If budget wasn't a constraint, would you still use CiviCRM or is there another system you would choose?
10. How many Donor Development employees do you have? How many are power users of CiviCRM? How many are Development officers for fundraising?
11. How do you best track moves management in CiviCRM?
12. Who supports your instance of CiviCRM- you or an external vendor?

# Answer
> 10 votes
We have around 14 million contacts & 35 million contributions. I believe our budget is less than $100 million per year but it's in the ballpark

I think we've used CiviCRM for over 10 years. We did evaluate changing about 4-5 years back and instead used a fraction of the cost of changing to invest in performance fixes & improvements which have been merged to core & resolved the issues we had.

Our top metric is $$ in :-)

We have internal support for CiviCRM & our fundraising technology in general. We do have a part-time developer dedicated to needs around CiviCRM and have maybe 20-30 people on the non-tech side of our fundraising & partnerships team at a guess

Top strength is definitely the fact we can customise the things we want changed. The biggest weakness is probably some aspects of the UI - but we are hoping to support some of the proposed changes to that over the next couple of years

# Answer
> 5 votes
1. What is the income/donation-size of your organization ($10k, 100k, 1M, 10M, 100M)? **2M**
2. How many donor records do you currently have (1k, 10k, 100k, 1M, 10M)? **2500**
3. What are the top 2 strengths you experience with CiviCRM? **The ability to customize it to what we want/need. The price**
4. What are the top 2 weaknesses? **Ability to handle processing year-end receipts in one set. UI, can be difficult for some users to grasp (but this is also part of the strength because the difficulty stems from the flexibility)**
5. How much time per month do you spend customizing reports inside of and outside of CiviCRM, if applicable? **Not an issue now that we have things dialed into what we need.**
6. How long have you used CiviCRM to date? **3-4 years**
7. What CRM database did you use before? **Quickbooks but that is not a CRM**
8. If budget wasn't a constraint, would you still use CiviCRM or is there another system you would choose? **Have no experience with anything else**
9. How many Donor Development employees do you have? How many are power users of CiviCRM? How many are Development officers for fundraising? **We have 1 Development employee, we have 2 power users,**
10. Who supports your instance of CiviCRM- you or an external vendor? **Internal**

We have used it with WP and now Drupal. I'd go with Drupal over WP in a heartbeat.

# Answer
> 3 votes
I manage 3 sites with CiviCRM. Two for my day job - one for a small volunteer non-profit I am on the board of.

1. What is the income/donation-size of your organization? **$500,000, $10,000, $0**
2. How many donor records do you currently have? **10K, 500, 0**
3. What are your top 2 donor Metrics and Key Performance Indicators (KPIs) you track within the CiviCRM reporting capabilities? **Conversions from email to donations, conversions from mail to donation - custom fields for how people heard about us.**
4. What are the top 2 strengths you experience with CiviCRM? **The community and ability to customize everything.**
5. What are the top 2 weaknesses? **Lack of SAAS providers (all in one shops with set pricing - like nationbuilder, salesforce, etc), latest features right away may mean that you encounter some bugs, and ill give a third - the amount of time you will take to shop vendors is significantly longer than most one stop shops - but that time spent will be worth it in long run.**
6. How much time per month do you spend customizing reports inside of and outside of CiviCRM, if applicable? **With some new extensions - like Extended Reports - it has been a lot easier getting the reports just as we want them. We did at times have to get the data from a couple different reports - export them - import them into excel to get them to look how we want them to. Sometimes we have to ask ourselves - is it important to change the way we have things or can we be happy with the reports that Civi spits out - most of the time - we can be happy with the reports Civi spits out.**
7. How long have you used CiviCRM to date? **2-3 years**
8. What CRM database did you use before? **a mix of Excel sheets/mailchimp/eventbrite/Give Wordpress Plugin.**
9. If budget wasn't a constraint, would you still use CiviCRM or is there another system you would choose? **Likely stay with CiviCRM and pay to improve the product - a $10K investment in CiviCRM can do a whole lot. Take a look at MIH for example.**
10. How many Donor Development employees do you have? How many are power users of CiviCRM? How many are Development officers for fundraising? How do you best track moves management in CiviCRM? **1 Development staffer - 2 power users (includes the development staffer)**
11. Who supports your instance of CiviCRM- you or an external vendor? **For all instances - mostly internal - while I am savvy enough to manage upgrades, backups, maintenance, etc, there are instances where having a consultant or developer available on an hourly basis or retainer is super helpful. Especially when you want things to look a certain way on the front end. Another thing to factor in is your webhost, email provider, payment processor etc - there are non-civicrm vendors that you will have to use for some services - you may already be using some of them**

***There is a REALLY important question that you did not ask - what is your Content Management System.*** We use Drupal and Wordpress - both are great platforms - you can also use Backdrop and Joomla - but I have less experience with those. If you are happy with your current site - you should ask questions related to your current CMS. If you are considering a new CMS anyways - then there are pros and cons to both Wordpress and Drupal.

# Answer
> 1 votes
These are great questions, thanks for posting. We have several clients that have made this move and several that are larger. Please see my answers below:

What is the income/donation-size of your organization ($10k, 100k, 1M, 10M, 100M)? -- We have many over 10MM. See this URL for live stats. I believe that many larger orgs are not reporting back

How many donor records do you currently have (1k, 10k, 100k, 1M, 10M)? -- Several over 100K; there is at least one (Wikimedia) with 10MM+

What are your top 2 donor Metrics and Key Performance Indicators (KPIs) you track within the CiviCRM reporting capabilities? -- We tend to integrate Jasper Reporting into CiviCRM; CiviReporting is PHP based and we don't recommend it for our larger clients.

What are the top 2 strengths you experience with CiviCRM? -- Web integration -- still much better than any Nonprofit CRM (this is a weak point of Salesforce unless you want to spend a lot of $$ on Community licenses. -- Solid functionality across almost all core areas (membership, donations, etc.)+ it can be customized to meet your needs less expensively than any other NP CRM.

What are the top 2 weaknesses? -- Reporting -- Interface

How much time per month do you spend customizing reports inside of and outside of CiviCRM, if applicable? -- this varies a lot.

How long have you used CiviCRM to date?
-- 10+ years

What CRM database did you use before? -- varies, but moving from RE is common ; there are a few things RE does better (like bulk importing of donatations from lockboxes, but that can be added. RE also has a more advanced way of dealing with campaigns, but this can be added.

If budget wasn't a constraint, would you still use CiviCRM or is there another system you would choose? -- For our clients, if they have an intense web portal we believe CiviCRM is the best by far. SF is investing a ton of $$ in this, but they are not close yet.

How many Donor Development employees do you have? How many are power users of CiviCRM? -- varies

How many are Development officers for fundraising? -- varies How do you best track moves management in CiviCRM? -- there isn't a lot of good moves management built in, but it can be added. However, RE moves management is not any better. I do think Salesforce kicks everyones butt here. We use our SF expereince to augment CiviCRM.

Who supports your instance of CiviCRM- you or an external vendor? -- We use BackOffice Thinking, they are the best, but I'm biased :)

---
Tags: evaluating-civicrm
---


# Question
Title: How to fix it? By pressing “Print Summary”, there are 2 extra blank pages printed
By pressing "Print Summary", there are 2 extra blank pages printed. One of them is before the content and the other is after. How can I make them disappear? I'm using CiviCRM version 5.10.4. Thanks.

# Answer
> 1 votes
There is CSS that is adding the space. When I remove the height for the following it will not print blank pages.

crm-container div.form-item { height: 100%; }

I would create an "extras.css" so that you can override some of the built-in CSS. You can specify a custom CSS file under Administer \> System Settings \> Resource URLs: Custom CSS URL. *Note: the path to the CSS file should be accessible from a web browser.*

If you add the following to the extras.css then it will fix the print of extra pages:

```
#Print1 div.form-item {
    height: 0;
}

```

When you go to print summary you can cancel the chrome printing pop-up and then inspect the CiviCRM page (it has the "print" and "done" buttons). You can further refine the print style using the Chrome Dev tools.

---
Tags: drupal, search, drupal-views, debugging
---


# Question
Title: ContactLayout extension not working with civicrm 5.10
So we are using Drupal 7 and civiCRM 5.10. We want to use this extension https://github.com/civicrm/org.civicrm.contactlayout

We have installed angular profiles (4.7.31-1.1.2) and API v4 (4.3.0) as well as the contact layout (1.3.1). We also have shoreditch.

When we navigate to Administer -\> Customize Data and Screens -\> Contact Summary Layouts all we get is an empty civicrm screen. When we try to view a profile with these enabled we get the error 'Api ContactLayout get version 4 does not exist.'

Any ideas about this one? I have tried having a search on here and a google of this error message, but so far I haven't seen this issue?

# Answer
**Short answer:** you need to update your extensions. Visit your extension admin page and apply all updates.

**Longer answer:** There are incompatibilities between older and newer versions of the *ContactLayout* and *Api4* extensions. The breaking change was introduced in ContactLayout 1.4 and Api4 4.3 (which were both released on the same day).

Either both extensions need to be *at or above* those versions, or both need to be *below* those versions. If one is below and the other is above, things will be broken.
> 7 votes

---
Tags: extension, contact-layout-editor
---


# Question
Title: CiviContribute Thank You Letter not emailed - using CiviDesk SparkPost
CiviCRM 4.7.22

I am trying to send CiviContribute thank you letters by email using this workflow:

Find Contributions \> Actions \> Thank-you letters - print or email

Invariably, I get the following error:

> An error occurred when CiviCRM attempted to send an email (via SMTP). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt. The mail library returned the following error message: The SparkPost service is unavailable due to a sending error, and the backup mailer is not enabled or not configured. This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » System Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are: Your Sendmail path is incorrect. Your Sendmail argument is incorrect. The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.

I am using CiviDesk SparkPost for my emails. I am able to successfully send transactional and CiviMail emails. My email address works just fine for these, and it is configured in the FROM email addresses. I am a site administrator, so full permissions.

Any clues? Thanks for helping me troubleshoot.

**Update**: I tested again using this workflow:

Find Contributions \> Actions \> Email - send now

And the Thank You emails went out without incident.

So it seems to me that my email setup is perfectly fine. This must be an issue with CiviContribute and the Thank You Letter workflow.

# Answer
> 1 votes
If anyone finds this post and is experiencing problems with the Sparkpost extension by PESC (not CiviDesk) this link may help: Event registration fatal error since v5.0.1

# Answer
> 1 votes
This appears to be a rather old bug. I opened an issue here and also a pull request.

The fix will be shipped with CiviCRM 5.12. Meanwhile, it's a 1 line patch that can be applied on top of CiviCRM 5.11.

The bug was specific to sending Thank You letters by email with the email address of the contact (even if it's an allowed domain, it was not specific to Sparkpost).

# Answer
> 0 votes
Spark post has limitation of checking from address belong to domain registered in sparpost i.e DKIM.

DKIM allows receiving email services to verify that message content was created by an agent authorized by the domain owner and that it has not been altered in transit.

The thank you letter form by default uses from address of logged in user to send email.

Solutions: 1. Submit a core patch to add from address on Thank Letter form. 2. or Update your primary email address with @domain.address.

HTH

Pradeep

---
Tags: civicontribute, sparkpost
---