At the CiviCons and developer meetings this year, we've had several conversations about release strategy. The topic is a bit abstract -- touching on a web of interrelated issues of technology and scheduling and business-process. I've been searching for a way to explain this topic to people who don't eat and breathe code in CiviCRM's
git repos -- an analysis which is a bit simpler and more transcendent.
The best analysis predates us by a few years -- Will Durant attributed the idea to Aristotle's Nicomachean Ethics, paraphrasing:
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
All of us -- users, developers, administrators, core, contributors -- want excellence in CiviCRM. Does that mean we need one grand release to prove our excellence? No, excellence merely means that we review every patch thoughtfully. Excellence means that we have mastery over our use-cases, and that we...Read more
To ensure that CiviCRM continues to work with standard, contemporary PHP hosting platforms, a future version may make a subtle change in hosting requirements. We expect this to be mostly seamless; however, we're looking for administrators responsible for sites running a recent CiviCRM (e.g. v4.7+) to spend a few minutes to help ensure a smooth transition.
Q: I'm not too fluent in geek-speak. What should I do?
Forward this to whoever manages your server. If you work with a CiviCRM partner, they may be thinking of you already.
Q: I am fluent in geek-speak. What should I do?
Determine if your web server has the PHP extension
mysqli installed. Any of these will tell you:
Use the server's command-line:
php -r 'echo extension_loaded("mysqli") ? "loaded\n" : "missing\n";'".
- It should display "loaded".
- Run "
For many years CiviCRM has had the capability to log all actions that take place in the database but while it mostly works well there have been a few issues. I looked into these recently and came up with some improvements, which shipped in 4.7.7 - but if you want to take advantage of them there are some actions you might need to take. This article is mostly intended for a technical audience.
How does CiviCRM logging work?
Turning logging on is as simple as checking the box 'Logging' on the admin page at Administer->System Settings->Misc. Once you do this a 'shadow table' for each table in your database (except for cache tables) is created. For example log_civicm_contact tracks civicrm_contact table. MySQL triggers are created that cause every update, insert or delete action to be logged in these tables. Some of the data in these tables can be viewed through the 'Log' tab on the contact record, although much more is only visible through...Read more
Busy sites have often encountered problems with deadlocks on the group contact cache. There were no less that 3 different code contributions to mitigate this problem put up for 4.7.8 and a number of other discussions have been going on in JIRA.
Merged into 4.7.8 are some improvements which we hope will mitigate this problem for those sites that experience it. JIRA is the primary source of information on this, however I wanted to share a brief overview.
The focus of the fix so far has been very much on deadlocks when clearing the contact cache. The reason being that these have been causing the most havoc. In analysing the problem it turned out that when someone edits pretty much anything the code looks for stale groups & tries to flush the cache. Depending on the size of the cache that can take a few seconds and it doesn't update the cache last flushed date until afterwards. So if the...Read more
There are two powerful modules used in the Drupal world for creating fast custom searches. Search API is a framework which provides an interface for site builders to create custom searches on any entity known to Drupal. It supports several search backends, including Apache Solr and native database search. It has a flexible API so developers can easily extend, customize, and alter aspects of the search process. Many additional contrib modules are available. Using these techniques, searching millions of records becomes fast and efficient.
The Facet API module allows site builders to easily create and manage faceted search interfaces. In addition to the UI components that standard, themers and module developers can build their own widgets, or alter the...Read more
It's becoming a common request from our clients to find user-friendly ways to integrate CiviCRM data with the rest of their Drupal website functionality. Oftentimes content creators without direct user access to CiviCRM need to do simple things, such as create, update, and delete contacts in simple, specific ways.
Example Use Case
A hypothetical organization advertises various community service projects that they organize and coordinate. Each service project can have it's own page, created by adding a Project content type to display a description, images, videos, slideshows or other information for each project. You'll probably use a View to show multiple Project listings on a page. All that is standard Drupal site building content and functionality. No problem.
But what if the organization wants to display to the user the Project Coordinator(s), which they also want to store in...Read more
CiviCRM Entity is a Drupal module which greatly enhances CiviCRM integration with Drupal. This module exposes many CiviCRM entities as true Drupal entities. That means that almost any module can use Drupal entities. As a result, these modules can access and manipulate CiviCRM data directly from within Drupal via Drupal’s Entity API. This includes many commonly used modules such as Views, Rules, Search API, Entityqueue, Entity Reference, and many more.
CiviCRM Entity was originally developed by Eileen McNaughton from Fuzion....Read more
Automated tests are important when collaborating with other developers in a large project. Even if you focus your attention on a small piece of the puzzle, your piece depends on other pieces, and others may depend on you. There will be inevitable occasions when a change in one causes an unexpected change or break in another. Automated tests form the first line of defense, providing timely feedback so that problems can be addressed while the material is mentally fresh.
Testing CiviCRM is trickier than testing a basic library -- tests may involve system services (from Civi or the CMS), and CiviCRM developers may use different CMS's, file structures, and URLs. This problem can be mitigated by creating more configuration files (for each extension, test-suite, or installation), but that grows unwieldy with multiple extensions.
We've published some updated documentation and tooling to support tests in extensions. The remainder of this post assumes that you have...Read more
Civi v4.7 introduces some overhauls to the core CiviCRM development framework. Some of the planning discussions can be found in the forum, but now that it's merged and stablized a bit, I wanted to give a walk-through for other developers. A few highlights:
Core service objects (such as the settings manager, logger, and JS/CSS resource manager) should be accessed through a new facade, simply named
Civi. A few examples of using this facade:
Civi::log()->info('Hello, log!'); Civi::settings()->get('versionCheck'); Civi::service('civi_api_kernel')->getEntityNames(3); Civi::resources()->addScriptFile('org.example.mymodule', 'ex.js'); Civi::$statics[__CLASS__]['tmpCacheData'] = ...;
All remaining settings from
civicrm_domain.config_backendhave been migrated to the settings framework. These may be modified, inspected, and overridden...