Elsewhere

Cocomore: We Got It: The Drupal 8 Developer Certificate

Planet Drupal - Tue, 20/09/2016 - 00:00

For software developers it is very important to continue their education continuously. That’s why our Drupal programmers in Seville didn’t hesitate and participate as some of the first ones in the Drupal 8 Certification Program of Acquia. With success! For everyone thinking about also getting certified for the latest version of the CMS we have some useful tips.

Categories: Elsewhere

Palantir: Noble Network of Charter Schools

Planet Drupal - Mon, 19/09/2016 - 23:38
Noble Network of Charter Schools brandt Mon, 09/19/2016 - 16:38 Supporting Students For a More Promising Future

Support for a better managed codebase across a platform of Drupal sites.

Highlights
  • Provided valuable insight into state of the site with an in-depth code audit

  • Transitioned seamlessly from previous hosting platform to Acquia

  • Streamlined theme to reduce code duplication

Do you need a site audit?

Let's Chat.

Noble Network of Charter Schools (Noble) is a Chicago-based nonprofit organization that manages a network of 16 public high schools and one middle school located throughout Chicago. The schools of the Noble Network serve over 10,000 mainly low-income, underserved students, and work toward making a college degree a reality for each of them. 

Noble needed a firm with a deep bench of Drupal talent to optimize its current sites and maintain and extend the underlying platform as Noble improved and advanced its online presence. Noble’s previous support provider no longer had the Drupal staff to support their needs, and they also needed assistance in transitioning their sites to a new hosting platform.

As we do with all of our support clients, we began with an in-depth code audit that allowed Noble to see the state of their sites behind the scenes. This audit provided details on what we could implement to increase the stability and speed of the Noble sites. One of the most significant updates we made was to streamline the theme to reduce code duplication. The existing code base did not leverage Drupal’s theme inheritance properly.

Across the sites in the network, about 95% of the CSS is identical. Only colors and log images are changed. However, when the site was initially built by another firm, the code and CSS for each site was duplicated, which meant that if a change was made in one place, it needed to be changed in 17 different places. Using a base theme properly, our developers updated the codebase so that if something is fixed on the core level, then it is fixed on all of the sites. 

In addition, we implemented bonus features like a homepage slideshow, form and calendar integrations, and modified Google Translate functionality. The form and calendar integrations allows Noble students and families to more efficiently see upcoming events at their campuses and provides a quick way to contact the school by email with general questions and comments. The Google Translate functionality is very important, as many students’ families speak Spanish at home. Noble sends all official documents home with Spanish translations, and it was important that the website be just as accessible.

Working with Acquia, we helped Noble transition to a new hosting provider that provides Drupal support for the network. Because we jumped right in with a great project manager and the right resources to get started, Noble’s sites experienced no downtime which mitigated any negative user experience. Moving to Acquia gave us better tools for managing code and deployments across the sites, and as our partnership continues and more features are added, the result is a better managed and overall more reliable platform of sites.  
 

"Going with Palantir to support your Drupal website is a no brainer." Donnell P. Layne, Director of Information Technology

We want to make your project a success.

Let's Chat. Drupal Services Support Project Management How to Gauge Your Support Needs We've Got Your Back: Palantir's Support Services The Secret Sauce, Ep. 25: What Can Support Do for You? noblenetwork.org
Categories: Elsewhere

Drupal Aid: Enhancing CKEditor in Drupal 8

Planet Drupal - Mon, 19/09/2016 - 21:00

It was a happy day for me when CKeditor was incorporated into Drupal 8 core. Out of the box, Ckeditor is great. But there a lot of things you can do to make it better and more user friendly for your clients. In this post, I’ll show you some easy additions you can make to enhance your end-user's content editing experience.

  • How to easily make Links to other content
  • How to easily add Files and Images (and manage them too)
  • Adding Custom Styles
  • Adding Templates
  • Other helpful CKEditor Add-ons that are available.

Read more

Categories: Elsewhere

Acquia Developer Center Blog: Personalization Happens - Acquia at dmexco 2016

Planet Drupal - Mon, 19/09/2016 - 18:12

Conversations about delivering business needs with digital tools, or "How to get Drupal into the conversation without talking technology."

Acquia and several partners had a successful presence at the 2016 dmexco trade show for digital marketing and advertising. By "successful," I mean we spoke with hundreds and hundreds of people about how we can help them do better business and I think many of them will end up being happy users, consumers, and contributors to Drupal and our community.

In this podcast (audio and video), I give a quick intro to the dmexco trade fair and speak with the following people about digital transformation, selling Drupal without selling Drupal, the state of Drupal in Germany in 2016, and more:

Bonus! Acquia made it into the official dmexco wrap-up video. Great to see us representing Drupal alongside so many big names.

Bonus 2! Check out my Buzzword Bingo video from the dmexco floor to get a feel for the magnitude of the show and its ecosystem and the sometimes confusing world of contextual cloud targeting, media data reach optimisation, customer brand implementation, storytelling growth and even more that I didn't make up!

Skill Level: BeginnerIntermediateAdvanced
Categories: Elsewhere

ActiveLAMP: Who is Drupal Right For: DrupalCamp LA 2016 Table Talk - pt. 2/5

Planet Drupal - Mon, 19/09/2016 - 17:01

Part two of our table talk! This week the agency owners of Achieve Internet, Stauffer, ActiveLAMP and Facet Interactive discuss the who is Drupal right for.

Read more...
Categories: Elsewhere

Dcycle: Using Docker to evaluate, patch or develop Drupal modules

Planet Drupal - Mon, 19/09/2016 - 16:51

Docker is now available natively on Mac OS in addition to Linux. Docker is also included with CoreOS which you can run on remote Virtual Machines, or locally through Vagrant.

Once you have installed Docker and Git, locally or remotely, you don't need to install anything else.

In these examples we will leverage the official Drupal and mySQL Docker images. We will use the mySQL image as is, and we will add Drush to our Drupal image.

Docker is efficient with caching: these scripts will be slow the first time you run them, but very fast thereafter.

Here are a few scripts I often use to set up quick Drupal 7 or 8 environments for module evaluation and development.

Keep in mind that using Docker for deployment to production is another topic entirely and is not covered here; also, these scripts are meant to be quick and dirty; docker-compose might be useful for more advanced usage.

Port mapping

In all cases, using -p 80, I map port 80 of Drupal to any port that happens to be available on my host, and in these examples I am using Docker for Mac OS, so my sites are available on localhost.

I use DRUPALPORT=$(docker ps|grep drupal7-container|sed 's/.*0.0.0.0://g'|sed 's/->.*//g') to figure out the current port of my running containers. When your containers are running, you can also just docker ps to see port mapping:

$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f1bf6e7e51c9 drupal8-image "apache2-foreground" 15 seconds ago Up 11 seconds 0.0.0.0:32771->80/tcp drupal8-container ...

In the above example (scroll right to see more outpu), port http://localhost:32771 will show your Drupal 8 site.

Using Docker to evaluate, patch or develop Drupal 7 modules

I can set up a quick environment to evaluate one or more Drupal 7 modules. In this example I'll evaluate Views.

mkdir ~/drupal7-modules-to-evaluate cd ~/drupal7-modules-to-evaluate git clone --branch 7.x-3.x https://git.drupal.org/project/views.git # add any other modules for evaluation here. echo 'FROM drupal:7' > Dockerfile echo 'RUN curl -sS https://getcomposer.org/installer | php' >> Dockerfile echo 'RUN mv composer.phar /usr/local/bin/composer' >> Dockerfile echo 'RUN composer global require drush/drush:8' >> Dockerfile echo 'RUN ln -s /root/.composer/vendor/drush/drush/drush /bin/drush' >> Dockerfile echo 'RUN apt-get update && apt-get upgrade -y' >> Dockerfile echo 'RUN apt-get install -y mysql-client' >> Dockerfile echo 'EXPOSE 80' >> Dockerfile docker build -t drupal7-image . docker run --name d7-mysql-container -e MYSQL_ROOT_PASSWORD=root -d mysql docker run -v $(pwd):/var/www/html/sites/all/modules --name drupal7-container -p 80 --link d7-mysql-container:mysql -d drupal-image DRUPALPORT=$(docker ps|grep drupal7-container|sed 's/.*0.0.0.0://g'|sed 's/->.*//g') # wait for mysql to fire up. There's probably a better way of doing this... # See stackoverflow.com/questions/21183088 # See https://github.com/docker/compose/issues/374 sleep 6 docker exec drupal7-container /bin/bash -c "echo 'create database drupal'|mysql -uroot -proot -hmysql" docker exec drupal7-container /bin/bash -c "cd /var/www/html && drush si -y --db-url=mysql://root:root@mysql/drupal" docker exec drupal7-container /bin/bash -c "cd /var/www/html && drush en views_ui -y" # enable any other modules here. Dependencies will be downloaded # automatically echo -e "Your site is ready, you can log in with the link below" docker exec drupal7-container /bin/bash -c "cd /var/www/html && drush uli -l http://localhost:$DRUPALPORT"

Note that we are linking (rather than adding) sites/all/modules as a volume, so any change we make to our local copy of views will quasi-immediately be reflected on the container, making this a good technique to develop modules or write patches to existing modules.

When you are finished you can destroy your containers, noting that all data will be lost:

docker kill drupal7-container d7-mysql-container docker rm drupal7-container d7-mysql-container Using Docker to evaluate, patch or develop Drupal 8 modules

Our script for Drupal 8 modules is slightly different:

  • ./modules is used on the container instead of ./sites/all/modules;
  • Our Dockerfile is based on drupal:8, not drupal:7;
  • Unlike with Drupal 7, your database is not required to exist prior to installing Drupal with Drush;
  • In my tests I need to chown /var/www/html/sites/default/files to www-data:www-data to enable Drupal to write files.

Here is an example where we are evaluating the Token module for Drupal 8:

mkdir ~/drupal8-modules-to-evaluate cd ~/drupal8-modules-to-evaluate git clone --branch 8.x-1.x https://git.drupal.org/project/token.git # add any other modules for evaluation here. echo 'FROM drupal:8' > Dockerfile echo 'RUN curl -sS https://getcomposer.org/installer | php' >> Dockerfile echo 'RUN mv composer.phar /usr/local/bin/composer' >> Dockerfile echo 'RUN composer global require drush/drush:8' >> Dockerfile echo 'RUN ln -s /root/.composer/vendor/drush/drush/drush /bin/drush' >> Dockerfile echo 'RUN apt-get update && apt-get upgrade -y' >> Dockerfile echo 'RUN apt-get install -y mysql-client' >> Dockerfile echo 'EXPOSE 80' >> Dockerfile docker build -t drupal8-image . docker run --name d8-mysql-container -e MYSQL_ROOT_PASSWORD=root -d mysql docker run -v $(pwd):/var/www/html/modules --name drupal8-container -p 80 --link d8-mysql-container:mysql -d drupal8-image DRUPALPORT=$(docker ps|grep drupal8-container|sed 's/.*0.0.0.0://g'|sed 's/->.*//g') # wait for mysql to fire up. There's probably a better way of doing this... # See stackoverflow.com/questions/21183088 # See https://github.com/docker/compose/issues/374 sleep 6 docker exec drupal8-container /bin/bash -c "cd /var/www/html && drush si -y --db-url=mysql://root:root@mysql/drupal" docker exec drupal8-container /bin/bash -c "chown -R www-data:www-data /var/www/html/sites/default/files" docker exec drupal8-container /bin/bash -c "cd /var/www/html && drush en token -y" # enable any other modules here. echo -e "Your site is ready, you can log in with the link below" docker exec drupal8-container /bin/bash -c "cd /var/www/html && drush uli -l http://localhost:$DRUPALPORT"

Again, when you are finished you can destroy your containers, noting that all data will be lost:

docker kill drupal8-container d8-mysql-container docker rm drupal8-container d8-mysql-container Tags: blogplanet
Categories: Elsewhere

Nuvole: Pimp your Behat Drupal Extension and rule the world

Planet Drupal - Mon, 19/09/2016 - 16:00
Make the most out of your Behat tests by using custom contexts, dependency injection and much more.

This post is an excerpt from the topics covered by our DrupalCon Dublin training: Drupal 8 Development - Workflows and Tools.

At Nuvole we consider writing good tests as a fundamental part of development and, when it comes to testing a complex site, there is nothing better than extensive behavioral tests using Behat. The benefits of such a choice are quite obvious:

  • Tests are very easy to write.
  • Behat scenarios serve as a solid communication mean between business and developers.

As a site grows in complexity, however, the default step definitions provided by the excellent Behat Drupal Extension might not be specific enough and you will quickly find yourself adding custom step to your FeatureContext or creating custom Behat contexts, as advocated by all official documentation.

This is all fine except that your boilerplate test code might soon start to grow into a non-reusable, non-tested bunch of code.

Enter Nuvole's Behat Drupal Extension.

Nuvole's Behat Drupal Extension

Nuvole's Behat Drupal Extension is built on the shoulders of the popular Behat Drupal Extension and it focuses on step re-usability and testability by allowing developers to:

  • Organize their code in services by providing a YAML service description file, pretty much like we all are used to do nowadays with Drupal 8.
  • Override default Drupal Behat Extension services with their own.
  • Benefit of many ready-to-use contexts that are provided by the extension out of the box.
Installation and setup

Install Nuvole's Behat Drupal Extension with Composer by running:

bash $ composer require nuvoleweb/drupal-behat

Setup the extension by following the Quick start section available on the original Behat Drupal Extension page, just use NuvoleWeb\Drupal\DrupalExtension instead of the native Drupal\DrupalExtension in your behat.yml as shown below:

default:
  suites:
    default:
      contexts:
        - Drupal\DrupalExtension\Context\DrupalContext
        - NuvoleWeb\Drupal\DrupalExtension\Context\DrupalContext
        ...
  extensions:
    Behat\MinkExtension:
      goutte: ~
      ...
    # Use "NuvoleWeb\Drupal\DrupalExtension" instead of "Drupal\DrupalExtension".
    NuvoleWeb\Drupal\DrupalExtension:
      api_driver: "drupal"
      ...
      services: "tests/my_services.yml"
      text:
        node_submit_label: "Save and publish" "Service container"-aware Contexts

All contexts extending \NuvoleWeb\Drupal\DrupalExtension\Context\RawDrupalContext and \NuvoleWeb\Drupal\DrupalExtension\Context\RawMinkContext are provided with direct access to the current Behat service container. Developers can also define their own services by adding a YAML description file to their project and setting the services: parameter to point to its current location (as shown above).

The service description file can describe both custom services and override already defined services. For example, given a tests/my_services.yml containing:

services:
  your.own.namespace.hello_world:
    class: Your\Own\Namespace\HelloWorldService

Then all contexts extending \NW\D\DE\C\RawDrupalContext or \NW\D\DE\C\RawMinkContext will be able to access that service by just calling:

<?php
class TestContext extends RawDrupalContext {

  /**
   * Assert service.
   *
   * @Then I say hello
   */
  public function assertHelloWorld() {
    $this->getContainer()->get('your.own.namespace.hello_world')->sayHello();
  }

}
?>

The your.own.namespace.hello_world service class itself can be easily tested using PHPUnit. Also, since Behat uses Symfony's Service Container you can list services your service depends on as arguments so to remove any hardcoded dependency, following Dependency Injection best practices.

Override existing services

Say that, while working on your Drupal 7 project, you have defined a step that publishes a node given its content type and title and you want to use the same exact step on your Drupal 8 project, something like:

Given I publish the node of type "page" and title "My page title"

The problem here is that the actual API calls to load and save a node differs between Drupal 7 and Drupal 8.

The solution is to override the default Drupal core services specifying your own classes in your tests/my_services.yml:

parameters:
  # Overrides Nuvole's Drupal Extension Drupal 7 core class.
  drupal.driver.cores.7.class: Your\Own\Namespace\Driver\Cores\Drupal7
  # Overrides Nuvole's Drupal Extension Drupal 8 core class.
  drupal.driver.cores.8.class: Your\Own\Namespace\Driver\Cores\Drupal8

services:
  your.own.namespace.hello_world:
    class: Your\Own\Namespace\HelloWorldService

You'll then delegate the core-specific business logic to the new core classes allowing your custom step to be transparently run on both Drupal 7 and Drupal 8. Such a step would look like:

<?php
class TestContext extends RawDrupalContext {

  /**
   * @Given I publish the node of type :type and title :title
   */
  public function iPublishTheNodeOfTypeAndTitle($type, $title) {
    $this->getCore()->publishNode($type, $title);
  }

...
?> Ready to use contexts

The extension also provides some utility contexts that you can use right away in your tests. Below a quick overview of what's currently available:

Context Description NuvoleWeb\Drupal\DrupalExtension\Context\DrupalContext
Standard Drupal context. You want to use this one next to (and not instead of) Drupal\DrupalExtension\Context\DrupalContext. NuvoleWeb\Drupal\DrupalExtension\Context\ContentContext
Perform operations on Content. NuvoleWeb\Drupal\DrupalExtension\Context\CKEditorContext
Allows to interact with CKEditor components on your page. NuvoleWeb\Drupal\DrupalExtension\Context\ResponsiveContext:
  devices:
    mobile_portrait: 360x640
    mobile_landscape: 640x360
    tablet_portrait: 768x1024
    tablet_landscape: 1024x768
    laptop: 1280x800
    desktop: 2560x1440
Resize the browser according to the specified devices, useful for testing responsive behaviors. NuvoleWeb\Drupal\DrupalExtension\Context\PositionContext
Check position of elements on the page. NuvoleWeb\Drupal\DrupalExtension\Context\ChosenFieldContext
Interact with Chosen elements on the page.

We will share more steps in the future enriching the current contexts as well as providing new ones so keep an eye on the project repository!

Disclaimer

At the moment only Drupal 8 is supported but we will add Drupal 7 support ASAP (yes, it's as easy as providing missing Drupal 7 driver core methods and adding tests).

Tags: Drupal PlanetBehatTest Driven DevelopmentTrainingDrupalCon
Categories: Elsewhere

Aurelien Navarre: How to return the path to an enabled Drupal module or theme?

Planet Drupal - Mon, 19/09/2016 - 09:33

In Drupal 7, it was fairly easy to retrieve the filesystem path for, say, enabled modules.

mysql> SELECT filename, name FROM system WHERE status = 1 AND name = "xmlsitemap"; +--------------------------------------------------------+------------+ | filename | name | +--------------------------------------------------------+------------+ | sites/all/modules/contrib/xmlsitemap/xmlsitemap.module | xmlsitemap | +--------------------------------------------------------+------------+ 1 row in set (0.00 sec)

Why would you do that? Simply because sometimes you can run into issues caused by duplicate .info files in the filesystem. A common error is when you're deleting a duplicate module or changing directories in the filesystem but the module is still registered in the database in its original location. This will make Drupal sad when it bootstraps.

When this happens, you need to know where a particular module is being loaded from. You may compare the results of the above MySQL query with a simple Linux command to find all occurrences of those filenames in your Drupal docroot and try to narrow down the issue (e.g. is the filename being loaded still present on the filesystem?). This could be with the form:

$ find . -type f -name "*.info" | grep -oe "[^/]*\.info" | sort | uniq -d property_validation.info xmlsitemap.info

Let's say xmlsitemap.info is our culprit. We can refine the Linux find command accordingly:

$ find . -type f -name "xmlsitemap.info" ./sites/all/modules/xmlsitemap/xmlsitemap.info ./sites/all/modules/contrib/xmlsitemap/xmlsitemap.info

Which gives the full path to the duplicate .info file.

What matters the most here is we don't need to bootstrap Drupal, which can be a lifesaver in case the site is down.

Going forward with Drupal 8

In Drupal 8 we still have drupal_get_path() to help if we can bootstrap Drupal.

Psy Shell v0.7.2 (PHP 5.6.24 — cli) by Justin Hileman >>> drupal_get_path('module', 'xmlsitemap'); => "modules/xmlsitemap"

However, we can no longer query the {system} table. One workaround I found is to decode the corresponding {key_value} entry. E.g.:

$ drush sqlq "SELECT CONVERT(value USING utf8) FROM key_value WHERE collection = 'state' AND value LIKE '%xmlsitemap.info.yml%'" | grep --color=auto 'xmlsitemap.info.yml'

This will return a huge array, so, having a colored output for grep is helpful to get the filename to the loaded .info.yml file.

This gets the job done but not as cleanly as I would. Do you know of any better way to achieve this?

Categories: Elsewhere

Danny Englander: Drupal 8 Architecture: Video Tour for Designing Structured Modular Content Using Entity Construction Kit (ECK) & Inline Entity Form (IEF)

Planet Drupal - Mon, 19/09/2016 - 01:54

A few months back, I read an interesting blog post by Chapter Three about something they call the "Slice Template." I was really inspired after I read that, it struck me as a whole new paradigm for content creation, that of "structured modular content." At the same time, I was working on a new Drupal 8 theme and build where my objective was to create something that would give content creators lots of flexibility.

When I've had discussions with content creators in the past, more often than not, the one word that kept coming up was "flexibility." In turn, on site builds, this lead to doing some really wacky things all in one wysiwyg.

In the meantime, I had been playing around with the Paragraphs and Field Collection modules for Drupal 8 but after reading Chapter Three's post, I decided to go in different direction, that being Entity Construction Kit, "ECK."

One way of building with ECK is that you have "slices" which are entities that contain bundles and can also reference other entities that have their own bundles. On the content creation side, you can leverage the Inline Entity Form and Inline Entity Form Preview modules to create a minimalistic interface for content creators. It took me a long time to wrap my head around all this and lots of trial and error.

Now that I feel like I have a good handle on this, I decided to record a video tour of what I have been building. It's still a work in progress but I think it's well enough along to give a little demo.

Tags 
  • Drupal 8
  • Video
  • Tutorial
  • Drupal Planet
  • Theming
  • Architecture
Categories: Elsewhere

Red Route: Considerations for a Drupal 8 upgrade

Planet Drupal - Mon, 19/09/2016 - 01:00

This article was originally posted on the Capgemini Engineering blog

If you're migrating from a different CMS platform, the advantages of Drupal 8 seem fairly clear. But what if you're already on Drupal? There has been a lot of discussion in the Drupal community lately about upgrading to Drupal 8. When is the right time? Now that the contributed module landscape is looking pretty healthy, there aren't many cases where I'd recommend going with Drupal 7 for a new project. However, as I've previously discussed on this blog, greenfield projects are fairly rare.

Future proofing

One of the strengths of an open source project like Drupal is the level of support from the community. Other people are testing your software, and helping to fix bugs that you might not have noticed. Drupal 7 will continue to be supported until Drupal 9 is released, which should be a while away yet. However, if your site is on Drupal 6, there are security implications of remaining on an unsupported version, and it would be wise to make plans to upgrade sooner rather than later, even with the option of long term support. While the level of support from the community will no longer be the same, sites built on older versions of Drupal won't suddenly stop working, and there are still some Drupal 5 sites out there in the wild.

Technical debt

Most big systems could do with some refactoring. There's always some code that people aren't proud of, some decisions that were made under the pressure of a tight deadline, or just more modern ways of doing things.

An upgrade is a great opportunity to start with a blank piece of paper. Architectural decisions can be revisited, and Drupal 8's improved APIs are ideal if you're hoping to take a more microservices-oriented approach, rather than ending up with another MySQL monolith.

Drupal's policy of backward incompatibility means that while you're upgrading the CMS, you have the chance to refactor and improve the existing custom codebase (but don't be suckered in by the tempting fallacy that you'll be able to do a perfect refactoring).

There are no small changes

Don't underestimate how big a job upgrading will be. At the very least, every custom module in the codebase will need to be rewritten for Drupal 8, and custom themes will need to be rebuilt using the Twig templating system. In a few cases, this will be a relatively trivial job, but the changes in Drupal 8 may mean that some modules will need to be rebuilt from the ground up. It isn't just about development - you'll need to factor in the time it will take to define requirements, not to mention testing and deployment. If it's a big project, you may also need to juggle the maintenance of the existing codebase for some time, while working on the new version.

The sites that we tend to deal with at Capgemini are big. We work with large companies with complex requirements, a lot of third party integrations, and high traffic. In other words, it's not just your standard brochureware, so we tend to have a lot of custom modules.

If it ain't broke, don't fix it

Given the fact that an upgrade is non-trivial, the question has to be asked - what business value will an upgrade bring? If all you're doing is replacing a Drupal 7 site with a similar Drupal 8 site, is it really a good idea to spend a lot of time and money to build something that is identical, as far as the average end user can tell?

If the development team is focused on upgrading, will there be any bandwidth for bug fixes and improvements? An upgrade will almost certainly be a big investment - maybe that time, energy and money would be better spent on new features or incremental improvements that will bring tangible business value and can be delivered relatively quickly. Besides, some of the improvements in Drupal 8 core, such as improved authoring experience, are also available in the Drupal 7 contrib ecosystem.

On the other hand, it might make more sense to get the upgrade done now, and build those improvements on top of Drupal 8, especially if your existing codebase needs some TLC.

Another option (which we've done in the past for an upgrade from Drupal 6 to 7) is to incrementally upgrade the site, releasing parts of the new site as and when they're ready.

The right approach depends on a range of factors, including how valuable your proposed improvements will be, how urgent they are, and how long an upgrade will take, which depends on how complex the site is.

The upside of an upgrade

Having said all of that, the reasons to upgrade to Drupal 8 are compelling. One big plus for Drupal 8 is the possibility of improved performance, especially for authenticated users, thanks to modern features like BigPipe. The improved authoring experience, accessibility and multilingual features that Drupal 8 brings will be especially valuable for larger organisations.

Not only that, improving Developer Experience (DX) was a big part of the community initiatives in building Drupal 8. Adopting Symfony components, migrating code to object-oriented structures, improving the APIs and a brand new configuration management system are all designed to improve developer productivity and code quality - after the initial learning curve. These improvements will encourage more of an engineering mindset, and drive modern development approaches. The net benefit will be more testable (and therefore more reliable) features, easier deployment and maintenance methods and increase speed of future change.

Decision time

There is no one-size-fits-all answer. Your organisation will need to consider its own situation and needs.

Where does upgrading the CMS version fit into the organisation's wider digital roadmap? Is there a site redesign on the cards any time soon? What improvements are you hoping to make? What functionality are you looking to add? Does your site's existing content strategy meet your needs? Is the solution architecture fit for your current and future purposes, or would it make sense to think about going headless?

In summary, while an upgrade will be a big investment, it may well be one that is worth making, especially if you're planning major changes to your site in the near future.

If the requirements for your upgrade project are "build us the same as what we've got already, but with more modern technology" then it's probably not going to be worth doing. Don't upgrade to Drupal 8 just because it's new and shiny. However, if you're looking further forward and planning to build a solid foundation for future improvements then an upgrade could be a very valuable investment.

Tags:  Drupal development agile open source All tags
Categories: Elsewhere

Vardot: Drupal + SEO: Optimizing Your Site for Search Engines

Planet Drupal - Sun, 18/09/2016 - 14:49
Case Studies Read time: 11 minutes

A few month ago when I wrote my first article about Drupal, some people noticed that for listing essential security modules one should have more development experience. It’s true, when I’ve started working at Vardot, I had to interview many developers and site builders before writing every single blog post, but the topic I’ve chosen this time is my favorite. This topic is something (beside basics of Russian language) that  I’m teaching my colleagues, but not learning from them. And this topic is called search engine optimization.

 

 

Vardot boosted its organic traffic up to 202% during last 6 month, and in this article I’ll share with you our best practices - use them to increase search engine ranks of your Drupal sites, too. So how to take the most of search engine optimization when it comes to Drupal? Here are our answers.

 

1. Pay attention to UX

UX design covers any touch point that the user can have with the organization. This means that a better UX-design leads to happier customers, and a bad UX-design works as a customer repellant. If your product is marketed through word of mouth publicity, than more and more people start searching for it; Google understands that it is a very positive trend and increases your organic visibility. However, latest Google searching algorithms analyze not only the popularity of your brand, but also the behavior of your site visitors. Search engines calculate the amount of time people spent on a webpage, number of pages viewed per session, and bounce rate as an indicator of customer satisfaction. Below you’ll find UX factors that are critically important for developers.

 

  • Design

If a website attracts a good amount of traffic, but users are not able to find what they are looking for, Google is decreasing the position of the website on search engine result pages. An unattractive design or a slow website make users close it, which affects your SEO. Therefore, UX is becoming one of the important ranking factors.

 

  • Site structure

Website structure is an organic process that starts with an initial design and undergoes a number of tweaks and redesigns as it starts taking shape. In relation to SEO, the structure of a website plays a crucial role. There are mainly three aspects for site structuring: Site Navigation, Internal Linking, and URL structuring. When it comes to navigation, make sure you avoid the kind that makes it difficult for the search engines to crawl through your website’s pages. Secondly, it would be a good idea to create internal links which offer an opportunity to create and use keyword rich anchor texts. Finally, URL structuring gives that added and a very important benefit of integrating your company’s target keywords with its vital navigation area.

Link Structure: Analyzing the Most Important Methods

 

  • Proper code

There’s a concept in coding known as the time-space tradeoff. This means the complexity of a code can reduce its size but will increase its processing time and vice versa. The key here is to establish the right balance.

Also, it’s equally important to keep testing your code for bugs. They affect the bounce rate of a website as nobody likes to read a page that has loading or any other issues. Remember, it’s not always about crawlers - it’s much more about customer satisfaction.

 

  • Improve Site Speed, Performance and Raise Application Performance Index (Apdex)

Apdex measures the ratio of satisfactory response time and unsatisfactory response time against a set threshold. Last investigations show that websites with a load delay of a few seconds have 7% more bounce rate than the others. Make sure to check-list everything that can help you to make your site faster.  

 

  • Prevent Duplicate Content

Nothing kills a website faster than duplicate content. You need to have original and unique texts that convey your message effortlessly. In case you need to copy and paste an article as it is from somewhere else, make sure you add a canonical URL to let Google now that you’ve mentioned the original source and not plagiarized it.

 

  • Remove 404 (content-not-found)

Content-not-found occurs on the client side when a given web page is deleted or moved to another location and the new URL is not updated. A big number of broken links on your site can affect its PageRank and decrease its visibility in search engines. Make sure time to time to crawl your website using tools like SEMrush and remove links pointing to inactive or non-existent pages.

 

2. Tell search engines what is your site about
  • Title tags

 

Title tags are among the most important aspects for efficient SEO of any web page, and it is highly important to include your main keywords to the title of the page. Google are (or is?) following the approach of repeating your title tag information in the search engine result page (SERP), so it also affects the clicking rate. A well crafted tag is easy to read and gets more clicks. The rule of the thumb is to write like a copywriter or write it in a way so that it can also be used on an advertisement brochure. Make sure that you have only one title tag per page. Keep things short and crisp. A title tag is more like a punch line: if you need to speak more about it, change it. Title tag should be of 60 characters in length and should include the main keyword. For more advice, check this amazing article.

 

  • Meta tags

Correct use of Meta Tags increases your website’s search rankings. They can be found in the head of every page i.e. between the HTML tags. If you consider the statistics, 90% of users look only at the top 20 to 30 search results, so your goal should be to land somewhere in this range or higher. The top search engines today use meta tags to index your pages, therefore it goes without saying how important it is to use them to get your site indexed and increase its rankings. There exists a range of meta tags that Google understands - use them all.

 

  • Meta Description

 

Meta description is a brief description of the page, basically piece of code situated in the header. There you can include extra details. To make it worth for your SEO efforts, there are some rules that you can follow. Keep your description restricted to a range of 135 to 160 characters and don’t forget to include keywords in it. Keep the form of the subject active and actionable which simply means use sentences that drive the reader to click on your link. Make your description unique, structured and a reflection of what your content is about and also at the same time containing the focus keywords. Search Engine Land gives you more advice to the topic.

 

  • Open Graph

This will provide social identity to every page of your website. One of the key roles of Open Graph is that it adds a snippet that appears automatically when an article is shared. The amount of traffic you attract and clicks you get is proportional to how engaging your OG snippet text is. Facebook established it in order to improve the presentation of pages on their social network. By using this protocol, your webpage will become a part of their social graph. The protocol is to supply accurate information required by the search engines. This increases the SEO rankings of your pages because search engines like Google are optimized to detect these Open Graph Meta Tags. You can integrate the Open Graph Protocol in your web pages to boost the SEO rankings. Facebook also provides Open Graph Testing Protocol which can be used to check the information that will be presented. You can say that this is the new way to represent the data on the internet.

 

  • ALT Tags for Images

 

It’s more difficult for search engines to recognize images as compared to texts, and alt tags are used to explain crawlers what is the content of the page about. Search engine queries with respect to your image will be exponentially enhanced if you follow best policies to generate your alt tags. Moreover, for images that are linked, alt tags work in a similar manner as anchor texts for text links. Using alt tags on all your images may consume a little more time than what you originally planned, but remember that this does provide its share in increasing your rankings. Above all, for a better performance of your content make sure to include keywords to your image descriptions.

 

3. Create friendly environment for Crawlers
  • Search Engine Friendly URLs

Let me illustrate this with an example. Here are two sample URL’s for you “http://example.com/index.php?page=gall_&ry” and “http://example.com/gallery”. Which one do you find easier to read and understand? The same goes for SEO as well. Friendly URLs explain the path to a search engine in a way which is easy to understand and call. In the example we mentioned, it is the latter that will be easily called by search engine bot.

 

  • XML Site-map

XML sitemap is a document that allows a website’s webmaster to inform Google and other search engines about your website and lets them identify and understand each and every URL that helps in a better crawling. XML sitemap contains information like when was the webpage last updated, how often the website undergoes changes and information regarding relevance and importance of a given page in relation with other web pages. XML sitemap also lets you exclude some pages from bot’s crawl.

 

  • Add Site Theming

Imagine a web-crawler trying to go through your web page with “divs” everywhere. It would be hard for them to differentiate between the part of the document meant for navigation and the main article. They can analyze your document composition using some hints, like a “ul” list of internal links can mean page navigation. On the other hand, if a “nav” element is used instead of “ul”, the crawler will understand right away that this is for page navigation. H1 heading contains the category name or the product name. H2 is used for subheadings and to segregate content into segregated blocks which are easier to scan. H3 doesn’t hold much information, and they are mostly used for closing the post heading.

 

4. Help people find you
  • Site Verifications

Site verification on Google, Bing, Yandex and other major search engines lets them know that you are the actual owner of the given website. Once your ownership is verified, Google lets you access the private Google Data, which can improve a spider bot’s crawling abilities on your website.

 

  • Resource Description Framework (RDF)

Make sure your site interface includes world-wide accepted standards for Resource Description Framework (RDF) that enhances metadata description for the web.

 

  • Google News Site-map

The Google News sitemap contains a lot of benefits in comparison to merely numbering the URLs of every page of your website. With proper titles and publication dates tagged on a sitemap, crawlers are able to categorize your content more accurately. Moreover, you get the facility to comments on your content with keywords, stock tickers, and other metadata.

 

  • Multilingual content

If your site supports multiple languages, you can surely talk to more potential clients on the internet (check the statistics here). To increase the traffic of your site, translate it to different languages and make it valuable for many people.

 

  • Social Media integration

Social media like Facebook, Twitter, LinkedIn, etc generate more traffic and give you additional mentions on the web. Although Google doesn’t consider shares as high as normal backlinks, crawlers still measure the visibility of your site. If people keep talking about it in social networks, your rank in search engines will grow. Produce more valuable content that will be shared by people!

 

5. Analyze your results
  • Google Analytics Integration

Usually people can not predict everything, that’s why testing has the same importance as an actual development. The best instrument to understand what your site visitors like and what they dislike is Google Analytics. Use it to monitor and analyze the traffic and the performance of your website.

 

Conclusion

It’s true that Drupal is one of the best CMSs in terms of SEO: it helps you to generate a clean code, prevents duplicate content and spam, easily integrates with third-party tools and is very user-friendly and configurable. However, I’ve seen many Drupal sites that are not optimized at all and as a result they don’t get much organic traffic from search engines.

It is very important to remember that our responsibility as Drupal community members is not only to create an SEO-friendly framework for our customers, but also to educate them on how to get the most of it. I hope this article will help you to build websites that rank high by search engines and prove that Drupal is one of the best available CMSs for SEO.

Tags:  SEO Drupal Planet Title:  Drupal + SEO: Optimizing Your Site for Search Engines
Categories: Elsewhere

Aram Boyajyan: Custom permissions in Drupal 8

Planet Drupal - Sat, 17/09/2016 - 14:31
Custom permissions in Drupal 8 Sat, 17/09/2016 - 14:31

Drupal's permissions system is at the same time easy to use and very powerful. It covers most of the cases where your module provides different functionality for various roles on the site.

In both versions of Drupal this is fairly straightforward to implement through code. There are two parts to this article: defining custom permissions (both static and dynamic), and performing checks to see if the current user has access to them.

Categories: Elsewhere

TimOnWeb.com: How To Force Search API To Reindex a Node / an Entity

Planet Drupal - Sat, 17/09/2016 - 14:26

By default Search API (Drupal 7) reindexes a node when the node gets updated. But what if you want to reindex a node / an entity on demand or via some other hook i.e. outside of update cycle? Turned out it is a quite simple exercise. You just need to ...

Read now

Categories: Elsewhere

Dave Hall Consulting: The Road to DrupalCon Dublin

Planet Drupal - Sat, 17/09/2016 - 12:26

DrupalCon Dublin is just around the corner. Earlier today I started my journey to Dublin. This week I'll be in Mumbai for some work meetings before heading to Dublin.

On Tuesday 27 September at 1pm I will be presenting my session Let the Machines do the Work. This lighthearted presentation provides some practical examples of how teams can start to introduce automation into their Drupal workflows. All of the code used in the examples will be available after my session. You'll need to attend my talk to get the link.

As part of my preparation for Dublin I've been road testing my session. Over the last few weeks I delivered early versions of the talk to the Drupal Sydney and Drupal Melbourne meetups. Last weekend I presented the talk at Global Training Days Chennai, DrupalCamp Ghent and DrupalCamp St Louis. It was exhausting presenting three times in less than 8 hours, but it was definitely worth the effort. The 3 sessions were presented using hangouts, so they were recorded. I gained valuable feedback from attendees and became aware of some bits of my talk needed some attention.

Just as I encourage teams to iterate on their automation, I've been iterating on my presentation. Over the next week or so I will be recutting my demos and polishing the presentation. If you have a spare 40 minutes I would really appreciate it if you watch one of the session recording below and leave a comment here with any feedback.

Global Training Days Chennai DrupalCamp Ghent

Note: I recorded the audience not my slides.

DrupalCamp St Louis

Note: There was an issue with the mic in St Louis, not there is no audio from their side.

Categories: Elsewhere

Jay L.ee: Drupal Relation Module Configuration Manual

Planet Drupal - Sat, 17/09/2016 - 06:53

Today I'll show you guys how to install the Relation module for Drupal 7. Believe it or not, it took me almost five years to fully figure out how to install what I think is one of the most confusing modules ever made lol.

So what exactly does Relation do? Let's say you have a film and its sequel:

* Film 1 is followed by film 2.
* Film 2 follows film 1.

The beauty of Relation is that once you create one relation (in either direction), it creates the other one for you automatically. It's this simple thing that this module does amazingly well.

Tags: Drupal 7Drupal Planet
Categories: Elsewhere

Drupal core announcements: Drupal core security release window on Wednesday, September 21, 2016

Planet Drupal - Fri, 16/09/2016 - 23:44
Start:  2016-09-21 11:00 America/Chicago Organizers:  xjm catch David_Rothstein stefan.r Event type:  Online meeting (eg. IRC meeting)

The monthly security release window for Drupal 8 and 7 core will take place on Wednesday, September 21.

This does not mean that a Drupal core security release will necessarily take place on that date for any of the Drupal 8 or 7 branches, only that you should watch for one (and be ready to update your Drupal sites in the event that the Drupal security team decides to make a release). This is also the final security release window for Drupal 8.1.x, so Drupal 8 sites should prepare to update to Drupal 8.2.0 and test Drupal 8.2.0-r1.

There will be no bug fix or feature release on this date. The next window for a Drupal core patch (bug fix) release for all branches is Wednesday, October 05, which is also the scheduled release for Drupal 8.2.0.

Drupal 6 is end-of-life and will not receive further security releases.

For more information on Drupal core release windows, see the documentation on release timing and security releases, and the discussion that led to this policy being implemented.

Categories: Elsewhere

CU Boulder - Webcentral: Using Geolocation for More Personalized Results

Planet Drupal - Fri, 16/09/2016 - 23:19
In today's world, users are accustomed to having results personalized for them without having to do any work. If you login to your favorite store, e.g. Amazon, you'll get a list of recommended products. Google will provide you location-based searches. Your video streaming services, banking, big box stores, even your potential online dates all have incorporated location-based way-finding. Sometimes, you aren't even aware that you are being directed by location. It's simpler to just make users select their location and filter by that, but the best user experience is to attempt do this step for the user. Scenario When showing...
Categories: Elsewhere

CU Boulder - Webcentral: Drupal as a Service at CU Boulder

Planet Drupal - Fri, 16/09/2016 - 19:22
The Web Express service at CU Boulder runs over 1,000 Drupal-powered web sites and is designed, developed and maintained by a team of nine . For our team to support the service, we created a design, development and user experience strategy that allows us to support and scale the service to the campus needs. When we started with Drupal, we were eager to do any custom design and development work that was required for a project. In a short amount of time, we had a lot of custom sites on custom codebases. We learned that this was not something that...
Categories: Elsewhere

Mediacurrent: Meet Matt Davis

Planet Drupal - Fri, 16/09/2016 - 17:02

Hi Matt - thanks for letting us get to know a bit more about you! Let's get started:

1. What’s your role at Mediacurrent, both internally and client-related?

I am a Lead Drupal Architect, which means I do a lot of requirements gathering, discovery, and planning out large scale builds, and then I help lead development teams in executing those builds.

Categories: Elsewhere

OSTraining: How to Add Audio Files to Drupal 8 Sites

Planet Drupal - Fri, 16/09/2016 - 15:58

This week, an OSTraining member asked us about adding audio files to their Drupal 8 site.

Using the Drupal AudioField module, I will explain how you can display a simple HTML5 player for your site's audio files.

In order to get started, you must download, install and enable the AudioField module.

Categories: Elsewhere

Pages

Subscribe to jfhovinne aggregator - Elsewhere