Newsfeeds

Odata Client

New Drupal Modules - 1 March 2019 - 3:27am
Introduction

OData client implements configuration entity for OData servers, IO functions to OData collections and Drupal format OdataQuery object.

Requirements

The module requires the following libraries:
saintsystems/odata-client: ^0.2.4
league/oauth2-client: ^2.4
thenetworg/oauth2-azure: ^1.4

Categories: Drupal

Price Difference Formatter

New Drupal Modules - 1 March 2019 - 2:47am

This module adds a new field formatter to show at the same time:

  • The original price of the variation.
  • The price with the promotions applied.
  • The difference in price in percentage.

The initial idea arose in a project in which it was necessary to show the percentage of discount both in the lists of products and in the pages of detail.

REQUIREMENTS

This module requires the following modules:

Categories: Drupal

SynCart

New Drupal Modules - 1 March 2019 - 12:15am
Categories: Drupal

Smart Content View Mode

New Drupal Modules - 28 February 2019 - 7:58pm

Switch view modes based on Smart Content conditions.

Categories: Drupal

orkjerns blogg: Migrating Panel nodes into Layout Builder nodes. Is that even possible?

Planet Drupal - 28 February 2019 - 12:24pm
Migrating Panel nodes into Layout Builder nodes. Is that even possible? admin Thu, 02/28/2019 - 22:33

Oh snap”, said the project manager. “The client has this whole range of rich articles they probably are expecting to still work after the migration!

The project was a relaunch of a Drupal / Commerce 1 site, redone for Drupal 8 and Commerce 2. A couple of weeks before the relaunch, and literally days before the client was allowed in to see the staging site, we found out we had forgotten a whole range of rich articles where the client had carefully crafted landing pages, campaign pages and “inspiration” pages (this is a interior type of store). The pages were panel nodes, and it had a handful of different panel panes (all custom).

In the new site we had made Layout builder available to make such pages.

We had 2 options:

  • Redo all of them manually with copy paste.
  • Migrate panel nodes into layout builder enabled nodes.

Is that even possible?”, said the project manager.

Well, we just have to try, won’t we?

Creating the destination node type

First off, I went ahead and created a new node type called “inspiration page”. And then I enabled layout builder for individual entities for this node type.

Now I was able to create “inspiration page” landing pages. Great!

Creating the migration

Next, I went ahead and wrote a migration plugin for the panel nodes. It ended up looking like this:

id: mymodule_inspiration label: mymodule inspiration migration_group: mymodule_migrate migration_tags: - mymodule source: # This is the source plugin, that we will create. plugin: mymodule_inspiration track_changes: TRUE # This is the key in the database array. key: d7 # This means something to the d7_node plugin, that we inherit from. node_type: panel # This is used to create a path (not covered in this article). constants: slash: '/' process: type: plugin: default_value # This is the destination node type default_value: inspiration_page # Copy over some values title: title changed: changed created: created # This is the important part! layout_builder__layout: layout path: plugin: concat source: - constants/slash - path destination: plugin: entity:node # This is the destination node type default_bundle: inspiration_page dependencies: enforced: module: - mymodule_migrate

As mentioned in the annotated configuration, we need a custom source plugin for this. So, let’s take a look at how we make that:

Creating the migration plugin

If you have a module called “mymodule”, you create a folder structure like so, inside it (just like other plugins):

src/Plugin/migrate/source

And let’s go ahead and create the “Inspiration” plugin, a file called Inspiration.php:

<?php namespace Drupal\mymodule_migrate\Plugin\migrate\source; use Drupal\Component\Uuid\UuidInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\State\StateInterface; use Drupal\layout_builder\Section; use Drupal\layout_builder\SectionComponent; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; use Drupal\node\Plugin\migrate\source\d7\Node; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Panel node source, based on panes inside a panel page. * * @MigrateSource( * id = "mymodule_inspiration" * ) */ class Inspiration extends Node { /** * Uuid generator. * * @var \Drupal\Component\Uuid\UuidInterface */ protected $uuid; /** * Inspiration constructor. */ public function __construct( array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, UuidInterface $uuid ) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $state, $entity_manager, $module_handler); $this->uuid = $uuid; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) { return new static( $configuration, $plugin_id, $plugin_definition, $migration, $container->get('state'), $container->get('entity.manager'), $container->get('module_handler'), $container->get('uuid') ); } }

Ok, so this is the setup for the plugin. For this specific migration, there were some weird conditions for which of the panel nodes were actually inspiration pages. If I copy-pasted it here, you would think I was insane, but for now I can just mention that we were overriding the public function query. You may or may not need to do the same.

So, after getting the query right, we are going to do some work inside of the prepareRow function:

/** * {@inheritdoc} */ public function prepareRow(Row $row) { $result = parent::prepareRow($row); if (!$result) { return $result; } // Get all the panes for this nid. $did = $this->select('panels_node', 'pn') ->fields('pn', ['did']) ->condition('pn.nid', $row->getSourceProperty('nid')) ->execute() ->fetchField(); // Find all the panel panes. $panes = $this->getPanelPanes($did); $sections = []; $section = new Section('layout_onecol'); $sections[] = $section; foreach ($panes as $delta => $pane) { if (!$components = $this->getComponents($pane)) { // You must decide what you want to do when a panel pane can not be // converted. continue; } // Here we used to have some code dealing with changing section if this // and that. You may or may not need this. foreach ($components as $component) { $section->appendComponent($component); } } $row->setSourceProperty('layout', $sections); // Don't forget to migrate the "path" part. This is left out for this // article. return $result; }

Now you may notice there are some helper methods there. They look something like this:

/** * Helper. */ protected function getPanelPanes($did) { $q = $this->select('panels_pane', 'pp'); $q->fields('pp'); $q->condition('pp.did', $did); $q->orderBy('pp.position'); return $q->execute(); } /** * Helper to get components back, based on pane configuration. */ protected function getComponents($pane) { $configuration = @unserialize($pane["configuration"]); if (empty($configuration)) { return FALSE; } $region = 'content'; // Here would be the different conversions between panel panes and blocks. // This would be very varying based on the panes, but here is one simple // example: switch ($pane['type']) { case 'custom': // This is the block plugin id. $plugin_id = 'my_custom_content_block'; $component = new SectionComponent($this->uuid->generate(), $region, [ 'id' => $plugin_id, // This is the title of the block. 'title' => $configuration['title'], // The following are configuration options for this block. 'image' => '', 'text' => [ // These values come from the configuration of the panel pane. 'value' => $configuration["body"], 'format' => 'full_html', ], 'url' => $configuration["url"], ]); return [$component]; default: return FALSE; } }

So there you have it! Since we now have amazing tools in Drupal 8 (namely Layout builder and Migrate) there is not task that deserves the question “Is that even possible?”.

To finish off, let's have an animated gif called "inspiration". And I hope this will give some inspiration to other people migrating landing pages into layout builder.

Categories: Drupal

Open Weather Map

New Drupal Modules - 28 February 2019 - 12:00pm
Categories: Drupal

Views Node Access Filter

New Drupal Modules - 28 February 2019 - 10:02am

This module provides a Views filter to only show the nodes that the current user is allowed to edit. This is typically useful as an UX improvement for editors on the /admin/content page.

Note: because of the way core deals with node access (for performance reasons), this module may not take into account some node access modules which change the update access without updating the node access registry.

Categories: Drupal

Acquia Developer Center Blog: Building Usable Conversations: The Story of Ask GeorgiaGov

Planet Drupal - 28 February 2019 - 9:13am

In this final installment of our series on conversational usability, we dig into a case study that brings together all of the ideas and best practices we have discussed so far: the Ask GeorgiaGov skill built by the Acquia Labs team for Digital Services Georgia.

Tags: acquia drupal planet
Categories: Drupal

Jeff Geerling's Blog: The 2019 Drupal Local Development Survey

Planet Drupal - 28 February 2019 - 7:58am

It's that time of year again! Leading up to DrupalCon Seattle, Chris Urban and I are working on a presentation on Local Development environments for Drupal, and we have just opened up the 2019 Drupal Local Development Survey.


Local development environment usage results from 2018's survey.

If you do any Drupal development work, no matter how much or how little, we would love to hear from you. This survey is not attached to any Drupal organization, it is simply a community survey to help highlight some of the most widely-used tools that Drupalists use for their projects.

Take the 2019 Drupal Local Development Survey

Categories: Drupal

Lessons From Improv - by Gregory Pellechi

Gamasutra.com Blogs - 28 February 2019 - 6:52am
Improv provides a lot of lessons for writing, creativity, team work, and even your own tabletop campaigns. But if you don't have time to take lessons, then here's a look at what you can apply to your own game writing and design.
Categories: Game Theory & Design

Drupal core announcements: Drupal 8.7.0 will be released May 1; alpha begins week of March 11

Planet Drupal - 28 February 2019 - 6:48am
Drupal 8.7.0-alpha1 will be released the week of March 11

In preparation for the minor release, Drupal 8.7.x will enter the alpha phase the week of March 11, 2019. Core developers should plan to complete changes that are only allowed in minor releases prior to the alpha release. The 8.7.0-alpha1 deadline for most core patches is March 8. (More information on alpha and beta releases.)

  • Developers and site owners can begin testing the alpha after its release.

  • The 8.8.x branch of core will be created, and future feature and API additions will be targeted against that branch instead of 8.7.x. All outstanding issues filed against 8.7.x will be automatically migrated to 8.8.

  • All issues filed against 8.6.x will then be migrated to 8.7.x, and subsequent bug reports should be targeted against the 8.7.x branch.

  • During the alpha phase, core issues will be committed according to the following policy:

    1. Most issues that are allowed for patch releases will be committed to 8.7.x and 8.8.x.
    2. Most issues that are only allowed in minor releases will be committed to 8.8.x only. A few strategic issues may be backported to 8.7.x, but only at committer discretion after the issue is fixed in 8.8.x (so leave them set to 8.8.x unless you are a committer), and only up until the beta deadline.
Drupal 8.7.0-beta1 will be released the week of March 25

Roughly two weeks after the alpha release, the first beta release will be created. All the restrictions of the alpha release apply to beta releases as well. The release of the first beta is a firm deadline for all feature and API additions. Even if an issue is pending in the Reviewed & Tested by the Community (RTBC) queue when the commit freeze for the beta begins, it will be committed to the next minor release only.

The release candidate phase will begin the week of April 15, and we will post further details at that time. See the summarized key dates in the release cycle, allowed changes during the Drupal 8 release cycle, and Drupal 8 backwards compatibility and internal API policy for more information.

Bugfixes and security support of Drupal 8.5.x and 8.6.x

Since September 2018, we have been providing security coverage for the previous minor release as well as the newest minor release.

So, in accordance with our policy, security releases for Drupal 8.6.x will be made available until December 4, 2019 when Drupal 8.8.0 is released. Bugfixes that are not security-related will only be committed until Drupal 8.6.x's final bugfix window on April 3.

Normal bugfix support for Drupal 8.5.x ended in August 2016. However security support is provided for 8.5.x until the release of Drupal 8.7.0 on May 1, 2019.

Categories: Drupal

Historians discuss Far Cry 2 - by Bob Whitaker

Gamasutra.com Blogs - 28 February 2019 - 6:46am
Historians Bob Whitaker and Charlie Thomas discuss Far Cry 2. Topics include the game's setting, postcolonial wars in Africa, Cold War ideologies, the African environment and diseases, and displaced populations.
Categories: Game Theory & Design

How blockchain can (and will) influence game design - by Daniel Berube

Gamasutra.com Blogs - 28 February 2019 - 6:45am
This post talks about how the blockchain technology can and will influence game design in the next upcoming decade. It detailed the origin of blockchain technology and use simple examples to explain it.
Categories: Game Theory & Design

Commerce Shipping Paczkomaty

New Drupal Modules - 28 February 2019 - 2:45am

The module allows a buyer to choose the point of receipt of the order using Paczkomaty service of inpost.pl.

Setup

1. Install the module.

2. Edit your shipment type (Commerce->Configure->Shipment->Shipment types) and enable the 'Paczkomaty' trait

3. Edit 'Shipping' order checkout flow (Commerce->Configure->Order->Checkout flows) and drag "Wybierz Paczkomat" checkout pane below "Shipping Information". Configure it choosing a previously created Paczkomat shipping method.

Categories: Drupal

OpenSense Labs: Is BackDrop CMS - the fork of Drupal 7 - a viable alternative to Drupal 8?

Planet Drupal - 28 February 2019 - 2:11am
Is BackDrop CMS - the fork of Drupal 7 - a viable alternative to Drupal 8? Jayati Thu, 02/28/2019 - 15:41

Change is the only constant. That’s the lesson we need to adopt when it comes to embracing Drupal 8 and migrating from Drupal 7. Since the launch of Drupal 8 in 2015, many new challenges have emerged among developers and one of them includes forking Drupal.


Quoting Dries' opinion on embracing change:

“The reason Drupal has been successful is because we always made big, forward-looking changes. It’s a cliché, but change has always been the only constant in Drupal. The result is that Drupal has stayed relevant, unlike nearly every other Open Source CMS over the years. The biggest risk for our project is that we don't embrace change.” What is Backdrop CMS?

Backdrop is a Content Management System (CMS) which can be put to use when designing a wide variety of websites from a single administrator's personal blog site to an intricate, multi-role business e-commerce site. It is the perfect fit for comprehensive non-profit, educational, corporate, or government websites.

Being a tool for structuring websites, the core Backdrop CMS package aims to include many useful features, but only those that are necessary for the majority of sites using it. Backdrop can be extended with the addition of modules, themes, and layouts which are easy in nature.

In a way, it allows non-technical users to manage a wide variety of content. It is feature-compatible with Drupal 8 (containing things like Configuration Management Initiative(CMI), WYSIWYG & Views in core), but is built on APIs more similar to those found in Drupal 7.

Evolution of Backdrop CMS

Backdrop CMS started its existence as an offshoot of Drupal. Although Backdrop originates from a common codebase with Drupal, its philosophy and organisation are distinct. Backdrop follows a policy of concentrated releases that account feedback from the community. 

Essentially, for the small to medium sized businesses, non-profits, educational institutions, or any other organisations, who are in need of a comprehensive website on a budget, Backdrop CMS is easy to build and extend. 

Advantages of Backdrop CMS

Both, Backdrop and Drupal projects have different end goals, but emerging from the same original code base, there are areas in which collaboration can benefit both projects. 

  • Along with easier updates, Backdrop is backwards compatible. Backdrop attempts to keep API change to a minimum in order for contributed code to be maintained easily, and for existing sites to be updated affordably.
  • Being simple in its structure, backdrop lets you write code for the majority. It aims to be easy to learn and build upon, even for those with a minimal amount of technical knowledge. Direct implementations are chosen over abstraction, and how things work can be immediately clear and easily documentable.
  • The focus is to include features for the majority. Backdrop core only includes features and tools that benefit the majority of sites that are running it. Also, Backdrop aims to include opinions from individuals who attend trainings, meetups, and camps as well as real-world engagements with consumers.
  • Backdrop can be extended. Backdrop aims to provide a powerful core that can be readily extended through custom or publicly available contributed modules. These additional modules provide desired features that are not incorporated in core due to their complexity or use cases that are too specific.
  • Rendering great performance, Backdrop has low system requirements. Backdrop runs on affordable hosting with very basic requirements. This means not chasing popular trends in technology, but instead adopting common, proven, and learnable systems.
  • Backdrop lets you plan and schedule releases. Each release contains a planned set of features, and is released on time. If a feature is not ready in time for a specific release, the feature gets postponed, but the release is delivered on time. 
  • It gives the freedom to remain free and open source. All codes included with Backdrop are under an Open Source license that allows anyone to use it for free, regardless of their beliefs or intentions.
Why fork Drupal?

There are lots of reasons why Drupal was forked to create Backdrop. These are the most notable ones:

Technical Gap

Though many features in Drupal 8 are identical to those in Drupal 7, the code underneath has little to share resemblance with the Drupal of yesteryear. Developers value maintaining the code that has a proven success rate rather than drifting from the track record of the success.

Coding Principles

The Backdrop community may vary from the Drupal community on some issues that they regard higher, and vice versa. As the principles diverge, so does the code. This justifies the existence of Backdrop.

Niche Audience

Backdrop CMS is dedicatedly targeted at small to medium-sized businesses, non-profits, and education. It best serves the kinds of organisations that need complex functionality, but on a budget.

Source: QuoraCase Studies

The NorCal Hunter Jumper Association is a not-for-profit recreational sports organization that was looking for a better viewing website experience for the membership, mainly on tablets and mobile devices. The new site also needed to be easy for the board and administrators to update and manage. Further, they planned to move board membership nominations, voting, general surveys, and other forms onto the website in the future, including forms that may need credit card processing. Thus, Backdrop was chosen as the medium to integrate all these requirements and following were the results:

  • A finer viewing experience for the members on tablets and mobile devices.
  • Easier updates and management for the board and administrators.
  • Flexible in adding features as the needs of the organization grows.
  • Easy to integrate with other web services.
  • Affordable maintenance and long-term development costs.


BGP Site Solutions is a group of business sites showcasing web publishing experience.

Founded in 2003, BGP Site Solutions has managed nearly 100 web properties with vast experience in performance-based online marketing (Cost per Lead, Cost per Acquisition, Cost per Click), white-hat organic search engine optimization, and web publishing in the marketing verticals of post-secondary education, home services, insurance (auto/health), wine, diet/weight loss/health, financial services, dating, and eldercare/senior services. 

On the other hand, formed in 2011, Authority Media is a leading publisher of career training web properties. The AM goal was to be the most authoritative source of information in each post-secondary education category in which they operate.  

These sites were formerly separate WordPress sites and were hacked multiple times. Thus, security of the website was the need of the hour. 

Since these are both fairly small sites, combining them into a single codebase site offered savings in terms of hosting and maintenance costs. And the multi-site feature offered by Backdrop CMS seemed like the perfect fit.


Final Thoughts

Drupal 8 is a huge departure from anything the Drupal community has released in the past and it’s a move towards the enterprise.

Backdrop is not about users but about developers facing challenges in adapting and investing their time to further improve the Drupal platform. That’s where Backdrop aims to fill the gap left and attempting to maintain connectivity and cohesiveness with the larger Drupal community.

Thus, both Drupal 8 and Backdrop are trying to address the problem, in fundamentally different ways.

Still confused? OpenSense Labs provides steadfast solutions and services to empower digital innovation for all enterprises.
Ping us at hello@opensenselabs.com and let us know how we can help you achieve your digital goals.

blog banner blog image Drupal 8 Backdrop CMS Blog Type Articles Is it a good read ? On
Categories: Drupal

Entity Route Context

New Drupal Modules - 28 February 2019 - 1:58am

This project provides a service and context to determine if the current route match is owned by a particular entity type, by way of link templates.

A context is also provided for plugins and other to consume. For example you may want to create a block, or DsField, that relies on a particular entity from the route. It operates similar to the node.node_route_context context, but in an entity type agnostic way. Entity type specific contexts are also available in case a plugin is designed to take any entity type, but as a site builder you may choose for it to respond to a particular entity type.

Categories: Drupal

NotifyVisitors - A/B testing : Optimize Conversion Rate

New Drupal Modules - 27 February 2019 - 11:37pm

NotifyVisitors : Cross Device Customer Engagement software. Show Surveys, Feedback Forms , Lead Capture forms, lightbox style notifications.

A/B testing : Website optimization software - Optimize website , enhance user experience and Boost conversion rate through AB testing, Split URL testing, Multivariate testing

Features

Categories: Drupal

Freelock : Ask Freelock: "Traditional hosts" vs "cloud providers"

Planet Drupal - 27 February 2019 - 10:57pm
Ask Freelock: "Traditional hosts" vs "cloud providers" John Locke Wed, 02/27/2019 - 23:57

A client asks about yet another hosting option:

The VPS-2000HA-S includes the following resources:

6GB RAM (burstable)

150GB SSD Disk space

5TB Monthly Bandwidth

4 free dedicated IP's

options to configure the server for particular versions of PHP

2 hours of Launch Assist to help migrate and configure the server with the Managed Hosting team (one on one Tier 3 support)

... what do you think?

Backup DevOps Drupal Drupal Planet Hosting Risk Security WordPress
Categories: Drupal

Last Call Media: 2019 Drupal Community DevOps Survey

Planet Drupal - 27 February 2019 - 3:59pm
2019 Drupal Community DevOps Survey alexandra Wed, 02/27/2019 - 18:59

Our company is hosting a 2019 Drupal Community DevOps Survey to determine the community’s use of DevOps currently and tracking progress over time. We’re excited to utilize these results in our presentations this year, especially at DrupalCon Seattle this April!

Categories: Drupal

Translators

New Drupal Modules - 27 February 2019 - 1:52pm

Facilitate for translators at your site by providing all users a Language Combination field where they can register their translation skills. Then you can configure different features such as:

Categories: Drupal

Pages

Subscribe to As If Productions aggregator