Change permission to "Print Report" in CiviCase

sites/default/files/civicrm/templates_c is where temporary compiled files live. You could try instead editing templates/CRM/Case/Form/CaseView.tpl but there is no such thing as hasAccessToMyCases (where you've just replaced "All" with "My") so you'd need to use something else. But also note this will break when you upgrade since the file will get replaced.
What I would do is create an extension and in hook_civicrm_buildForm I would do something like:
if ($formName == 'CRM_Case_Form_CaseView') {
  $form->assign('hasAccessToAllCases',
    CRM_Core_Permission::check('access my cases and activities'));
}

This would also give access to the Audit Report, but you're probably ok with that since it's just a variation of the Print Report. I vaguely remember the original reason for restricting being something like "this would make it too easy for somebody to print it and then give it to an unauthorized person, either on purpose or inadvertently". It was a different era.
But it may also allow access to other things it shouldn't. Would need to test.
Then you also need to edit this line in CRM/Case/xml/Menu/Case.xml which controls access to urls, and then clear civi caches after at Admin - System Settings - Cleanup Caches.
<access_arguments>access all cases and activities</access_arguments>
change to
<access_arguments>access my cases and activities</access_arguments>
Also when you get redirected like that, if you then visit any civi page it will show you the actual error.


My site goes to maintenance mode spontaneously

I had a problem with the Backup and Migrate module where this would happen. There is a setting to put into maintenance mode while the backup is running. But the backup would error out and never turn off maintenance mode.


Can a price set item be marked "Partially Deductible"?

I think that's just a manually-set field.  It certainly predates the accounting improvements, and I think it predates price sets.

The problem is that it's not always a reasonable assumption that the bulk of a contribution is deductible.  You might have a organization with a 501(c)3 arm and a 501(c)4 arm.  The dinner is $500 per couple, toward the c3, with $100 non-deductible because it's the value of the dinner itself.  Then, they ask for a $250 contribution to the c4 on the form as well.  The result is that really only $400 of the $750 is deductible, but the non_deductible_amount is $100.

Really, this needs to be at the line-item level or dropped entirely.

I tend to avoid the field and encourage folks to just say in the receipt text that they received $100 worth of goods/services in return for the gift.  The donor can do the math, and it's not too important for the organization to track that at the contribution level.


Webform Select List using Existing Contact

This looks like a bug! Can you/Skvare help put a PR together to fix this issue?


System Status Notice about Timestamps and Timezones

I've found link go to Doctorw Wen in CiviCRM (WordPress version) by go to Administrator Menu and fix the notice "Timestamps and Timezones", Thanks!


I would make region and club to be Organization sub-type and make a relationship between club and region.
So you can use the contact fields for the address info and url and if you need you can add custom fields to each subtype.

Then there are 2 options imo:

Create a membershiptype per club, where each club is the Membership Organization.
Create a custom field of type Contact Reference and add it to the Memberships, where you can select a Club for each membership

Both have advantages and disadvantages. I suggest you try them and see for yourself.


Civirules: how to move contact into NEW group XX days after added to group

A rule can't be created without indicating an explicit trigger - there is a cron job for CiviRules whose description reads: trigger civirules cron triggers.

A few things about your condition:

If you are not 100% sure that the created date will always equal the activity date, you're probably better off using the activity date instead since this is user-driven whereas created date is system-driven
Using an operator of "Greater than or equal to" will allow you to capture any retroactively created/updated activities (another argument for using the activity date instead of the created date)
"Compare Value" assumes system date, so it actually needs to be negative to compare the previous 90 days (when you save the condition, you will see the date 90 days ago listed as follows: Activity.activity_date_time >= YYYY-MM-DD).

If you find that the activity based rule is not working out for you, you may wish to consider the development of custom triggers, conditions and actions as documented HERE.

Hope this helps,
Tamar


Mailing list member received unexpected opt-out message

In civi, you have two ways to be removed from a mailing: unsubscribe from the group or opt-out (from any mailing).

The later doesn't remove the contact from any group, but change the status of the email and automatically exclude the contact from any mass mailing.

When you do to the contact summary, do you have a red icon next to his/her email?

If you want to have the contact receive mass mailing again, you need to edit the contact and uncheck the opt-out (beware, you should only do that for contacts that actually want to receive emails)

As for why she/he was opted out, it's likely the email was forwarded around, and one of the recipient that received the forwarded email clicked on unsubscribe. Obviously, instead of preventing friends to forward you emails, it did unsubscribe the original recipient, hence the opt-out message.


Could CiviCRM 4.5 or 4.6 make it easier to generate large numbers of PDFs at once?

Are you using the wkhtmltopdf option in CiviCRM:

Administer CiviCRM >> System Settings >> Misc

http://d46.demo.civicrm.org/civicrm/admin/setting/misc?reset=1

Its a local binary installation (needs to be done by your system admin), but gives you a lot better performance than the php pdf libraries shipped with CiviCRM


KCfinder is very sensible with the path to image storage. It configured path to the storage must match the path send by the JS component exactly! It doesn't work well with symbolic links on unix.

On windows servers, there may be problems with capital letters and small letters too.

I'm not shure, if this may be the problem in this case, but just double check all configured pathes.


"content" needs to be a string if using that - it represents the actual attachment contents. What you probably want is the move-file one. If you're at /civicrm/api in the explorer click on the Code Docs tab at the top and pick Attachment for the Entity, then at the bottom of the text that appears is an example, just yours is slightly different since it's a custom field.

Also some assorted samples in here, e.g. https://github.com/civicrm/civicrm-core/blob/5.14/tests/phpunit/api/v3/AttachmentTest.php#L91


Why does CiviDiscount remove the url parameters after a discount code is applied?

Form submissions will always remove the parameters because they are now in $_POST and for example keeping "reset=1" would mean the form would reset and wouldn't get processed fully. So not just cividiscount. Some forms redirect to a different url and might add some parameters but that's specific to the form.
lcMessages is a bit special and yes maybe it needs some extra handling.


I need a developer for a custom extension where is the best place to ask?

The obvious place to start is the list of experts at https://civicrm.org/partners-contributors and select custom code and extensions


What is the best way to add a contact to existing membership using relationships?

From your description it sounds like you want to have a membership type that applies to a household and which subsequently applies to any individual with a given relationship to that household (probably the "Household Member is" relationship).

To make this work it needs to be set up before you have any memberships in your database. As soon as one of these memberships is applied to a contact, you can't then change the relationship element of the membership type.

From your question it sounds like this is where you are: you've created the membership type but not set the relationship, and then you have created a membership for one or more contacts and so can't now edit the relationship settings for the membership type.

How to get round this? One option that might be workable subject to the volume of memberships that you might need to edit could be as follows:

Create a new membership type that matches the settings of your current membership type, but add in to it the required relationship setting.

Then you could go through each of your contacts that has one of the original memberships, and edit it to remove the original membership and add the new membership (the one with the relationship setting in place).

Then any related contacts would automatically have the membership applied via that relationship. As I say this approach could be workable if you don't have too many records with the old membership, otherwise it might not be a sensible manual task, and an alternative approach, such as manipulating the database directly, or via the aPI, might be more suitable.

To add a relationship setting to your membership type, you need to decide which relationship is the right one. This is not necessarily intuitive, but depending on the version of CiviCRM you are running, there may be a useful pop-up help window when you click the question mark icon.

It reads:

"Use this field to configure Membership Types where memberships are automatically granted to related contacts. Examples:

Relationship Type: 'Household Member is'

Direct member is: a household

Membership is automatically granted to: 'Household Members' of that household"

I think that might fit your particular requirement. If required you can also optionally set a maximum to the number of these related memberships that are allowed. For a household this might not be particularly relevant, but is often useful when the direct member is an organisation.


How to get max_amount, min_amount from Contribution Page

what is that you have in the param?

I would suggest you to use the api explorer, it should guide you and the generated code can be copy/pasted in your plugin

Just to be clear: the min_amount and max_amount are the amounts a user CAN enter, it doesn't show how much has been given already. for that, you should look at the contribution api.getcount (and filter it by contribution_page)


Can I customize the contact relationship tab to show custom fields?

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

Custom Contact Relationships Tab

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

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


Front End Name List/Search Gives DB Error

Looks like you don't have summary_overlay profile in your civicrm_uf_group table. This is a reserved profile which we cannot delete or disable from UI.

So its possible if the name is edited or the profile is deleted from your db due to some reason. To check-

Open civicrm_uf_group table.
Check for the entry for Summary Overlay profile. This is with id 7 on demo site of civicrm.
If you don't find this profile -  error is due to this reason.
If you find it - check the name column of this profile and change if it is anything other than summary_overlay.


You can use $civicrm_setting variable to over-ride your CiviCRM settings. You can find documentation here.

To set extension directory you can use below snippet

global $civicrm_setting;
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/var/www/html/trcbtp/drupal/sites/default/civicrm_extensions';

You can also use civicrm token variable for dynamic path

1. [cms.root]
2. [civicrm.root]
3. [civicrm.files]

HTH

Pradeep


Is there a way to set the autorenewal checkbox on a membership contribution page to be ticked by default?

Unless things have changed I believe this requires a customisation. We did one a while back. I will check what effort is involved in getting it extracted in to an extension if there is not one 'out there'.


How to make my custom report template appear?

(Expanding comment as an answer...)

Reports > Contact Reports shows the Reports that have been created from Report Templates.  Your extension adds a Report Template, so from Report > Contact Reports, click 'New Contact Report' to see the templates. Select your template, configure and save as a new Report.


I can't answer on behalf of CiviCRM LLC but I can say that the only cookie I see is the session cookie which just stores a session id. However the session object on the server that matches that id has many things in it, but in any case the purpose within the code is usually to provide functionality, such as the recent history list in the sidebar, or even just basic access control.

What a system administrator might also do with the cookie would be specific to the site.


Please update your Extension Resource URL path as below and give a try
http://sitename.org/sites/default/files/civicrm/upload/

I guess this should work - please let me know the status thanks


Adding expired/grace membership numbers to the Membership Dashboard

In my experience, the Membership Dashboard isn't really a great tool, and I was it was deprecated.  It's extremely inflexible (as you're seeing here) and any reports you need can be placed on the main dashboard as a dashlet.  So I would recommend a different approach.

To answer some of your other questions - class names and file locations map to each other.  You should find the CRM_Utils_Array class in <civiroot>/CRM/Utils/Array.php.

Finally, it's a bad idea to change core CiviCRM files, because they'll be overwritten on upgrade.


Bee email composer integration (alternative to Mosaico)

The mosiaco extension integrates the mosaico editor for mass e-mail editing in CiviCRM. However it is not an e-mail service.

I dont know of anyone in the community who have been looking into it, however there is a question on Stack Exchange about integrating a bee template into CiviCRM: CiviMail/Cron Fails using BeeFree template


CiviContribute: change "from" email address for thank-you letters

A quick look at the 'Thank-you Letter for Contributions (PDF)' page suggests that you are not missing something, and that this is not possible at the moment.

I wouldn't call it a bug, I would call it a missing feature, but that is somewhat academic / pendantic :)

If you did want to be able to select a person, as you can when sending other mailings, you would need to add this feature. Either by asking someone to do it for you, or coding it yourself (not sure if you are a coder, Noky).

If you want to go down the first route, you can find a list of people that could help you do this here: https://civicrm.org/partners-contributors


CiviCRM Profile / new contact: is there a way to automatically update the Source Field?

If you are using Drupal, Webforms give you full control over these things.


Below are the simplified instructions taken from Moving an Existing Installation to a New Server or Location, but specific to answer your question.

Open the file wp-content/plugins/civicrm/civicrm.settings.php in any text editor and change the value for CIVICRM_UF_BASEURL with your new domain name
For CiviCRM Version 4.7 open the file wp-content/uploads/civicrm/civicrm.settings.php
Login into WP and navigate to

http://[your domain name]/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/setting/updateConfigBackend&reset=1

and clear cache and save the new base directory/path settings

Rebuild CiviCRM menu by navigating to

http://[your domain name]/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1


Primary Emails not Being seen as primary

I found a solution to this using the 'Update Multiple Contacts' feature. Here are the details:

I created a profile to be used for search views that contained the Org name and Email (main).
From search results I selected the Org that the primary email was not showing and selected 'Update Multiple Contacts' from the action menu.
I  selected my newly created profile for updating email.
When the update screen loaded I just hit the update button and this updated the main emails to be primary.

Since this was a relatively small amount of records this solution was manageable. Probably not the best solution for a larger amount of records.


Error al introducir un contacto -- Entered a contact name incorrectly

Puede ser que tu registro de usuario no incluye el permiso "CiviCRM: editar todos los contactos" - tendrias que pedir al administrador del sistema que añade este permiso a un perfil que está asociado tu registro de usuario (e.g. personal, editor, etc.).

Espero que esto ayude!

Tamar


Can I find the target contact ID in hook_civicrm_buildForm?

Not sure about them, but you can at least always retrieve the logged in user? Like so:

$session = CRM_Core_Session::singleton();
$userId = $session->get('userID');


Add fields in Matching CiviCRM fields on Import Contact

You can add custom fields for district.  Once you add the field you can map it in the import.  see http://gitbook.civicrm.org/organising-your-data/creating-custom-fields.html for how to add the field.

I'm not sure just what district is in this case.  If the addresses are for a foreign country that has district as part of the address, it may already sort of be there.  It may be stored in state province field.  If it is this case, you can see what's there by going to a contact, change the country and seeing what's in the pull downs.  If you are importing addresses from some other country you may need to add a field for country to your cvs.

I'm not sure I fully understand the mismatched file problem.  If you have both individuals and households in the same file you will get a mismatched contact problem.  Then you need to either run the file twice.  Once for individuals and once for households and ignore the errors or split the file into two.

The problem with the addressee is most likely picking the wrong field to map to.  The addressee field is expecting a smarty clause, like {contact.first_name}{ }{contact.middle_name}{ }{contact.last_name}, which creates the addressee on the fly by using using the values in other fields.  If you are trying import specific text to be the addressee then map it to "Addressee Custom".  (The same is true for postal and email greetings as well).


It seems like the Block editor no longer breaks CiviCRM shortcodes. But you do lose the quick CiviCRM shortcode button.

The classic editor plugin with Wordpress 5.0 makes the move easier. Personally we set the Classic Editor as default and allow users to switch to block with the understanding that they will have to generate the shortcode for civi elsewhere or memorize the shortcode params. ;)


I found a way to make this work, though I don't know if it is a solution or a workaround...

I made a page called Wordpress, and made the auto-generated CiviCRM page a child page of that page. Therefore the URL of that page is mysite.com/wordpress/civicrm and I suppose because that page exists, WP does not try to rewrite it? For some reason, it works now...


How can we have recurring related fields on custom report?

If you're using CiviCRM 4.6, there's now a CiviCRM report template that uses the recurring contribution table as a base and gives you access to a bunch of those related fields.

I've got a custom extension here: https://github.com/adixon/ca.civicrm.contributionrecur
which backports that report to earlier CiviCRM versions, and also adds a few more fields.

I notice in your picture you are actually trying to export records, presumably to generate a report in a separate piece of software. You can do something similar from any (CiviCRM) report, i.e. it has a csv download option, and the ability to select which fields to show.


Is it possible to set up to search name of attached document or better yet, contents of attach doc?

If you are on WordPress, there are at least of couple of plugins that do full-text search on files:

https://searchwp.com/
https://wordpress.org/plugins/opensearchserver-search/

Since the files uploaded with CiviCRM are stored in the same folder hierarchy as the other WordPress uploads those plugins should be able to index and locate these files.

However, they will not be able to link the document back to the CiviCRM contact they are attached to. This feature could be achieved with a custom development.


What's the problem with API V4 update to 4.3?

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?


Event Info, registration and other front end not displaying correctly

That page doesn't look unreasonable, but I'm attaching a screenshot here that shows a lot of failed css loads in the console.

I'd guess it's a file permissions issue (i.e. your server is unable to read those resources).


End-of-life for Web Spell Checker (WSC) dialog plugin for CKEditor 4

This is a solution that the client accepted so thought I’d share –
Enable the browser spell check functionality.
Administer > Customize Data and Screens > Display Preferences > Configure CKEditor
By default, native browser spell check functionality is disabled in the editor. Use the config.disableNativeSpellChecker configuration option to enable it:
config.disableNativeSpellChecker = false;

With this addition to the CKEditor configuration you should be able to see the spelling corrections underlined in your editor content.


You can get somewhat close to your desired functionality by putting the contacts in a smart group and displaying them within the relationship report.

Use the advanced search to display all contacts within the event (by adjusting the search fields within ("Events").
Add all the contacts to a new smart group.
Create a new report to show relationships (Administer > CiviReport > Create new report from template > Relationship report).
In "Filters", set "Group" to your smart group.
Adjust other report settings as necessary.

But I suspect the end result will still not be 100% satisfying. Groups of three might not display well enough for you.


Solved: CiviRules 2.1 and CiviVolunteer 4.7.31-2.3.1 not working with CiviCRM 5.4.0

Many post-upgrade issues like this can be resolved by clearing the caches.  It should be taken care of by the upgrade process, but it's worth trying it again.

You can clear the caches in various ways including: Administer > System Settings > Cleanup Caches and Update Paths > Cleanup Caches


cannot select profile for online event registration after upgrading civi on Joomla

I also had a similar issue where I could not select Profiles in Civi.  I am on a Wordpress site.  I found that Civi had a conflict with my theme (it was not a problem if I changed back to the default theme).  In my theme's functions.php file it had the following include which was causing the problem:

include_once('mkdinc/plugins/visual-composer.php');

I changed it to this:

if(isset($_GET['page']) && $_GET['page'] == 'CiviCRM')
 ;//dont include it breaks civi
else
 include_once('mkdinc/plugins/visual-composer.php');

and the profiles were useable again.  Hope that helps.


Not sure yet about SE protocol but there are other options than L1 L2 etc especially if there is no requirement to have separate Drupal domains for each component. For example, we have delivered multi-level permissioned solutions using the Related Permissions extension. This can go as many levels deep as required.

For example if Org X has permissioned relationship to Org Y, which has permissioned relationship to Org Z, then any 'officer' with a permissioned relationship to an Org at any point in the hiearachy will only see the Contacts that their Org, or and sub-Orgs have permissioned relationships to.

This is also explained here and a blog is well overdue. Obviously if you need Drupal sites at each tier then yes the L2, L3 model is one to go for.


CiviCRM Wordpress Cron not running - DB Error connect failed

The reference for cli is Manage Scheduled Jobs. It tells

  This method requires a valid Username and Password (for a Drupal, Joomla or WordPress user who has adequate permissions for the job or jobs being run).

So try to run it with a Wordpress user and password.


Unsubscribe Token for Subscription Reminders

Generally, there's not a way to opt-out of transactional emails, like receipts and reminders.

I found this in the documentation, which states

  Scheduled reminders are still sent to contacts who have opted out of
  bulk emails and those who have selected the privacy option Do not
  email.

It goes on to say

  If you want to exclude contacts who have opted out of bulk emails from
  a scheduled reminder you should:

  1) Find all contacts who have not
  selected the privacy options Do not email or NO BULK EMAIL.

  2) Create
  a smart group from the search results.

  3) Select this smart group as
  the Recipients of the scheduled reminder.


CiviCRM does not have permission to write temp files - halts the system

Thank you. Deleting everything as suggested worked. Problem solved.


Is it safe to remove INDEX keys for multi language installation?

CiviCRM adds indexes to custom field only if its searchable(checkbox ticked for is searchable field). Removing it might impact performance if your system has lots of records but you won't notice if its only 1k to 10k records.

But you trying to remove index which is not being used, so that should be fine.


How to make the City field a dropdown selection depending on the county selected?

I am not sure what you mean by 'is it possible'? My answer would be: yes it is possible but not without coding. You would have to make a small extension that would enable this.


I think the answer will be primarily a drupal answer ie you need to get the tokens for the submission values on the confirmation page. The best recipe (untested by me) that I can see that doesn't involve a custom module is here

Please report back how it goes.


We're in a bit of a transition phase at the moment with the tools we use for writing documentation.

The authoritative user and admin guide is here: https://github.com/civicrm/civicrm-user-guide.

fork the repository (you'll need a github account to do that)
make the edit directly on your fork of the repository
submit a pull request back to the original repository with a summary of your edit, why you made it, etc.

If it is a small edit, then the above is all you need to do. If it is a larger edit (or if you just feel like it) then you probably want to submit a documentation ticket on jira to discuss what you are planning on doing https://issues.civicrm.org/jira/secure/CreateIssue!default.jspa

If you think that you'll be making a few edits, then here's a bit more reading that you might find useful.

https://civicrm.org/blogs/michael-mcandrew/moving-civicrms-user-and-administrator-guide-gitbook-or-readthedocs
https://civicrm.org/improve-documentation


book library mgmnt and student credit system

In terms of Library functionality, not suggesting civicrm couldn't be bent do what you want (I will answer re school stuff separately) but you might want to look at http://www.koha.org/ which is open source library system that some other kiwis made


All schedule job get saved against civicrm_job. So, by restoring civicrm_job table you can get all the schedule jobs back -

If you are looking for just the standard schedule jobs then try to install the same version of civicrm in different instance and copy the table content to your DB


Can you change Added By information via a profile?

I dont think you can add source contact in profile field and do a bulk update. The options i can think of

Run sql query to update contact_id in civicrm_activity_contact table for record_type_id = source.
Or Export the activities you want to update and import them back with adding source contact id column in the csv file.

Thanks

Pradeep


CiviCRM send notification to admin if payment goes failed on recurring charges

welcome to CiviCRM Stack Exchange!
Navigate to Administer -> CiviContribute -> iATS Payments settings -> Here you can enter an email address which should be notified of failures (first option). There are some other settings here you may want to explore as well.


CiviRules - where is the data stored in the database? - backdating

Be really careful of what you are doing. But the delayed actions are stored in the civicrm_queue_item database table.

The column release_time indicates the date from which the action is going to be executed. The data for the action is stored as a serialized data blob in the column data.


How is the en-/decoding of the optOut-URL done ? (algorithm)

Welcome to SE!
You can see the construction of the opt-out URL here and the processing of it here

'jid' is the Job id
'qid' is the Queue id
'h' is the Hash

The contact_id is not included in the URL but can be looked up via the qid.


Is there anything stopping you using Custom Fields to do this? Thats normally how people add extra information they wish to hold about the event. You'd then need to do some work on the display side to use the image.


How to make the callback URL from Mailchimp accessible from anonymous users in Wordpress?

WordPress does not require that a role be given to users who only visit your site (e.g. to read posts) so long as it is public - roles are only required when logging in. However, for a WordPress client using the MailChimp sync, we found that we needed to create an Anonymous User role with the webhook permissions assigned - once you do this, pasting the webhook in MailChimp should no longer result in an error.

To clarify, no one has to be assigned the Anonymous User role for this to work.

Hope this helps!
Tamar


Donor personal information exposed in Google searches

1. Find and Fix the problem:

1a) Check your Permissions settings in admin/people/permissions
Look in the Anonymous User role column -> for permissions such as : View Any Contact in the CiviCRM database; There are a lot of settings - examine them all - and remove any checkboxes for Anonymous that are not appropriate;

1b) It's also quite possible that you've misconfigured Profile/Fields to be listed publicly; here's the documentation for that: https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/#making-directories-with-profiles - note that for every Field in a profile - you can specify it's Visibility; examine if any of the fields are set to Public (and if so - correct them to User and Admin);

2. Address the Google Indexing: get into your Google Webmaster Tools account (create one if you don't have one yet) - and remove the unwanted links from the Search Index.


confusing interface for staff registering contacts for events

This is an inconsistency in the CiviCRM interface that others have noticed before as well.

This inconsistency does NOT exist for the "New Contribution" screen - because that screen has a "submit credit card contribution" link to bring you to the live entry screen.

For kicks, I added &mode=live to the "New Event Registration" URL - and it APPEARS to work.

I would recommend:

Append &mode=live to the "New Event Registration" URL and confirm that it works correctly.
If it does, it should be a simple matter to submit a patch to generate the "submit credit card registration" link to the appropriate template.


I got the issue. It was due to .htaccess authentication on entire site.

In such access denied cases, CiViCRM API should give some proper response message like "Access denied" or "Authentication failure" instead of just Unable to parse returned JSON


In civicrm.settings.php there's some settings to log it all to a file. See https://docs.civicrm.org/dev/en/latest/tools/debugging/#changing-file-based-settings

define('CIVICRM_MAIL_LOG', '/file/path');
define('CIVICRM_MAIL_LOG_AND_SEND', 1);


Control content access in larger Wordpress site using Civicrm credentials

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

EDIT - Christian is recommending this plugin instead


Should Manage Groups display the Smart Group contact count, or just display it as Unknown

The issue was solved very simply, you just need a non-zero smart group cache timeout for the problem to go away.


Is there a way to capture the event price "label" with Webform CiviCRM?

I wonder if this is another example of this issue?
https://www.drupal.org/node/2840851

Short version - Webform CiviCRM does not provide line item detail to CiviCRM, which only guesses, sometimes wrongly, the details. That issue provides a patch which tries to make smarter guesses.


HTML_QuickForm_Controller: Unhandled action "_qf_Main_reload" in page "Main"

Could you please confirm if you have CiviDiscount extension enabled and on latest 3.8.2 version?
Similar issue was recorded for CiviDiscount on gitlab.
HTH
Pradeep


Since that activity type is sort of a system type and is marked Reserved to discourage editing it, I don't think there is currently a way. Since you must have disabled it in the database outside the UI you might be ok with a workaround involving some coding. You might be able to write a little extension to use hook_post to delete activities of those types after they get created: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_post/


How to show CiviCRM menu for non admin role using WordPress?

If I am understanding correctly you wanting other roles to access CiviCRM menu, which is linked to the WordPress Access Control and giving that role CiviCRM: access CiviCRM. You would then have to give them the access to whatever other features are needed. These settings are in Administer > User and Permissions > Permissions (Access Control) and select WordPress Access Control.


To close this out, I have actually written a custom PHP script to do this for me in a nice table format. I inject the PHP using a wordpress plugin call XYZ PHP Code and it works great.

you can get the script here: http://txt.do/d01fm


My cronjob fails to run my Civimail queue. What am I missing here?

Your script is nicely designed for running the civi cron using "cv", quietly in the background. But you want to run it w/ noise so you can debug it.

To start, try running it manually without the last line and see if you get anything. The main script here is "cv" (run as a php script) and the other bits are making sure cv runs with the right arguments. If it's quitting silently, try something simpler, like seeing if you can actually run php and then if you can run cv via php with a simpler argument like "vars:show".

Documentation of cv is here: https://github.com/civicrm/cv


How do I suppress the "are you sure you want to leave this page" popup from contribution page

CiviCRM uses jQuery to watch form inputs and give a warning only if there are unsaved changes. You'll find the code for it in Common.js. When I try out a sample contribution page on the demo server it looks to be working correctly; if I open a contribution page, enter nothing and close the tab, I get no warning. But if I enter an amount and then try to leave it pops up the onbeforeunload message.

If you're up for it, debugging the CRM.utils.initialValueChanged function to find out why civi thinks the form has been changed when it hasn't would be helpful feedback for us improving the software.

Or you could just add a little javascript to your FB login button. If the existing markup looks like <button type="submit"> then you could add to it so it looks like <button type="submit" onclick="window.onbeforeunload = null;">

But seriously, the debugging feedback would be helpful.


Check how this bug was fixed elsewhere https://github.com/veda-consulting/uk.co.vedaconsulting.pcpteams/pull/216


Edit profile the triangle just keeps spinning

This sounds like a javascript error. Try going through the following troubleshooting steps:

Troubleshooting popups, autocompletes, or other javascript problems.


Would this be of help?
https://civicrm.org/extensions/fancy-tokens

" There are several tokens for different time periods of upcoming events, such as 7 days, 3 weeks, and 3 months. After inserting the token into the body of the message, you can change the numeric portion of the token to whatever you prefer. This token will produce a nicely formatted HTML list of upcoming events, ie events starting after now() but before the end of the time period chosen. All event titles will be hyperlinked to the event information page."


CiviCRM identifies itself over SMTP as 'localhost' while sending CiviMail via CLI


Where should one look for logs when debugging a new problem?

It really depends on the type of error you are getting. If something is wrong with the display or some ajax functionality isn't working I check the JavaScript console. If there is an actual error message I check the php log and then turn on display back-trace to get a better view of where the problem is occurring.


Sorry, this is a half-answer.

The HTML encoding is being added because this line is adding default 'wrapper' functions that include adding HTML entities (CRM_Utils_API_HTMLInputCoder).

You can fix this by altering the defaults passed into WrapperAdapter::construct(), to include 'content' in the array of skipFields. I think you could do this here.

Just add a line like

'content', // For attachment.create

This does work - I tried it.

However this may not be secure because I don't know if any of the other APIs use the rather generic 'content' parameter name. If they do, then removing the protection afforded could result in XSS vulnerabilities or other problems.

So the other way to fix it would be rename the API content something more unique attachment_content - but that would require changing a public API (!)

So another way would be to put in some sort of check that changes the default wrappers for the particular case of attachment.create, but I'm not familiar enough with the internal workings of the API system to suggest that patch.

Hmmm.


Can ExtendedReports report on CiviDiscount usage?

Yes - you can now!
See https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/pull/148

Adding field label from the civicrm_line_item table allows admins to search (i.e. filter) for Contacts, Contributions that have had a discount code applied to them - in the standard report environment so Actions (exports) as well as Add to Group are available out of the box.

The screenshot below uses template civicrm/report/price/contributionbased - but any ExtendedReport will now have line label as a field/option for you to specify what discount code you'd like to search for.


Normally you could handle this with an API Join rather than an API Chain but unfortunately the Participant API is one of the four quirky entities that don't support this.

APIv4 is under heavy development right now, and one of the primary goals is to standardize these four entities to eliminate this limitation of APIv3.  You may want to test APIv4 to see if it meets your needs yet.


I made the A# field part of Individual rather than the Detained Persons an Individual sub-type. Many non-detained persons have A#'s so its appropriate. Now that A# is at the Individual level, it was possible to add it to an unsupervised dedupe rule like email. This seems to be working.


The correct answer is to put the text

Red,Blue

without quotes in a single cell of the CSV that you're trying to import.

You also need to make sure that the field you're importing into allows multiple values to be set, not just a single value.


Webform (Contact Create API) doesn't set Communication Style

If Communication Style is set to Formal -> is_default on:

civicrm/admin/options/communication_style?reset=1

Then that's what shows in the Contact record (see below); Are you saying that webform_civicrm removes this default for existing contacts; or that new contacts have their is_default set wrong?

Added: I've confirmed that creating a New Contact with the API leaves the Communication Style 'blank'. However one would expect it should be setting it to the default value that is specified in the Administer settings.

So it's an API issue - we could fix this in webform_civicrm - by explicitly passing on a value for Parameter Communication Style - but I think it should be fixed in CiviCRM Core itself.


By default, CiviCRM requires at least one of email, first name, or last name. You can change this at Contacts > Find and Merge Duplicate Contacts, creating a new rule and setting it for usage when unsupervised, or, more appropriately, by selecting it as the Dedupe Rule when importing at Contacts > Import Contacts. Beware of setting the rule to identify duplicates too loosely, as you will end up with lots of duplicates in your database. This is a complicated, tricky area...good luck.


How to test for CiviCRM status messages in selenium?

So one possibility is to use Selenium2TestCase as your base class for you test...

I've been using Selenium Standalone Server 3.3 (looks like 3.4 just released)
http://www.seleniumhq.org/download/

So its a little different that SeleniumTestCase, because Selenium 2 uses the WebDriver, and support for firefox may require you install the third party gecko drivers, there's a chrome driver there too that works really well.

So I have a test class that extends Selenium2TestCase , and added this helper function:

/**
   * Utility function to wait for an element to be displayed
   *
   * @param $elementCssPath
   * @param $timeout
   * @return \PHPUnit_Extensions_Selenium2TestCase_Element
   * @throws Exception
   */
  public function findElementWaitUntilDisplay($elementCssPath, $timeout){
    $this->waitUntil(function() use($elementCssPath){
      if ($element = $this->byCssSelector($elementCssPath)) {
        if($element->displayed()) {
          return true;
        }
        else {
          return null;
        }
      }
      return null;
    }, $timeout);
    try{
      $element = $this->byCssSelector($elementCssPath);
      return $element;
    }
    catch(Exception $e){
      throw $e;
    }
  }

So then you may have a test use it like so:

testStatusMessageDisplayed() {
  $status_message_element = $this->findElementWaitUntilDisplay('whatever-your-css-selector-is', 5000); //wait 5s for status message to appear
  $this->assertEquals('expected text', $status_message_element->text());
}

This helper function has been coming in handy, whether I am waiting for a page to load, or an ajax request, or some javascript rewrite the dom.


why i cannot get all number errors when importing data

I am not sure how you got 500 Error because by default only 250 errors will be printed in civi. if you want the full list just go to CRM/Import/Parser.php file and change the const MAX_ERRORS value. This way you can get the full list. also do consider the DEFAULT_TIMEOUT.


SEPA Mandate not visible on Contact anymore

Welcome to Stack Exchnage Hans-Christian.
The latest version of CiviCRM contains changes regarding the display of custom tabs in the contact view that also affect CiviSEPA. You should be able to fix the described issue by upgrading to the latest CiviSEPA version (1.5): https://github.com/Project60/org.project60.sepa/releases


It seems to mean you are trying to import the latitude (or longitude, never remember) of your contact. Do you really have a column that contains that?

Sometimes, the suggestion to map your columns in the csv file and the fields in civi aren't correct, check that you aren't trying to import a completely unrelated "code" column into that "geo code +" field.

Your easiest bet to see what's the expected format of each of the fields is to export a few contacts from civi and include these fields, so you can see how you need to format them on your own file.


How to store emergency contact phones related to a contact without creating new contacts?

I can see a few options:

create phone types (or perhaps even location types if it is more than a phone for an emergency) like 'parents phone'. This is what I have done myself for a youth choir
create a custom data set 'emergency phones' for individuals. If you set it to allow multiple records you can have a group with a label field and a number field
you could indeed use notes but I would not recommend that as it is unstructured data
an extension seems like overkill to me in this case