Drupal Planet

Subscribe to Drupal Planet feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 2 hours 51 min ago

Evolving Web: Creating an Events Calendar in Drupal 8

May 5, 2017 - 1:53pm

If you have ever worked with sites that deal with events, you've probably been asked to create some type of calendar display. In this article, we'll discuss how to set up a basic events calendar using the Calendar (8.x-1.x-dev) for Drupal 8.

Configure the event content type

In our example, to handle events, we create a new content type called Event. You can put any content type in a calendar as long as it has a Date field. Though we might need date ranges to handle multi-day events, at the time of writing this article, there is no support for using the date range field with the calendar module, so we will use a simple date field for this example.

The Event node form. Right now, events only have a title, description and a date field labelled Schedule.

Configuring the "events" view

With the node type in place, the next step will be to display the nodes using a view, using calendar display settings. To create a view with the calendar settings in place, you can go to Structure > Views > Add view from template page (admin/structure/views/template/list). Here, we choose the template which allows us to create a calendar for our date field.

We click the Add button corresponding to the date field (which we called Schedule).

The template provides you some options to configure certain aspects of the calendar to be generated, namely:

  • View name
  • Description
  • Base view path: The base path to use for the calendar pages and tabs. In our example, we choose events as the base so the calendar will generate paths like:
    • events/day: For a day-wise view
    • events/week: For a week-wise view
    • events/month: For a month-wise view
    • events/year: For a year-wise view

From the views configuration page, we can also configure the path for our calendar page(s) and create blocks with mini-calendars.

Some settings for the calendar to be generated.

Once done fine-tuning, we save the view and visit the relevant front-end page, which in this example is events/month. Here's how the calendar looks out of the box with the Bartik theme.

Conclusion

The calendar module will be a great contrib module while working with calendars. However, it may or may not serve your needs depending on your project requirements. Here are certain points (at the time of writing this article) which might affect the usability of this module:

  • No support for date range: Lack of support for date ranges makes it hard to work with multi-day event scenarios.
  • No support for start & end date: Though we can setup two separate date fields for start and end date, multi-day events are not visible as multi-column rows in the calendar.

 

+ more awesome articles by Evolving Web
Categories: Blogs

Acquia Developer Center Blog: Beyond Code - Contributing to Community Spirit

May 5, 2017 - 12:07pm

How the DrupalCon Prenote helps us laugh, learn, and be a community. Four other Acquians joined me on stage in the DrupalCon Baltimore Prenote, helping spread a little joy and silliness. Drupal gets better when companies, organizations, and individuals build or fix something they need and then share it with the rest of us. Our community becomes better, stronger, and smarter when others take it upon themselves to make a positive difference contributing their knowledge, time, and energy to Drupal. Acquia is proud to play a part, alongside thousands of others, in making tomorrow’s Drupal better than today’s.

Tags: acquia drupal planetdrupalconBaltimorecontributioncommunity
Categories: Blogs

Valuebound: Getting Started With Drupal Commerce 2.x - Part 1

May 5, 2017 - 11:59am
Drupal Commerce 2.x overview

E-commerce in Drupal 8 is a very interesting topic for many developers and this blog is the right place to start with E-commerce in drupal 8.

Drupal Commerce 2.x is the module for creating online stores of varying complexity. This blog provides an overview of the Commerce 2.x module for Drupal 8.

In this blog, we will be focusing on following things

Installing Drupal E-Commerce 2.x

To install Drupal Commerce, make sure that your server has a Composer dependency manager installed. In Drupal 8,…

Categories: Blogs

CiviCRM Blog: Using the CiviCRM Entity Reference Field submodule with Inline Entity Form

May 5, 2017 - 11:15am

CiviCRM Entity Reference Field is a submodule of the CiviCRM Entity project. One of the many advantages of installing the CiviCRM Entity module is the ability to use Drupal’s Entity Reference module to reference CiviCRM data from nodes, terms, or other entity types. Many people are using the Inline Entity Form module, which provides field widgets that allow you to create, edit, or delete a referenced entity from the parent form.

If you reference CiviCRM contacts via an Entity Reference field and use Inline Entity Form, you’ll often want to include the ability for the user to create or edit subsidiary CiviCRM entity types, such as the email, phone, and address entities. This can get tricky with CiviCRM integration. A regular entity reference field stores a target entity id in a Drupal field table of the Drupal database.  CiviCRM Addresses are stored in the CiviCRM database, and can be created by different types of users and in many different ways. In addition, Drupal and CiviCRM reference data in opposite ways.  Drupal’s field model, “forward references,”  which means the entity stores the ids of the child entities. CiviCRM generally uses “backreferences,” meaning the child entity will store the parent entity’s id.  To make the situation even more interesting, this pattern is not consistently followed in CiviCRM, and you’ll occasionally have a “forward reference”. For example, events store a location block id, and the location block references addresses.

We want the convenient and familiar interface of the Inline Entity Form/Entityreference combination, but we want to use the existing data from the CiviCRM tables, and not store target ids in Drupal field tables, while at the same time being flexible enough to go both ways. We want to make a square peg to fit into a round hole. What we needed was a “remote reference field”.

The Drupal Field API is very powerful, and it allows you to make field types that are disconnected from the standard Drupal field tables. The solution is CiviCRM Entity Reference Field, which adds a new field type that can be added to any CiviCRM entity type.

We’ve successfully used this module for a variety of use cases, including:

  • Referencing emails, addresses, phones from contacts
  • Referencing participants from events
  • Referencing relationships from contacts
  • Referencing activities from contacts
  • Referencing contacts from activities
  • Referencing contacts from relationships

It is also possible to have CiviCRM Entity Reference (CER) fields on entities referenced by CER fields. For example, In CiviCRM, Events reference location blocks, which in turn reference addresses. To edit profiles on Events, you need to reference UFJoin from Events.  The UFJoin entity type needs a UFGroup reference field which needs to reference UFField. That case is especially interesting as that “line of reference” runs both forward and backwards from the UFGroup entity.

That’s the what and the why, to see an example of how to use it, please continue reading this article on Skvare.com.

ToolsCiviCRMDrupalExtensions
Categories: Blogs

ADCI Solutions: How to create a headless Drupal site

May 5, 2017 - 5:52am

Once upon a time there was a trend of headless Drupal websites. But time passed and we realised that the Decoupled Drupal approach is more than the trend. It makes a developer’s life easier since back-end and front-end teams can work separately. Decoupled websites are able to serve content on different platforms better.

 

So why don’t we try to build a decoupled website on our own? For the front-end part we’ll use React, for the back-end - Drupal.

 

Read the tutorial.

 

Categories: Blogs

Lullabot: Accelerated Mobile Pages (AMP) with Google’s Paul Bakaus

May 4, 2017 - 7:00pm
Mike and and Matt are joined by Paul Bakaus, who is the AMP developer advocate at Google, as well as Lullabot senior developer (and AMP module creator) Matthew Tift to talk all things Accelerated Mobile Pages.
Categories: Blogs

Chocolate Lily: Dries, Acquia, and the Drupal Association--Some Essential History

May 4, 2017 - 6:31pm

In recent weeks Drupal community members have raised many questions about the Drupal Association (DA). Can the DA serve as an effective balance to the powers of the project's dictator for life, Dries Buytaert? Why does Buytaert have his name written into the bylaws with a reserved board seat? Is the DA structured in such a way that it could reliably address potential conflicts of interest involving Buytaert's company, Acquia? What's the history?

Community members have also raised questions about transparency in the Drupal Association.

In the absence of reliable information, speculation has been rampant.

These questions come as the Drupal Association has announced plans to facilitate a process of community consultation around governance of the Drupal project. For these discussions, it's especially important that community members have access to frank information and perspectives about the DA.

In this piece I hope to help address the knowledge gap by filling in some of that missing background. I have years of experience in the two incarnations of the Drupal Association--the Belgian-based VZW (the first Drupal Association, which I'll here call DA-VZW) and the US-based Drupalcon Inc (the current Drupal Association, which I'll here call the DA). This experience includes:

That said, comments here are my own and in no way reflect the views of either DA-VZW (which, in any case, is now defunct) or the DA.

A bland backgrounder I compiled in 2012 may be useful by way of intro, but in what follows here I promise way more of the gritty detail!

Categories: Blogs

Acquia Developer Center Blog: 256: Drupal 8 Certification Crash Course at Texas Camp 2017!

May 4, 2017 - 2:09pm

At DrupalCon Baltimore, I got the chance to chat with David Porter and David Stinemetze from Rackspace. Listen to this conversation to learn a little more about the Daves, Drupal at Rackspace, and the value of Acquia's certification program to individuals and organisations. If you can make it, don't miss your chance to get a 10% discount on taking an Acquia certification exam by taking the Drupal 8 certification crash course at Texas Camp 2017!

The Texas Camp 2017 Drupal 8 Certification Crash Course: a full day of Drupal 8 learning goodness on June 2nd!

"We're hoping to get as many people certified as possible" - Dave Porter

Crash Course Origin Story

I asked Dave Stinemetze what he was looking for coming to DrupalCon Baltimore: "At Rackspace, we're currently on Drupal 7; we're looking to move to Drupal 8. One of the things our team wanted to do was increase our competency with Drupal 8, which included going to sessions, seeing lessons learned from companies who have already made this migration ... you know, starting to get a game plan together."

Both Daves recently got Acquia Drupal 8 certification. I asked about their motivation for doing that. Dave Stinemetze explains, "I've spent so much time in Drupal 7 and Drupal 8 ... it's an idea. It wasn't something I'd had hands on experience with. For me, doing the certification was actually my introduction to transitioning from D7 to D8. I just went head down into the study guides, into the manuals, everything I could find. I started aggregating all these data, taking notes ... [on] all these things that have changed. I placed all my notes up on Guthub, so they're available for anyone."

Why Certification?

Dave Porter adds, "Originally, when I got the D7 certification, I was the only one in San Antonio ... and until Monday, I was still the only one. That was a nice credential to have for myself and for Rackspace. It's important to know that Acquia did the right thing, forcing the fact that there needed to be certification. There needed to be something to give people some kind of credential to validate that they know what they're doing. Because Drupal gives all of us a job. And for us to work in the technology and profession we like, to be who we are, to wear what we want, to go where we want to go and be a part of this community. That certification only solidifies that even more."

"It's important to know that Acquia did the right thing, forcing the fact that there needed to be certification. There needed to be something to give people some kind of credential to validate that they know what they're doing."

"If you go to any of the big agencies and you've got that credential, it's going to separate you from the rest of the people (unless you're one of the big names). But other than that, it's a path for a lot of the people that are coming into Drupal. Drupal is growing; it's appealing to more developers, especially more PHP developers. So giving them a path, a way into the community that really verifies their knowledge and competence, I think it's invaluable."

Dave Stinemetze rounds out the picture, pointing out that being a verified expert also helps internally at Rackspace (and I' sure this goes elsewhere, too), "We're selling ourselves to our stakeholders and we're creating that perception of expertise within our own business. That has value in and of itself."

Conversation Video

Links, References
Podcast series: Drupal 8Skill Level: BeginnerIntermediateAdvanced
Categories: Blogs

Aten Design Group: Does using drush uli in D8 and getting http://default drive you mad?

May 4, 2017 - 12:27pm

In Drupal 8, setting your sites domain in settings.php is no longer possible. In Drupal 7, you could set the base_url in settings.php like:

$base_url = 'http://domain.com';

Have you noticed in Drupal 8 that when you use drush uli it returns a url that starts with http://default! If you are tired of copying and pasting what comes after http://default/ or adding the --uri=http://domain.com flag along with drush uli I have a solution for you!

Meet the drushrc.php file. I prefer to put this one level higher than my Drupal root. So…

  • Project repo
    • webroot (public_html, web, docroot, etc)
    • drush/drushrc.php

Lots can go in the drushrc.php file, but if you simply want to fix the drush uli default issue, it can just have:

<?php   $options['url'] = 'http://domain.com';

If you are using GIT to manage your code base, you could consider a strategy of a drushrc.php file per environment. Example:

Create drush/drushrc.local.php

That file can contain:

<?php   $options['url'] = 'http://domain.dev';

Your main drushrc.php now looks like:

<?php   /** * If there is a local drushrc file, then include it. */   $local_drushrc = __DIR__ . "/drushrc.local.php"; if (file_exists($local_drushrc)) { include $local_drushrc; }

Now you can place drush/drushrc.local.php in your .gitignore file.

If you are using a PaaS like Pantheon, you can take this strategy:

Since Pantheon automatically handles setting the $options[‘url’] for you, you can simply say...if NOT Pantheon, use my local dev domain.

With the Pantheon approach, your drushrc.php file can look like:

<?php   if (!isset($_SERVER['PANTHEON_ENVIRONMENT'])) { $options['url'] = 'http://domain.dev'; }

I believe setting the $options[‘url’] has always been possible if using drush aliases, so continue on if you’ve always done that.

Now enjoy the infinite bliss when typing drush uli and having the correct domain returned.

Categories: Blogs

erdfisch: Girls Day 2017 at erdfisch

May 4, 2017 - 12:26pm
Girls Day 2017 at erdfisch 04.05.2017 Michael Lenahan Body:  Girls Day 2017 at erdfisch

Every year here in Germany we have Girls' Day. This is a day in which girls can see what it is like working in male-dominated industries (there is an equivalent Boys' Day as well).

We at erdfisch have been taking part in Girls' Day since 2015, so this was our third year. We had the privilege of welcoming Anna, Bianca and Franzi into our office in Heidelberg.

Why do this?

Why is it worth our time taking part in something like this?

Well, if you need a reminder of what a privilege it is to do your job, spend a day explaining the miracle that is open source web development to some teenagers.

I'm very proud of the fact that we are more than just a bunch of developers - in our work, we interact with other developers from other countries and other companies every day.

We meet at international events like the incredible Drupalcamp that took place in Iceland earlier this year.

We are participants in an extremely open way of working.

When explaining to teenagers how Drupal gets developed, you start to realise what an incredible privilege it is to have such a career.

It is, in itself, so much fun to explain why people around the world share their their time and talent for free, and how the economics of open source actually works.

It's more than just a job. It's a career or "calling" (in German, the word "Beruf" for career and "Berufung" for calling are very close).

And there is no reason why this privilege should only be available to men and not women.

Learning open source through Drupal site building

For me and my colleague Peter, Girls Day was a day in which we took time out from our work to explain how Drupal works, and to provide a full day's site building training.

This is a great benefit to us because it helps us to appreciate what it's like to be a beginner again, and to be a site builder.

It makes you find good examples of contributed modules that you can use to introduce the idea of Drupal's incredible extensibility.

We got the girls set up on https://pantheon.io/ - Pantheon is a great platform for trainings like this.

We introduced extensibility by swapping out the default Bartik theme with a modern alternative https://www.drupal.org/project/robotic.

Robotic has a nice slideshow function so that the girls could quickly personalize their sites with colors and slides.

Next, we got to working with content types and fields. We introduced the concept of adding a new type of field through the contributed geolocation module, which allows you to create a field with a location on a Google map.

From there, it was about adding our content, and then displaying content with views. We used calendar module to show how it was possible to build sophisticated views.

It didn't take long before the girls were working on their own concepts.

Anna built a showcase for her mother's store: http://dev-anna-felix.pantheonsite.io/

Bianca build a site which allows her schoolmates to log in and cast votes and choose destination for their school outing: http://dev-klassenfahrt.pantheonsite.io/

Franzi built a site for her music school orchestra: http://dev-musikschulorchester-wiesloch.pantheonsite.io/

Drupal 8 is getting to where we want it to be

It's been interesting running this event over the past three years, because we've been able to take a snapshot each year of how Drupal 8 is progressing in real life.

We're now at the point where Drupal 8 finally feels stable and fun to work with.

It's where we want it to be - a system which you can spend a day learning and really achieve something worth while. And understand how far you can go with it.

And how rewarding it is to be a part of this incredible thing. Don't let sexism, racism, snobbishness or any other thing exclude you from it.

Schlagworte/Tags:  planet drupal-planet Ihr Name Kommentar/Comment Kommentar hinzufügen/Add comment Leave this field blank
Categories: Blogs

Acquia Developer Center Blog: Pipelines Beta UI is Now Available!

May 4, 2017 - 10:52am

We’re happy to announce that the web user interface for the Acquia Pipelines beta is now available to all those beta participants with subscriptions on Acquia Cloud! In addition to the CLI, we've now provided a great UI to enhance reporting and usage inside of the Cloud UI.

Tags: acquia drupal planet
Categories: Blogs

InternetDevels: Why Drupal is an ideal solution for your dropshipping site

May 4, 2017 - 10:14am

Commerce is rapidly shifting to the Internet nowadays, because it is a vast territory that 
allows you to find sellers and buyers worldwide and make orders at any time. Maybe
you even have already created your own e-commerce site on Drupal.

Read more
Categories: Blogs

Agiledrop.com Blog: AGILEDROP: Other Top Drupal Blogs from April

May 4, 2017 - 7:45am
Months quickly go by and it's once again time to look at the best work from other authors from the previous month. It's April's turn, so let us see the top Drupal blogs from April. We'll start our list with Jerome Zech and his Manage your digital assets with Bynder and Drupal 8. The author reveals that MD Systems implemented a module that integrates with the Bynder DAM and lets you use its assets directly in a Drupal 8 site. Our second choice is Tips for Setting up a Booth at DrupalCon by Brandon Williams. The author writes about his first experience in setting up a booth for any… READ MORE
Categories: Blogs

ADCI Solutions: Adding filtering by Nodequeue name in Search API Views

May 4, 2017 - 7:41am

For some of the projects we built a search page made with Views. In order to improve performance we usually used the Search API module. But when we had to integrate Nodequeue in View, we faced a problem: Search API doesn’t have an integration with Nodequeue yet. A solution was found under the hood of Entity API.

 

Learn what the solution is.

Categories: Blogs

ADCI Solutions: Drupal &amp; Vue.js: how to work without jQuery

May 4, 2017 - 2:42am

If you’ve been working with Drupal long enough you probably know that it has jQuery out of the box since the 5th version.

If you’ve been working with Drupal long enough you probably have already tried to find something instead of jQuery.

jQuery doesn’t solve the problems that developers face nowadays. But Vue.js does. Besides having many stars and downloads, a large and friendly community, it is supported by Laravel (PHP framework) out of the box.

Those were the reasons to start using Vue.js for enhancing  Drupal user elements without jQuery. If you feel like learning how to work with Vue.js components, integrate Vue.js with third-party libraries and you want to create a simple SPA on your own - keep on reading here.

Categories: Blogs

Jeff Geerling's Blog: Composer and Drupal are still strange bedfellows

May 3, 2017 - 11:31pm

More and more sites are being built in Drupal 8 (over 160,000 as of DrupalCon Baltimore 2017!). As developers determine best practices for Drupal 8 site builds and deployment, they need to come to terms with Composer. In one of the most visible signs that Drupal is 'off the island', many modules are now requiring developers to have at least a fundamental grasp of Composer and dependency management.

But even more than that, many developers now use Composer in place of manual dependency management or a simpler tools like Drush Make files.

With these major changes comes some growing pains. Seeing these pains on a daily basis, I wrote Tips for Managing Drupal 8 projects with Composer to highlight some best practices and tricks for making Composer more powerful and helpful.

But many developers still wrestle with Composer, and mourn the fact that deployments aren't as simple as dragging zip files and tarballs around between servers, or checking everything into a Git repository and doing a git push. For example:

  • If I manage my codebase with Composer and follow Composer's own recommendation—don't commit dependencies in my vendor directory, what's the best way to actually deploy my codebase? Should I run composer install on my production web server? What about shared hosting where I might not have command line access at all?
  • Many modules (like Webform) require dependencies to be installed in a libraries folder in the docroot. How can I add front end dependencies via Composer in custom locations outside of the vendor directory?

And on and on.


Over 3,000 community members attended DrupalCon Baltimore 2017.
(Photo by Michael Cannon)

During a BoF I led at DrupalCon Baltimore 2017 (Managing Drupal sites with Composer), we identified over 20 common pain points people are having with Composer, and for many of them, we discussed ways to overcome the problems. However, there are still a few open questions, or problems which could be solved in a number of different ways (some better than others).

I've taken all my notes from the BoF, and organized them into a series of problems (questions) and answers below. Please leave follow-up comments below this post if you have any other thoughts or ideas, or if something is not clear yet!

Categories: Blogs

myDropWizard.com: Drupal 6 security update for Remember Me

May 3, 2017 - 5:10pm

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Moderately Critical security release for the Remember Me module.

Remember Me adds a "Remember me" checkbox to the login form.

It had a bug where it would override the session cookie lifetime, regardless of whether the user checked "Remember me" or not. This could affect applications that set the session cookie lifetime to a very short value, like banking websites.

(A note about the timing of this release: The Drupal 7 fix was released on April 23rd, however, we don't have any customers who depend on this module. So, it falls outside of the set of modules that we usually release security patches for on the same day they are released. But this is a module we like, so we decided to port the fix! :-))

Here you can download the Drupal 6 patch.

If you have a Drupal 6 site using the Remember Me module, we recommend you update immediately!

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on Drupal.org).

Categories: Blogs

Pages