Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 16 min 3 sec ago

DrupalOnWindows: Running Drupal 8 on PHP 7

Sun, 08/05/2016 - 18:52
Language English

Drupal 8 was released with full PHP7 support:

[META] Support PHP 7

But the fact that the Drupal 8 codebase is able to run on PHP7 does not mean that you can run PHP7 Drupal 8 deployments. Why? Because there is more than just "Drupal" to run a decently performing Drupal 8 based application.

There are at least 3 additional components that need full PHP7 support:

More articles...
Categories: Elsewhere

Danny Englander: Drupal 8 Development: 5 Things to Add to Your Theming Toolbox

Sun, 08/05/2016 - 17:03

My uncle used to say, "You have to use the right tool for the job." This is no different when it comes to Drupal 8 theming and development. I have been having an absolute ball learning and theming with Drupal 8 the past several months. You can read more about how I got inspired here. In this article, I will outline some of the tools and methods I have been using while I've been building a new Drupal 8 theme.

1. Twig Debugging

One of my primary tools for Drupal 8 theming is Twig debugging so you'll definitely want to enable this while building out a theme and site. Chapter Three wrote a great post on enabling Twig debugging so I won't rehash that here how to get it up and running.

Twig's debug output will really come in handy for printing out:

  • Theme hook names
  • All possible suggested template names
  • Existing templates being used
  • The full path of the current template in use

After you write your own theme hook, those new template names will also show up in the debug output.

<div class="postscript"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'region' --> <!-- FILE NAME SUGGESTIONS: * region--postscript.html.twig * region--postscript-second.html.twig x region.html.twig --> <!-- BEGIN OUTPUT from 'themes/custom/hibiscus/templates/layout/region.html.twig' -->

Sample output from Twig debugging

2. Devel Kint

Kint, part of the Devel module for Drupal 8 is awesome for inspecting arrays that contain your entity info, field names, view modes, and more. Kint is similar to Devel Krumo but for Drupal 8. If you really want to dig in with theming, Kint will be invaluable, especially for writing custom preprocess functions, creating variables, and theme hooks.

3. Search Kint

Search Kint for Drupal 8 is similar to Search Krumo for Drupal 7. It extends Kint by giving you two additional functions that are huge time savers. The first is a search box and select list to search any arrays on the page. The second function is a "get path" box where you can easily copy an array path. This takes the guess work out of things, especially since Kint provides much more info than what we were used to in Krumo.

4. Drupal Console

Drupal Console is fast becoming one of my new favorites. This is an amazing tool which can perform dozens of Drupal 8 tasks efficiently in Terminal. I'm just getting started with Console but I really like it already. Console can import / export config, clear cache, generate module / theme scaffolding, generate entities, create nodes, and much more. There's even has a "learning" mode as well as some auto-complete functionality. So it does a lot of what Drush does but it goes beyond with much needed and added functionality. At this point, I am pretty sure I will be switching over to using Drupal Console instead of Drush.

module module:debug Display current modules available for application module:download Download module or modules in application module:install Install module or modules in the application module:uninstall Uninstall module or modules in the application

Just a few sample commands available out of dozens in Drupal Console

5. Drupal Template Helper

There is also now a Google Chrome plugin called Drupal Template Helper which moves all the your Twig debug output to a Chrome web inspector tab. This makes your main HTML inspection area a lot cleaner and easier to scroll through. I even got this extension running in Opera which has been my browser of choice lately for web development. Note, I've been using Opera for theming for a few reasons. It's built upon Webkit so it's the same familiar Web Inspector UI as Chrome that you're used to. Opera also seems faster, less buggy, and less bloated than Chrome.

Summary

This is just a basic rundown of my Drupal 8 Toolbox. I am sure I will pick up more tools as time goes by. Do you have any favorite tools I have not mentioned here?

Tags 
  • Drupal
  • Twig
  • Theming
  • Drupal Planet
  • Drupal 8
Categories: Elsewhere

Jay L.ee: Drupal BackgroundField Module Configuration Manual

Sun, 08/05/2016 - 05:08

Yesterday I wrote a blog post on how to configure a Drupal module called Background Images Formatter, which is part 2 of the Drupal Background Images Module Configuration Manual. Today I'll continue with part 3 with a module called BackgroundField. Then tomorrow I'll finally reveal how to create clickable background takeover ads.

Tags: Drupal 7Drupal Planet
Categories: Elsewhere

Jeff Geerling's Blog: How to build your own Raspberry Pi Cluster

Sun, 08/05/2016 - 04:53


The banana is for scale.

When I originally built the Raspberry Pi Dramble 6-node Pi cluster in 2014 (for testing Ansible with bare metal hardware on the cheap), I compiled all the code, notes, etc. into a GitHub repository. In 2015, I decided to take it a step further, and I started hosting www.pidramble.com on the cluster, in my basement office!

Categories: Elsewhere

ARREA-Systems: Our business solution runs on Drupal 8.1

Sun, 08/05/2016 - 04:27
Our business solution runs on Drupal 8.1 Sun, 05/08/2016 - 10:27

 

Hello,

Our back-office management solution is now running on version Drupal 8.1. The live demo is updated with the latest version.

It has been a long run since the project was initiated while Drupal 8 was still under alpha stage. And there is still plenty of work to do.

One objective is to make a full distribution package including most of the current functionalities available in the demo version. Our main issue with this target is the lack of resources and time. Thus if any of Drupalists are enthusiastic about business process solutions and would like to contribute, they are welcome.

Categories: Elsewhere

DrupalEasy: Summertime, and the hiring is (Drupal)Easy

Sun, 08/05/2016 - 00:18

It’s almost summer, and at DrupalEasy, that means it is almost Intern Season! Our Spring Drupal Career Online class is three-fourths of the way to graduation, and we have just three budding Drupalists who are looking for work experience through internships (the others are already spoken for!)  If you’ve got too much to do, and not enough capacity to do it, an intern might be just the ticket through our (Work Experience) WE Drupal Program.

We love sowing the Drupal Community with well-trained new talent, all of whom have already devoted hundreds of hours, thousands of dollars, and more than three months of their lives to learning, practicing, engaging and developing their passions for Drupal in their quest to become professionals.  We’ve found that they have a lot to offer organizations who can use their eager new Drupal passion and help them build really great first Drupal Experience entries on their resumes.  If you need some extra bandwidth, or have some tasks or projects suited to a new site-builder type, why not engage an intern?

Hosting an intern is also a great way to test out talent and take some of the lower-level workload off of senior developers (like taking care of your own site, or those simpler tasks you need to get done for your clients.)  Here’s the deal: you bring on a graduate of our Drupal Career training program, either paid or unpaid in mid-June.  They devote their new Drupal enthusiasm and best-practice foundational skills to your projects for 2 to 3 months while you give them some guidance and experience.  You and the intern then decide if they move on, or continue on as an (already indoctrinated) contractor or employee.

If you’d like to learn more, you can check out how we approach WE Drupal, fill out a Host Application (no commitment, just a way for us to learn what you are looking for)  or email me.  

Summer is just around the corner, so WE hope you don’t delay.

Categories: Elsewhere

DrupalCon News: We are sprinting - come join!

Sat, 07/05/2016 - 16:17

Extended sprints have officially kicked off at Launch Pad.  We will be here all day, so stop by and join.

The Extended Sprints are located at 643 Magazine Street.  The front door is set back a little bit.  When you arrive, please send @joelpittet a text so that he can come let you in the front door.

We have breakfast, lots of sunlight and a rooftop deck, so come join!

Thank you for sprinting.

 

Categories: Elsewhere

Jay L.ee: Drupal Background Images Formatter Module Configuration Manual

Sat, 07/05/2016 - 04:51

Yesterday I wrote a blog post on how to configure a Drupal module called Background Images. Today I'll continue with part 2, and it's a simple one but essential as well, because this module doesn't even come with a README.txt file at all lol.

But before we begin, let's answer the million dollar question of why anyone would want to use this module:

A good example would be my use case where I run a membership website and want my members to be able to upload background images, because the Background Images module only allows people with admin access (specifically to admin/content/background-images) to enable background images at all.

Tags: Drupal 7Drupal Planet
Categories: Elsewhere

Darryl Norris's Blog: 4 New CKEditor Plugins For Drupal 8

Sat, 07/05/2016 - 04:40


About a month ago I was testing a pull request (#1999) for Drupal Console that will generate boilerplate code to integrate a button plugin from CKEditor to Drupal 8. So apparently the integration to integrate a CKEditor plugin for Drupal 8 is very simple thanks to the great CKEditor API in Drupal 8. While testing this pull request (#1999) I ended up with 4 plugins in my computer and I decide to share the code in Drupal.org so people can use it.

CKEditor Smiley

CKEditor Loremipsum

  • Project Page: https://www.drupal.org/project/ckeditor_loremipsum
  • Plugin Description: This plugin allows to generate lorem ipsum sentence or paragraph easily, to use in your web content, for example, it can be very useful when you want to demonstrate a website or a portal.

CKEditor Video Detector

More
Categories: Elsewhere

ActiveLAMP: Adding CKEditor plugins to Drupal 8

Sat, 07/05/2016 - 04:00

Drupal 8 has greatly improved editor experience out-of-the-box. It comes shipped with CKEditor for WYSIWYG editing. Although, D8 ships with a custom build of CKEditor and it may not have the plugins that you would like to have or that your client wants to have. I will show you how to add new plugins into the CKEditor that comes with Drupal 8.

Read more...
Categories: Elsewhere

Drupal Bits at Web-Dev: Drupal: Enable or Disable a View in Deployment.

Sat, 07/05/2016 - 03:41

Drupal Hook Update Deploy Tools now (as of v 7.x-1.16) has the ability to enable or disable  a View from within a hook_update_N().  It handles validation to make sure that your request to enable or disable a View actually did what you asked it to do.

 

Add something like this to a hook_update_N in your custom deploy module.install
to enable some Views.

<?php
  $views = array(
    'some_view_machine_name',
    'another_view_machine_name'
  );
  $message =  HookUpdateDeployTools\Views::enable('$views');

  return $message;
?>

To disable some Views, it looks like this:

<?php
  $views = array(
    'some_view_machine_name',
    'another_view_machine_name'
  );
  $message =  HookUpdateDeployTools\Views::disable('$views');

  return $message;
?>

Here is an example of what your terminal would show after running the enable method above:

Categories: Elsewhere

DrupalCon News: Scholarship, grant, training proposals open for DrupalCon Dublin

Fri, 06/05/2016 - 21:16

DrupalCon Dublin will be here before you know it! Join us this 26-30 September in one of Europe's major centers for technology. We're looking for bright ideas from our amazing community when it comes to training proposals and other programmign content. While registration isn't open just yet, it's never too early to book your hotel room, make your travel plans, and send in your proposals for training, or to apply for a grants or scholarship. Consider it like an early RSVP!

Categories: Elsewhere

myDropWizard.com: myDropWizard is providing Drupal 6 Long-Term Support for 424 sites!

Fri, 06/05/2016 - 21:16

We've been pretty busy in the 11 weeks since Drupal 6's End-of-Life on February 24th.

Really, CRAZY busy, in fact!

We're currently responsible for providing Drupal 6 Long-Term Support for 424 sites in total!

For some of our bigger clients with large numbers of sites on a single code-base or those subject to regulation (for example, governments and universities) we had to compromise on not providing "security updates only" service - but some protection is certainly better than no protection.

Going through the sales process (which includes performing an in-depth site audit), on-boarding process and subsequently supporting and maintaining 424 sites in only 11 weeks has been enormously challenging for a small company like ours - but also an amazing learning experience.

Things are finally slowing a bit with regard to Drupal 6 LTS, we're heading out to DrupalCon New Orleans next week, and starting to look at the next phase for our business.

This feels like a good time to stop and reflect on the things we've learned from our experience with providing Drupal 6 LTS: what worked, what didn't and what we can improve for the future!

This isn't a marketing post (unlike most of our posts recently - sorry!) but a look Behind the Veil at our growing startup, what we do and why we do it. And it's about time! The last one I did was back in June, explaining why we we're launching myDropWizard.

So, if you're still interested in my meandering reflections, please read on!

Categories: Elsewhere

Aten Design Group: Drush Tools for Inspecting Configuration

Fri, 06/05/2016 - 19:50

I have a confession to make: I don't like clicking through the Drupal admin. Over the course of a project, beit one with content migrations, configuration in code, or just general site building, the information I need the most is field and taxonomy configuration. Typically, this means bouncing betweens tabs for content types and taxonomies which consumes time and precious clicks. Add in custom entities in our new Drupal 8 projects and there's even more time spent in the admin.

After a few dozen repetitions of navigating between field and taxonomy screens, I was ready to build tools to make the pain points of this process go away. I’d like to introduce you to Drush TypeInfo, Drush TaxonomyInfo, and Migrate Inspect. Hopefully, you find these tools helpful in working on your projects. Besides helping with the initial setup of a project, I feel like these tools are excellent when you're dropped into a project later in the process. Even for project with a detailed architectural plan, things change, documentation goes stale, and the only real source of truth is the actual site being built.

Content Types and Entities

Born from the fire of massive migrations, Drush TypeInfo is a Drush command that can provide you with all the information you could want about your content types and entities. The examples below show the full command names, but everything also has short aliases which you can find by running drush --help.

First up, if you need to figure out the machine name of a content type or see if a content type exists, try:

drush typeinfo-list

This will list all the content types and entities on your site:

item_instruction item_instruction item_instruction_type - language_content_settings - menu - menu_link_content - node article node page node testlet node testlet_item taxonomy_term tags taxonomy_term trajectories taxonomy_vocabulary - user - user_role - view -

Pro tip for the list: if you only want a specific entity type, you can specify that as well: drush typeinfo-list node. Next, maybe you need to check out the fields on an article content type:

drush typeinfo article

If you're looking for information about the fields on an entity besides nodes, you can look that up too. For fields on a taxonomy term the command would be:

drush typeinfo tags taxonomy_term

Now we're in business, but what about even more information? Well, field_tags probably relates to a taxonomy, but let's make sure we know exactly which one:

drush typeinfo-field field_tags article

This will show us:

Field info for: field_tags Type: entity_reference Form displays: - node.article.default Widgets (node.article): default: entity_reference_autocomplete_tags Target type: taxonomy_term Target bundles: tags Cardinality: unlimited

We can see that the field is targeting the topic taxonomy and that it accepts unlimited values. If you want to see field instance info (like field widget settings), you can also pass the bundle/entity type:

drush typeinfo-field field_shared_topic event node

This example will show the field_shared_topic information as it relates to the event content type (I'm specifying the node entity type here, but Drush TypeInfo will also make this assumption for you by default if you want to be lazy).

If you want to see raw internal arrays that Drupal uses for a field, you can get extra in-depth details with the --field-info, --display-info, and --widget-info flags.

Drupal 8 note: this is mostly up-to-date with Drupal 8 functionality, but there are likely more things to load (including some of the display and form display information).

Taxonomy

Next up: taxonomies. It's common to have several vocabularies complete with their own terms. Accessing a list of vocabularies and their terms used to mean plenty of clicking and tabbing through the UI. Not anymore -- I created Drush TaxonomyInfo to display site-wide taxonomy information with a single command.

To list out the vocabularies on a site:

drush taxonomyinfo-vocab-list

To list terms within the topic taxonomy:

drush taxonomyinfo-term-list topic

Drupal 8 note: this should be updated and ready to go for Drupal 8 with the exception of nested terms, these will not show up as nested (yet).

Migrate

Several Drupal 7 projects I worked on last year included very large content migrations. The Migrate module has command line tools for core functionality (importing, rolling back, etc.) but what happens with the data once it is imported? Let's check it out with the help of a tool called Migrate Inspect.

If we've imported some legacy events with an Event migration, we may want to open the last node we imported in a browser:

drush migrate-inspect-last Event

Or even a random event we imported (useful when you want to spot check 30,000 nodes you imported!):

drush migrate-inspect-random Event

When you're reviewing your migration, you may notice a source node that didn't get pulled into the destination correctly. In a case where you know the source ID, but you don't know where that content ended up on the new site, you can find that with the command:

drush migrate-inspect-destination Event 100

Or if you know the destination ID on the new site, but want to know the legacy ID from the old site:

drush migrate-inspect-source Event 200

Sometimes you might know a source or destination ID but unsure which migration it came from. This usually happens for me in cases where there are multiple migrations that can put content into a destination node (for example, when the old site has blog posts and news, but they're being combined on the new site). Migrate Inspect comes with two commands to make this easier by searching for you. Again the commands are broken up into source or destination versions, depending on the ID you have at hand:

drush migrate-inspect-find-source 200 drush migrate-inspect-find-destination 100

Drupal 8 note: this has not been updated for Drupal 8 yet.

Categories: Elsewhere

Acquia Developer Center Blog: Faceted Search in Drupal 8: Using Search API Solr and Facets

Fri, 06/05/2016 - 15:20

When module authors decide to port their modules to a new major version of Drupal (e.g. 6 to 7, or 7 to 8), they often take the time to rearchitect the module (and sometimes an entire related ecosystem of modules) to make development more efficient, clean up cruft, and improve current features.

Tags: acquia drupal planetsolracquia searchSearch API
Categories: Elsewhere

Tim Millwood: Drupal Deploy demos

Fri, 06/05/2016 - 09:32
Single site content staging with Deploy This demo shows creating content on a stage workspace then...
Categories: Elsewhere

Jay L.ee: Drupal Background Images Module Configuration Manual

Fri, 06/05/2016 - 08:06

During my San Diego Drupal Users Group lightning talk on March 8, I showed a brief demo of how background images can be made to be clickable via CSS, something that many people consider to be impossible. But as I'll show you over the next few days, it actually is 100% possible, and I had a LOT of fun getting it to finally work exactly the way I want it. Today's tutorial will be part 1 of 3. My next two blog posts will cover the rest of the steps for creating clickable background takeover ads.

Tags: Drupal 7Drupal Planet
Categories: Elsewhere

Pages