hook_civicrm_alterCalculatedMembershipStatus It seems that hook_civicrm_alterCalculatedMembershipStatus is the right place for adding various actions based on Membership change. It looks like there is some issue with $membership array from the calling function.
I v'e started the hook exploration with the code below:
mail('my@email', 'title', print_r($membership, true));

and get two emails with different arrays (with 6043 part is being changed instantly):
[custom_2_6043] =>
[custom_4_6043] =>
[custom_5_6043] =>
[custom_7_6043] =>
[custom_10_6043] =>
[custom_11_6043] =>
[custom_12_6043] =>
[custom_94_6043] => 0
[custom_19_329] =>

and
[custom] => Array
        (
            [2] => Array
                (
                    [6043] => Array
                        (
                            [id] => 6043
                            [value] =>
                            ...
                        )

                )

            [3] => Array
                (
                    [6043] => Array
                        (
                            [id] => 6043
                            [value] => 0
                            ...
                        )

                )
            ...
            [94] => Array
                (
                    [6043] => Array
                        (
                            [id] => 6043
                            [value] => 0
                            ...
                        )

                )

Since we aim to perform an additional action based on a custom field value, it seems a bit tricky to catch custom field by its key without searching by field key in array or as a part of a [custom_KEY_6043] string. Besides, if there are  two emails, it might mean the hook is being executed twice.
Am I taking right direction here? What would be the simpliest way of getting
if field value is X [then do Y]

Please advise.

That hook is intended for overriding the effects of the membership status rules ('Current', 'Grace', 'Expired' etc).
If you want to take action based on membership changes, try CiviRules


What is the recommended/supported version of Webform CiviCRM module for Drupal 7? What are the differences between Webform CiviCRM versions 7.x-4.x and 7.x-5.x?

The recommended/supported version is 7.x-5.x
If you're on 7.x-4.x (or below...) you are strongly encouraged to upgrade. The newer 7.x-5.x branch includes many bug fixes along with improvements in the code base, e.g. many direct database queries have been replaced by API calls.
Next week we will be going through the drupal.org webform-civicrm issue queue and we will be closing issues as outdated if they are against 7.x-4.x or below.


l10n Translations does not show in settings I'm using Civicrm v4.7.19 on Drupal,

for using another language (like ES/DE) I've been creating directory:
/public_html/sites/all/modules/civicrm/l10n

And the "mo" files placed in these addresses [both for testing]:
/public_html/sites/all/modules/civicrm/l10n/es_ES/civicrm.mo
/public_html/sites/all/modules/civicrm/l10n/de_DE/LC_MESSAGES/civicrm.mo

But the Localization settings page don't show the languages.

Can you check:

Go to Administer > System Settings > Option Groups
Then search for "Languages" and click on its "Options" link.
Double-check that the language is enabled.

Otherwise, it might be a file permission issue: can you check to make sure that the web server has permission to read the l10n directory and files?


Can we do quick search on non primary details? There is a option called 'Search Primary Details Only' under Administer >> Customize Data and Screens >> Search Preference when set to 'No' it works only when searched using search forms like Advance contact search or Find contact search but the quick search on top left corner doesn't respect this setting. Is it a core bug or intended to search on primary details or never supported?

There has been discussion going on to implement this in CiviCRM core code, developed a small extension to do that for time being until its been implemented in core.


Cloud-based or local network storage Maybe I'm just not looking on the correct pages for this issue.  Once I download and set up a CiviCRM database, is the actual data saved to a cloud?  Or, can I save it all to me local drive or network?

Thanks, G

Please refer to CiviCRM documentation, section on installation here https://docs.civicrm.org/sysadmin/en/latest, CiviCRM database is stored on your hard drive or local network depending on your setup


Can I add sent mailing to a campaign The NGO I'm working with decided to create campaigns for all the ongoing projects. We weren't using this information previously, so I wasn't tagging the mailings to a project but now retroactively some of the mailings belong to some of the campaigns. Is there any way that I can edit the sent mailing and use campaign information?

campaign_id is a field in the civicrm_mailing table in your database. I suspect that the only ways to modify this are
- edit the db directly
- use the API Explorer to change the value assuming this is available via the UI (via /civicrm/api#explorer)

hopefully those are enough pointers for a start


linking email subsciptions to WordPress blogs to CiviCRM I am adding a blog to the WordPress site on which I am running CiviCRM. I want to include an email subscription to the blog. Ideally I'd like to link this subscription to the CiviCRM contact (for example: so that I can send subscribers extra emails or that I can send invitations to the blog to non subscribing members)

I have found a couple of solutions to the blog subscription (JetPack and Mailchimp) but neither link with the WordPress users or CiviCRM contacts.

I may well be able to use the Mailchimp CivCRM Integration plugin to link it all up, but I'd still rather avoid using Mailchimp because of the cost if the blog really takes off and I don't need any of the other functionality.

How to automatically create mailings from an RSS feed looks to have some of the functionality, but would still need development beyond my capabilities and I'm not sure its active.

Has anyone found any good solutions to this?

I'm not sure if this would work with Wordpress but you could do something like: https://civicrm.org/extensions/content-tokens  to pull in the content combined with
https://civicrm.org/extensions/scheduled-communication to automatically schedule the mailings.


Getting an error with mailchimp plugin We have installed the mailchimp plugin from veda consulting.  The plugin was working until recently

when I try to access this
page https://www.fremantlechamber.com.au/civicrm/mailchimp/settings?reset=1

I get the error below.  I checked the groups and they are all correctly
synced to the plugin and not referencing a list in Mailchimp that does
not exist.

Sorry but we are not able to provide this at the moment.
Invalid MailChimp List ID: e33355b9f6

Return to home page. https://www.fremantlechamber.com.au/

Can you please assist.

A CiviCRM group is mapped to the list ID of a Mailchimp list or interest which is not available (deleted on Mailchimp, or belonging to another Mailchimp API key, or ...). Review the groups which are syncing to Mailchimp, and make sure each one of those connects to a current / valid List or Group in Mailchimp.

There are DB tables you might be able to identify the specific group ID from. Look in civicrm_value_mailchimp_settings

mysql> select * from civicrm_value_mailchimp_settings;
+------+-----------+------------+----------------+-------------+-----------------------+
| id   | entity_id | mc_list_id | mc_grouping_id | mc_group_id | is_mc_update_grouping |
+------+-----------+------------+----------------+-------------+-----------------------+
|    1 |       123 | aabbccddee |                |             |                  NULL |
|    2 |       124 | 1122334455 | beadbeadbe     | aceaceacea  |                     1 |
|    3 |       125 | 9988776655 | facefacefa     | deadeddead  |                     1 |
+------+-----------+------------+----------------+-------------+-----------------------+

The column entity_id is the relevant CiviCRM Group ID, and you'll see e33355b9f6 in one of your other columns I expect.


Gravity Forms and CiviCRM Anyone have success integrating Gravity Forms with CiviCRM? Alternatively is there another WP form plugin that works with WPML and CiviCRM.  A plugin would be great.  We are looking at the CiviCRM API, but hope to get advice from someone that has done this before.  Thanks.

There are currently two Wordpress integrations that I know of:

1) Contact Form 7 integration, developed by CiviCoop, here more info about it, I haven't tried it yet but looks promising.

2) Gravity Forms integration (paid for add-on) developed by Civivip, link to their shop, it supports Contacts and Activities entities.

Edit

Here's the Caldera Forms integration that I'm working on (the one I mentioned in the comment), is still in progress but is usable, if anyone wants to try it I recommend doing it in test environment first.

Github repository: caldera-forms-civicrm

You will need the Caldera Forms plugin installed previously, and of course CiviCRM, for it to work.


Error Backing Up Database using drush: Call to undefined function drush_sql_dump_execute() I am running Drupal 7.37 and CiviCRM 4.3.8. I am in the process of upgrading both, but currently get an error when manually creating a backup of the CiviCRM database. All regularly occurring daily backups are fine.

I used this command:

root@web:/path/to/docroot# drush civicrm-sql-dump > ../civicrmdatabase-backup1610312230.sql

Which returned:

PHP Fatal error:  Call to undefined function drush_sql_dump_execute() in /var/www/html/civicrm/v4.3.8-d7/drupal/drush/civicrm.drush.inc on line 959
Drush command terminated abnormally due to an unrecoverable error. Error: Call to undefined function drush_sql_dump_execute() in /var/www/html/civicrm/v4.3.8-d7/drupal/drush/civicrm.drush.inc, line 959

It may be helpful to know that I am using a symlink from the Drupal modules folder to the civicrm install folder for now. Any insight into this error or an alternative to taking an immediate backup without installing anything would be appreciated, thanks!

I would bet almost 100% that you're using drush 7 or higher.  The function drush_sql_dump_execute doesn't exist in drush 7.  Support for drush 7 was added as of CiviCRM 4.5.5 - see CRM-15567.

That link suggests that drush 6 has the same problem.  I would recommend using mysqldump until you're upgraded.


How do I access Mosaico on CiviCRM Spark instance? My client paid the upgraded fee for CiviCRM Spark Hosting with CiviMail and Mosaico. CiviMail is working, but Mosaico isn't under Mailings as it is in other CiviCRM instances I work with. I also can't find anywhere to enable it.

It is an Extension and you would need to 'install' it via the Extension page. Administer > System Settings > Extension


Membership Renewals with 'Partner' relationship causing membership lapses/missing contribution Contact A has an expired Membership which was granting Membership to Contact B through 'Partner of' relationship. Contact B renewed after Contact A's membership expired through an online contribution page, and the record showed the contribution, however their membership had the status of 'Expired'. Not knowing what to do, we deleted the relationship from Contact B to Contact A, and then re-added it. Now Contact B shows no contribution and no membership. What happened, and is there a way to fix this?

Ultimately what we want is either Contact A or B to be able to renew the 'joint' membership - does Civi support this?

CiviCRM 4.6.7 on Drupal 7

"Ultimately what we want is either Contact A or B to be able to renew the 'joint' membership - does Civi support this?" No it doesn't support this. Generally I think users work on assumption that reminders should only go to Contact A, andI would suggest preferably with a checksum to a renewal form that sets First/Last as read only to stop contact B clicking on the link in the email without checking who it was to, and hence avoid risk of having name overwritten


How can I reset a user password for a PCP owner? A donor/owner of a PCP has lost her password. How can I help her?

The precise steps to reset a user's password will depend on which CMS platform you are using (i.e. Drupal, WordPress, or Joomla). The CMS — not CiviCRM — manages user logins and passwords.

Nevertheless, the first step is usually to find the user's contact record in CiviCRM and click on the link to the user's associated CMS record as shown below.

Once you've reached the page for the CMS record, resetting the password will hopefully be intuitive. If it's not, then I'd suggest searching the web for something like "Reset Drupal user's password" (or similar, for other CMS platforms).

If you don't see a "User ID", as is shown in the screenshot above, then it can be a bit tricky. Most likely there will a different (duplicate) contact record in CiviCRM which will have an associated CMS record.


How can I change the user access permission (read write mode for different user) using drupal and civicrm? I want to set a different values for different users(Read/write permission) by using php not by a customizing (Drupal menu - > People -> permission).

Assuming you are interested in CiviCRM permissions rather than Drupal content, take a look at the Hooks section in the Developer guide, specifically the Permission Hooks subsection.


Can Legal Name be used as a token? I need to use an organization's legal name for invoicing. I have already customized the invoice template for many other fields, but cannot see how to insert Legal Name as a token.

I note this 10 year old forum posting saying that the Legal Name field was not exposed to the token system:
https://forum.civicrm.org/index.php?topic=832.0
Is this still the latest answer?

I know I could add this to my custom field set for organization financial info, but I would rather not duplicate existing field names.

Likewise I can put the Legal Name in the Organization name field, but that renders the Legal Name field redundant (and gives me long, unwieldy org names)

We're running 4.6.24

In order to use legal_name against your message template the best way would be enabling CIVICRM_MAIL_SMARTY to 1 in civicrm_setting.php
By doing this you can access {contact.legal_name} in your message template
I did made a test against Version 4.7.15 which worked. so please give a try
Reference: https://wiki.civicrm.org/confluence/display/CRMDOC/Smarty+in+mail+templates
I guess this helps!!!


Force user to confirm signup CiviEvent Is it possible in some way to force users to confirm their signup before closing the window or leaving the page when they are on the confirmation page.

We've had to many persons missing doing that.

There is a little piece of javascript that kicks in on the contribution page to warn a visitor if they try to leave before submitting the form. It sounds like you want to have something like that for the confirmation page? I think that would be a useful feature. Forcing the user to do anything is going to be a non-starter of course ...

Alternatively you could also configure your contribution to skip the confirmation page.


spam problem (inbound mail) I do have problems with some inbound e-mail processed by mail to activity. Some spammer got hands on the e-mail address for e-mail processing to activity. I have listed the e-mail address displayed by civi to the pop-mail-boxes spam filter (spamassassin):

preference  value
blacklist_from yxz@spam.com

however the spam still goes to civi's inbound mail...

To do further inverstigation I need the e-mail header, which is not displayed in civicrm U/I.

Is there a way to see the header, probably with a mysql statement. I think it should be somewhere in the database...

Thank you for your assistance!

A copy of the raw email is in the CiviMail.processed folder under the "custom" folder. Depending on the CMS you are using the location is different, but e.g. for Drupal it's usually sites/default/files/civicrm


NEWBIE: Is CiviCRM RIGHT FOR US I have a nonprofit organization who wants to manage their members and create a paperless membership management environment. Some of the specific, out of the box needs are:

The ability to manage roles and functions within the organization, such as executive board members, officers, chairpersons, committee assignments, etc.
Pay dues with installment options and late fees
Customizable member profile options
Manage events
Manage yearly obligations

The interface would be for internal use only, sort of an intranet. There would be no outside membership subscriptions. We are currently on a Joomla platform. Can CiviCRM interface. Is this a good choice?

It's an excellent choice for you. I've run Civi on both WordPress and Joomla and it does everything you are asking and more. Right now, I have at least a half dozen sites under my care on both Joomla and Wordpress. Depending on the size of your organization, Joomla may be the perfect, especially if the client is already accustomed to using Joomla. The ACL will probably be a little more familiar than in a WordPress environment.


Issue with Drupal 8 CiviCRM Views + CiviCRM event Does anyone know how to create a Drupal view to show only future/upcoming CiviCRM events in Drupal 8?
I tried by adding the Event start date as filter but it doesn't provide the filtering options to set the date or choose an offset like it did in D7.

I just checked and this is working using the latest D8 CiviCRM Entity - it is under development, so best to use the latest directly from its GitHub Repo:

https://github.com/eileenmcnaughton/civicrm_entity/tree/8.x-3.x

If you're interested in helping us to advance/accelerate this development - consider becoming a Maker/sponsor of the D8 integration projects (D8 Webform CiviCRM and D8 CiviCRM Entity) modules.


Send rejected participants to wait list? I would like to configure CiviEvent so that rejected participants are sent to the waiting list - is this possible?

Or is the easiest thing just to rename the Rejected status to something that sounds less final?

If you look at the participant statuses (Administer>CiviEvent>Participant Statuses) you can customize these any way you want. You can use the wait list by manually changing to that. The key is how they are counted. If you look at the class column you will see the following:

Positive - paid in full, etc.
pending - counted but awaiting payment, can from pay later or just moved off wait list.
waiting on wait list or some other state (not counted)
negative - rejected or not approved, etc.

You can manage the statuses in what ever way best fits your process. You want to make sure your reporting reflects how you decide to use statuses. Also, make sure you aware of which statuses are being counted against the participant total.

Hope this helps


Custom fields in CiviGrants I have just added some custom fields to grants but they dont show in reports - what have I missed? How do I get them to show up and be available in reports?

Cheers - Phil

Did you make the custom fields 'searchable'?

Because then they should pop up in your report. I tried it on the civi demo
(http://d46.demo.civicrm.org/civicrm/report/instance/29?reset=1) and there they showed up.


KCFinder in https context doesn't browse First of all, I use CiviCRM 4.6.2 with Drupal 4.7
My website works with a ssl certificate, so the url is https://www...
In CiviCRM I try to send a new email. In The text editor there is a button to insert or edit an image. It open KCFinder but when i click on "browse" to browse and find an image, it doesn't work. In the Google Developer Console it says : "Mixed Content: The page at 'https://www.xxx.com/sites/all/modules/civicrm/packages/kcfinder/browse.php?opener=tinymce&cms=civicrm&type=image' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Oxygen:400,300,700'. This request has been blocked; the content must be served over HTTPS."

I understand this message but I don't know how to fix it...
Any advise ?
Regards,
HashKey

I changed http to https in my theme css and the message disappeared.

Now there's still one error.

I changed the editor from tiny or CKE to "default drupal editor". And it WORKS !


Scheduled reminders have stopped working in v.4.7.8 Just discovered that scheduled reminders have stopped working and appear to have done so since updating CiviCRM to v4.7.8 on 3rd June.  The following error message is in the scheduled jobs log:
Summary
Finished execution of Send Scheduled Reminders with result: Failure, Error message: Cannot build query. Variable "@memberTypeValues" is unknown.
Details
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Send Scheduled Reminders with result: Failure, Error message: Cannot build query. Variable "@memberTypeValues" is unknown.

Other points to note:

Wordpress version 4.5.2
Other CRON is working
No extensions are installed
Scheduled mailings are going out OK

Can anyone tell me where I should be looking for errors or are there any known bugs?
Many thanks

Yesterday, the scheduled reminders started working again!  This was after I had disabled and then re-enabled 'Membership Types' in Administer/Civimember and also upgraded to v 4.7.10
Hope this helps anyone having the same problem.


Use activity or event? my organization would like to let users (anon and auth) be able to submit a request for a workshop via a drupal webform which would then be approved or denied based on various criteria by management.

Would it be better to have the webform submission trigger civi to record a new event, or activity (i.e. email response) from an admin?

A drupal webform cannot create an event (it can register a person for an existing event tho... is that what you meant?). It can create an activity, which, even if you don't use it as part of your approval workflow, might be useful just to record the fact that the person submitted a proposal.

It's hard to say what you "should" do because you haven't described exactly what your end goal is. Is a workshop ultimately going to be a CiviCRM event, with participants registering, etc? Or something else? I'm not sure that you necessarily need to be creating anything in Civi for your purpose. Maybe all you need is the webform submission. Or activities might work well for you if you create a few extra activity statuses like "Proposed" "Approved" and "Rejected". Or if you wanted to get really detailed in your record keeping, you could have the webform open a case, which would let you record all your back-and-forth (as activities) and the details of exactly when and why the session was approved or rejected.

Seems like the bottom line is that you'll end up creating the actual sessions by hand (as Civi events or whatever else) so that's not really part of the equation here, so you should just do whatever works well for you to record the proposals and manage the acceptances.


Send an Email When Tag is Applied - or When Added Automatically to a Smart Group I'm looking to set up a series of drip emails once a contact is tagged. Unfortunately, the rules around tagging are convoluted to the point where I'm afraid to use them since I have the potential to send an email out to many people who I don't wish to receive the email. There are also no instructions regarding how to trigger an action using tags.

Because of this, I created a rule indicating that when a contact is added to a smart group, which occurs when they are tagged, that they will receive an email. And an email is sent when I add a contact manually, but not when it is done automatically via the smart group rules.

Goal: to send a contact an email once they've been tagged.

You should be able to do what you're describing using CiviRules.  However, to be safe, I would start by testing with an action other than sending email - or at least do it on a test server that redirects emails to the logs rather than sending live emails.

Here's a screenshot that shows how to set up what you're describing.  Note the trigger ("Tag added to entity") and linked condition ("Contact has tag").


Unable to Connect to MailStore for Bounce Processing Tested on Wordpress 4.7.3 and Joomla

CiviCRM 4.7.16

We've set up a domain for all Civi-related mail processing for our CiviCRM clients for whom we provide site management. For one account we are unable to get the bounce processing job to connect to the mail account. We have no issues using the mail account to send and receive from both webmail and setup in a mail client. All ports are open and functioning. We've tried both IMAP, POP and SSL, TLS. Fails every single time.

Any ideas?

Here is the entry from the ConfigandLog directory:

Mar 16 17:14:22  [info] $Fatal Error Details = Array (
  [message] => Could not connect to MailStore for lemoyne_bounces@mailprocessing.org
    Error message:
    An error occured while sending or receiving mail.
    Failed to connect to the server: mailprocessing.org:143.
  [code] =>
)

Mar 16 17:14:22  [info] $backTrace = #0
/home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(331):
CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Utils/Mail/EmailProcessor.php(177):
CRM_Core_Error::fatal("Could not connect to MailStore for
lemoyne_bounces@mailprocessing.org<p>Error...")
#2 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Utils/Mail/EmailProcessor.php(58):
CRM_Utils_Mail_EmailProcessor::_process(TRUE,
Object(CRM_Core_DAO_MailSettings))
#3 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(361):
CRM_Utils_Mail_EmailProcessor::processBounces()
#4 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89):
civicrm_api3_job_fetch_bounces((Array:1))
#5 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(169):
Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#6 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(100):
Civi\API\Kernel->runRequest((Array:7))
#7 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/api/api.php(23):
Civi\API\Kernel->runSafe("Job", "fetch_bounces", (Array:1), NULL)
#8 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(134):
civicrm_api("Job", "fetch_bounces", (Array:1))
#9 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(113):
CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#10 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php(149):
CRM_Core_JobManager->executeJobById("3")
#11 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(172):
CRM_Admin_Page_Job->browse(NULL, NULL)
#12 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Job.php(136):
CRM_Core_Page_Basic->run()
#13 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(310):
CRM_Admin_Page_Job->run((Array:3), NULL)
#14 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84):
CRM_Core_Invoke::runItem((Array:13))
#15 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52):
CRM_Core_Invoke::_invoke((Array:3))
#16 /home3/pnmiinfo/public_html/lemoyne/wp-content/plugins/civicrm/civicrm.php(1227):
CRM_Core_Invoke::invoke((Array:3))
#17 [internal function](): CiviCRM_For_WordPress->invoke("")
#18 /home3/pnmiinfo/public_html/lemoyne/wp-includes/class-wp-hook.php(298):
call_user_func_array((Array:2), (Array:1))
#19 /home3/pnmiinfo/public_html/lemoyne/wp-includes/class-wp-hook.php(323):
WP_Hook->apply_filters("", (Array:1))
#20 /home3/pnmiinfo/public_html/lemoyne/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#21 /home3/pnmiinfo/public_html/lemoyne/wp-admin/admin.php(222): do_action("toplevel_page_CiviCRM")
#22 {main}

A common issue is to have missing php extensions, are you sure your php has imap extension enabled?

(the command to install it depends on what OS or distrib you use).


Webform CiviCRM Integration I've found the extension "Webform CiviCRM Integration" is compatible with Drupal. But, I'm working with WordPress and need to register membership in a more flexible way than allowed by CiviCRM alone.
Does anyone know whether Webform CiviCRM Integration works for WordPress?

Thanks in advance.

No - it won't work.

I think caldera forms may be the way to go on WP as far as forms go (although others will be better informed).

civicrm-wp-member-sync may be the way forward - And Haystack (the developer) may have the best viewpoint ;)


Where is the edit button? I have created a user that belongs to a group. I have rights to edit contacts from that group. However I can only edit in the "quick view", but the button for editing the whole profile has disappeared. From the advanced search I can see that "edit" link...
Why? How can I restore it?
Thanks!

Do you have any custom CSS or java script?  Do you see a reference to the edit button if you check the page source?


How to fix 'New mailing' that only has 'Initializing' and edit boxes that wait forever One of my Civi installs has a problem where clicking 'New mailing' has 'Initializing' but nothing more, and edit boxes on the summary screen have a continuously circling triangle if an item is edited. I've been through this forum help and looking at the browser console I can see 'HTTP/1.1 500 Internal Server Error 54ms'.
I have removed extensions, and upgraded to the latest 4.6.27 CiviCRM release but no change. I really don't know what to do next, so very grateful for any help. CMS is Drupal 7.52 and PHP 5.6
(Added) The full message in the above browser console is:
'https://www.myapp.com/civicrm/ajax/angular-modules  HTTP/1.1 500 Internal Server Error 34ms'

This problem turns out to be a mis-configuration on the shared server. We were also getting Internal Error 500 messages just on signing in today, but the hosting company (vidahost.com) fixed the problem & Civi is working fine now.  So not a problem with Civi, but a problem on the shared server, now fixed.  No wonder I couldn't find anything wrong with Civi..


How can I show groups in membership report columns? I've got the request to display (certain) groups in the membership detail report. A lot has been written over time about customizing reports, and I'm not sure what info is up-to-date. This looks good:
https://alastaira.wordpress.com/2011/03/17/civicrm-creating-a-custom-report/

I think roughly, I would need to

set up the paths for custom templates and php files at setting/path
create a custom template with just a single {include file="CRM/Report/Form.tpl"}
create a custom php file copied from CRM/Report/Form/Member/Detail.php
register both using Administer –> CiviReport –> Manage Templates
in the php file, append stuff to _columns and from()

is that correct ? Has anyone already done something like this for groups .. ?

The current correct way to create a custom report is to use an extension, rather than the manual process linked to in the question.

Updated documentation for creating a report extension is found here:

https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-report

The link in Donald Lobo's answer is now broken, but an old version of the document is still available here:

https://wiki.civicrm.org/confluence/display/CRMDOC46/Create+a+Report-Template+Extension


Install CiviCRM alone or as Wordpress plugin? I need your advice. What is the best ? Install CiviCRM alone or as Wordpress plugin ?

I have a wordpres website for a NPO, and I want to manage members with CiviCRM.

We are not big, and will manage approximately 100 members.

I would like to take registration for new members and cotisation (Paypal or Stripe).

There will also be fee-paying events, so I would like to make forms so that members can register for events and pay for them.

I'm afraid about integrate CiviCRM with Wordpress.I don't know if from a management point of view it wouldn't be better to have it separately.

What is your opinion on that?

Thanks a lot !

You cannot install CiviCRM standalone, you need to install it as part of a Drupal / WordPress / Joomla! / Backdrop CMS system.


Advance Multi-Select - Obsolete? When I was editing a custom field I got this pop-up:

'Obsolete widget
The old "Advance Multi-Select" widget is being phased out and will be removed in a future version of CiviCRM. "Multi-Select" is the recommended substitute.'

Our user find it quite nice to be able to move items between the two lists rather than remember to hold down the Ctrl key or else they lose all their previous selections.

Can anyone shed any light on why this field type is going obsolete and if there is any way of continuing to use something similar?

Had a search around and couldn't find any info.

Thanks,

Dave

You may be thinking of the old multi-select widget, which required Ctrl+click. The new one is much improved (I think it was refreshed in 4.5) using the popular Select2 widget. It does find-as-you-type, and as it narrows down the options you can either click or press enter to add that option, then continue with the next one. You can also click in the field for a drop-down of all options (except the ones you've already chosen). Give it a shot on the Civi demo site; I'm sure you will like it.


Where is the documentation for installing CiviCRM with Drupal 8 or for upgrading a Drupal 7 system with Civi to Drupal 8 This question is being asked so that it becomes the go to Answer for documentation / installation / migration questions hopefully.

Currently the primary location for documentation is

Installation

Migration of a CiviCRM system from D7 to D8 (tbc)


Installation de civicrm sur worpress I installed civicrm on wordpress, and when I want to configure it: I fall on THIS MESSAGE /
Thank you for helping me.

philippe

Parse error: syntax error, unexpected ':', expecting '{' in C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\secret_defense\wp-content\plugins\civicrm\civicrm\vendor\league\csv\src\functions.php on line 33

Ligne 33 : function bom_match(string $str): string
    {
static $list;

    $list = $list ?? (new ReflectionClass(ByteSequence::class))->getConstants();

    foreach ($list as $sequence) {
        if (0 === strpos($str, $sequence)) {
            return $sequence;
        }
    }

    return '';

This seems to be the same as upgrade of civicrm fails with parse error. You need to have php 7.x on the server not php 5.x.


Compilation error when installing on Drupal8 Following install guide I get fatal error at compilation tasks in composer require civicrm/civicrm-core:'~5.35'.
The setup is on Aegir with Drupal 8.9 and drupal/recommended-project composer template, having a relocated document root.
Is this error related to the setup above, or it's CiviCRM related?
Error log:
Compiling additional files (For full details, use verbose "-v" mode.)
Compile: Generate CCL wrapper functions
> @php -r 'require_once '\''/var/aegir/platforms/d8.9.13/vendor/autoload.php'\''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::template($GLOBALS["COMPOSER_COMPILE_TASK"]);'
WARNING: Failed to read compilation-task from COMPOSER_COMPILE_TASK. Please use "composer compile".
PHP Fatal error:  Uncaught InvalidArgumentException: Invalid file reference (tpl-file=NULL) in /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks/Template.php:62
Stack trace:
#0 /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks/Template.php(21): CCL\Tasks\Template::assertFileField()
#1 /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks.php(24): CCL\Tasks\Template::compile()
#2 Command line code(1): CCL\Tasks::template()
#3 {main}
  thrown in /var/aegir/platforms/d8.9.13/vendor/civicrm/composer-compile-lib/src/Tasks/Template.php on line 62
Script @php -r 'require_once '\''/var/aegir/platforms/d8.9.13/vendor/autoload.php'\''; Civi\CompilePlugin\TaskTransfer::import(); \CCL\Tasks::template($GLOBALS["COMPOSER_COMPILE_TASK"]);' handling the shell-runner event returned with error code 255
Subcommand @composer compile  returned with error code 255

Installation failed, reverting ./composer.json to its original content.

In ComposerPassthru.php line 72:

  Subcommand @composer compile  returned with error code 255

It turns out this compilation error is related to composer versions:

Using default composer version of 1.10 on Ubuntu 20.04 produces this fatal error.
Manually upgrading to composer 2.0 resolves this issue.


Civimail wont send (but Civi email will) bit weird but here's whats happening

I use the Mosaico extension (thank you very much) to do bulk emails.  Ive been using it for some months with no issues.  About a month ago I included a few Civi tokens including a checksum for contacts to update their details - all good.. or so I thought

I started to get complaints that long time recipients weren't getting the weekly newsletter.  The non receipt started when I included the checksum.

After a few wrong turns the issue turned out to be that every time someone used the checksum to update their details Civimail wont recognise their record

There is nothing wrong with their email address - I know this because I can click on the contact, send an email and they receive it.

The only way to rectify this that I've found is to go through every field on their personal details and recreate it, save it and then Civimail will see the record. Presumably the details they have updated are causing the problem but I can't tell what they changed so have to do them all

any suggestions to what might be going on ( and how to fix it!)

thanks

Civi 4.7.14 Wordpress 4.7.5

well the answer turned out to be using a profile that included the "is deceased" field.  Somehow that was setting that field to Null and Civimail didnt like that.

Setting the "is deceased" field to 0 fixed it up and all good now


Why won't data entered into CiviCRM profile html snippet save? I'm using Joomla 3.4.1 with CiviCRM 4.6.3 on a demo site as part of a re-design. I've used the CiviCRM profiles html snippet to create a Joomla signup module. See here for example.

It worked once - storing the name and email into CiviCRM and even re-directing to the proper page and giving a thank you message after it stored the data.

However, now when you hit "save" in the module, this time nothing is saved and it kicks you back to the front page. I've read the manual, searched the forums, and tried a bunch of stuff, but nothing works. What am I missing?

I wonder if it's the recaptcha on the form action page?

http://tremololabs.com/clients/IREHRTEST/index.php?option=com_civicrm&task=civicrm/profile/create&gid=15&reset=1

My guess is that posting to that page without the recaptcha data (which is what your form does) is going to cause the server to be annoyed, and perhaps there's some kind of code or server security something that is hiding the response and just sending the user to the front page of your site? Do you have some kind of special configuration for your recaptcha perhaps?


What do I do when rebuild Smart Group Cache fails? (Sorry, was hoping to not have to start a new Question but instead comment on another's but StackExchange doesn't allow it unless you have 50 points of privileges.)

CiviCRM 4.6.0
Joomla 3.4.1

I am getting errors on both manual use and cronjob:

Manual button in Groups:

    @import url(/administrator/components/com_civicrm/civicrm/css/civicrm.css); @import url(/administrator/components/com_civicrm/civicrm/bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css);    Sorry but we are not able to provide this at the moment.  is not of the type Int Return to home page.    function toggle( element ) { var className = element.className; if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') { element.className = 'crm-accordion-wrapper crm-fatal-error-details-block'; } else { element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block'; } }

Scheduled Jobs (cronjob):

  Parameters raw (from db settings):
  limit=Number optional-Limit the number of smart groups rebuild

  Parameters parsed (and passed to API method):
  a:2:{s:7:"version";i:3;s:5:"limit";s:56:"Number optional-Limit the number of smart groups rebuild";}

  Full message:
  Finished execution of Rebuild Smart Group Cache with result: Failure, Error message: A fatal error was triggered:  is not of the type Int

could you create a new issue for this on JIRA and link it as related to https://issues.civicrm.org/jira/browse/CRM-15816.


EntityTag table not available to drupal view Creating a view in drupal, when I try to add a field I see all the normal civiCRM fields for contacts, email, etc, but what I want is the entity_tag table for the contact id which does not appear in the list of available fields.

The table is listed in sites/default/settings.php, but it is not available in the view

I created a view based on civicontact and it seems to work.

Thanks


Recommendations or Experiences on Archiving Mailing Data We have an instance that has been using CiviMail extensively for years.
The civicrm_mailing and civicrm_activiy tables far exceed the number of records of any other tables.

It seems likely that these tables could have some ancient history removed from them and make some operations work more smoothly, faster, or less error prone. e.g. back-ups or operations in civicrm involving groups.

Are there any recommendations, best-practices, or gotcha's for archiving/deleting historic data in CiviCRM. Specifically for mailings and activities, but while we are at it: contact or other data as well?

Top database tables:

2.6G    ./prod_civicrm/civicrm_mailing_recipients.ibd
2.3G    ./prod_civicrm/civicrm_mailing_event_queue.ibd
1.6G    ./prod_civicrm/civicrm_activity_contact.ibd
1001M   ./prod_civicrm/civicrm_log.ibd
641M    ./prod_civicrm/civicrm_mailing_event_delivered.ibd

we have a custom overnight routine that copies data from civicrm_mailing_x and civicrm_mailing_event_x tables to duplicate tables with a archive namespace and then deletes the appropriate rows from the main tables. The biggest things is making sure that you adequately understand the relationships between the tables so you don't accidentally delete data that hasn't yet been archived due to a Foreign Key constraint. The other thing to note is that doing it this way means you loose stats from the reports etc for the mailings that have been archived.


Webform CiviCRM - add to group option We all know the Drupal Webform CiviCRM auto add to group option.

But how do we allow a user to select which groups they get added to?

Specifically I'd like them to opt in/out to a newsletter.

Thanks!

Make it a -user select-  and then if you want to narrow down the options -> switch the element configuration to static (live is default). When static you can not only decide whixh Groups a user can select - you can also order them - and relabel them.


How to use the API to query custom fields on activities? Looking at the API explorer on the demo site it appeared that it's possible to query custom data on activities using the API.

However it seems that while the UI helps you select custom fields and set the values you want to search for, and there's no error submitting that, it seems completely ignored in terms of the query run.

I added a custom field set to Meeting activities on the demo (4.6.8 at 21 Aug 2015) and added a meeting activity with foo in a custom field, then queried this using the API explorer, but it seems to return all activities regardless of the custom_N query.

The developer documentation says

  As with normal API parameters, you can set custom_22 = 'Fred' in a get operation to filter for records that have custom_22 ...

So is this a bug/unimplemented feature or am I doing something wrong? Is there a work around or do I go back to writing plain ol' SQL?

Thanks.

The answer at the time of writing is that this is not implemented, so you can't use the API for this.

However, work has begun and you need to wait for issue CRM-16036 to be resolved and released.


Mosaico and 'View in your browser' not working I am running Mosaico beta 1.0 beta1 with 4.6.22 and 'View in your browser' does nothing.  Of course, this is a beta so not surprising.  But... is there a way round this? Otherwise quite impressed with Mosaico after a shaky start, but it would be good to have a greater variety of block shapes to add.  Anyway, for now the above is the problem that I would love to find a workaround for.

In general, bugs with extensions should be reported on the extensions' github page.

In this case, you may be interested to know that there is a new CiviMail/Mosaico extension nearing completion which will supercede the one you are trying out.


Error while installing CiviVolunteer on civicrm 4.6.5 When trying to install CiviVolunteer with CiviCRM 4.6.5

Wordpress 4.2.3 and CiviVolunteer4.5-1.4.0

I get the error:

"'Multi-select' is not a valid option for field html_type"

Based on this screenshot, two possibilities occur to me, neither of which I like very much:

Something is different about 4.6.5, and it no longer accepts 'Multi-select' as an HTML type. In the code for the extension, this appears on line 433 of CRM/Volunteer/Upgrader.php. In some other usages of this HTML type, I see it referred to as 'Multi-Select' (note the different capitalization) -- it could be that capitalizing the S solves the problem for you. If so, please let me know, and we'll make sure that goes into the next release.
I see you're not running CiviCRM in English. Is your site running in French only, or is it a multilingual site? I'm not sure yet why this would matter, but I've seen strange things occur with the schema changes, etc. that come with a multilingual site -- there are some circumstances CiviVolunteer doesn't account for. It seems like a long shot that the problem is related, but I thought I'd ask anyway.

The failure occurs during a step of the installation that creates custom fields for the volunteer contact subtype. Since the API call that performs this task has worked with previous versions of CiviCRM, I suspect something has changed with the parameter validation, either in the API itself or further down the stack. Either this change was intentional and CiviVolunteer should be updated, or it was unintentional and we should consider filing a regression bug.

Note: I haven't yet tried to reproduce this on a test copy. I'd say this is a necessary step before speculating much further.


Can I allow users to update their registration? I have a non-profit that runs an event once a month where the users leave their cars at home to walk, bike, or ride public transit for their daily commute. I'm testing the online registration function of CiviCRM to allow them to record their transit method and mileage for that day, but they need to be able to update the record in case their method changes. For example, if they said they were going to ride a bike but instead took the subway because of rain.

If they attempt to register twice they'll get the message that they're already registered. If I allow multiple participants, they can record a new route but they show up as multiple entries with the same name (obviously).

I can't seem to find a configuration setting to allow registration updates. Am I missing something?

Drupal Webforms currently have this functionality, so if you set up your Civi event registration page using Drupal Webform-Integration, your users will be able to revisit the form and update their contact info, registration details, or even cancel their registration.


what should be the auto return url for paypal civicrm? I am setting up membership renewal using a contribution page and payment processor is Paypal Standard, what should be the Auto Return URl which should be incorporated in paypal website payment preference so that it redirects to thank you page of contribution?

Currently, it does not redirect automatically (probably due to it being in sandbox),when I do click on button Return to Website , it takes to Thank You Page and shows message "You don't have access permission to view the page"

The Return URI should be the URL of your site. The docs says

  Enter your CiviCRM site home page as the Return URL. This is a placeholder. CiviContribute will pass the exact return URL to PayPal automatically during each transaction.


hide profile title in Fieldset (legend) Is there a way to hide the profile title.  I have added a tracking profile which is being populated by values passed in the URL to the contribute page. The fields I have added are being hidden, so the title is unnecessary.

The simplest way is to use CSS to have something like the following

.whatevercontext fieldset.crm-profile-id-13 legend {
  display: none
}

and then put that into your site's theme CSS file alongside other customizations you do for your site.  Alternatively, you could create a special CSS file and enter the URL in Administer > System Settings > Resource URLs.  Both methods avoid hacking CiviCRM's CSS code.

However, you should double-check the affected form(s) after each upgrade just to make sure the selector hasn't changed.


How to link preexisting fundraising pages to 'contributions' when setting up CiviCRM My NGO is thinking about setting up CiviCRM primarily to coordinate donations but we're totally new to all of this. We have various preexisting fundraising pages and profiles on other websites through which people can donate. Is it possible to link all of these diverse sources through to the CiviCRM Contributions section so they're coordinated? How is this done?

The standard way of using CiviCRM is to create contribution pages within CiviCRM for displaying on your website to collect donations.

You may be able to do what you want using the API, but that would need definitely need to be set up by a developer. (I am not a developer hence the "may".)


RSForm! integration with CiviCRM A friend is using the RSForm! Pro extension with Joomla and wants to gather volunteer signup information and port the data to CiviCRM. Does anyone have any experience with doing this? What is involved. I do not find any reference to this product on StackExchange and a web search doesn't turn up much.

RSForm! Pro is made by RSJoomla (rsjoomla.com) and has the ability to post data to external (to Joomla) databases. This article at their site may help: https://www.rsjoomla.com/support/documentation/rsform-pro/custom-scripting/silent-post.html


I Need more contact base types I need to add to my CRM object which are neither Individual/Household/Organization.
In my case an example would be embryos which relate to their parents (yes, in fertilization process) which have many attributes but none of the individual's (they don't have names/phone/address/skype etc).

thanks

You might consider not making those into contacts.  Instead, set up a set of custom fields on an individual (parent) or household that allows for multiple entries (in a tab).  You can then record the necessary information without cluttering your CRM with contacts who have no names and can't be contacted.


Switching from same-db to separate-db? I'm using latest drupal 7 and civicrm.

I have an existing drupal/civi install which uses the same database, and i'd like to switch to having separate databases - is that possible?

The civi side is the important part fwiw.

Thanks!

Do you mean separating the Drupal and CiviCRM database on an active installation? If possible the easiest would be to re-install with separate databases.


CKEditor with well-formatted html source code In my 4.7.24 as well as the demo site, CKEditor doesn't attractively format the source code. No indents or spaces. It's very hard to read.

However, I found a solution. Hopefully it's not too far from good practice - I'm not a real coder so I've just done the best I could!

Adding the following code to CKEditor's config file seems to do the trick. So, go to (on Drupal 7.56) sites/default/files/civicrm/persist/crm-ckeditor-default.js.

It's important to know that you probably have to clear your browser's cached files each time you make a change to this file.

This file is created by the CKEditor UI at civicrm/admin/ckeditor?reset=1, and will be overwritten if ever that page is saved. But if you can keep everyone away from it, you're safe to edit the file directly.

Place the following code somewhere well outside all of the CKEDITOR.editorConfig function:

CKEDITOR.on( 'instanceReady', function( ev ) {
    // Sets indentation of source code
    ev.editor.dataProcessor.writer.setRules( 'div', {
                indent: true,
                breakBeforeOpen: true,
                breakAfterOpen: false,
                breakBeforeClose: false,
                breakAfterClose: true
            });
});

This is from: https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_output_format

I'm sure there's a better way, and probably better code than this, and if so I'd be glad to know what would be a 'best practice' solution.

Thanks!


Data Mapping for Importing data from external database Can someone please guide me to the table/data templates for CiviCRM.  We are in the process of migrating from an existing relational Access database to CiviCRM and want to map related data to organisations, individuals, membership payments etc.  I have not been able to locate this in any documentation.

Thank you in advance for any pointers/help.

Graeme

During installation the CiviCRM are generated from xml files, and those will not always correspond 1-1 with the tables AFAIK.

You can find the xm definitions in the civicrm folder: civicrm/xml/schema.

Alternative is to use the API Explorer (Support/API Explorer in your CiviCRM menu) and do a getfields action for the entity? I would recommend using the API to do a migration anyway rather than moving into the tables directly.


Signing up household type memberships The organization wants to have the ability to have multiple contacts for custom membership types of Household, Sustaining, Patron. I've set up the membership types for this, with the "household member is" relationship setting. This works only if the primary contact type is "Household". The problem with this is that the public facing membership sign up form (contribution form) only lets you sign up as the Individual contact type. Is there some way to tie the membership type to the contact type at the time the contact is created?

This looks like the most relevant forum post:
https://forum.civicrm.org/index.php?topic=27970.0
Looks like there might be a way with drupal, but not wordpress. Just how much additional code would this require? -- I could write this very quickly with c#... but php/wordpress never.

One approach would be to extend to code which makes the 'on behalf of Organisation' approach work for Households as well.

The membership type would be set up so that an individual 'inherits' the membership based on a specified relationship.

When an Individual signs up they either be given the option of selecting 'on behalf of', or the 'household' membership page would be set up to require it.

The outcome of a new membership would be that the individual is created, a household is created, the membership 'belongs' to the household, a permissioned* relationship would be created between the individual and the household, and due to that relationship the individual would 'inherit' the membership provided in the settings of the Membership Type.

my understanding of the 'on behalf of Organisation' code is that for the individual to be able to renew on behalf of the organisation (ie for their Organisation to prefill on the form if the user is logged in or using a checksum link) the individual is set up with the 'employee of' Relationship, they are also set as 'current employee' and the relationship is set so the individual is 'permissioned over the organisation'.

For a household equivalent, there is no equivalent for 'current employee' so the solution would need to step around that but that sounds fairly trivial.


Just installed Webform CiviCRM and cannot see the CiviCRM tab on webforms I must be missing something very basic here.  Install went fine.  Supporting modules are all installed and enabled.  All the permissions I know to check have been checked.  However, the CiviCRM tab is not displayed on the webform edit page. The link suggesting I click on the tab is there but no tab.

I'm on Drupal 7.35 and Civi 4.6.2.

Clear Drupal's cache from your browser (not via Drush).


Import override for latitude and longitude I'm in the process of importing latitude and longitude information for contacts.  This process is straightforward but I don't see an option to upload an option to turn on 'Override automatic geocoding'.  What's the best way to turn on this option for all of these contacts?  Thanks.

You could take a look at the API csv extension. The field is called manual_geo_code and is available via the API (updated based on Jon's comment)


Can't update domain.address After upgrading to 4.6.0 I can no longer update the value of the domain.address token. I try to update the address in Administer > Organization Address and Contact, but after saving the new address it reverts to the old address.

Could you replicate on d46.demo.civicrm.org and then file a bug report at issues.civicrm.org? Thanks.


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&amp;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&amp;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+:

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

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.


In Civicase - reports ignore 'Order' on 'Status' and use status id instead? When I run a Civicase report and request it to be sorted by 'Status' the sort order comes out according to the id of the status record (ORDER BY case_civireport.status_id). Whereas I have updated the 'order' field on the case status admin and believe the report should use that 'order', not the row id.

Can anyone confirm this? Might it be classed a bug?

I have tried it on https://dmaster.demo.civicrm.org and can confirm that changing the order in Administer->CiviCase->Case Statuses has no effect on the report ordering.

Thanks.

There is a "weight" field and a "value" field for each status. Changing the ordering on the admin pages changes the weight. Changing the "value" will correspond to status_id, but be careful about that - I'm not sure if it will autoupdate your existing data, i.e. if the value of "Completed" is "2" and you change it to "7", you might still have data in the system that has "2" stored and so it won't represent Completed anymore. You would then need to update civicrm_case.status_id in the database to match. Make a backup first if you're going to try that!

Weight is used for ordering in dropdown lists and such.


Nothing happens on selection of “Actions” dropdown options Can someone offer me some insight as to the possible cause of the Actions drop-down not working?

Here is my setup:

CiviCRM 5.13.3
Drupal 7.67
PHP 7.2.16
Bootstrap subtheme set to use JQuery 3.1

When I execute a search from the advanced search form, I get the following JS error:

TypeError: f is undefined
    mysite.org/misc/jquery.ba-bbq.js:19:115
Warn: could not find module util

When select contacts from search results, I get the following errors:

TypeError: $(...).val(...) is undefined
    mysite.org/sites/default/files/civicrm/civi_extensions/org.civicrm.shoreditch/js/main-menu.js:66:41
    Ember 2 (errors)
        isQuickSearchOnGoing
        removeCustomClassOnOutsideClick
    jQuery 2 (errors)
        dispatch
        handle

When I select an item from the "Actions" dropdown, I get the following errors:

TypeError: $(...).val(...) is undefined
    mysite.org/sites/default/files/civicrm/civi_extensions/org.civicrm.shoreditch/js/main-menu.js:66:41
Ember 2 (errors)
    isQuickSearchOnGoing
    removeCustomClassOnOutsideClick
jQuery 8 (errors)
    dispatch
    handle
    trigger
    trigger
    each
    each
    trigger
    b
<anonymous> Ember
jQuery 7 (errors)
    dispatch
    handle
    trigger
    trigger
    each
    each
    trigger
Ember 5 (errors)
    triggerChange
    onSelect
    selectHighlighted
    init
    bind
jQuery 2 (errors)
    dispatch
    handle

I am able to execute actions options from a contact's individual record, but not from any search results. Changing Bootstrap's settings to use a lower version of JQuery has no effect. Disabling the Bootstrap sub theme and base theme has no effect. It happens in Firefox and Chrome.

Can you try below patch on shoreditch extension to see if it fixes your problem?

diff --git a/js/main-menu.js b/js/main-menu.js
index c4bd2576..c87ba81d 100644
--- a/js/main-menu.js
+++ b/js/main-menu.js
@@ -63,9 +63,12 @@
    * @return {boolean}
    */
   function isQuickSearchOnGoing () {
-    var searchValue = $('#sort_name_navigation').val() || '';
-
-    return !!searchValue.trim();
+    if ($('#sort_name_navigation') && $('#sort_name_navigation').val()) {
+      return !!$('#sort_name_navigation').val().trim();
+    }
+    else {
+      return false;
+    }
   }

   /**

Cheers

Pradeep


How to tell which .extra.tpl files CiviCRM is trying (and failing) to load? I was writing an extension which injects a template snippet, and was working fine.  While working on the PHP, without any change to the snippet, it's no longer loading (the rest of the extension IS working).  The template is at <extensionname>/templates/Contact/Form/Contact.extra.tpl (NOT in a "custom templates" folder - though if I move it there, it works).  I realize I have absolutely no idea how to check which file locations CiviCRM is checking for its template files, is there a way to see?

This code might help shed some light:

  $template = CRM_Core_Smarty::singleton();
  print_r($template->template_dir);


CiviCRM >> Administer CiviCRM >> Profiles is blank When I go to CiviCRM >> Administer CiviCRM >> Profiles it is blank.  How do I correct this?

I am running CivCRM 4.7.22 on Joomla 3.6.4.  I have cleared caches and rebuilt the menu.  There are no javascript errors in console.  I can add profiles when I edit contribution pages.  I can edit and create profiles when setting up contribution pages.  I need to go to CiviCRM >> Administer CiviCRM >> Profiles because according to my research that is where the settings are to add reCaptcha to profiles.

UPDATE:  There are not any errors (404 or otherwise) in the Network tab of the browser dev tools.  Below is an image of what I mean by blank.

That's a headscratcher for sure.  Here are some things to try:

Review the log at ConfigAndLog just after you load the Profiles page.
I've seen this happen when your Resource URLs and directories aren't set properly.  Check both: Administer » System Settings » Resource URLS and Administer » System Settings » Directories.
Check the HTML to see which div is missing compared to the demo site.  Knowing that will help someone who wants to look in the source code.
You said you cleared caches - I assume that include removing templates_c.  If not, please delete that. Also check the permissions on templates_c to make sure this isn't a permission error on the compiled template.


How to change contribution pages profile labels into a placeholder? I would like to convert all the form fields labels of the contribution pages and events pages into placeholder. Is it possible to do? If yes, how please ? Thanks

You write a small jQuery script and include it on your forms

<script type="text/javascript">
CRM.$(function($) {
  let label, labelDiv, value;
  $('input').each(function() {
    value = $(this).val();
    labelDiv = $(this).closest('.crm-section').find('.label');
    $(labelDiv).hide();
    label = $(labelDiv).text();
    label = label.replace(/\s\s+/g, ' ');
    $(this).attr("placeholder", label);
  });
});
</script>

There are various ways to include jquery in your forms

Implement hook(buildform or preprocess or pagerun) via extension/plugin/module to add js using add resource method
Override tpl file using extra.tpl method to include jquery


Creating activities in code adds extraneous contact to 'with' field So we create an activity when a contact 'refers a friend', we want it on both users Contact. This is working thus:

$activity = civicrm_api(
      'Activity',
      'create',
      array(
          'version' => 3,
          'sequential' => 1,
          'activity_type_id' => 60, //refer activity
          'status_id' => 2,  // complete
          'source_contact_id' => $post['contactId'],
          'target_contact_id' => $contact['contact_id'], //person who created it
          'activity_subject' =>
             'Referred by a mate: ' . $post['contactId'],
      )
);

Works correctly to link the two contacts via the Activity.

But - in the 'With' field, it also adds a second person each time, unrequested. The extra persons contactId increments by 1 each time - which may be a hint.

We've logged all through our code, and through Core trying to find where this is being added, but can't find. Does anyone have any hints on where to look/log for this behaviour?

So I'm fairly sure this issue was actually a dev environment specific issue. The dev database wasn't using the full 'activity' table (as it was so large) and thus creating some oddities.

If I see it again on a live env I'll have to investigate in future though.


Unable to get Contact ID to display in Custom Field Been stuck on this for the past few days I want to set a default value for a custom field in a contribution. The Custom fields are associated by Financial Types,  I intend to show the current contact id of the person the contribution is being submitted for in a custom field. I tried doing this originally within the CustomDatabyType.php file.

class CRM_Custom_Form_CustomDataByType extends CRM_Core_Form {

  public function setDefaultValues() {
    $contact_id = CRM_Core_Form::getContactID();
    $defaults = [];
    $defaults['custom_224_-1'] = $contact_id;
    CRM_Core_BAO_CustomGroup::setDefaults($this->_groupTree, $defaults, FALSE, FALSE, $this->get('action'));
    return $defaults;
  }
}

To Clarify the reason i want the contact ID for the user i am submitting the form for is because i want to display that contacts 'Employer' in a custom field. I have tried the following:

CRM_Utils_Request::retrieve('cid', 'Positive');
$form->getContactID();
$form->_contactID;

The issue i am having is that is the above lines of code work if i associate it to a field within the contribution form but if i associate it to a custom field it will show the contactID of the user submitting the form not the user of whom the form is being submitting for.

I have also tried to do this via a custom buildForm hook:

function dfi_civicrm_buildForm($formName, &$form) {

    if ($formName == 'CRM_Contribute_Form_Contribution' || $form == CRM_Core_Action::ADD) {
        $thisContactID = $form->_contactID;
        $defaults['custom_224_-1'] = $thisContactID;
       $form->setDefaults($defaults);
    }
}

I hope i have been clear and i would really appreciate your help.

Thanks

An Idea i have had is to set the ContactID within a field in the 'Contribution section' use getVar to get the value of the field and then assign that value to the custom field.

Is this possible?

I was able to figure this out using the following code:

        $getSessionArray = CRM_Core_Session::singleton()->get('CRM_Utils_Recent');
        $thisContactID = $getSessionArray[0]['id'];


How to download a copy of the CiviCRM User and Administrator Guide? I am a new admin user of CiviCRM and want to know how to download a copy of the latest Admin Guide rather than view online? This is referred to in the introduction and refers to the chapter 'History of this Guide' but I can't find a link to a file anywhere.

What follows are steps to download and view the User Guide offline using the MkDocs software.

Caveats: this solution (a) requires some technical skill to set up, and (b) still requires a web browser to read (though not an Internet connection).

Install pip (python package manager)

OS X: brew install python
Debian/Ubuntu: sudo apt-get install python-pip python-wheel

Install MkDocs

sudo pip install mkdocs

Download the source files for the guide from GitHub.

git clone https://github.com/civicrm/civicrm-user-guide.git
cd civicrm-user-guide

Run MkDocs

mkdocs serve

View through your browser at http://localhost:8000

More information about the process is available on the documentation page within the CiviCRM Developer Guide.


update pending contributions transaction date wrong When doing a search for pending contributions and then do a batch update to completed the received date is changed to today's date. In the past version 4 this would stay as the original received date. This is causing us problems as the received date shouldn't change.

We are using CiviCRM 5.3.1 on Drupal 7

Thanks

Gareth

If you are using Batch update using profile than including Receive date in your profile will actually solve your issue. There has been change in code to handle contribution fields correctly now.

The workflow does make sense when changing contribution to completed the receive date is updated to now(). The system assumes that money has come in now unless you specify the exact date.

So when you include Receive date in your profile it will be pre populated with old values and hence it won't update to now().

HTH

Pradeep


Custom Reply-to setting doesn't stick I'm trying to use new feature Custom Reply-to introduced in CiviCRM 4.6 (4.6.8 now installed).  I go into Admin/CiviMail/Mailer Setting and click the Yes radio button, then save.  A Reply-to field now appears on the message preparation form, and the feature appears to work fine.  However, when I go back to Admin/CiviMail/Mailer Settings the Custom Reply-to radio buttons are both blank (unselected), with neither Yes or No selected.  This same issue exists in both my test and production systems.  The sandbox does not have this issue so there is probably something amiss in my database(s).  Which table is supposed to store this setting, and can I best repair the problem?

That's stored in civicrm_settings with a group_name of Mailing Preferences and a name of replyTo.

As a tangential note, this feature also existed in Civi 4.5.


How do I change the expiry date on one of our donors recurring credit card donations? One of our donors has had their credit card replaced and the expiry date has changed. How do I change the expiry date to reflect the new date? IATS is our payments processor.

Using iATS for recurring contributions means that CiviCRM only holds onto a 'token' that is used to trigger subsequent contributions in the schedule. Which means that the card information all lives over on the iATS servers, and the easy answer is that you can edit it there using the iATS payments administrative interface.

But also note that the next release of the extension (tentatively 1.5.0) in a couple of weeks will allow you to do that editing directly in CiviCRM so it'll be much easier.

And finally - note that earlier versions of the extension will not try and run credit cards that it thinks are expired, based on the expiry date of the card originally used. In other words, in those versions, you'd need to re-enter a new card for a new recurring contribution. That rule was taken out of the last couple of releases (1.4.2? not sure), since expired cards can still work during a recurring series (as long as they are not expired when you first set them up).


Merge related activities and related groups options not available in merge contacts We've recently upgraded a site to 4.6.10

When merging duplicate contacts the options to merge activities and groups (and tags and events etc) are missing.

I've tried merging a couple of dummy contacts. Contact data merges as expected, but associated group and activity data is deleted along with the duplicate contact not transferred to the remaining contact.

The demo work displays as expected. Are there any settings that control this activity that I've overlooked?

Has anybody experienced this issue before?

Any hints/tips/pointers as to where I can look?

Thanks

Craig

Try upgrading to the latest release.

(NB I realise I may not be adding much to above comments but am trying to get some unanswered questions answered as that is currently the 'weakest' aspect of our Beta civicrm stackexchange according to these [stats][1])


Delete wordpress user when related Civicrm contact is deleted I would like that when an admin deletes a CiviCrm contact it also deletes the wordpress user that is linked.
I am using "CiviCRM WordPress Member Sync" so when a contact is created it is added to wordpress but it doesn't delete the wp user when contact is removed. This would be quite precious for me as I know I will later need to delete so many users and I don't want to do it twice, on Civicrm and Wordpress.

Would you have a solution ?

Thanks

In general there is a risk of having a CMS user deleted when the CRM contact is deleted, since the CMS user can (in theory) be the author of pages, comments etc

Therefore Civicrm does not offer this directly and I think you would need to find/make a customisation/extension or see if there is a tool in WP that you could use that would make it easy to find all WP users that are not connected to a civi contact and then delete them (there are solutions for this with Drupal using Views and VBO, and potentially also Drupal Rules in case any of that provides hints for WP)


Backbone JS error with 4.6.4 on WP messing up contribution page set up It feels inappropriate posting this on Stack Exchange, but I don't see any other viable option since the support forum has been deprecated and no-one goes there any more, so here goes:

Just upgraded to 4.6.4 on a simple up to date Wordpress site. When setting up a contribution page the Receipting tab doesn't load correctly, the clickable fields that open up into CKEditor text areas don't work. I'm seeing a JS error in the Console: "TypeError: Backbone.Marionette is undefined" and a reference to line 11 of civicrm/js/crm.designerapp.js

Can't replicate on the demo site, but then again that is apparently not running 4.6.4, but 4.6.5.

Anyone?

On closer investigation, and with thanks to @coleman for referring me to the troubleshooting guide, I have successfully identified the culprit as the JetPack WP plug-in. With it de-activated, my contribution page set-up works without a hitch.


What is "Error: Could not find valid value for u" Since I upgraded from 5.24.4 to CiviCRM 5.28.2, roughly since end of August 2020, I have been finding a lot of errors in the log when Anonymous users attempt to access mysite.com/civicrm/mailing/url.

If I go to this URL myself (as an admin) I get the CiviCRM error box with the message "Error: Could not find valid value for u".
If I go there as Anonymous I get the same error message on a blank white screen.
On 5.24.4 Anonymous gets 'Access Denied' which is sensible, and Admin gets a list of current mailings.

What should this URL do?
Presumably 5.28.2 has introduced a bug?

What should this URL do?

This URL is used to track the number of clicks done on the URL included in mailings.
When the URL is included in mailing, it is in the format of civicrm/mailing/url?qid=<mailing_queue_id>&u=<url_id>
If there is no URL id (u parameter), use of the above link is invalid, hence the error.
So i think you should never have this URL without u query string in it. How do you get this URL from?


Using price sets for renewing memberships on online pages? I want to provide a signin to a membership with CiviCRM contribution pages. I configured an auto-renew membership with a Membership Type Duration Unit = 1 month..
Then i set up a price set. The price set is configured with different prices and terms, lets say

quarterly with a number of terms = 3 for 30 €
yearly with a number of terms = 12 für 100 €.

Both is now included in a contribution page, with a payment processor and enabled membership section.
When filling out the forms and submitting on the contribution page like civicrm/contribute/transact?reset=1&id=1, the membership is recorded with the right terms (eq. 12 month), but the recurring contribution is recorded as monthly payment, eq. 100 € every month, which is not right.
On the confirmation page (before submitting the form) it also shows I want to contribute this amount every month instead of every 12 month.
Papypal is used as payment processor, but i have also tried credit card.
Is this expacted behaviour and did i misunderstood the price sets?
thanks a lot, kindly regards

It would be nice if it worked as you have set it up but multiple terms are not compatible with auto-renew.
The documentation for multiple membership terms includes this caveat at the end:

However you need to be aware that your members will not be able to auto-renew if you use this type of multi-term configuration.


CiviCRM rebuilding templates_c with permissions I have just upgraded from 4.3.8 to 4.7.15 on Drupal 7.50. Everything went well except the <drupal_root>sites/default/files/civicrm/templates_c directory is rebuilt with the wrong file permissions. The owner should be fclub, not www-data, I think. For example, if I delete this directory in order to solve cached template loading problems and reload the page, it rebuilds itself.

drwxr-sr-x 3 www-data www-data  4096 Jan 11 14:24 templates_c

If I change the owner manually to the correct owner, as all other files and directories, there is an error message about not being able to write to temp files in templates_c.

This seems to be the residual affect of something that is causing multiple problems, including possibly outgoing mail, scheduled jobs and showing the menu.

Edit: Here is what it looks like after upgrading on an exact copy/dev site:

drwxrwsr-x 3 fclub www-data  4096 Jan  8 21:30 templates_c

Actually that looks good - your webserver user www-data needs to be able to write to files/ (and anything below it);


Error during Drupal installation: MySQL support not included in PHP I am getting an error as show by the image above when attempting to install CiviCRM on drupal.

What does this error message mean and how could I go about fixing it?

The entire configuration report is as follows:

Recommend setting MAMP to use PHP5.6 if you have that option.

The screenshots show MAMP is set to use PHP7, but CiviCRM isn't ready for PHP7 yet.

(PHP7 removes ext/mysql in favour of ext/mysqli and ext/pdo_mysql. CiviCRM looks for ext/mysql, and the installer test is bailing out when it detects that this isn't supported.)

CiviCRM's PHP requirements are documented in the CiviCRM wiki.


Css not loading causing the dashboard not loading correctly The error in question is as follows:

Refused to apply style from 'mysite/wp-content/uploads/civicrm/persist/contribute/dyn/crm-menubar.e7a0463626d3eb2004ca8b83b4b12bad.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Anyone have any idea how to fix this?

Fixed this by resetting the css path in the settings.
It was trying to access an folder that didnt exist.


Confirm Contribution button not clickable for non-default payment processor When selecting the non-default payment processor (ACH in this case), the "Confirm Contribution" becomes non-clickable (greyed out).  Switching back to the default (credit card) it is still unclickable until I refresh page.

This may be related to the following StackExchange question:
Can someone help me fix a "greyed out" save button for a new contribution?

which made me originally think it was a URL inconsistency due to a recent upgrade from 4.6.x to 4.7.23

All URLs and paths look consistent (I made them absolute) and caches have been cleared
Rebuilding contribution page doesn't fix it
Other sites running 4.7 and iATS don't exhibit this problem
All payment methods work through the backend New Contribution page
Non-default payment processor works when on its own contribution page

Running WP with iATS 1.6.0.

Unfortunately there are some outstanding 4.7 issues with non-default payment processors in CiviCRM; it's not related to iATS - it affects all payment processors; Here's one JIRA issue: https://issues.civicrm.org/jira/browse/CRM-19508 - no resolution yet as there is a workaround;


Custom fields in webform membership renewal I'm starting out to create a CiviCRM system under Drupal for managing the memberships of a Photobiology Society. I have already imported contacts, organizations, memberships and contributions from the old system.Now I should carry out the registration phase of the applications or renewals to the society through the Webform integration. No problem for the applications, while for the renewals I would like to present all the data to the old member, INCLUDING the custom ones that I had to create.
If I include an "existing contact" field, I'm able to only fill in the standard CiviCRM fields (name, address, email, phone, etc.) and not the custom ones, including the active membership.
Can someone help me and above all is it possible to do this?

Pinto Vasa, Welcome to CiviCRm SE. Yes its possible to include any CiviCRM custom fields on webform which is available under their respective tab of CiviCRM webform config setting. Those fields will be pre-populated on webform based on logged in user details, will be empty if its a anonymous submission or new submission if logged in. The webform can be used to populate details of specific contact by passing contact id (and checksum if the user doesn't have sufficient permission eg anonymous user or minimal permission authenticated user).

eg http://example.org/renewmembership?cid=202&cs=9f4a2e5d4d57567b6ba4468750ac128d_1585225559_168


When Paypal Standard pay as Guest (no paypal account) Session Expired message on Thank You I'm using CiviCRM 4.7 with paypal standard.  When someone proceeds to paypal and chooses the guest option (no account) to pay with credit card, it processes normally.  Yet, when returning to the CiviCRM they get the contribution page form again (not the 'thank you page') and a message that 'session expired'.  This behavior is consistent across these browsers: Chrome, Edge.

Anyone seen this?  Is there a setting or change within CiviCRM to prevent this?  People are confused and making a second donation.

It turns out the existing Paypal account had its Primary Email set to one that was different from the Merchant Email used for Paypal login. Making these both the same fixed the pending contribution issue.


How to export with state abbreviations We are using Civi 4.7.27 on Wordpress 4.9
When doing exports the state is shown as the full name. We really need to be able to export with the 2 letter state abbreviation.  How can we set it to do this?

Thank you.

*****Added Screenshot***

It seems the problem is that you're using CiviReport rather than Advanced Search to perform your export.  If you use search and the Export search action, you'll get abbreviated state names.

Since you're exporting contributions, don't forget to set Display Results As to Contributions.  See screenshot:


Is it possible to Pre-Fill Form Fields Using URL Parameters? I would like to pre-fill this field in the picture and I have tried with following URL, but it doesnt seem to work! Anyone has clue if this is possible with civicrm links? Thanks

https://example.com/civicrm/mailing/browse/scheduled?reset=1&scheduled=true?mailing_name=SOMENAME

Most pages don't support this out of the box because securing inputs is tricky.  CiviReports supports this, and search pages are starting to support this (it works for a handful of fields and more are coming) but for now, if you want to do this, you should probably write a bit of jQuery to parse the url argument and fill the field in.

EDIT: See this Github issue which tracks the status of documenting the fields that are supported by passing parameters in the URL.


How to show only the relevant County/State of multiple countries in a profile? I created a profile with Countries and County/States along with name and address.

County/States actually merges all the available states regardless of selected country.

Is there a way to show only the relevant county depending on selected country?

My civi version is 4.4.14

If you have a state/province field on its own, it will have all options for the countries' states you enable on your site.  If you have a country field alongside a state/province field of the same location type, the state listing will depend upon the selected country (regardless of whether the country's states are enabled).

My hunch is that you have different location types for the two fields. Changing them to be the same should make it work.

(While it may seem maddening at first, it's a good feature.  You can have multiple addresses in your profile, and if your home state field were to change as you set the work country field, that would be a problem if your addresses are in different countries.)

Counties work similarly with regard to states, except you must use a state field: there are so many US counties with repeating names that it would otherwise be a big problem.


Why does outbound email stop working after enabling the PHP Mcrypt extension? On a CiviCRM 4.6.30 / Drupal 7 installation using the com.cividesk.email.sparkpost extension, outbound email stopped working after enabling the PHP Mcrypt extension on the server. This affected both CiviMail and transactional emails.

Why would this occur and how can it be resolved?

CiviCRM has a utility class CRM_Utils_Crypt for encryption & decryption. If PHP Mcrypt is installed, it uses that plus base64 encoding. If not, it falls back to using just base64.

This class is used for encrypting some settings, including:

smtpPassword in core 4.6.30
sparkpost_apiKey in com.cividesk.email.sparkpost

PHP Mcrypt was not initially installed on the server, so these settings will have been encoded by CRM_Utils_Crypt::encrypt() just using base64_encode.

Once PHP Mcrypt is installed, CRM_Utils_Crypt::decrypt() will try to decrypt these settings using mcrypt functions. This fails in this case, because they weren't encrypted with mcrypt when they were entered.

The simplest solution is to re-enter the settings. They will then be stored encrypted with mcrypt. If this wasn't feasible, it should be possible to write a script to decode specified settings using the non-mcrypt method and then encrypt and store them using mcrypt.

A few thoughts...

If Mcrypt is not installed, settings are not being stored encrypted. It would be good if site admins were made aware of this, perhaps via the System Status page. This could also warn of the consequences of enabling Mcrypt on a server where Civi is already configured.
The conditional code in CRM_Utils_Crypt::encrypt() & decrypt(), which falls back to just base64 encoding, appears to have been added for PHP 5.2 compatibility on Windows: see Email Configuration at https://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Configuration . As CiviCRM no longer supports PHP 5.2, the reason for this change seems no longer to apply and perhaps we should make Mcrypt a requirement. However...
The PHP Mcrypt extension has been deprecated as of PHP 7.1.0 and moved to PECL as of PHP 7.2.0. Comments there say:

"This extension rely in libmcrypt which is dead, unmaintained since 2007."
"Avoiding mcrypt is only half of the advice. The other half: NEVER do crypto in PHP in the first place!" [It goes on to give some good arguments and alternatives.]

In summary, I think Civi should not leave it to chance, when it comes to deciding whether or not to encrypt something, whether a particular PHP extension is installed or not. It should at least warn site admins, if not require a suitable encryption method to be available. Which method that should be needs discussion, given the deprecation of PHP Mcrypt.


Installation error for CiviCRM in Wordpress I have searched for answers and none apply to this particular instance. I get one particular error preventing me from installing CiviCRM in WordPress. I have the latest version of CiviCRM and WordPress. I get the following error under file permissions no matter what I do:

Is the /home/tackletheagenda/public_html/Civicrm/wp-content/plugins/files folder writeable?

The user account used by your web-server - tackletheagenda - needs to be granted write access to the following directory in order to configure the CiviCRM settings file:
//home/tackletheagenda/public_html/Civicrm/wp-content/plugins/files

I have already verified that the folders were writable. A bug? Other people had this problem on other platforms, but no answers for this problem in WordPress.

The link that is supposed to provide a solution for this is broken...on this page:

https://docs.civicrm.org/sysadmin/en/latest/install/wordpress/

If you are on a Windows machine and get the message "The user account used by your web-server needs to be granted write access to the following directory in order to configure the CiviCRM settings file: C:/wp-content/plugins/civicrm/" even after changing directory permission in
Explorer, see:

http://forum.civicrm.org/index.php/topic,5056.msg23720.html#msg23720


Setting default date value via civicrm_buildForm hook no longer displays date I have a custom module that invokes the civicrm_buildForm hook to set the default date for a given field to today's date.

It is working - in part. When I examine the code I see that the default value is set. However, it is set in the input that is hidden. Whereas there is a second input that is displayed using what appears to be a randomly generated id (dp1479931180679) which seems to be created by the date picker widget.

If you leave the field blank, the default date is picked up and works. But it's a usability issue since it doesn't appear to be filled out to the user.

Anyone have a work around?

Here is what the html code looks like:

<span class="crm-form-date-wrapper">
<input id="custom_17" class="crm-form-text required crm-hidden-date" data-crm-custom="Constituent_Info__Individuals:Date_Started" data-crm-datepicker="{"date":"mm\/dd\/yy","minDate":"1986-01-01","maxDate":null,"time":false}" name="custom_17" value="11/28/2016" style="display: none;" type="text">
<input id="dp1480365364891" class="crm-form-text required crm-form-date hasDatepicker" style="" type="text">
</span>

The first input (which properly shows the right value) is hidden. The second one, which is the one displayed, doesn't have a value set.

I think the date widget have its default value based on the format it is being set.

Eg - For mm/dd/yyyy input format set in Administer -> Localization -> Date Formats.

This works -

function civitest_civicrm_buildForm($formName, &$form) {
  $defaults['register_date'] = date("m/d/Y");
  $form->setDefaults($defaults);
}

This doesn't -

$defaults['register_date'] = date("m-d-Y");
$defaults['register_date'] = date("d/m/Y");


CiviMcRestFace installation problem I've an issue with the plugin CiviMcRestFace.
I can't install it in my WP site v. 5.7.2 running on Linux server with php 7.4.6
I download plugin from github (https://github.com/CiviMRF/civimcrestface-wordpress) and then I upload it with WP plugin page.
When I try to activate plugin nothing happens, but I can see this error log:
PHP Fatal error:  require_once(): Failed opening required '/Volumes/web/default/crm.depadova.com/wp-content/plugins/civimcrestface-wordpress-master//vendor/autoload.php' (include_path='/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/ext/form-processor-master/:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/ext/action-provider-master/:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/ext/recaptcha/:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/ext/financialacls/:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/ext/eventcart/:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/ext/greenwich/:.:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/packages:/Volumes/web/default/crm.depadova.com/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/Volumes/web/default/crm.depadova.com/wp-content/plu in /Volumes/web/default/crm.depadova.com/wp-content/plugins/civimcrestface-wordpress-master/wpcmrf.php on line 32, referer: http://asterix.y-tech.it/crm.depadova.com/wp-admin/plugins.php?plugin=civimcrestface-wordpress-master%2Fwpcmrf.php
Any ideas?
many thanks

If you install it from github you need to run the following command in the directory of the plugin composer install
This is explained in the readme on Github.
The easiest way to install this plugin is on the Manage plugin page in your wordpress installation and then press add plugin and search for this plugin in the plugin directory.


Unable to upload or view files through the CKEditor This weekend I updated our test environment to CivCRM 5.10.0 running on Wordpress 5.0.3 and PHP 7.2.

I now find that if I use the CKEditor in e.g. Message Templates and click the Image button in the toolbar, then click Browse Server, the popup window comes back completely blank.

Likewise, if I try to upload a file, I get a popup saying "Incorrect Server Response" and the JS console shows

ckeditor.js:19 [CKEDITOR] Error code: filetools-response-error. {responseText: ""}

Similar errors I have found seem to suggest a file path or permissions error, but that they all seem to be correct as far as I can tell (and working fine on the production machine). PHP.ini memory limit is 2Gb, post_max_size is 1Gb and upload_max_filesize is 1Gb. I can't find any other errors being logged by the system.

Any thoughts as to where I can look next?

Steve

I'm not sure this is an answer to your question, since you seem to have a specific error. Nevertheless, we've had a similar problem and so it may be helpful to hear our solution: When the file browser gives a blank screen for our users, the problem seems to arise from slow internet connections causing some problems in the computer's DNS cache. If we clear the browser cache completely AND also the computer's DNS cache then it magically works again.

This is for us in Civicrm 5.10 and Drupal 7 latest, so again, our situation may be different to yours. For instructions on clearing computer's DNS caches we used links like this for mac and this for Windows 10.


Data Not Showing Up After Upgrade We upgraded a site from 5.14.x to 5.16.3 and we are now seeing strange issues where some data is clearly in the system but it is not showing on the screen.

For examples, if you edit an address you can see the address on the screen before you edit it and you can see the lat/long data when you edit it but you do not see any of the other fields filled in.

The data is all in MySQL.

Also, we have an event in the system. We need to edit the Info and Settings tab. This tab loads blank.

All of the other tabs are fine.

We tried to create a new event and also get a blank screen.

There are no JavaScript errors showing up in the console and no errors being reported in CiviCRM.

Thank you in advance for your help.

Thank you, @Lesley Carter - BackOffice - I had cleared the cache but I had not deleted the files in templates_c. Clearing out templates_c solved all the problems.