Code Karate: Installing a Drupal Site and Database - 2 of 3

Planet Drupal - Mon, 13/04/2015 - 04:07
Episode Number: 201

In part 2 of the 3 part series, we are looking at how get a Drupal website and database setup and running. If you followed part one, you will remember we are doing this all on our local environment using MAMP. As the video will show, we begin by going to Drupal.org/project/drupal and downloading the newest version of Drupal. At the time of this DDoD, Drupal is at version 7.36.

Tags: DrupalInstallation ProfilesDrupal 7Drupal PlanetDeploymentServers
Categories: Elsewhere

Pixelite: How and why you should update PHP to PHP 5.5 with Drupal

Planet Drupal - Mon, 13/04/2015 - 02:00

This post is a follow up to my previous blog post on how to upgrade PHP to 5.4 to support Drupal 8.

Why you should upgrade PHP

If you are looking for reasons to ditch PHP 5.3, here are some:


PHP 5.3 reached end of life in August 2014, this means that if you are running this version, you are running an insecure version of PHP that potentially has security holes in it. This is bad for obvious reasons.

Bundled opcode cache

PHP 5.5 is the first version that bundles an opcode cache with PHP, this means there is also no need to also run APC (unless you need userland caching in APCu).


PHP profiled the 5.4 release compared to 5.3 for Drupal, and that found that:

  • 7% more requests/second
  • 50% PHP memory reduction

PHP 5.5 offers more performance again, and there is a section at the bottom of this article that goes through a real life scenario.

Cool new features

Read through the list of new features, here are some neat things you are missing out on:

$array = [ "foo" => "bar", "bar" => "foo", ];
  • Function array dereferencing
$secondElement = getArray()[1];

And many others.

How to upgrade to PHP 5.5

There are a number of ways to update your server to PHP 5.5.

Upgrade to Ubuntu Trusty Tahr 14.04

Ubuntu Trusty Tahr 14.04 (which is an LTS version), which comes bundled with PHP 5.5.9. This is probably the best solution if you are managing your own Ubuntu box.

Install a PPA on Ubuntu Precise 12.04

If you are running the older Ubuntu Precise 12.04, you can add a PPA

sudo add-apt-repository ppa:ondrej/php5 sudo apt-get update sudo apt-get install php5 php5 -v

It would be worth considering a dist upgrade though, but this at least can buy you some time.

Acquia Cloud UI

If you use Acquia Cloud for hosting there is a convenient PHP version selector in the UI.

More information can be found in the documentation. Be aware, once you upgrade beyond PHP 5.3, you cannot downgrade, so ensure you test your code on a development server first ;)

Common coding issues

Although Drupal 7 core, and most popular contributed modules will already support PHP 5.5, it would pay to do a code audit on any custom code written to ensure you are not using things you should not be. Here are some links you should read:

Below are some of the most common issues I have found in sites:

Call time pass-by-reference

If you have this in your code, you will have a bad time, as this is now a PHP fatal.

foo(&$a); // Bad times. Only variables can be passed by reference

This will cause PHP to throw notices.

$ php -a Interactive shell php > ini_set('error_reporting', E_ALL); php > var_dump(reset(explode('|', 'Jim|Bob|Cat'))); PHP Strict Standards: Only variables should be passed by reference in php shell code on line 1 Strict Standards: Only variables should be passed by reference in php shell code on line 1 string(3) "Jim"

Where you will likely find this in Drupal in my experience is when manually rendering nodes:

This code works in PHP 5.3, but will throw notices in PHP 5.5:

$rendered = drupal_render(node_view(node_load(1), 'teaser'));

The fix is to simply use a temporary variable:

$view = node_view(node_load(1), 'teaser'); $rendered = drupal_render($view);

The reason being that drupal_render() expects a variable to be passed in (as it is passed by reference).

How do you find coding issues

Enable the syslog module, and tail that in your development environment, hunt down and fix as many notices and warnings as possible. The more noisy your logs are, the harder it is to find actual issues in them. While you are at it, turn off the dblog module, this is only helpful if you do not have access to your syslog (as it is a performance issue to be continually writing to the database).

Real world performance comparison

This was taken from a recent site that underwent a PHP 5.3 to 5.5 upgrade. Here are 2 New Relic overviews, taken with identical performance tests run against the same codebase. The first image is taken with PHP 5.3 running:

You can see PHP time is around 260ms of the request.

With an upgrade to PHP 5.5, the time spent in PHP drops to around 130ms. So this is around a a 50% reduction in PHP time. This not only makes your application faster, but also it means you can serve more traffic from the same hardware.


If you have gone through a recent PHP upgrade, I would be interested to hear how you found it, and what performance gains you managed to achieve.

Categories: Elsewhere

Drupal for Government: Tree cross pollination maps using Drupal! aka debugging drupalgap geofield with genymotion and gapdebug

Planet Drupal - Mon, 13/04/2015 - 01:27

DrupalGap continues to rock.  Today I wanted to test the geofield module and get some maps in my apps... duh... it came about as a result of meeting with Tom Cormons from Appalachian Voices. He mentioned a problem - you often need two trees to pollinate eachother, and only have space for one... an app might help neighborhoods coordinate healthy tree communities.  

Anyhow - my dev skills were amok.  I followed the instructions on Tyler Frankenstein's site however I wasn't getting the maps to show up on my phone.  They showed up fine on the web-app side of things (eg https://www.cvillecouncil.us/mobile-application/index.html#node_23 ) however after building and piping to my android phone I couldn't get the maps to show up on my kyocera hydro (c5170...) ... I needed a debug environment... enter gapdebug!  oh yeah... gapdebug only works with android 4.4... my ghetto phone is running android ice cream 4.04... enter genymotion!

Categories: Elsewhere

Dave Hall Consulting: Managing Variables in Drupal 7

Planet Drupal - Mon, 13/04/2015 - 01:02

A couple of times recently the issue of managing variables in Drupal 7 has come up in conversation with other developers. This post outlines the various ways of managing variables in Drupal sites. The three things this guide ensures:

  • Sensitive data is kept secure
  • Variables are correct in each environment
  • You are able to track your variables (and when they changed)
The Variables Table

The most common place you'll find configuration variables is in Drupal's variable table (aka {variable}). The values in this table are often managed via admin forms that use system_settings_form(). Users enter the values click "Save configuration" and the data is stored in the database.

If you prefer to manage your configuration via the command line and know the variable you wish to set you can use drush vset. This does exactly the same thing as admin form, without needing to click on a mouse.

$conf Array

While the variables table is great at storing our variables, there are times when you want to enforce a setting. This might be because you want to prevent users from changing it (accidentally or otherwise) or because you need it to be different in each environment. The $conf array in settings.php always overrides any values in the variable table.

Acquia, Pantheon and platform.sh all provide environment variables so you can use different values in your $conf array depending on the environment.

Exporting Variables

In Drupal 7, the common way to export your variables is by using Strongarm with Features. I'm not going to cover how to do this as there is loads of documentation already available on this topic.

If your variable changes on a per environment basis or if it calculated on the fly, then you won't want to use strongarm+features as the exported values are static. You will need to put them in settings.php.

Note to self: I should debug and reroll my patch for adding support in alter hooks strongarm.

My settings.php is Out of Control!

This is a common problem, especially on more complex sites. To avoid this I recommend creating sites/default/settings/settings.[env].php files. Your settings.php file should check for the environment in an environment variable and then include the appropriate settings.[env].php file.

What About Sensitive Data?

You can encrypt variables on a case by case basis using the encrypt module and some custom code similar to what I recently implemented in the Acquia SDK module (see on store and on read examples). Warning: This doesn't encrypt the data if you're using drush vset.

If you are storing sensitive data in your variables table I would recommend you implement hook_sql_sync_sanitize() which will delete the sensitive data from your db when drush sql-sanitize or drush sql-sync --sanitize are run.

How to Decide?

This little code snippet should help you decide.

<?php // Don't try using this code in your Drupal site. if (!using_version_control()) { // Seriously there is no point in doing this without version control. abandon_all_hope(); drupal_exit(); } if (is_data_sensitive($var)) { $var = encrypt_var($var); if (!we_use_drush_based_workflows()) { learn_and_implement_drush_based_workflows(); // I'm serious! } } implement_hook_sql_sync_sanitize($var); } if (is_unique_per_environment($var)) { store_conf_array($var); } else { store_in_db($var); if (!we_use_features_based_workflow()) { learn_and_implement_features_based_worflows(); // I'm serious! } export_using_strongarm($var); }
Categories: Elsewhere

Mark Brown: Acer Aspire E11

Planet Debian - Sun, 12/04/2015 - 20:52

Recently I was in Seoul in the middle of three weeks of travel and my laptop died on me.  Since I had some work that needed doing fairly urgently I took myself over to Yongsan Electronics Market and got myself a cheap replacement to tide myself over.

What I ended up with was an Acer Aspire E11. There’s a bunch of different models all with very similar plastics, I got one which has a N2940 SoC, 2G of RAM (upgraded to 4G in store), a 500G hard disk and no fans for just over 200000 Korean Won, or about $200. As you’d expect at that price it’s got shortcomings but overall I’ve been extremely happy with it, it’s worth looking at if you need something cheap.

The keyboard in particular is probably the nicest I’ve used 0n a laptop in a long time with a good, definite but not excessive click feel as you press. Battery life is about 5 hours as advertised which is not wonderful but basically fine for me most of the time, and while not exactly Retina it’s clear with good viewing angles and generally pleasant to look at. Everything is plastic but feels very solid and robust, better than a lot of more expensive devices I’ve used, and there’s not much bezel around the screen which means it’s the first laptop I’ve had which has been comfortable to use in a standard economy seat on a plane.

The biggest drawback is performance – it’s a little slow opening applications sometimes and kernel builds crawl with an x86 allmodconfig taking about one and three quarter hours. For e-mail and web browsing there’s no problem at all, I did have to move from offlineimap to mbsync to get my mail to sync in a reasonable time but that’s more to do with the performance of offlineimap than that of the system. Overall in use it feels like the Dell I was using from about 2008-2011 or so, comfortable in use outside of builds, and I do appreciate having a system with no fans.

There were a couple of small tricks getting Debian installed – this is the first system I’ve seen with secure boot enabled by default which took me a few moments to work out (but is really good to see). Once that was disabled the install was smooth other than being bitten by Debian bug#778810 which meant I needed a manual fixup to actually get it to boot from the disk. It’s also got a Broadcom WiFi module which means it doesn’t work at all with mainline but it looked like that was on a standard mini PCI Express module so easily replaceable (I happened to have a USB dongle handy so haven’t bothered) and the wired ethernet just worked.

Like I say I’ve been very happy with it, there’s a bunch of other models with different specs for everything except the case (some touchscreen, some with small 32G eMMC drives) as well. Were it not for my need to do kernel builds I’d probably be keeping it as my primary laptop.

Categories: Elsewhere

Bartosz Fe&#324;ski: lack of SRS on @debian.org mail servers

Planet Debian - Sun, 12/04/2015 - 20:46

Any good reason that we’re not using SRS to make SPF aware servers happy?
That’s kinda strange given that @debian.org is doing only forwarding.

Categories: Elsewhere

Josselin Mouette: GNOME for system administrators - Jessie edition

Planet Debian - Sun, 12/04/2015 - 16:29
The mini-Debconf Lyon 2015, in addition to being a great meeting to meet both friendly and new faces, has been the occasion for me to update and enrich the GNOME for system administrators course.

For those who couldn’t be here, as well as those who were here and disappointed to see me cut through the last third for timing reasons, here are the slides:
Categories: Elsewhere

Wouter Verhelst: LOADays 2015 talk done

Planet Debian - Sun, 12/04/2015 - 13:36

I just uploaded my LOADays 2015 slides to slideshare. The talk seems to have been well received; I got a number of positive comments from some attendees, which is always nice.

As an aside, during the talk I did a short demo of how to sign something from within Libreoffice using my eID card. Since the slides were made in Libreoffice Impress, the easiest thing to do was just to sign the slides themselves, which worked perfectly well. So, having uploaded, downloaded, and verified these slides, I can now say with 100% certainty that slideshare does not tamper with files you upload. They may reformat them so it's easier to view on a website, but if you click on the download link, you get the original, untampered version.

At least that's the case if you sign documents, of course; it's always possible that they check for that and special-case such things. Would surprise me, though.

Categories: Elsewhere

DrupalOnWindows: Decent PDF generation in Drupal

Planet Drupal - Sun, 12/04/2015 - 02:29
Language English

Wether you like it or not PDF is a mainstream adopted format to exchange documents. Your customers will ask, sooner or later, to have some sort of content generated in PDF (be it an invoice, a report, etc...).

Doing a quick search these are the modules that offer some sort of PDF integration in Drupal:

More articles...
Categories: Elsewhere

Drupal @ Penn State: Dynamic Memory Allocation in Vagrant Virtual Machines on Windows Hosts

Planet Drupal - Sun, 12/04/2015 - 01:36

Whenever there is a constraint on the number of developers in a pool, it can make it more difficult to solve issues. As we have been developing Nittany-Vagrant, I have found that there is definitely a smaller pool of developers running on a Microsoft Windows host for their vagrant based virtual machines.

The extra credit problem of the day for me was how to allow vagrant to automatically size a virtual machine's memory pool when utilizing VirtualBox as the VM provider on Windows. This is a well known solution on OSX:

Categories: Elsewhere

DrupalOnWindows: Calling .Net Framework and .Net Assemblies from PHP

Planet Drupal - Sat, 11/04/2015 - 23:48
Language English

You know that the PHP ecosystem is not yet (but heading to) professional or truly business ready. Something as simple as doing good and solid PDF manipulation, interacting with Word and Excel and others are simply a nightmare. You will of course find libraries to handle all that, the problem is that they are all half broken, slow and not even close the the professional offering you can find the in the .Net environment.

More articles...
Categories: Elsewhere

tanay.co.in: Some quick statistics from scraping the Acquia Certification Registry

Planet Drupal - Sat, 11/04/2015 - 19:38

As Acquia Drupal Certification turned 1 recently, I was trying to make sense of how many people have taken the certification exam, especially from India.

The certification team had recently launched the Acquia Certification Registry portal @ http://training.acquia.com/registry where you can search through and browse the list of candidates that have cleared the certification exam(s).

I built a small script that scraped the results, crawling through all 20 pages currently available on the registry portal, into a spreadsheet as well as a MySQL database, that I could run queries later to mine for the data I was looking for.

Finally, after a few minutes, I had a local consolidated database of the data publicly available from the certification registry, which I could run queries against, to find the answers I was looking for.

FInally, I have the numbers that I was interested in...

Total Number of Certifications = 777

(As on the registry on Sat April 11 9am IST)

Number of People Certified = 685

Unites States tops the chart with

307 certifications of

259 certified candidates, followed by

India with 86 candidates!

Number of Certifications - Top 6 Countries

United States








United Kingdom




Number of Certified Developers - Top 6 Countries

United States








United Kingdom




Acquia Certified Developers are spread over 40+ Countries!

On this context, I had a quick chat with Peter Minijak from the Acquia Certification team for a more deeper insight into the numbers. Was surprised to know that this list is going to explode soon to at least 150% as the total number of registered profiles including those who are yet to give their exam currently stands at 60+!

66 Developers have

more than 1 certification!

Acquia also gives a ”Grand Master”title to candidates who have cleared the first 3 examinations. There are

11 such candidates currently.

The same are listed @ http://training.acquia.com/registry/grand-masters  

14 countries have developers holding

more than 1 certification

Feels good to see India at #2, by absolute numbers. But if seen relatively, considering the large number of Drupal shops and Service Integrators in India, I think the number is still small and definitely bound to make a huge leap in the coming months.

NOTE: These numbers were scraped from the Certification Registry portal. They are no where close to being reliable. There could be some bugs from my script or the bad queries I write ;-)  

Categories: Elsewhere

Steve Kemp: Some things get moved, some things get doubled in size.

Planet Debian - Sat, 11/04/2015 - 02:00


We're about three months away from relocating from Edinburgh to Newcastle and some of the immediate panic has worn off.

We've sold our sofa, our spare sofa, etc, etc. We've bought a used dining-table, chairs, and a small sofa, etc. We need to populate the second-bedroom as an actual bedroom, do some painting, & etc, but things are slowly getting done.

I've registered myself as a landlord with the city council, so that I can rent the flat out without getting into trouble, and I'm in the process of discussing the income possabilities with a couple of agencies.

We're still unsure of precisely which hospital, from the many choices, in Newcastle my wife will be stationed at. That's frustrating because she could be in the city proper, or outside it. So we need to know before we can find a place to rent there.

Anyway moving? It'll be annoying, but we're making progress. Plus, how hard can it be?

VLAN Expansion

I previously had a /28 assigned for my own use, now I've doubled that to a /27 which gives me the ability to create more virtual machines and run some SSL on some websites.

Using SNI I've actually got the ability to run SSL almost all sites. So I configured myself as a CA and generated a bunch of certificates for myself. (Annoyingly few tutorials on running a CA mentioned SNI so it took a few attempts to get the SAN working. But once I got the hang of it it was simple enough.)

So if you have my certificate authority file installed you can browse many, many of my interesting websites over SSL.


I run a number of servers behind a reverse-proxy. At the moment the back-end is lighttpd. Now that I have SSL setup the incoming requests hit the proxy, get routed to lighttpd and all is well. Mostly.

However redirections break. A request for:

  • https://lumail.org/docs

Gets rewritten to:

  • http://lumail.org/docs/

That is because lighttpd generates the redirection and it only sees the HTTP connection. It seems there is mod_extforward which should allow the server to be aware of the SSL - but it doesn't do so in a useful fashion.

So right now most of my sites are SSL-enabled, but sometimes they'll flip to naked and unprotected. Annoying.

I don't yet have a solution..

Categories: Elsewhere

Andrew Shadura: Kallithea 0.2 released

Planet Debian - Fri, 10/04/2015 - 22:48

This post is almost a carbon copy of the Kallithea 0.2 release notes.

Kallithea project have just released Kallithea 0.2. Kallithea is a Python-based GPLv3 source code management software for web-based hosting of Mercurial and Git repositories.

This release brings many changes since 0.1. Notably, pull requests system have been improved, making contributing changes more robust. The visual appearance has also been refined: modern font-based symbolic icons from FontAwesome and GitHub Octicons have replaced the previously used bitmap icons, and revision graphs are now drawn with HiDPI display support. Kallithea now supports Mercurial 3.3 and Dulwich 0.9.9. Several fixes in the database code boosted performance significantly.

We have also updated our Javascript libraries: jQuery, CodeMirror and Mergely. Javascript and CSS code have been cleaned up, with less and less code depending on Yahoo UI library.

Since 0.1 we have discovered two security issues, so all users are strongly recommended to upgrade. For more details on these issues, please see our Security Notices page

For more information, see https://kallithea-scm.org/ or http://docs.kallithea-scm.org/.

The summary of the changes since 0.1 release is below.

Bug fixes:

  • forms: add CSRF protection to all forms — CVE-2015-0276
  • api: don’t send internal data unless asked for it — CVE-2015-0260
  • middleware: fix force_tls typo in force_https backward compatibility code (Issue #44)
  • rebranddb: update user extern_type and _name to ‘internal’ instead of ‘kallithea’ (Issue #38)
  • git: do not fail if git is not installed and has been removed from __init__.py backends
  • git: fix 'name' must be bytestring, not unicode error on browsing changesets
  • git: close SubprocessIOChunker inputstream used for git (Issue #32)
  • git: introduce hack for handling git failure on --depth cloning (Issue #33)
  • git: fix version detection with unexpected version string (Issue #71)
  • git: preserve line endings when calling out to git
  • hg: fix clone from svn+http urls using hg-svn (Issue #72)
  • migrate: add missing import (Issue #29)
  • pullrequests: handle pull requests to empty repos (Issue #27)
  • pullrequests: when creating PRs, fix handling of new ajax requests while other ajax requests are pending
  • pullrequests: fix updates for PRs between different repositories
  • pullrequests: preserve query parameters in pull request overview paging links
  • compare: workaround unexpected Mercurial behaviour when finding ancestor of null rev
  • javascript: remove trailing comma to please IE8 (Issue #39)
  • download: fix for zip file downloads not being valid zips (Issue #35)
  • helpers: fix crash on new users without email (Issue #28)
  • middleware: change middleware ordering so we don’t buffer hgweb output in redirect
  • bin: give kallithea_config.py #!/usr/bin/env python so it can be executed directly
  • bin: reintroduce cleanup-repos paster command
  • bin: fix update_repoinfo command
  • urlify: don’t include trailing punctuation in markup
  • urlify: markup of hashes in ()
  • styling: don’t loop on trying to load kallithea-logo.png after kallithea-logo.svg failed
  • error: don’t crash on /error/document urls
  • error: don’t crash on response without status
  • admin: prevent deletion of users that are owners of a repository/user group (Issue #64)
  • admin: make settings hook name field smaller so it is less likely to overlap with the value field
  • admin: when scanning for repos to add, ignore removed groups
  • auth_crowd: fix Admin Group Membership when using the Atlassian Crowd plugin
  • auth: enable selecting PAM authentication module
  • auth_ldap: fix user automatically activated with LDAP authentication (Issue #78)
  • db: fix beaker cache key for user groups — don’t collide with users
  • db: fix handling of (invalid) unicode email addresses
  • db: don’t use sql ‘in’ on empty sets in compare — avoid warning of bad performance
  • db: to the extent it makes sense to have a one byte size limit, make it 255 instead of 256 to please MySQL (Issue #96)
  • files: use current revision as default for ‘show at’ (Issue #31)
  • files: fix HTML injection via file names
  • files: use forward slash as path separator for consistency
  • files: don’t use HTML encoding where not needed (Issue #74).
  • feed: urlify and escape the commit description
  • diff: fix diff of renamed files with whitespace in their names
  • diff: don’t split lines on bare CR as python splitlines do
  • mergely: update Mergely to v3.3.9 (Issue #83)
  • jquery: upgrade to 1.11.1
  • codemirror: cleanup of integration and update to version 4.7
  • setup: constrain dulwich to version 0.9.9, fixes CVE-2015-0838
  • gists: add missing formencode.htmlfill import
  • ini: Make celeryd.log.level default values uppercase — lowercase might not be recognized and cause failure
  • notification: handle unicode translations (Issue #95)
  • repos: fix redirect after repo creation (and user/group add focus) (Issue #98)
  • changeset: don’t crash on malformed whitespace parameter — return 400 Bad Request
  • stats: fix display when no data ready yet
  • stats: fix “show more” link

Features and improvements:

  • ui: use font based icons — FontAwesome and Git Hub Octicons from fontello
  • ui: HiDPI / Retina support in graphs and other places
  • paster: add install-iis command to automate IIS handler generation and update documentation
  • email templates: send text/plain part as well
  • docs: lots of improvements of structure and content and language
  • translations: updated using WebLate
  • admin: show links to added repos after repo scan
  • admin: show links to created users and groups
  • admin: when scanning for repos without ‘remove’, report the repos that could/would be removed
  • setup: support Mercurial 3.3
  • db: drop most lazy joins — significant performance improvement
  • db: add missing indices — significant performance improvement
  • db: don’t commit session if cache invalidation didn’t change anything — improves performance
  • comment: show full username in emails for PR/changeset comments
  • changelog: added Settings to repo context menu
  • utils: better display of ages >1 year when in short form
  • remotes: add support to clone from Mercurial repositories over ssh
  • hg: reimplement branch head listings more efficiently
  • pullrequests: use same code and table ui for Repo Pull Requests and My Pull Requests
  • pullrequests: add delete button to My Pull Requests overview
  • pullrequests: on ‘my pullrequests’ show the user’s own vote as second column next to ‘latest vote’
  • pullrequests: add option for adding repo owner as reviewer if none assigned
  • pullrequests: make top pane one big form with meta data and one save button and preview changes in pane below — more like when creating the PR
  • pullrequests: make ‘update’ functionality a separate submit button in the big form, automatically enabled when an update changeset is chosen
  • pullrequests: show graph next to the list of changesets that are available for update
  • pullrequests: for available changesets, also show changesets that not are descendants and thus not directly available but will be merged in
  • pullrequests: show unrelated branch heads in the graph too — show the problem instead of trying to explain it
  • pullrequests: show pending reviewer changes with “(not saved)”
  • pullrequests: show comment count in top of summary box
  • diff: improved parsing, be more strict and fail with good error messages
  • diff: handle GIT delta binary patches
  • diff: show renamed files as that
  • diff: make trailing spaces more visible — make vertical line less transparent
  • diff: show CR (\r) in diffs
  • comment: warn before leaving page with open comments
  • comment: clarify shown comment count (inline vs general)
  • comment: extend next/previous links to global comments (Issue #91)

Changes (might influence workflows):

  • i18n: en translation has been removed — make sure to update your .ini files to have ‘lang =’ (nothing)
  • ini: turn show_revision_number off by default
  • pullrequests: don’t give changeset ‘unreviewed’ status just because it is added to a PR
  • pullrequests: tweak readable titles — just append /_/ and branch name
  • pullrequests: only author and admin can close
  • pullrequests: don’t add repo owner as reviewer in all PRs
  • pullrequests: PRs between different repos should default to same destination/source branch
  • pullrequests: use -- as separator in the automatic text when “updating” pull requests and is it to put latest updates first
  • diff: don’t group diffs based on the kind of change
  • admin: set current user as owner when running repo scan
  • changelog: change default view to 100 changesets, max to 2000
  • date representation: use ISO8601 rather than a specific locale
  • user groups: drop add/remove all buttons for member selection — they are too dangerous and multi-select can do the same
  • hg: drop support for hg web.hidden
  • template: link the last revision in the file browser to the changeset


  • code: Fix typos and language in comments and code
  • ui: Correct capitalization and improved English text in the UI
  • javascript: use strict mode
  • tags: rename old non-Kallithea tags and prefix them with 0.0 to show that Kallithea is superior
  • javascript: more jQuery, less YUI, less clutter
  • templates: better structure, less cut’n’paste coding
  • html: various improvements
  • css: various improvements
  • exceptions: avoid silently catching exceptions — especially avoid catch all
  • tests: stability fixes
  • tests: remove large unused test fixture
  • whitespacecleanup.sh: run it regularly to ensure consistent whitespace and avoid spurious changes
  • controllers: consistently use formfill.render with force_defaults=False
  • gists: use allow_extra_fields and filter_extra_fields in gist forms like in most other forms
  • json: always use kallithea.lib.compat for json — and nothing else
  • json: drop simplejson fallback and just use stdlib
  • db: check for None instead of boolean false if that is what we mean
Categories: Elsewhere

Théodore 'nod_' Biadala: Visualization of jQuery use in Drupal 8

Planet Drupal - Fri, 10/04/2015 - 20:00

Since FrontendUnited 2012 Amsterdam, I've been saying Drupal core should significantly cut it's jQuery use. Until now it was without much data to back it up. What follows is a visualization of jQuery modules use in Drupal 8 code, it's fancy so feel free to click everywhere. There is additional information in titles, be sure to check those out. Took long enough to make, sorry mobile users.


2488 occurrences of jQuery-related code.

traversing attributes event manipulation css sizzle data ajax offset dimensions effects serialize wrap core deprecated deferred exports

View data from folders:

core/misc core/modules core/themes core/vendor

@media (max-width: 767px) { label {display:block;} } label {cursor:pointer;display:inline-block;cursor:pointer;margin:0;padding:0.5em 0.75em;overflow:hidden;text-align:center;} label input {position:absolute;overflow:hidden;width:1px;height:1px;} label.focus {text-decoration:underline;} #rss-friend {display:none;} #rss-fiend {display:block!important;margin:3em 0;} #bubblewrap {position:relative;height:600px;width:100%} #modules, #folders {display:flex;flex-wrap:wrap;} #modules label {flex: 1 1 auto;} #folders .selected {background-color:lightgrey;} .major {font-weight:bold;} .node, #modules label.selected {color:white;} .node { border: solid 1px white; overflow: hidden; position: absolute; display:flex; text-align:center; } .node span {flex: 1 1 auto;align-self: center;} .depth-1 {font-weight: bold;} .hidden {visibility: hidden;} .node {text-decoration: none;} .node:focus, .node:active {text-decoration: underline;}

I've been working on a tool that inspect javascript files and show all jQuery methods and Sizzle selectors used in that file. I will be releasing it soon, once the npm namespace issue has been sorted out and I polished it a little bit more. Meanwhile, I ran it on Drupal code and got this: View raw data.

Categories: Elsewhere

Richard Hartmann: Release Critical Bug report for Week 15

Planet Debian - Fri, 10/04/2015 - 19:45

Still on the road with shittynet; sorry for missing last week.

The UDD bugs interface currently knows about the following release critical bugs:

  • In Total: 1041 (Including 159 bugs affecting key packages)
    • Affecting Jessie: 82 (key packages: 54) That's the number we need to get down to zero before the release. They can be split in two big categories:
      • Affecting Jessie and unstable: 65 (key packages: 49) Those need someone to find a fix, or to finish the work to upload a fix to unstable:
        • 19 bugs are tagged 'patch'. (key packages: 13) Please help by reviewing the patches, and (if you are a DD) by uploading them.
        • 6 bugs are marked as done, but still affect unstable. (key packages: 1) This can happen due to missing builds on some architectures, for example. Help investigate!
        • 40 bugs are neither tagged patch, nor marked done. (key packages: 35) Help make a first step towards resolution!
      • Affecting Jessie only: 17 (key packages: 5) Those are already fixed in unstable, but the fix still needs to migrate to Jessie. You can help by submitting unblock requests for fixed packages, by investigating why packages do not migrate, or by reviewing submitted unblock requests.
        • 8 bugs are in packages that are unblocked by the release team. (key packages: 5)
        • 9 bugs are in packages that are not unblocked. (key packages: 0)

How do we compare to the Squeeze and Wheezy release cycles?

Week Squeeze Wheezy Jessie 43 284 (213+71) 468 (332+136) 319 (240+79) 44 261 (201+60) 408 (265+143) 274 (224+50) 45 261 (205+56) 425 (291+134) 295 (229+66) 46 271 (200+71) 401 (258+143) 427 (313+114) 47 283 (209+74) 366 (221+145) 342 (260+82) 48 256 (177+79) 378 (230+148) 274 (189+85) 49 256 (180+76) 360 (216+155) 226 (147+79) 50 204 (148+56) 339 (195+144) ??? 51 178 (124+54) 323 (190+133) 189 (134+55) 52 115 (78+37) 289 (190+99) 147 (112+35) 1 93 (60+33) 287 (171+116) 140 (104+36) 2 82 (46+36) 271 (162+109) 157 (124+33) 3 25 (15+10) 249 (165+84) 172 (128+44) 4 14 (8+6) 244 (176+68) 187 (132+55) 5 2 (0+2) 224 (132+92) 175 (124+51) 6 release! 212 (129+83) 161 (109+52) 7 release+1 194 (128+66) 147 (106+41) 8 release+2 206 (144+62) 147 (96+51) 9 release+3 174 (105+69) 152 (101+51) 10 release+4 120 (72+48) 112 (82+30) 11 release+5 115 (74+41) 97 (68+29) 12 release+6 93 (47+46) 13 release+7 50 (24+26) 14 release+8 51 (32+19) 15 release+9 39 (32+7) 16 release+10 20 (12+8) 17 release+11 24 (19+5) 18 release+12 2 (2+0)

Graphical overview of bug stats thanks to azhag:

Categories: Elsewhere

DrupalCon News: Announcing DrupalCon Los Angeles Keynote Speaker Whitney Hess

Planet Drupal - Fri, 10/04/2015 - 18:16

We are so excited to announce our final keynote speaker for the upcoming DrupalCon Los Angeles, Whitney Hess.

Whitney is a coach, writer and speaker helping people bring their whole selves to their work. For the last decade, she has coached hundreds of companies on how to make their products easier and more pleasurable to use, boost the bottom line, and do work they love. Whitney is the co-host the podcast Designing Yourself, writes on her blog Pleasure & Pain, and speaks at conferences and corporations worldwide. 

Categories: Elsewhere

Drupal Association News: New Try Drupal Program

Planet Drupal - Fri, 10/04/2015 - 18:05

One of the Drupal Association's primary missions is to grow the adoption of Drupal.  We are about to launch a new program on April 15th called Try Drupal.  The program will make it easy and fast for evaluators to try Drupal and have a simple, great experience while on Drupal.org.

We’ve created Try Drupal with our Premium Hosting Supporters to make it easier for CMS evaluators and Drupal.org newcomers to test and work with a Drupal demo site.  The Program will showcase a selection of Hosting Companies where a new user can quickly (in less than 20 minutes) sign up and have a Drupal demo site up and running for them to use for free. 

This is part of the Drupal Association’s initiative to develop a new revenue stream through advertising programs on Drupal.org.  This revenue will help fund various site initiatives by the Association to improve Drupal.org performance, and make it easier to use and more secure.  After interviewing many members of the community, we determined that new advertising products should be useful to Drupal.org visitors, support our mission to grow the adoption of Drupal, and should not interfere with visitors contributing to the project.

To ensure a positive Drupal experience, partners need to adhere to the following guidelines:

  • Users are directed to a self-serve sign up platform
  • Users can create a free account for the demo site that accommodates a trial installation of Drupal 7 or 8
  • Users can create a website in 20 minutes or less
  • The demo site should be available to the user for a minimum of one day upon sign up
  • The partner cannot include a paywall or require a credit card upon sign up

The Try Drupal program will be featured on the homepage of Drupal.org.  It will launch with a larger iterative change to the homepage, with an emphasis on helping users move from newcomer, to learner, to skilled Drupal community members.

It’s important that we fund Drupal.org improvements, and that we do so in a responsible way that respects the community. We anticipate rolling out more key advertising programs throughout 2015, stay tuned for more updates.  Thanks for taking the time to read about our initiatives, and please tell us your thoughts!

Categories: Elsewhere

SitePoint PHP Drupal: Integrate Elasticsearch with Silex

Planet Drupal - Fri, 10/04/2015 - 18:00

In the previous article I started exploring the integration between Drupal 7 and the Elasticsearch engine (henceforth referred to as Elastic). The goal was to see how we can combine these open source technologies to achieve a high performance application that uses the best of both worlds. If you’re just now joining us, you should check out this repository which contains relevant code for these articles.

We’ll now create a small Silex application that reads data straight from Elastic and returns it to the user.

Silex app

Silex is a great PHP micro framework developed by the same people that are behind the Symfony project. It is in fact using mainly Symfony components but at a more simplified level. Let’s see how we can get started really quickly with a Silex app.

There is more than one way. You can add it as a dependency to an existent composer based project:

"silex/silex": "~1.2",

Or you can even create a new project using a nice little skeleton provided by the creator:

composer.phar create-project fabpot/silex-skeleton

Continue reading %Integrate Elasticsearch with Silex%

Categories: Elsewhere


Subscribe to jfhovinne aggregator - Elsewhere