Drupal News

Promet Source: Drupalcamp Cebu 2017 Up Close

Main Drupal Feed - Tue, 12/19/2017 - 22:54
Another Drupalcamp event had just successfully ended in Cebu! Wait... Where is Cebu?

Acro Media: Video: How Drupal Delivers a True Omnichannel Experience

Main Drupal Feed - Tue, 12/19/2017 - 21:43

The term "omnichannel" has been around for a long time, but in a lot of cases it was just a buzzword.

We talk sometimes about omnichannel being online and in store, but in reality, it refers to all the channels that are available to your customers. That's call-in orders, customer service, catalog orders, integrations with other fulfillment partners like Amazon or eBay—those are all channels through which you sell products.

Omnichannel is about having all those channels work together. So if Joe buys something online, for instance, he should be able to return it to the physical store, and the customer service rep in the store should be able to see his updated account history, because everything should sync up.

In the early days, basic omnichannel really just meant that if the product showed on the website, it was also in the store. But these days, omnichannel is also about customizing the experience for each channel.

So if Joe is on the app, it should automatically pick his closest store. It should show him what aisle or section the item is located in and whether its in stock. On the other hand, if Joe is buying online, he doesn't care what aisle it's in, he just wants to know how long it will take to get the item shipped to him. So you have to tailor the experience to each type of channel, but the systems all need to mesh together.

What can you expect from the omnichannel experience from most platforms?

You will generally get rudimentary stock syncing. That means that whether you sell items online or in store, you will know how many you have and when you're out of stock. But even that has variations. Do you know your inventory status in real time? Every hour? Or does it only sync nightly? That can make a big difference.

With most platforms, you're not going to get features like the ability to inform the customer where the item is located in the store. Only a few retailers do that because it's very difficult and requires a lot of extra work. You need to know that data, for one thing. So even if the platform supports that, that doesn't mean that you actually track the precise location of every single product in your store.

What's different with Drupal?

With Drupal, syncing is simple because we can use the same platform for everything: we have a point of sale, we have a web platform, and we can automatically do pushes to different channels like Amazon and eBay. We have real-time stock and shipping.

Then we can add more customizations. We can allow for your customers to start an order online and finish it in store, for instance. Or if they go into the store and find it's not in stock, the clerk can put in an order—but instead of it getting shipped to the store and the customer having to come and pick it up, the clerk can simply turn it into an online order and have the item shipped to the customer. This is the kind of stuff we can mostly do out of the box, but there's usually a bit of customization work to make it a smooth flow.

What's the deal with add-ons?

Drupal is well set up for omnichannel, but keep in mind that there can be problems any time you integrate with other systems. Payment gateways are usually not a problem, but you can run into issues if you have to pass data to some warehouse fulfillment system and it can't provide real-time stock info back. So Drupal can keep track of stock, but if they knock over a pallet in the warehouse, or they get a new shipment but take a while to put it in, that can be slow to update. So the caveat here is that you can be let down by other parts of your system.

Chat with us

If you'd like to how Drupal Commerce fits into your omnichannel solution, give us a shout. We're here to help.

qed42.com: Art of writing template files - Drupal 8

Main Drupal Feed - Tue, 12/19/2017 - 20:49

When it comes to Drupal 8 theming layer, there is a lot Drupal 8 offers. Few concepts that come to mind while thinking of Drupal 8 theme layer include Renderable Array, Cacheabilty, Cache Context, Cache Tags, Twig and Preprocessors. Some of these are improvements of old concepts, while others are new introduction in Drupal 8. In this post, I'll share my experience on how to best utilise these concepts for a robust and performant frontend with Drupal 8.

To get best out of this post, you should be comfortable with:

  1. Drupal 8 #cache
  2. Twig Debug
  3. Preprocessor functions


We will focus on the following concepts:

Renderable array caching, walk through Drupal 8 caching power and Cache contexts

Drupal 8 comes with a lot of changes and almost all of us are even familiar with these changes. So, now it’s high time we start exploiting these to get best out of Drupal 8. It’s very important to understand how Drupal 8 caching works. Go through drupal.org documentation besides implementing the same once thoroughly on a vanilla Drupal instance. At the end have an answer to all these questions:

Drupal Association blog: Call for Proposals: DrupalCon Europe License

Main Drupal Feed - Tue, 12/19/2017 - 18:09

The Drupal Association’s mission is to unite the global open source community to help them build and promote Drupal. One of the most important ways that we advance our mission is through DrupalCon, Drupal’s flagship event.

At DrupalCon, community members with a technical, business, and marketing background come together to unite as a community, level up their Drupal skills, and contribute to the project. As a global event, DrupalCon breaks down walls between countries and the various personas who build, use and support Drupal, making it an accelerator of knowledge sharing, relationship building and contribution.

DrupalCon is ready to grow.  We need a model that allows the community to deliver DrupalCon globally. Our vision is to empower all regions to host DrupalCon, providing this experience to communities around the world.  As a first step, we are licensing DrupalCon to the European region.

We are excited to empower a new entity grounded in the European Drupal community to take this special event to the next level. The DrupalCon license initiative is an opportunity to re-imagine DrupalCon Europe to uniquely serve the Drupal community. The license is designed to allow for a new creative direction while enhancing Drupal’s mission, vision and values while maintaining the integrity of DrupalCon.

With the help of the DrupalCon Europe License Committee, we created a process for entities to apply for a DrupalCon Europe license by 30 March, 2018. We reviewed approaches used by other conference organizers, with particular attention to the key attributes that allow TED to scale its TEDx events. Then, we applied those learnings to our licensing process.

In short, we learned that TEDx scales because of clear “rules and tools” for the licensee (aka event organizer) and we aimed to provide the same level of guidance and support for the DrupalCon licensee. There are clear guidelines in the license agreement and the event rules and we will provide support in the form of knowledge transfer, tools, and advisory services. We also recognize that this is our first time creating such a program, so we encourage entities who are applying to contact us to discuss any areas of concern or question.

Below details how to submit a proposal for the DrupalCon license and the criteria that the Drupal Association will use to select the licensee.

We are grateful for the help of Bert Boerland, Baddy Breidert, Alex Burrows, Gabor Hojtsy, Janne Kalliola, Zsofi Major, and Stella Powers, who participated in the DrupalCon Europe License committee and contributed many hours and great insight into this process.

Table of Contents
  • Key Points
  • Who Can Apply For a DrupalCon License
  • Important Dates
  • What To Submit To Apply for a DrupalCon License
  • DrupalCon License Rules
  • Drupal Association Support
  • Decision Making Criteria
Key Points Who Can Apply For a DrupalCon License

To be eligible to apply for a DrupalCon license, you must meet the following criteria:

  • An entity grounded in the voice and needs of the Drupal community. This can include, but is not limited to:

    • A professional event company

    • A Drupal community group

    • A collective of Drupal businesses

    • A Drupal business

    • An event organizing company that demonstrates how they will work with the Drupal community

    • An entity where someone on the team has event experience

  • Able to accept funds as a business or nonprofit

  • Must have successfully produced an event that broke even or was profitable. Or, the team member with event experience has worked on an event that broke even or was profitable.

  • Must agree to abide by and enforce DrupalCon’s policies and rules.

Important Dates

Above is a timeline of important dates to know. The call for a DrupalCon license proposal is now open and it closes on 30 March, 2018. In mid to late April, applicants will be interviewed and a licensee will be selected by the Drupal Association in May 2018.

As early as July 2018, The Drupal Association will provide an onboarding workshop to the licensee, to begin knowledge sharing, and map out how best to support the event organizer leading up to and during DrupalCon.

What To Submit To Apply for a DrupalCon License

To apply for the DrupalCon license, please submit the following items by 30 March, 2018 to DrupalConEurope@association.drupal.org. Your application must include the items listed below in the following formats (presentation, spreadsheet, document).

  1. DrupalCon Business Plan. Submit a business plan with the following information:

    • Event location and dates.

    • Detailed event budget, structured as similarly as possible to the current DrupalCon budget format.

    • Budget assumptions. Clearly define the budget assumptions for expenses. Also, include forecasted ticket and sponsor revenue. Define your ticket pricing plan and your sponsor strategy (who you will sell to and how you will create value for sponsors). Additionally, explain how you will secure the cash flow for initial event investments like securing the venue.

    • Details about your event team. Who are the key people on your team, what roles will they play, and what is their event experience?

    • An overview of how you will ensure the event reflects the Drupal community's needs and culture and moves the project forward.

    • The event’s mission and vision, which should align with the Drupal Association’s mission and vision.

    • Target audience and target size. Which personas will your event attract and generally in what ratio? Please define your personas.

    • Event goals, strategies and objectives

    • What value will you bring to each persona and how?

    • Programming concept overview (which we know can change as you get further into planning). Please be sure to adhere to the programming rules.

      • Event duration

      • Provide a sample program and suggested tracks

      • Share your general concept for session selection

      • What is your plan to ensure conference diversity (attendees and speakers)

      • Tell us about some aspirational keynotes you would like to invite

  2. Drupal culture. Tell us how you define Drupal’s community spirit and culture and what it means to you.

  3. What’s your “why”. Tell us why you want to organize DrupalCon. Why should you be selected, and how will you maintain the Drupal community spirit.

  4. Your needs. As seen on page 4, the Drupal Association will support you with knowledge sharing, tools, and advisory services. What additional needs do you have?

  5. About your past events. Submit an overview of your past event that you, your event partner, or your team member worked on. Describe the event audience, audience size, goals, and how you achieved those goals along with the event’s financial statements.

The Drupal Association will select the organizer who can demonstrate the best approach for creating value to a technical and non technical audience by uniting the community, leveling up Drupal skill, and accelerating the project through a sustainable model.

DrupalCon License Rules

The DrupalCon license is designed to encourage creativity, to re-imagine the event. That means you can decide what is the best programming to meet the attendee’s needs. Or you can decide that sustainability is best achieved by starting with a smaller event that grows over time. However, all proposals and the actual event must conform to the DrupalCon licensing rules and agreement to maintain the Drupal Association’s community and governance expectations, as well as DrupalCon’s brand experience.

You can find DrupalCon Rules here.  

You can find the DrupalCon license agreement here.

Since this is the first time the Drupal Association has crafted DrupalCon license rules, we are open to discussion. Please contact us if you feel a rule is a blocker to you submitting a proposal. If discussions result in a rule change, we will update the rules document to reflect that change.

Drupal Association Support

The Drupal Association wants to make sure the chosen event organizer is set up for success. We recognize this means that we will play a role leading up to and perhaps during the event. Here are some ways the Drupal Association will help. We are open to hearing about additional ways in which we might help.

  • In-person workshop: The Drupal Association staff will fly to the organizer’s location to run a workshop where we will do a knowledge transfer, training, and determine how the Drupal Association will play a support role during the event production phase.

  • Playbooks, Guidelines, and Templates. The Drupal Association has several production playbooks that we will share so the organizer can see how the event was produced in the past. We recognize that the event organizer may want to alter our approach or create a brand new one.

  • Advisory Services. You may have questions along the way and we are here to help. No question will be too big or too small. We can set up periodic check in meetings to provide guidance as you develop your event.

  • Access to tools. DrupalCon promotion and management relies on several tools that we will share with the event organizer including the DrupalCon event site, social media handles, access to DrupalCon email lists, etc.

  • Promotion Support

    • The Drupal Association can amplify your call for ticket sales, sponsorship, and content through our channels including social media, email, newsletters.

Decision Making Criteria

When reviewing and comparing proposals, The Drupal Association will select the event organizer by using the following criteria:

Category

Topic

Weight

Sustainability

Conservative, realistic, complete budget plan with clear revenue and expense budget assumptions

10

Staffing plan

Clearly defined leadership team description and a staffing plan for producing the event that is designed to avoid burnout

8

Goals, strategies, objectives

Clearly articulated goals, strategies, and objectives that move the project forward, serve multiple personas, and has achievable metrics.

9

Location

Easy to reach by European community

8

Event Dates

Avoids major holidays (national, religious, etc) and aligns with Dries Buytaert’s availability

10

Target Audience

Program serves multiple personas

8

Programming

Creative approach for serving all persona  while meeting the licensing rules.

9

Session Selection

Well thought out approach that adheres to the DrupalCon licensing rules.

7

Diversity & Inclusion

Well thought out approach for growing speaker and attendee diversity to exceed the DrupalCon Vienna benchmark

8

Definition of spirit/ culture

Strong understanding of the Drupal culture

7

Keynote examples

Creative, inspiring keynote ideas that speak to all personas

6

Event Planning Experience

Clear demonstration of event experience on the team

7

Acquia Developer Center Blog: A Look Inside Decoupled Architecture: The Engage Digital Application

Main Drupal Feed - Tue, 12/19/2017 - 17:07

“The most compelling advantage of API-first Drupal is not the way it negates Drupal's presentation features, it's the way it enables the capabilities of the CMS to power multiple applications and devices. Leveraging Drupal as a centralized data source enables authors to deliver content to multiple devices outside of Drupal, while leaning on the strength of the CMS editorial workflow and patterns.” -- Jason Enter, Manager Technical Services, Acquia.

Tags: acquia drupal planet

Jacob Rockowitz: Drupal 8 and the Webform module helps NYC online voter registration bill get passed

Main Drupal Feed - Tue, 12/19/2017 - 17:04

My family and I got to see Mayor Bill de Blasio sign the online voter registration bill into law which Ben Kallos, a New York City councilman and true fan of Open Source, sponsored. Kallos used the Webform module to demonstrate how easy it easy it is to capture a digital signature. The most ironic thing about watching the mayor sign the online voter registration bill, which is driven by the concept of digital signatures, into law, was the fact that he used used multiple pens to sign the bill. My daughter Lili and I both received pens that the mayor used to sign the bill. Everyone, myself included, has Kallos to thank for making this bill and experience happen. I guess - and this is a good thing - we’ll have to find other uses for our pens.

Last month, Kallos did a presentation at the NYC Drupal Meetup about how he used the Webform module to help get legislation passed to allow online voter registration for New Yorkers.

 

We all know that we can’t vote online yet, but I was surprised to realize that people can’t even register to vote online! Sure governments and municipalities move slowly, but how hard should it be to set up an online voter registration application? There is even an online HTML form that generates a filled-out PDF form that you have to print out, sign, and mail in. Next, someone manually re-enters your information, with no typos…duh. Kallos gets technology, which is why he sponsored this legislation and tackled the real challenge of showing his fellow council members how to capture a digital signature, which is essential for registering...Read More

Droptica: Droptica: Building a big website? Here are ten reasons why you should be using Drupal

Main Drupal Feed - Tue, 12/19/2017 - 11:24
When you’re building an advanced website, you can choose from among many technologies. Usually, the first choice is the programming language (PHP, Python, Java, ASP.NET, etc.) and then we decide whether we should code everything from scratch or use a framework to do all the heavy lifting. There is also a third choice, a more comprehensive solution –so-called CMF systems, which stands for content management framework. Drupal 8 is one of these systems. In this article, I will tell you why it’s worth it to choose Drupal as the basis for any large and advanced website.  By large and advanced, I mean one that is changed frequently. Content changes are carried out by at least one editor, supported by at least one developer (along with a QA tester and a sysadmin), who’s responsible for continuous development of the website, adding new functionalities, fixing the emerging bugs and so on.  Some examples of large and advanced websites:

Amazee Labs: Client Interactions - Amazee Agile Agency Survey Results - Part 8

Main Drupal Feed - Tue, 12/19/2017 - 11:24
Client Interactions - Amazee Agile Agency Survey Results - Part 8

This is part eight of our series processing the results of the Amazee Agile Agency Survey. Previously I wrote about estimations, this time let’s focus on client interactions. How regularly does the team meet the client and how is communication between the team and the client handled?

Josef Dabernig Tue, 12/19/2017 - 12:24 Client Meetings

When asked about “how regularly does the team meet the client”, 33% mentioned “more or once per week”, 30% selected they would meet “less frequently” compared to the 16.7% which chose “every two weeks”. This is followed by 6.7% that chose to meet clients “each day for the daily standup”, and the same amount chose to meet clients “never”. It looks like there is no apparent tendency but half of the teams choose to work together with clients more regularly, and another half of the team doesn’t have much client interactions.

For us, at Amazee this depends heavily on the project and the teams. In some cases we form teams together with clients where all developers will be assigned to the project full time in that consequence have regular client interactions. For the stable Scrum teams in Zurich that I work most with, we run multiple projects at the same time and therefore didn’t consider inviting clients to our daily meetings as we discuss several projects at the same time. As we have been successfully moving towards having fewer projects per team and a global maintenance team, we are considering this option though as to have closer client interactions between the team members. On top of that, we have found regular demos for clients and grooming meetings between the teams and clients beneficial. We balance the decision to do them based on how much money the client is willing to spend on having multiple people at a meeting.

Client Communication

In a second question, we asked “How is communication between the team and the client handled” and contestants could choose from a scale of 1-5. The lowest indicates communication is handled “exclusively by a person dedicated to talking to the client (PM, PO proxy, ...)”, and the highest, indicates that communication is handled “Always together with the entire team”. An equal share of 33% turned out to be with a 2 or a 3, 13.3% with a 1 or a 4 and 6.7% with a 5. We can see that there is a tendency to channel communication between clients and the team through a person within the company (PM, PO proxy).

For us at Amazee its a 2. Every project has a PO from our side assigned that will represent the client to the team if the client is not available and will represent the team to the client to have a single point of contact. Still, we encourage clients to meet the team regularly for a better understanding on both sides of the project and collaboration. The higher the ratio is that a team can dedicate their time to one project & customer, the easier it is to justify that the entire team will collaborate with the client. Being in an agency environment with multiple projects at the same time, those customers are not often to be encountered though. This is why we try to find a good compromise between customer collaboration with the team and efficiency gains of channelled communication.

How do you and your team interact with your clients? Please leave us a comment below. If you are interested in Agile Scrum training, don’t hesitate to contact us.

Stay tuned for the next post where we’ll look at agile practices.

 

Digital Echidna: Thoughts on all things digital: Putting Our Best Foot Forward Against Bullying on For Me Day

Main Drupal Feed - Tue, 12/19/2017 - 09:12
Bullying is a major problem in our schools, workplaces, homes, and over the Internet. Over the next 14 months, Digital Echidna is supporting a series of mental health awareness campaigns, in particular those with an emphasis on inclusion and…

Last Call Media: LCM Drupal Scaffold 2.0

Main Drupal Feed - Tue, 12/19/2017 - 02:00
LCM Drupal Scaffold 2.0 Rob Mon, 12/18/2017 - 21:00

Last year, we released an ambitious project to open source our own internal workflow. We called it the Last Call Drupal Scaffold (definitely not the most original name), and we presented it to the world at several different camps and conferences, including Drupalcon Baltimore.

Agiledrop.com Blog: AGILEDROP: What do developers joining Drupal need to know before they start?

Main Drupal Feed - Tue, 12/19/2017 - 00:02
Did you decide that you want to become a Drupal Developer? Congratulation! That is a great decision. As a Junior Drupal developer, you are going to face some of the challengers. Do not worry; every Drupal developer needed to go true this. But what skills do you need to join Drupal community? Are there any particular tools that you need to me familiar with? Jup, there is some knowledge you need to conquer before you enter Drupal coding and let's see the list of important skills, concepts, and tools that we think you should already know as a beginner in Drupal.    1. PHP language Every… READ MORE

Xeno Media: Web Accessibility Part I: Do we still need to ask?

Main Drupal Feed - Mon, 12/18/2017 - 20:06

“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”

Tim Berners-Lee, 1997

What exactly is web accessibility?

Web accessibility is the removal of technical impediments that could limit access to or interaction with a website by any person with disabilities. The goal of a web accessible site is to allow all users equal access to all content and functionality. 

Some disabilities that web accessibility can address
  • Visual: Visual impairments up to and including complete blindness, various common types of poor vision, color blindness

  • Motor Skills: Difficulty using hands, tremors, Bradykinesia, loss of detailed muscle control, etc., due to conditions such as Parkinson’s, MS, stroke, and other movement disorders

  • Auditory: Hearing impairments up to and including total deafness and including the hard of hearing

  • Cognitive: Cognitive impairment and learning disabilities (Dyslexia, Dyscalculia, etc.) that may affect memory, attention, problem-solving and logic skills.

Temporary Disabilities

When developing with accessibility in mind there will almost certainly be some unexpected good fortune.  For example: if a person breaks her primary hand, and is forced to wear a cast, she may temporarily lose the ability to operate a mouse. The developer didn’t plan to cater to the temporarily disabled, but well designed keyboard navigation could surely save the day for such an accident victim.

Why does web accessibility matter?
  • It’s the right thing to do.

    Here’s a chance to make a positive difference in many people’s lives. Improving a site’s accessibility will make that site better for all users and will likely improve its position in the SERPs (Search Engine Result Pages). So be a good citizen and contribute to web accessibility! Make the web a better place for everyone!

  • It may be required.

    There are various state and federal laws regarding web accessibility.

    Some organizations and businesses have faced legal action for non-compliance with accessibility guidelines. Even if you were to win such a challenge, the cost in legal fees and in lost time would be substantial. Why risk exposing your business to the possibility of a legal challenge.

  • It’s good for business.

    According to the U.S. Census Bureau’s 2002 Survey of Income and Program Participation (SIPP), there are 51.2 million people with disabilities in the United States. That’s 18.1% of the U.S. population! Those folks need goods and services too, some of which are very specialized.

    Millions of people with disabilities shop, travel, buy cars, buy homes, eat out, go out and participate in most of the same activities as their fully-abled friends, neighbors and family. Web developers are in a unique position to work towards the good of all to advocate for and to help facilitate these behaviors. We all benefit.
     

  • Web accessibility is becoming easier to achieve and more unified with web standards as time passes.
  • More to come

    This series on Web accessibility will continue with the following:

    Part II: What guides accessibility efforts?

    This post will highlight the laws and governance related to web accessibility efforts.

    Part III: Tools and techniques for web accessibility

    Here we will provide a primer on assistive technologies and tools you and your developers can use to make your site more accessible.

    Part IV: Case studies

    This post will highlight two real-world applications where we have worked closely with clients to achieve highly-accessible websites. 

     

    Evolving Web: Writing a Custom Migration Source Plugin in Drupal 8

    Main Drupal Feed - Mon, 12/18/2017 - 18:01

    Usually, Drupal migrations get run at the beginning of a project to get all your content into Drupal. But sometimes, you need to create a migration that runs on a regular basis. For example, you have an external database of courses and programs maintained by a university that needs to be displayed on a Drupal site. Another example: you have a database of book data that needs to be pulled into Drupal nightly.

    When working with migrations where the source files are updated every day, it can get really tedious to download the updated source files manually each time the migration runs.

    In this tutorial, we'll write a source plugin based on the CSV source plugin which will allow us to automatically download CSV files from a remote server via SFTP before running migrations. This article was co-authored by my colleague David Valdez - gracias David for your contribution.

    The Problem

    In a project we worked on recently, we had the following situation:

    • CSV files are updated by a PowerShell script every night on the client's server.
    • These CSV files are accessible via SFTP.

    Our task is to download the CSV source files over SFTP and to use them as our migration source.

    Before We Start The Plan

    The goal is to avoid downloading the file manually every time we run our migrations. So we need a way to doing this automatically everytime we execute a migration. To achieve this, we create a custom source plugin extending the CSV plugin provided by the Migrate Source CSV module, which will download CSV files from a remote server and pass it to the CSV plugin to process them.

    The Source Migrate Plugin

    To start, let's create a custom module and call it migrate_example_source and implement a custom migrate source plugin by creating a PHP class inside it at /src/Plugin/migrate/source/MigrateExampleSourceRemoteCSV.php

    We start implementing the class by simply extending the CSV plugin provided by the migrate_source_csv module: namespace Drupal\migrate_source_csv\Plugin\migrate\source; use Drupal\migrate_source_csv\Plugin\migrate\source\CSV as SourceCSV; use phpseclib\Net\SFTP /** * @MigrateSource( * id = "migrate_example_source_remote_csv" * ) */ class MigrateExampleSourceRemoteCSV extends SourceCSV {}

    Adding the annotation @MigrateSource is very important because that is what will make the migrate module detect our source plugin. In our plugin, we use the phpseclib/phpseclib libraries to make SFTP connections. Hence, we need to include the libraries in our project by running the following command in the Drupal root:

    composer require phpseclib/phpseclib

    Our plugin will download the source CSV file and will simply pass it to the CSV plugin to do the rest. We do the download when the plugin is being instantiated like this:

    /** * {@inheritdoc} */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration) { // If SFTP connection parameters are present. if (!empty($configuration['sftp'])) { // A settings key must be specified. // We use the settings key to get SFTP configuration from $settings. if (!isset($configuration['sftp']['settings'])) { throw new MigrateException('Parameter "sftp/settings" not defined for Remote CSV source plugin.'); } // Merge plugin settings with global settings. $configuration['sftp'] += Settings::get('sftp', []); // We simply download the remote CSV file to a temporary path and set // the temporary path to the parent CSV plugin. $configuration['path'] = $this->downloadFile($configuration['sftp']); } // Having downloaded the remote CSV, we simply pass the call to the parent plugin. parent::__construct($configuration, $plugin_id, $plugin_definition, $migration); }

    In the constructor we are using global SFTP credentials with Settings::get(). We need to define the credentials in settings.php like this:

    $settings['sftp'] = array( 'default' => [ 'server' => 'ftp.example.com', 'username' => 'username', 'password' => 'password', 'port' => '22', ], );

    Once we have the credentials of the FTP server we use a downloadFile() method to download the remote CSV file. Here's an extract of the relevant code:

    protected function downloadFile(array $conn_config) { ... // Prepare to download file to a temporary directory. $path_remote = $conn_config['path']; $basename = basename($path_remote); $path_local = file_directory_temp() . '/' . $basename; ... // Download file by SFTP and place it in temporary directory. $sftp = static::getSFTPConnection($conn_config); if (!$sftp->get($path_remote, $path_local)) { throw new MigrateException('Cannot download remote file ' . $basename . ' by SFTP.'); } ... // Return path to the local of the file. // This will in turn be passed to the parent CSV plugin. return $path_local; }

    Note: The code block above has been simplified a bit. If you see the actual source plugin, there are some lines of code which make things more compatible with the migration_lookup plugin.

    This method creates an SFTP connection, downloads the file to a temporary location and returns the path to the downloaded file. The temporary file path is then passed to the Migrate Source CSV and that's it! Finally, to use the plugin in our migration we just set our plugin as the source/plugin:

    id: migrate_example_content label: 'Example content' ... source: plugin: migrate_example_source_remote_csv # Settings for our custom Remote CSV plugin. sftp: settings: sftp path: "/path/to/file/example_content.csv" # Settings for the contrib CSV plugin. header_row_count: 1 keys: - id ...

    The code for this plugin and the example module is available at migrate_example_source. Great!

    + more awesome articles by Evolving Web

    Electric Citizen: Essential SEO Tune-Up for your Drupal 8 Website

    Main Drupal Feed - Mon, 12/18/2017 - 15:49

    Drupal is well known for being a Search Engine Optimization (SEO) friendly Content Management System (CMS) and Drupal 8, the latest version, is the best by far. Many of the essential requirements for SEO best practices are already baked into the core software architecture, and with a little knowledge and some basic configuration anyone can tune up their website to become faster, drive more traffic, and perform better in the search engine rankings.

    Promet Source: Promet Source Announces Partnership with Drupal Open Y

    Main Drupal Feed - Mon, 12/18/2017 - 15:39
    Promet Source is proud to announce that we have teamed up with OpenYMCA.org, an open-source digital platform for marketing and e-commerce, as a Drupal development partner. Through this partnership, we are committed to the Open Y philosophy, community, and platform.

    OSTraining: Embed a Youtube Player as Media Asset Into CKEditor in Drupal 8

    Main Drupal Feed - Mon, 12/18/2017 - 14:19

    The new Media capabilities in Drupal allow you create a media library with all kinds of media assets and use these assets everywhere. One way to use them is to embed these assets directly into CKEditor.

    You can pull these assets from Youtube or Vimeo with the Video Embed Field module, so you only need to store the URL on your Drupal site.This will come in handy for a lot of site editors. Let’s start!

    Boots RTL

    Drupal Themes - Mon, 12/18/2017 - 09:29

    boots theme is sub theme to bootstrap. this theme develop to support RTL.

    Dcycle: Migrating Webforms from Drupal 7 to Drupal 8

    Main Drupal Feed - Mon, 12/18/2017 - 00:00

    I recently needed to port hundreds of Drupal 7 webforms with thousands of submissions from Drupal 7 to Drupal 8.

    My requirements were:

    • Node ids need to remain the same
    • Webforms need to be treated as data: they should be ignored by config export and import, just like nodes and taxonomy terms are. The reasonining is that in my setup, forms are managed by site editors, not developers. (This is not related to migration per se, but was a success criteria for my migration so I’ll document my solution here)
    Migration from Drupal 7

    I could not find a reliable upgrade or migration path from Drupal 7 to Drupal 8. I found webform_migrate lacks documentation (I don’t know where to start) and migrate_webform is meant for Drupal 6, not Drupal 7 as a source.

    I settled on a my own combination of tools and workflows to perform the migration, all of them available on my Github account.

    Using version 8.x-5.x of webform, I started by enabling webform, webform_node and webform_ui on my Drupal 8 site, this gives me an empty webform node type.

    I then followed the instructions for a basic migration, which is outside the scope of this article. I have a project on Githubwhich I use as starting point from my Drpual 6 and 7 to 8 migrations. The blog post Custom Drupal-to-Drupal Migrations with Migrate Tools, Drupalize.me, April 26, 2016 by William Hetherington provides more information on performing a basic migration of data.

    Once you have set up your migration configurations as per those instructions, you should be able to run:

    drush migrate-import upgrade_d7_node_webform --execute-dependencies

    And you should see something like:

    Processed 25 items (25 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d7_node_type' Processed 11 items (11 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d7_user_role' Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d7_user_role' Processed 95 items (95 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d7_user' Processed 109 items (109 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_d7_node_webform'

    At this point I had all my webforms as nodes with the same node ids on Drupal 7 and Drupal 8, however this does nothing to import the actual forms or submissions.

    Importing the data itself

    I found that the most efficient way of importing the data was to create my own Drupal 8 module, which I have published on Dcycle’s Github account, called webform_d7_to_d8. (I have decided against publishing this on Drupal.org because I don’t plan on maintaining it long-term, and I don’t have the resources to combine efforts with existing webform migration modules.)

    I did my best to make that module self-explanatory, so you should be able to follow the steps the README file, which I will summarize here:

    Start by giving your Drupal 8 site access to your Drupal 7 database:

    $databases['upgrade']['default'] = array ( 'database' => 'drupal7database', 'username' => 'drupal7user', 'password' => 'drupal7password', 'prefix' => '', 'host' => 'drupal7host', 'port' => '3306', 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', 'driver' => 'mysql', );

    Run the migration with our without options:

    drush ev 'webform_d7_to_d8()'

    or

    drush ev 'webform_d7_to_d8(["nid" => 123])'

    or

    drush ev 'webform_d7_to_d8(["simulate" => TRUE])'

    More detailed information can be found in the modlue’s README file.

    Treating webforms as data

    Once you have imported your webforms to Drupal 8, they are treated as configuration, that is, the Webform module assumes that developers, not site builders, will be creating the forms. This may be fine in many cases, however my usecase is that site editors want to create and edit forms directly on the production, and we don’t want them to be tracked by the configuration management system.

    Jacob Rockowitz pointed me in the right direction for making sure webforms are not treated as configuration. For that purpose I am using Drush CMI tools by Previous Next and documented on their blog post, Introducing Drush CMI tools, 24 Aug. 2016.

    Once you install in your ~/.drush folder and run drush cc drush, you can use druch cexy and druch cimy and instead of drush cim and drush cex in your conguration management process. Here is how and why:

    Normally, if you develop your site locally and, say, add a content type or field, or remove a content type of field, you can run drush cex to export your newly created configuration. Then, your colleagues can pull your code and run drush cim to pull your configuration. drush cim can also be used in continuous integration, preproduction, dev, and production environments.

    The problem is that drush cex exports all configuration, and drush cim deletes everything in the database which is not in configuration. In our case, we don’t want to consider webforms as configuration but as data, just as nodes as taxonomy terms: we don’t want them to be exported along with other configuration; and if they exist on a target environment we want to leave them as they are.

    Using Drush CMI tools, you can add a file such as the following to ~/.drush/config-ignore.yml:

    # See http://blog.dcycle.com/blog/2017-12-18 ignore: - webform.webform.*

    This has to be done on all developers’ machines or, if you use Docker, on a shared Docker container (which is outside the scope of this article).

    Now, for exporting configuration, run:

    drush cexy --destination='/path/to/config/folder'

    Now, webforms will not be exported along with other configuration.

    We also need to avoid erasing webforms on target environments: if you create a webform on a target environment, then run drush cim, you will see something like:

    webform.webform.webform_9521 delete webform.webform.webform_8996 delete webform.webform.webform_8991 delete webform.webform.webform_8986 delete

    So, we need to avoid deleting webforms on the target environment when we import configuration. We could just do drush cim --partial but this avoids deleting everything, not just webforms.

    Drush CMI tools provides an alternative:

    drush cimy --source=/path/to/config/folder

    This works much like drush cim --partial, but it allows you to specify another parameter, –delete-list=/path/to/config-delete.yml

    Then, in config-delete.yml, you can specify items that you actually want to delete on the target environment, for example content types, fields, and views which do not exist in code. This is dependent on your workflow and they way to set it up isdocumented on the Drush CMI tools project homepage.

    With this in place, we’ll have our Drupal 7 webforms on our Drupal 8 site.

    I recently needed to port hundreds of Drupal 7 webforms with thousands of submissions from Drupal 7 to Drupal 8.

    Sooper Drupal Themes: Try The SooperThemes Drupal 8 Experience With Our First Beta Release. Refinements for D7, One more thing..

    Main Drupal Feed - Sat, 12/16/2017 - 18:02
    Drupal 8 Products Now Feature-Complete with New Media Library

    A few months ago we released our first Alpha release on Drupal 8. Now we have full support for image re-usability thanks to the Entity Browser module and are ready to release our first beta! The beta hits feature-parity with the Drupal 7 products so you can start upgrading your websites if you're willing to be an early adopter. Download the beta here to test our Drupal themes and Drupal Drag and Drop builder:

    Drupal 8 Beta Download

    The result of our work with Entity Browser is a slick interface to search and select images. It's really a step up from Drupal 7's Media Browser. Entity Browser is becoming the standard for media management in Drupal 8 and we've made some contributions and customizations to get the interface up to our design standards. Here's a little demo video:

    Shooting For Early January Release Of All Drupal 8 Themes And Modules It's going to be a hell of  a lot of work to get all 15 demos running on our Drupal 8 framework. The demos use different (probably some untested) features and additional contrib modules on top of what the main demo uses. This means there's not just the work of migrating and testing hundreds of content items but also different interactions between Glazed Builder and several modules. We're aiming for an early January release but can't make a hard guarantee. However, since the beta releases will be backwards compatible you can already start building our Drupal 8 projects if you're with being a beta tester and you don't need the demos that are yet to be ported.  Refinements and Minor Bug Fixes: Patch Release On D7 Products

    We've been cleaning out out some minor bugs for Glazed Theme and Glazed Builder, trying to get the bug counter to zero before we release on Drupal 8. You can check the release notes for a full report but here's the management summary:

    Glazed theme:
    • Added support for Navbar module (backport from D8 navbar)
    • Fixed issue with page titles hidden between page title background image
    • Fixed issue with secondary header region expanding when sticky footer option is enabled
    • Fixed issue of body scrolling while swiping mobile menu backdrop
    • Updated all colors to reflect 2018 Glazed branding
    Glazed Builder
    • Fixed layout bug for websites using non-bootstrap theme with Glazed Builder
    • Updated design of image selection widget
    • Fixed issue with color picker
    • Added category selection to icons widget
    • Made icon search much faster (dropped jQuery ui from widget)
    • Fixed bug with Carousel element prev/next pager in Bottom-Left position
    • Updated all colors to reflect 2018 Glazed branding
    Something Extra For The Holidays:

    Something else was released this month that we're very excited about.. after many years of using Font Awesome 4 we now finally have Font Awesome 5 Pro! Because SooperThemes is a backer of this million dollar Kickstarter project we can now provide you with the Pro version of this enormous icon kit. Font Awesome 4 is not going anywhere, and will continue to exist along with Font Awesome 5 solid, light, and regular stroke icons.

    On top of that we also added the 900-icon Google Material Design icon kit! We thought it would be a nice contrasting option compared to the more round lines of Font Awesome. Material Icons are more tightly drawn and perhaps more suited if you're going for a stark, hard-edged look.

    We're super excited for everyone who's been waiting and emailing us about our Drupal 8 products, we're now confident you can start your Glazed project if your project's release is scheduled for january/february! If you're just curious you can spin up our Drupal 7 admin demo here: http://trysooperthemes.com/. To try our Drupal 8 beta release you'll have to sign up. Subscriptions start at just $78 USD and are guaranteed by our 20 day refund period.

    Join SooperThemes To Get Full Access

    Happy holidays! If you've got sales questions about our Drupal 8 products feel free to email us or drop a comment here. For feedback from testing the beta please use the feedback thread in our support forum.

    MTech, LLC: Migrate (almost) goes stable in Core

    Main Drupal Feed - Fri, 12/15/2017 - 14:06
    Migrate (almost) goes stable in Core

    For those following along from the sidelines, Drupal 8 core has 3 modules that make up the migrate sub-system. For the past few years, the community has been working very hard to get these to a stable state an out of their "experimental" designation. Drum role please... as very soon the first of these modules is going to do just that. Go stable. The migrate module (also known as the API module) should have its last critical release blocker committed in the next few days. At which point, this module can be called stable.

    Admin User Fri, 12/15/2017 - 08:06

    Pages