Planet Drupal

Syndicate content - aggregated feeds in category Planet Drupal
Updated: 9 min 15 sec ago

Drupal core announcements: Drupal 8 and 7 core release window on Wednesday, February 01, 2017

Sat, 01/28/2017 - 01:22
div class=field field-type-datestamp field-field-start7 div class=field-items div class=field-item odd div class=field-label-inline-first Start:nbsp;/div span class=date-display-start2017-01-31 12:00/spanspan class=date-display-separator - /spanspan class=date-display-end2017-02-02 12:00 UTC/span /div /div /div div class=field field-type-userreference field-field-organizers div class=field-labelOrganizers:nbsp;/div div class=field-items div class=field-item odd a href=/user/1370143 title=View user profile.stefan.r/a /div div class=field-item even a href=/user/14705 title=View user profile.David_Rothstein/a /div div class=field-item odd a href=/user/85000 title=View user profile.Fabianx/a /div div class=field-item even a href=/user/4521 title=View user profile.catch/a /div div class=field-item odd a href=/user/24722 title=View user profile.xjm/a /div div class=field-item even a href=/user/1639494 title=View user profile.cilefen/a /div /div /div div class=field field-type-text field-field-event-type div class=field-labelEvent type:nbsp;/div div class=field-items div class=field-item odd Online meeting (eg. IRC meeting) /div /div /div pThe monthly core patch (bug fix) release window is this Wednesday, February 01. Drupal 8.2.6 and 7.54 will be released with fixes for Drupal 8 and 7./p pAlso, a href=//”Drupal 8.3.0-alpha1/a will be released during the window./p pTo ensure a reliable release window for the patch release, there will be a Drupal 8.3.x and 8.2.x commit freeze from 12:00 UTC Tuesday to 12:00 UTC Thursday. Now is a good time to update your development/staging servers to the latest 8.2.x-dev or 7.x-dev code and help us catch any regressions in advance. If you do find any regressions, please report them in the a href=;status%5B%5D=Openamp;version%5B%5D=8.xamp;version%5B%5D=7.xamp;issue_tags_op=%3Dissue queue/a. Thanks!/p pTo see all of the latest changes that will be included in the releases, see the a href= commit log/a and a href= commit log/a./p pOther upcoming core release windows after this week include:/p ulliWednesday, February 15 (security release window and beta window for 8.3.x)/li liWednesday, March 01 (patch release window and release candidate window for 8.3.x)/li liWednesday, April 5 (scheduled minor release)/li /ulpa href= 6 is end-of-life/a and will not receive further releases./p pFor more information on Drupal core release windows, see the documentation on a href= timing/a and a href= releases/a, as well as the a href= core release cycle overview/a./p - Thoughts: Dev Environments With ZFS and Containers

Fri, 01/27/2017 - 18:20
div class=paragraph paragraph--type--text paragraph--view-mode--default cta-style--default div class=container div class=row div class=col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 div class=field field--name-field-text field--type-text-long field--label-hidden field--itemp dir=ltrDevelopment environments are used to develop and test changes before pushing code further through the release pipeline. Giving each developer their own environment allows changes to be made within the codebase without affecting other developers or environments./p p dir=ltrTraditionally, these environments would be locally based on the developer’s machine with all of the libraries and programs needed to run the code being installed too. We’ll examine development environments from the perspective of a web developer, so the needed programs would include a web server and a database server./p h2 dir=ltrThe Problem/h2 pThere are two main issues with local development environments: isolation and resources./p h3 dir=ltrIsolation/h3 p dir=ltrBefore virtual machines (VMs) were common, many developers had a single web server and database server installed on their computer. Multiple sites (and multiple copies of the same site) were separated at the directory level with each copy of the site taking up the same amount of space as its parent./p pHaving all sites served by the same web and database servers presents a few problems:/p ulli dir=ltr p dir=ltrServer level configuration is applied to every site/p /li li dir=ltr p dir=ltrSoftware versions are limited at server level/p /li li dir=ltr p dir=ltrEach site could potentially access other sites data/p /li li dir=ltr p dir=ltrConfiguration becomes cluttered over time/p /li /ulpOnce virtualisation became available to desktop hardware, software such as a href= made it possible to create VMs which allowed the developer to have an entire server for each website or for each client. This approach meant that the development environment could now be tailored to match production environments and can be completely isolated from other development environments./p h3 dir=ltrResources/h3 pBefore VMs, each site would only take up the code and database’s size of disk space. Generally, as only one web server and one database server ran at a time, the resources of only a single instance of each would be used./p p dir=ltrA VM is an entire computer, from the virtual hardware assigned, to the Linux operating system, to the applications such as the web server. This means that each VM needs more resources to run than just a single web server with multiple copies of code. Each VM will be allocated its own memory, CPU and disks - taking up more resources on a developers local machine./p h2 dir=ltrSolving the problem/h2 pTo solve the problems of isolation and resources, we’ll need to use different technologies to address the individual concerns of each./p p dir=ltrTo address the issues of isolation and indirectly address resource usage, container technology can be used. Amazon Web Services (AWS) describe containers as being “a method of operating system virtualization that allow you to run an application and its dependencies in resource-isolated processes”. Using containers grants several benefits:/p ulli dir=ltr p dir=ltrIsolation - each container will be isolated from other containers/p /li li dir=ltr p dir=ltrBetter resource use - unlike VMs, we don’t need to assign memory and disk space for the operating system/p /li li dir=ltr p dir=ltrFaster - even with VM snapshots, creating new containers is very quick/p /li /ulp dir=ltrEven though containers can reduce the disk space usage of development environments compared to VMs, it’s possible to further save space by using a filesystem that supports snapshotting and copy-on-write (COW) resource management. Copy-on-write allows data to be shared until a change is made to that data, at which point, a copy is made. This allows multiple copies of the same code database to exist without taking up the expected amount of disk space, which is beneficial if a developer wants to use a container to work on several features on the same site at the same time./p h3 dir=ltrTech used/h3 pTo demonstrate container technology, Docker will be used. Although there are other container engines available for use, Docker is the currently ubiquitous choice./p p dir=ltrZFS will be used for snapshotting and for copy-on-write./p pAlthough ZFS is available for OSX (a href=, at the time of writing, 10.12 does not have a stable version. Ubuntu Xenial will be used instead for the OS./p h4 dir=ltrZFS/h4 pZFS is a filesystem that was originally designed by Sun Microsystems in the early 2000s. a href= was designed to solve several problems that filesystems at the time had. It was designed to be easily scalable, have native snapshots for easy backup and restoration of data and check for corruptions via checksumming and if necessary, self heal.  By controlling both of the, traditionally separate, facets of data management - the physical management (such as hard disks) and the file management (a filesystem such as NTFS), ZFS has knowledge of and complete control of everything that makes use of it./p p dir=ltrZFS filesystems are built on top of virtual storage pools called zpools. A zpool is made up of virtual devices that are made up of block devices, for example a disk./p h5 dir=ltrZFS snapshots/h5 p dir=ltrWhen ZFS writes new data, the blocks containing the old data can be retained, allowing a snapshot version of the file system to be maintained. ZFS snapshots are created very quickly, since all the data composing the snapshot is already stored. They are also space efficient, since any unchanged data is shared among the file system and its snapshots./p h5 dir=ltrCreating filesystems from snapshots/h5 p dir=ltrWriteable snapshots (clones) can also be created, resulting in two independent file systems that share a set of blocks. As changes are made to any of the clone file systems, new data blocks are created to reflect those changes, but any unchanged blocks continue to be shared, no matter how many clones exist. This is an implementation of the copy-on-write principle and is what we’ll be taking advantage of to create new environments./p h4 dir=ltrZFS example/h4 h5 dir=ltrInstallation/h5 p dir=ltrInstall ZFS/p pre code class=language-bashapt install zfsutils-linux/code/prep dir=ltrBefore creating a ZFS filesystem, we need to create a zpool for it:/p pre code class=language-bashzpool create blogpost /dev/sdb/code/prep dir=ltr/dev/sdb is a 2GB disk attached to the machine. The zpool will take up the entire available space of the disk./p p dir=ltremzpool list/em shows:/p pre code class=language-bashNAME       SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH blogpost  1.98G    64K  1.98G         -     0%     0%  1.00x  ONLINE/code/prep dir=ltrAnd emmount/em shows:/p pre code class=language-bash/blogpost on /blogpost type zfs (rw,relatime,xattr,noacl)/code/prep dir=ltrYou can change the mountpoint at creation time by passing -m and a path./p p dir=ltrTo create the filesystem:/p pre code class=language-bashzfs create blogpost/master/code/prep dir=ltremzfs list/em will show the filesystem we created and the root filesystem:/p pre code class=language-bashNAME              USED  AVAIL  REFER  MOUNTPOINT blogpost          250K  1.92G    19K  /blogpost blogpost/master    19K  1.92G    19K  /blogpost/master/code/preh5 dir=ltrSnapshots/h5 p dir=ltrTo demonstrate the copy-on-write/snapshot features, create some test data:/p pre code class=language-bashdd if=/dev/zero of=/blogpost/master/file-1mb.txt count=1024 bs=1024 dd if=/dev/zero of=/blogpost/master/file-2mb.txt count=2048 bs=1024/code/prep dir=ltrAnd now create the snapshot:/p pre code class=language-bashzfs snapshot blogpost/master@testsnapshot/code/prep dir=ltremzfs list -t snapshot/em will show snapshots:/p pre codeNAME                             USED    AVAIL        REFER     MOUNTPOINT blogpost/master@testsnapshot      0        -         3.02M             -/code/prep dir=ltrClone the snapshot by specifying the clone and the destination filesystem. In this case, we’re taking the clone of master called ‘testsnapshot’ and creating a filesystem called development:/p pre code class=language-bashzfs clone blogpost/master@testsnapshot blogpost/development/code/prep dir=ltrListing the files in /blogpost/development will show the files:/p pre code class=language-bashdrwxr-xr-x 2 root root       4 Jan 10 17:51 ./ drwxr-xr-x 4 root root       4 Jan 10 17:57 ../ -rw-r--r-- 1 root root 1048576 Jan 10 17:51 file-1mb.txt -rw-r--r-- 1 root root 2097152 Jan 10 17:51 file-2mb.txt /code/prep dir=ltrEven though you can see the files and their sizes, only 1k of space is taken up instead of 3MB. The 3MB of data is being referenced rather than existing./p p dir=ltremzfs list/em:/p pre code class=language-bashNAME                         USED  AVAIL  REFER  MOUNTPOINT blogpost/development        1K  1.92G  3.02M  /blogpost/development blogpost/master            3.02M  1.92G  3.02M  /blogpost/master /code/prep dir=ltrAfter making a change to the 1mb file in /blogpost/development, zfs list now looks like:/p pre code class=language-bashNAME                         USED  AVAIL  REFER  MOUNTPOINT blogpost/development          1.14M  1.92G  3.15M  /blogpost/development blogpost/master             3.02M  1.92G  3.02M  /blogpost/master /code/preh4 dir=ltrDocker/h4 h4 dir=ltrDocker Example/h4 h5 dir=ltrInstallation/h5 p dir=ltr(Steps below are for Ubuntu 16.04. See a href= for other operating systems)/p pre code class=language-bashsudo apt install apt-transport-https ca-certificates sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D echo deb ubuntu-xenial main | sudo tee /etc/apt/sources.list.d/docker.list sudo apt update sudo apt-cache policy docker-engine sudo apt install linux-image-extra-$(uname -r) linux-image-extra-virtual sudo apt install docker-engine/code/preh5Usage/h5 pre code class=language-bashdocker run -d -p 80:80 tutum/hello-world/code/prep dir=ltrThe command above will automatically download an image called “hello-world” from the Tutum repository on the docker hub. Once downloaded, it will start the container in detached mode (runs in the background) and publishes port 80 so that we can connect. Once running, opening the page in the browser gives:/p p dir=ltrimg alt=Screen Shot 2017-01-11 at 11.28.26.png data-entity-type= data-entity-uuid= height=147 src= width=192 //p pNow that the image is downloaded (and already built as it’s stored in the Docker Hub), starting another container is as simple as changing the port and running the command again:/p pre code class=language-bashdocker run -d -p 8080:80 tutum/hello-world/code/prepThis will instantly start another container. We can use ‘docker ps’ to see the running containers:br /  /p pre code class=language-bashCONTAINER ID        IMAGE               COMMAND                     STATUS              PORTS 21def91c5b50        tutum/hello-world   /bin/sh -c 'php-fpm     Up 28 seconds fe4b2176f151        tutum/hello-world   /bin/sh -c 'php-fpm     Up 39 minutes /code/prep dir=ltrSo using two docker commands, we have 2 separate containers running Nginx and PHP - yet only using the process’ amount of resources instead of an entire operating systems, in the case of the VMs:/p pre code class=language-bashCONTAINER           CPU %               MEM USAGE / LIMIT 21def91c5b50        0.02%               3.977 MiB / 488.4 MiB fe4b2176f151        0.01%               4.516 MiB / 488.4 MiB /code/preh3 dir=ltrPutting it all together/h3 p dir=ltrUsing the above examples, it should be possible to see how containers and a copy-on-write filesystem can be used together in order to create new development environments quickly and cheaply./p p dir=ltrThe proof of concept techniques used above can be expanded into working with a minimal PHP developer’s setup - Nginx, PHP MySQL. Docker-compose will be used in order to simplify the defining and running of multiple containers./p hr /pNote:/p p dir=ltrThe PHP container uses a custom image which extends the official php-7 image and adds mysql pdo extensions. To create this image, create a file called Dockerfile containing:/p pre code class=language-bashFROM php:7-fpm RUN docker-php-ext-install mysqli pdo pdo_mysql/code/prep dir=ltrRunning the following will build the image./p pre code class=language-bashdocker build -t blogpost-web ./code/prep dir=ltr /p hr /pDocker-compose reads a docker-compose.yml file to determine what to do. The syntax is similar to that of a normal Dockerfile. Create a file in /blogpost/master called docker-compose.yml and use the following:/p pre code class=language-yamlweb:    image: nginx:latest    ports:        - 80:80    volumes:        - ./code:/code        - ./site.conf:/etc/nginx/conf.d/site.conf    links:        - php php:    image: blogpost-web    volumes:        - ./code:/code    links:        - db db:  image: mysql  volumes:    - ./database:/var/lib/mysql/  ports:    - 3306:3306  environment:    MYSQL_ROOT_PASSWORD: master    MYSQL_USER: master    MYSQL_PASSWORD: master    MYSQL_DATABASE: master/code/prep dir=ltrdocker-compose up will download the images (if needed) and start the containers./p h4 dir=ltrTest Data/h4 p dir=ltrIn order to test the functionality, a small file is placed in the code directory that connects to the DB and prints out the contents of the messages table. An example is:/p pre code class=language-php$db = new PDO('mysql:host=db;dbname=master;charset=utf8mb4', 'master', 'master'); echo(I am masterbr/br/Messages:/br/br); foreach($db-query('SELECT * FROM messages') as $row) {    echo $row['message']; }/code/prep dir=ltrThe disk space usage now looks like:br /  /p pre code class=language-bashNAME                       USED  AVAIL  REFER  MOUNTPOINT blogpost/master/code        20K  1.72G    20K  /blogpost/master/code blogpost/master/database   210M  1.72G   210M  /blogpost/master/database/code/prep dir=ltrSo the database is currently taking up 210MB. Traditionally, if we wanted to duplicate the database for another branch/feature, we’d copy the directory, thereby increasing the disk space usage to 420MB./p p dir=ltrTo snapshot the master branch, use the following commands:/p pre code class=language-bashzfs snapshot blogpost/master/database@masterdatabase zfs snapshot blogpost/master/code@mastercode/code/prepThen create the development filesystem and then clone the master snapshots to the development filesystem:/p pre code class=language-bashzfs create blogpost/development zfs clone blogpost/master/code@mastercode blogpost/development/code zfs clone blogpost/master/database@masterdatabase blogpost/development/database/code/prepzfs list now shows the master development filesystems:/p pre code class=language-bashNAME                            USED  AVAIL  REFER blogpost/master/code             20K  1.72G    20K blogpost/master/database        210M  1.72G   210M blogpost/development/code         1K  1.72G    20K blogpost/development/database     1K  1.72G   210M /code/prep dir=ltrThe code and database for the development branch is only taking up 2KB disk space instead of 210MB! Quite a saving if used with large databases and codebases./p pRunning docker-compose up in the development directory brings up the 3 containers. Edit the test PHP and replace ‘master’ with ‘development’, so that we can prove which codebase is being used./p p dir=ltrWhen visiting the master site, you should see/p p dir=ltrimg alt=Screen Shot 2017-01-11 at 16.46.24.png data-entity-type= data-entity-uuid= height=63 src= width=58 //p p dir=ltrAnd when visiting the development site, you should see:/p p dir=ltrimg alt=Screen Shot 2017-01-11 at 16.46.28.png data-entity-type= data-entity-uuid= height=69 src= width=88 //p p dir=ltrzfs list shows:br /  /p pre code class=language-bashNAME                            USED  AVAIL  REFER blogpost/master/code             29K  1.70G    20K blogpost/master/database        210M  1.70G   210M blogpost/development/code      9.50K  1.70G    20K blogpost/development/database  12.6M  1.70G   210M/code/prep dir=ltrSo although some extra space has been used, nearly 200MB is still saved even though an entirely new development environment now exists./p p dir=ltrGet a shell on the development DB container by running: docker exec -it development_db_1 /bin/bash/p p dir=ltrAnd insert some data:/p pre code class=language-bashmysql -umaster -pmaster master -e ‘insert into messages (message) values (This is the development branch);’/code/prep dir=ltrRefreshing the page on your development web server should now show another message:/p p dir=ltrimg alt=Screen Shot 2017-01-11 at 16.56.44.png data-entity-type= data-entity-uuid= height=104 src= width=188 //p pre code class=language-bashNAME                            USED  AVAIL  REFER blogpost/master/code             29K  1.70G    20K blogpost/master/database        210M  1.70G   210M blogpost/development/code      9.50K  1.70G    20K blogpost/development/database  12.8M  1.70G   210M/code/prepSo even with a change in the database, the majority of the data is referenced from the snapshotted data with only 12.8MB taking up space on the disk./p h2 dir=ltrConclusion/h2 p dir=ltrThe examples above have shown that it is possible to create quick andresource effective development environments locally. We have shown how containers can be used to isolate environments which provide a layer of security and cleanliness whilst still saving space and time when compared to traditional VMs. We have also shown how using a copy-on-write filesystem such as ZFS can be used to quickly and easily clone environments and reduce disk space usage, allowing a developer to have more environments than a traditional setup might allow./p p dir=ltrThe commands used can easily be scripted to make the process interactive and even faster./p /div /div /div /div /div

Mediacurrent: Friday 5: 5 Tips for Preparing for the Acquia Certification Test

Fri, 01/27/2017 - 16:02
img typeof=foaf:Image src= width=200 height=171 alt=Mediacurrent Friday 5 Logo title=Mediacurrent Friday 5 Logo / pHappy Friday, everybody. This episode Front End Developer Tim Dickens and a special guest give you some tips on how to prepare for the Drupal Certification Exams./p piframe allowfullscreen= frameborder=0 height=315 src= width=560/iframe/p pHave a topic that you'd like to learn more about? Feel free to email us at a with any suggestions and stay tuned for the next episode. Have a great weekend!/p

Lullabot: Matt Westgate and Seth Brown on Doing Good with Drupal

Fri, 01/27/2017 - 16:00
In this episode of Hacking Culture, Matthew Tift talks with Matt Westgate and Seth Brown about Lullabot, the Drupal community, and how people who build free software improve the world. This episode is released under the Creative Commons attribution share alike 4.0 International license. The theme music used in this episode comes from the Open Goldberg Variations. Learn more at

Agaric Collective: Adding Bootstrap button stylings to Drupal 8's action links and node links

Fri, 01/27/2017 - 15:50
pWhen all goes according to plan—which is surprisingly often—theming in Drupal 8 is a straightforward matter of editing templates and stylesheets. We found things did not go according to plan when styling page-level action links (such as Add new Forum topic) and content-level action links (or emnode links/em as Drupal 8 still calls them, such as read more or add comment). We are going to show how to add a href= styles, but the same approaches would be useful to add special stylings, button-like or otherwise, to selected action links and node links./p pFirst, let's revisit the steps to follow when trying to add classes to Drupal-produced markup:/p ollia href= Twig debugging/a./li liUsing your browser's inspector, identify the template providing the code you need to modify./li liCopy the template from where Twig debug output says it lives in Drupal core (or contrib) to your theme. If needed, use template name suggestions with a code--modifier/code to selectively override the template in specific cases./li liAdd a href= classes/a to your template. This is usually accomplished by tacking the codeaddClass(here are--my-classes)/code method onto an codeattributes/code variable./li liUse the classes you added in your CSS./li /olpNow let's try applying that to styling action links and node links (but only the actual link parts, not the surrounding text) as buttons./p h3Page-level action links/h3 pHere is an action link provided by Drupal core in the Forum module. It's classes don't align with Bootstrap's, so it displays without style./p pimg src= alt=A quot;Forumsquot; headline with an unstyled quot;Add new Forum topicquot; action link below it. class=border //p h4The process /h4pIf we open the template that is providing the HTML for each link, codemenu-local-action.html.twig/code, it is only one line of code (and 12 lines of comments). It couldn't be simpler!/p pre class=brush: php {# /** * @file * Default theme implementation for a single local action link. * * Available variables: * - attributes: HTML attributes for the wrapper element. * - link: A rendered link element. * * @see template_preprocess_menu_local_action() * * @ingroup themeable */ #} lt;li{{ attributes }}gt;{{ link }}lt;/ligt; /prep Except... the codeattributes/code variable we have available is on the list item (codeli/code tag), not the link itself. Using this template we can't add classes to the already-rendered link element. Putting the button class on the list item would result in a common UX problem: button-looking elements with parts that are not clickable./p pEven though this template cannot be used directly, it points us in the right direction. On line 10, a comments suggest us to see codetemplate_preprocess_menu_local_action()/code. So we shall./p pA symbol finder in an IDE or codegrep/code will quickly take us to line 65 of codecore/includes/ pre class=brush: php; first-line: 54 /** * Prepares variables for single local action link templates. * * Default template: menu-local-action.html.twig. * * @param array $variables * An associative array containing: * - element: A render element containing: * - #link: A menu link array with 'title', 'url', and (optionally) * 'localized_options' keys. */ function template_preprocess_menu_local_action(amp;$variables) { $link = $variables['element']['#link']; $link += array( 'localized_options' =gt; array(), ); $link['localized_options']['attributes']['class'][] = 'button'; $link['localized_options']['attributes']['class'][] = 'button-action'; $link['localized_options']['set_active_class'] = TRUE; $variables['link'] = array( '#type' =gt; 'link', '#title' =gt; $link['title'], '#options' =gt; $link['localized_options'], '#url' =gt; $link['url'], ); } /prep Here we can see exactly how Drupal is adding classes ('button' and 'button-action') to the buttons. Let's add our own preprocess function assuming our theme is name codeexampletheme/code:/p olliAdd a function to our .theme file. In this example, the file would be codeexampletheme.theme/code./li liName the function codeexampletheme_preprocess_menu_local_action()/code. That is, replace the word 'template' with the name of our theme name./li liModify the code$variables/code array to add our classes./li /olpWe could even remove the existing classes from the link, but we'll leave them for now. Note that the link that gets processed is code$variables['link']/code rather than code$variables['element']['#link']/code./p h4The solution/h4 pre class=brush: php /** * Extends template_preprocess_menu_local_action(). * * Add Bootstrap button classes to a single local action link. * * Default template: menu-local-action.html.twig. * * @param array $variables * An associative array containing: * - element: A render element containing: * - #link: A menu link array with 'title', 'url', and (optionally) * 'localized_options' keys. */ function exampletheme_preprocess_menu_local_action(amp;$variables) { $variables['link']['#options']['attributes']['class'][] = 'btn'; $variables['link']['#options']['attributes']['class'][] = 'btn-success'; } /prep img src= alt=A forums listing page with a large green button labeled quot;Add new Forum topicquot; at the top. class=border //p h3Content-level action links/h3 pNext let's style node links as buttons. It's well-nigh impossible to get the codebtn/code and codebtn-success/code classes on the login and register links within the sentence Log in or register to post comments. Therefore, we will use Bootstrap's handy mixins. The following is a SCSS code snippet which is turned into CSS by a SASS preprocessor./p pre class=brush: css .links--node a { @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border); @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base); } /prep Finally, we just need to add the codelinks--node/code class. Assuming our theme is called codeexampletheme/code:/p pre class=brush: php /** * Implements hook_preprocess_links() for node entities. */ function exampletheme_preprocess_links__node(amp;$variables) { $variables['attributes']['class'][] = 'list-unstyled'; $variables['attributes']['class'][] = 'links--node'; } /prep img src= alt=A comments section noting there are no comments yet, and providing two links, styled as buttons, in the sentence 'Log in or register to post comments' class=border //p h3Bonus: Link field links as buttons/h3 pFor styling the output of link fields as buttons, the aptly-named a href= link formatter/a module can help you out without the need for custom code nor templating./p h3Are you styling action links, node links, and other links?/h3 pHave you faced similar needs for changing the look of links, to be buttons or otherwise? How have you met them? Let us know in the comments!/p

CiviCRM Blog: Email Authentication – SPF, DKIM, DMARC

Fri, 01/27/2017 - 13:30
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encoded pimg alt=email image src=;ssl=1 /When email was first designed, security was not considered important and up until fairly recently it was still possible to send an email from any address and get away with it./p pHowever, as spam, phishing and spoofing attacks by email have become increasingly common there have been various attempts to make email more secure.  In the last year or so the major providers (AOL, Google, Microsoft etc.) have all seriously tightened their security and authentication requirements for validating and receiving email.  The result of this is that a lot of legitimate email is now being classified as spam or rejected by those providers.  In order to ensure that your email continues to be marked as legitimate and received by these larger providers it is now almost essential that you implement SPF, DKIM and DMARC on your domains otherwise many of your recipients will never see the emails you are sending!/p pAs an implementer of CiviCRM I've had to learn all this pretty quickly...  There's a lot of detailed information out on the web but hopefully this post covers what you actually need to know to make sure your clients emails are delivered and read!/p pstrongRead the rest of my blog post a href= p /p /div/div/divdiv class=field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-hiddendiv class=field-itemsdiv class=field-item evena href=/blog/tags/tools typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Tools/a/divdiv class=field-item odda href=/blog/tags/civimail typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=CiviMail/a/divdiv class=field-item evena href=/blog/tags/drupal typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal/a/divdiv class=field-item odda href=/blog/tags/security typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Security/a/divdiv class=field-item evena href=/blog/tags/wordpress typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=WordPress/a/div/div/div

Kalamuna Blog: Keep Your Site Evercurrent: Security Updates Just Got Easier

Fri, 01/27/2017 - 00:56
div class=field field-name-field-featured-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evena href=/news/keep-your-site-evercurrent-security-updates-just-got-easierimg src= width=870 height=300 alt=Evercurrent logo //a/div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpspanAt Kalamuna we not only build Drupal websites, but we also provide support services for a plethora of clients. One of these is providing security updates; we pride ourselves on keeping our clients’ sites safe and free from vulnerabilities. But, I have to admit that when I hear of new security releases I cringe. I think about the tedious process of going through each site or trying to recall who has what modules installed on their site. But I just discovered an app that finds all of the new security updates for me: Evercurrent. Read on to see how it works./span/p/div/div/div

Zhilevan Blog: How Deploy Drupal to Heroku

Thu, 01/26/2017 - 20:56
what is Heroku? It’s a service for developers eager to get their applications online without having to worry about infrastructure details. Metered, pay-as-you-go Cloud Computing services come in all kinds of flavors. Infrastructure as a Service (IaaS) offerings like AWS allows enterprises to shift their entire operations away from traditional data centers. The downside is that you’ll have to manage networking and provisioning yourself.

OSTraining: How to Build Drupal 8 Triple Display Slideshow Using Slick

Thu, 01/26/2017 - 20:37
div class=ost-intro-imageimg src= alt=How to Build Drupal 8 Triple Display Slideshow Using Slick width=200 height=133 //div pOne of our OSTraining members asked how it was possible to make multiple displays for Drupal 8 slideshows./p pIn this tutorial, I will show you how to build a slideshow that uses your article content type to make a slideshow with a teaser./p

Web Wash: Webinar: Customize Content Pages using Display Suite in Drupal 8

Thu, 01/26/2017 - 19:53
If you ever need to modify content pages, Display Suite is a good choice. It offers a lot of flexibility without learning a brand new interface. You just use the standard Manage display page to select a layout and move fields into regions. Yesterday, I presented a webinar on how to use Display Suite in Drupal 8. The webinar went for around 50 minutes and I covered the following: 1. What's new in Drupal 8. 2. How to set up a Display Suite layout on a view mode. 3. How to change the wrapper elements. 4. How to add custom CSS classes. 5. How to use Display Suite fields. 6. How to use the Display Suite Switch View Mode sub-module. 7. And finally, how to override a layout.

CiviCRM Blog: The quest for performance improvements - 5th sprint

Thu, 01/26/2017 - 15:47
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encoded pThe last two days we spent another sprint at socialist party to improve performance.  And again we used a guy with database knowledge to analyze our queries. We have optimized a few things so far one of the major areas to improve next was the ACL part of queries. That is the part of the query to decide which contacts you are allowed to see. So at the socialist party they have local chapter administrator who are only allowed to see the active members in their local area./p pTo decide which contacts you are allowed to see a search query is rebuild to include this ACL part. So there is a join on the membership table and a join on the chapter-structure table and then a where expression is to filter on the chapter and to filter on active memberships. Meaning that the MySQL will scan all records in the table civicrm_contact which at the socialist party is around 350.000./p pWe have worked on a proof-of-concept solution so far which is to create a table with the user_id and which contact_ids the user is allowed to see. We then do a join on this table resulting that only that subset of contacts is scanned by mysql. Which in fact improved the search query from running a few seconds to just a few milliseconds./p pWhen a user logs in we check how long ago it was when we last updated this table and if it is longer than 24 hours we will delete the entries for that user and re-insert the entries./p pWe have also reported this at the CiviCRM issue Queue see: a href= pThe next thing we are going to work on is to make the proof-of-concept stable and do some refactoring of the core civicrm_acl_contact_cache table.  As this proof-of-concept looks like a bit what civicrm_acl_contact_cache should do but does not do.  Also we want to add a setting in the user interface where site-administrators could set the value for the validity time./p pWe are also wondering what your thoughts are about our performance quest so far and about our proposed solution./p p /p /div/div/divdiv class=field field-name-taxonomy-vocabulary-1 field-type-taxonomy-term-reference field-label-hiddendiv class=field-itemsdiv class=field-item evena href=/blog/tags/drupal typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal/a/div/div/div

Acquia Developer Center Blog: Drupal 8 DIY: Creating Content Tabs with Theme Libraries and Slick

Thu, 01/26/2017 - 15:22
div class=field field-name-field-blog-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image class=img-responsive src= width=140 height=85 alt= //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpContinuing from our previous post, a href= 8 DIY: Creating a Slideshow with Theme Libraries and Slick/a, we wanted to build on the power of theme libraries provide us in Drupal 8./p/div/div/divdiv class=field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/tags/acquia-drupal-planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=acquia drupal planet/a/div/div/div

Acquia Developer Center Blog: 245: Drupal Association Board Community Elections 2017 - meet Megan Sanicki

Thu, 01/26/2017 - 14:41
div class=field field-name-field-podcast-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image class=img-responsive src= width=340 height=260 alt=DrupalCon-2013-BrokenBanjo-6.jpg - Photo by Trav Williams, Broken Banjo Photography title=DrupalCon-2013-BrokenBanjo-6.jpg - Photo by Trav Williams, Broken Banjo Photography //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedp In this podcast and video, Megan Sanicki, Executive Director of the Drupal Association, and I talk about what the DA Board is all about and why you might want to run for a community directorship. The 2nd half of the podcast is also a chance to get to know Megan. Megan fell in love with the intersection of tech and community work and has been with us in the community since 2009 (or 2010, she's not sure ...). /p p Talking about the business side of Drupal, I really like what she has to say: /p blockquotep It's more important to me how we move through life together as a community to create amazing software. /p/blockquote h2 Should you run for the Drupal Association Board of Directors?br //h2 p One interesting aspect of the DA Board that sets it apart from the rest of the community is that it goes against the grain, the nature of how we usually go about things. We're a community of doers. If you want to fix something specific, there are probably better places for you in the Drupal community, places where you can get busy, help, and improve stuff. The Board is an odd corner of the Drupal community where it's not about getting things done. I imagine a lot of people would be frustrated by that. /p p Listen to my conversation with Megan and if you want to serve the community in this capacity, here's what you need to do: /p ulliSelf-nomination for the election runs February 1-19, 2017. /li liRead Megan's blog post a href= Community Board Election Begins 1 February/a. /li liFollow any of the links it contains to get a full picture of the process. /li liWatch the a href= Election Candidate Brief video/a (also embedded in Megan's post). a a transcript/a if you need one. /li liRead the a href= Association bylaws/a /li liRead the a href= member agreement/a /li liRead a href= Drupal Association mission statement/a /li liThe a href= Drupal Association Board Elections page/a contains further information and it is where you can begin your self-nomination from February 1 to 19, 2017. /li /ulh2 More background infobr //h2 ulliMichael Schmid and I recorded a follow up and analysis of the 2016 DA Board community election that I published audio and video of as a href= Podcast 225/a. /li liI recorded a conversation with the 2016 DA Board community election, Shyamala Rajaram and published audio and video of it as a href= Podcast 243/a. /li /ulpiframe width=640 height=360 src= frameborder=0/iframe/p /div/div/divdiv class=field field-name-field-skill-level field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelSkill Level:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/skill-level/beginner typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Beginner/a/divdiv class=field-item odda href=/skill-level/intermediate typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Intermediate/a/divdiv class=field-item evena href=/skill-level/advanced typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Advanced/a/div/div/div

Blair Wadman: Transitioning from Drupal 7 to Drupal 8: programatically creating blocks

Thu, 01/26/2017 - 12:58
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpIf you are used to creating Drupal 7 modules, one of the major challenges of moving to Drupal 8 is all the changes under the hood. Almost everything has changed and that can be very overwhelming. But it doesn't have to be. One method to learn how to create Drupal 8 modules is to compare it to what you are used to in Drupal 7 module development./p/div/div/div

Real Life Digital: Drupal and SEO: A fly-by tour

Thu, 01/26/2017 - 12:55
div class=field field--name-field-main-images field--type-image field--label-hiddendiv class=field__itemsdiv class=field__item evena href=/blog/drupal-and-seoimg typeof=foaf:Image src= width=1200 height=500 alt=Drupal SEO - written in dark blue on a light blue background. The #039;O#039; has been replaced with the Druplicon Drupal Icon. //a/div/div/divdiv class=field field--name-field-intro field--type-text-long field--label-hiddendiv class=field__itemsdiv class=field__item evenpWe are often asked by those who are new to a href= and familiar with a href= - what SEO options are available?. In order to answer this, we've put together an overview of some of the tools available for Drupal. We're only really going to scratch the surface, but here's a few things that Drupal can do for you to boost your rankings in search engine results./p /div/div/div Blog: AGILEDROP: The Importance of Drupal Events

Thu, 01/26/2017 - 10:01
a href= src= //a Drupal Global Sprint Weekend will happen at the end of this week almost all over the world, so we have made a list for you, where you can attend it. We have also analysed Drupal Camps on all continents last year and presented you the reasons why you should attend DrupalCons. All together with user group meetups, they form Drupal events. But why is organizing and attending them important? Here are the reasons. Have you ever been to any of the described Drupal events? If your answer is yes, then you'll already familiar with things. But since you probably did not take the full advantage of it,… a href= MORE/a

DrupalCon News: Musings of a Business Track Lead

Wed, 01/25/2017 - 23:05
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpBefore working on the Session Track description, I spent some time researching. There are lots of blog posts on the embusiness of Drupal,/em plus surveys and articles - and, of course, what other Session Track committees have researched and put together./p pWhat it seemed to come down to this year was our own unified experiences - and the first ever a href= CEO survey/a that supports what we see and directs our topics./p/div/div/div

Mediacurrent: Dropcast Episode 28: Ahh Fabian Franz

Wed, 01/25/2017 - 22:49
img typeof=foaf:Image src= width=200 height=152 / p dir=ltrRecorded January 19th, 2017/p pThis episode we are ringing in the new year and giving you all a treat, by letting someone else talk. We welcome Fabian Franz, a core committer for Drupal 7  and co-creator of Ryan’s favorite thing in the whole wide world, Big Pipe. You do have to listen to us a little as we talk about Mediacurrent’s awesome blog posts, and Drupal News. Mario brings us the first Pro Project Pick of the year and we’ll finally shut up with Ryan’s Final Bell./p Featured Case Studies: University of Minnesota

Wed, 01/25/2017 - 22:42
div class=field field-name-field-mainimage field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg src= width=588 height=306 alt=Screenshot of homepage at //div/div/divdiv class=field field-name-field-link field-type-link-field field-label-abovediv class=field-labelCompleted Drupal site or project URL:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=http://umn.edu class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpSimply put, University of Minnesota is enormous. Nearly 70,000 students are enrolled at this Big Ten university with five major campuses spread throughout the state of Minnesota. Much has evolved since it was founded in 1851, but the University’s core values remain the same: enrichment by understanding, advancement of learning through education, and the search for truth through research; all of this to benefit the people of the state of Minnesota, the nation, and the world./p pThe University of Minnesota was planning to replace its existing Oracle Universal Content Management (UCM) system with a flexible, hosted Drupal implementation. The University’s UCM implementation had more than 600 sites, which represented a considerable amount of storage, and millions of site visitors monthly. Furthermore, while the University has a central Office of Information Technology (OIT), the system is a distributed environment where each collegiate unit has its own management structure and its own internal Web team./p pOIT wanted to create a centralized platform that would be an attractive and more easily maintainable alternative to departments spinning up their own independently-hosted sites. Several pilot sites would serve to provide representative real-life examples of various use cases for the platform./p/div/div/divdiv class=field field-name-field-module field-type-node-reference field-label-abovediv class=field-labelKey modules/theme/distribution used:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/project/panopolyPanopoly/a/divdiv class=field-item odda href=/project/workbenchWorkbench/a/divdiv class=field-item evena href=/project/migrateMigrate/a/divdiv class=field-item odda href=/project/zenZen/a/div/div/divdiv class=field field-name-field-developed-org field-type-node-reference field-label-abovediv class=field-labelOrganizations involved:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/ class=field field-name-field-profiles field-type-user-reference field-label-abovediv class=field-labelTeam members:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/u/agentrickardagentrickard/a/divdiv class=field-item odda href=/u/crellCrell/a/div/div/div

Mediacurrent: Drupal 8: How to Reference a Views#039; Block Display from a Field

Wed, 01/25/2017 - 19:49
img typeof=foaf:Image src= width=200 height=152 alt=Drupal bits and bytes title=Drupal bits and bytes / pIn Drupal 7, if you wanted to reference a view display from a node field, you had to use a module such as a href= In Drupal 8, this can be done with Drupal core alone by using the built in entity reference to reference a block instance created from the view./p h2Step 1: Create a hidden region in your theme./h2 p1. Open your /2. Find the section for regions:br /3. Add a new line: hidden: 'Hidden region for referenced blocks'/p