Uber will "Amazon der Beförderung" werden

heise online Newsticker - 2. Juni 2018 - 7:00
Ehrgeizige Pläne verfolgt der Fahrdienstvermittler Uber: Er will künftig zum größten Player bei der Personenbeförderung und beim Warentransport werden.

Mobilefish.de: Import translations on profile or module installation

Planet Drupal - 1. Juni 2018 - 23:11
Import translations on profile or module installation Peter Majmesku Fri, 06/01/2018 - 23:11

Let's say you have a custom module and you want to attach translation files to it. You want to import the translation files after installation or after you have updated the .po translation files. Also make sure that the Interface Translation (locale) core module is installed.

Use a folder named translations inside the module where the language files like de.po or fr.po can be found. To load the translations you have to insert the following lines into your example_module.info.yml:

'interface translation project': example_module
'interface translation server pattern': modules/custom/example_module/translations/%language.po

Note: more details about the interface translation properties can be found here.

To update your translations use the following Drush commands:

drush locale-check && drush locale-update && drush cr

To update existent translations you should take a look at the settings page (/admin/config/regional/translate/settings). You can use local translation files only or overwrite any existing translation.

Tags Add new comment

Drupal Commerce: A May Full of Drupal Commerce Releases

Planet Drupal - 1. Juni 2018 - 22:36

May was one of our most productive months to date. It was full of releases for the core Commerce modules, our standalone PHP libraries, and essential contributed modules that all work together to comprise Drupal Commerce. While I outlined the highlights in the roadmap issue on drupal.org, these wins are worth sharing more broadly to keep the rest of the Drupal community in the loop.

The biggest release of the month was Drupal Commerce 2.7, which included new features for currency formatting, address form configuration, and stored payment methods. It also fixed a handful of bugs that unblocked other module releases and updated core in response to improvements in our libraries and dependent modules.

We've long discussed how our standalone PHP libraries are exporting expertise off the Drupal island. Addressing and Internationalization, which have each been downloaded over one million times, are our two shining stars. We rolled new releases for each of them in May, improving even further Drupal Commerce's ability to solve the hardest parts of address entry / validation / formatting and currency localization. Refer to the price formatting change record from the 2.7 release to see how the new API is more flexible and performant as a result.

Additionally, we released Address 1.4 and Inline Entity Form 1.0 RC1. The latest Address release unlocks the customer profile’s address field to support collecting less detailed billing addresses. The Inline Entity Form release includes new product information management features, letting you duplicate product variations for faster product data entry.

Thanks to generous sponsorship from Authorize.Net themselves, we've been able to dedicate several weeks to improving their integration this year. The resulting Authorize.Net RC1 release now supports eCheck, Visa Checkout, and 3DSecure payments! We also included several bug fixes related to duplicate customer and payment profiles that appear when migrating from an old system to Drupal Commerce, for example.

While not fully released yet, our Technology Partner integration for Avalara's AvaTax is nearing beta. Jace Bennest from Acro Media contributed heavily by refactoring the module to properly use a TaxType plugin while my co-maintainer Matt Glaman contributed additional fixes to our port from the Drupal 7 integration to prepare it for certification. Thanks, Jace / Acro Media!

When Matt wasn't working on the above contribs, he was collaborating with Lisa Streeter from Commerce Guys to bring Commerce Reports to its first beta release for Drupal 8. The new version takes a completely different approach from the Drupal 7 using lessons we learned developing Lean Commerce Reports. It denormalizes transaction data when an order is placed to support reports generation with or without the Views module, providing a better developer experience and much better performance. Check it out below! (Click to expand.)

We've also been hard at work improving the evaluator experience. The big release for that is Commerce Demo's beta1, which showcases what Drupal Commerce provides out of the box. It creates products and scaffolds out a full product catalog (pictured below). To get the full effect, try it out with our default store theme, Belgrade. The new demo module gets us closer to something like we had with Kickstart 2.x on Drupal 7 - a learning resource for site builders and a way for agencies to more easily demo and sell Drupal Commerce.

Finally, I'm very excited to announce that Lisa Streeter is our new documentation lead! Expect some great things to come. She has already done fantastic work with the Commerce Recurring documentation and is working on revising our getting started, installation, and update docs.

Looking at June, we plan on finalizing the query level entity access API, which will allow us to better support marketplace and multi-store Drupal Commerce implementations. We expect to merge user registration after checkout completion, and we will also be focusing on address reuse / copying, Buy One Get One promotion offers, and more product management experience enhancements.

Ashday's Digital Ecosystem and Development Tips: eSignatures with HelloSign and Drupal 8

Planet Drupal - 1. Juni 2018 - 21:00

Previously, I wrote a bit about the HelloSign eSignature platform and how it can be integrated into a Drupal 7 website. As promised, a Drupal 8 version of the integration is now available and ready for use on cutting-edge websites everywhere. But this new version is much more than a one-to-one upgrade of the original module— we've leveraged some of Drupal 8's great new features to make using HelloSign with your site even easier than it was before. Here are just some of the highlights of the new release:

Valve verbannt Amoklauf-Spiel Active Shooter von Steam

heise online Newsticker - 1. Juni 2018 - 17:30
Ein Shooter, der einen Amoklauf an einer Schule simulieren kann, hat auf Steam nichts zu suchen, sagt Valve und schmeißt Active Shooter aus der Spiele-Plattform.

Sicherheitsupdate: Vorsicht vor dem Klonen von vergifteten Git-Repositorys

heise online Newsticker - 1. Juni 2018 - 17:00
Die Git-Entwickler haben eine neue Version veröffentlicht, in der sie zwei Sicherheitslücken geschlossen haben.

Nachrichten in iCloud: Apple speichert Schlüssel im iCloud-Backup

heise online Newsticker - 1. Juni 2018 - 16:30
Wer sicher gehen will, dass niemand Zugriff auf die Ende-zu-Ende-verschlüsselten iMessages hat, sollte das iCloud-Backup abdrehen. Darin ist der notwendige Key enthalten, wie Apple nun verriet.

Start-up will Online-Nachlass regeln

heise online Newsticker - 1. Juni 2018 - 16:30
Die US-Firma Back Up Your Life stellt sicher, dass nach dem Tod der digitale Nachlass erhalten bleibt. Und bestellt Dienste ab, die der Verstorbene nicht mehr benötigt.

IEEE 802.3bz: Höhere Geschwindigkeit trotz alter Kupferkabel

heise online Newsticker - 1. Juni 2018 - 16:00
IEEE 802.3bz verspricht Übertragungsraten von 2,5 oder 5 GBit/s ohne einen Austausch der alten Kupferkabel. Die aktuelle iX erklärt den Standard und stellt Switches für seinen Einsatz vor.

Virtual Reality und Video-Spiele: Wie ein Altenheim digital wird

heise online Newsticker - 1. Juni 2018 - 16:00
Virtual Reality und Video-Spiele ermöglichen das Eintauchen in andere Welten. Im Altenheim sollen die Techniken eingesetzt werden, um Senioren geistig fit zu halten.

Kaspersky bleibt tabu für US-Behörden

heise online Newsticker - 1. Juni 2018 - 15:00
US-Behörden dürfen weiterhin keine Produkte oder Dienstleistungen des russischen Kaspersky Lab beziehen. Mit einem Streich hat ein US-Gericht eine Klage der Firma abgewiesen, eine zweite Klage zurückgewiesen.

SLES-Workshop: Noch Plätze frei

heise online Newsticker - 1. Juni 2018 - 14:30
Wer noch mit Version 11 des SUSE Linux Enterprise Servers arbeitet, kann sich in einem Crash-Kurs am 20. und 21. Juni in Nürnberg auf den Umstieg auf die aktuelle Version 12 vorbereiten.

Gerichtsurteil: BND darf weiterhin Internet-Knoten De-CIX anzapfen

heise online Newsticker - 1. Juni 2018 - 14:30
Der Bundesnachrichtendienst kann weiterhin am Internet-Knoten De-CIX anlasslos Daten abgreifen, urteilt das Bundesverwaltungsgericht in Leipzig.

ComputerMinds.co.uk: Rebranding ComputerMinds - Part 5: Development

Planet Drupal - 1. Juni 2018 - 14:01

Let's have a quick look through our development process on this project and pick out some of the more interesting bits. As briefly mentioned in the last article we are using a composer set up and all code is version controlled using git on github. All pretty standard stuff.


In the previous article I briefly discussed how we set up Pattern Lab. Before getting stuck in to the components that would make up the pages of the site, we first needed to set up some global variables and grid. Variables allow us to reuse common values throughout the SCSS and if we need to make a change we can do so centrally. After adding variables for each of the colours and also a colour palette mapping which would allow to loop through all colours if we needed to throughout the project, we added variables for padding that would be used throughout and also font styles, after importing from Google Fonts.


CSS Grid

Although still relatively new, CSS Grid is a web standard and works in all modern browsers. So much simpler than using grid libraries like Susy we were keen to start using it on our projects and this was the perfect one on which to try it out. Set up was simple, partly due to the simple grid in the designs but mostly due to the simplicity of CSS Grid itself. A few lines of SCSS and the grid wrapper was set up:

.grid { display: grid; grid-auto-rows: auto; grid-gap: 20px; grid-column-gap: 20px; grid-template-rows: minmax(0, auto); }

This declares the grid, sets a consistent gap of 20px and sets a broad size range for the rows. As well as adding the .grid class to the wrapper of where we'd like a grid, we also need to add another class to define how many columns that grid should have. Defining, in SCSS, a simple mapping allowed me to create a loop to generate the column classes we needed:

// Column mapping $columns: ( one: 1, two: 2, three: 3, four: 4, five: 5, six: 6, ); // Generate column classes @each $alpha, $numeric in $columns { .grid--columns-#{$numeric} { grid-template-columns: repeat(#{$numeric}, 1fr); @include to-large { grid-template-columns: repeat(1, 1fr); } } }

This loop generates a class for each of the potential number of columns we might need. The last @include in the above code simply resets the column definition, making all columns full width on smaller screens. Now, all we needed to do was add 2 classes and we'd have a grid!

Occasionally, we'd have a need for grid items to to span more than one column. Using the same mapping as before, I created a simple loop that would generate classes to define different column spans. These classes could then be applied to the immediate children of the grid wrapper.

.grid__item { @include from-large { @each $alpha, $numeric in $columns { &--span-#{$alpha} { grid-column: auto / span #{$numeric}; } } } }

Now we have complete control over our grid. Here's a example of how it's used.

First item Second item spanning two columns Third item spanning three columns


Pattern Lab

In the previous article I mentioned the setup of Pattern Lab and Emulsify but didn't look in to the actual development, so let's do that now! Although we're used to coding SCSS in a modular way here at CM, with Pattern Lab's stand alone components essentially working like modules we actually don't need to take too much care to produce nice clean code. Each SCSS file is only catering for a small component on the page and as such is usually small and specific.

But, as well as including our pattern specific code within each component's directory we needed to ensure that we also considered working in a SMACSSy way to reduce the CSS we were generating. We didn't want multiple classes applying the same styling, so any rules that would be reused and consistent, like padding, were placed inside the Base folder in a Base SCSS file.

Of course, once we had defined our classes we needed to get them in to the Pattern Lab Twig templates. As components will have variations we can't just hard code the classes in to the templates, we need to pass them in as variables. Passing variables to Twig files is super simple and with Emulsify 2.x there's now even Drupal Attributes support with the addition of the BEM Twig extension. As we are likely wanting to pass multiple classes to the same element we can pass in a simple array of modifiers and render it out in the Twig template. So in a Drupal preprocess we can prepare some modifiers (we'll look at passing these on to the Pattern Lab Twig files later):

$variables['heading_modifiers'] = ['centered', 'no-space'];

And then in our Twig file we pass this through the BEM function:

{% set heading_base_class = heading_base_class|default('h' ~ heading_level) %} {{ heading }}

Which renders the markup as:




The beauty of using Pattern Lab is the ability to work simultaneously on frontend and backend development. Before bringing more hands on deck I was able to begin the backend of the site before getting even close to completing the frontend. As mentioned earlier, the codebase was set up before the Front End work began so we could jump straight in to the Emulsify theme. Using composer allowed us to quickly get Drupal 8 and a bunch of contrib modules we needed so when we were ready to start on the backend we could jump straight in.

This site required nothing too complex in terms of backend development and the work was more a task of building content types and views to display content as per the designs. That said, we did utilise the Paragraphs module allowing us to create reusable entities, or tiles as we're used to calling them, as they are used extensively throughout the designs.



Something that hasn't been standard in our Drupal 8 builds since the release is configuration. Gone are the days of bundling settings in to features, Drupal 8 Core comes with configuration management tools. In the early days, one of our senior developers created cm_config_tools - a module to give developers precise control over what config to export. Drupal 8 has progressed since then and the timing of this project allowed us to use a new module, Configuration Split.

Configuration Split builds on Drupal Core's configuration management ability to export a whole set of a site's configuration by allowing us to define sets of configuration to be exported to separate directories. It's then possible to define in settings.php which directories to include when importing/exporting. As we were committing settings.php to git we could include the main config directory here and then have a local.settings.php (not committed to git) to define the database and any other config directories to include:

## Enable config split settings $config['config_split.config_split.local_dev']['status'] = TRUE; $config['config_split.config_split.local_overrides']['status'] = TRUE;

This means we can have configuration solely for use when developing (things like Devel and Field_UI). It's also possible to override settings that are included in the main config export, locally. This allows us to run local environments without fear of interfering with live functionality, like affecting comments by changing the Disqus Domain, for example.

Importing and exporting works the same way as Core's configuration management, by using Drush commands:

Drush cim Drush cex



In a normal Drupal project, the markup (Twig files) would be within Drupal's templating system with prepared variables being rendered out where they were needed to be. With our component based Pattern Lab, all of our markup was within the Patten Lab structure, away from Drupal's /templates directory. Fortunately, including them is simple enough. First we needed to download and install the Components Libraries module. This allowed us to specify a different directory for our Twig files and also register Twig namespaces for those files. We do this in the theme's .info file:

component-libraries: base: paths: - components/_patterns/00-base atoms: paths: - components/_patterns/01-atoms molecules: paths: - components/_patterns/02-molecules organisms: paths: - components/_patterns/03-organisms templates: paths: - components/_patterns/04-templates pages: paths: - components/_patterns/05-pages

Now our Pattern Lab Twig files were included, we could begin to link them up to Drupal's templating system. Linking them is as simple as choosing which components you want to display and then calling that Twig file from your Drupal template. When you call the component's Twig file you just need to pass in the variables from Drupal.

So if we wanted to display a page title as an H1, within page-title.html.twig inside Drupal's template directory we would call our Pattern Lab's heading component passing in the title and heading level:

{{ title_prefix }} {% if title %} {% include "@atoms/02-text/00-headings/_heading.twig" with { "heading": title, "heading_level": 1, } %} {% endif %} {{ title_suffix }}

If we wanted to change the style of the heading we could pass in an array of modifiers, as shown in the example further up the page, too. For more complex page components we can also pass in an array to be looped over inside the component's Twig file. For example, if we wanted a listing of cards we could pass an array to a listing component Twig template and within that loop through the array each time calling another component's Twig template:

{% for item in content_array %} {% include "@molecules/card/01-card.twig" with { "card_img_src": item.image, "card_title": item.title, "card_body": item.body, "card_button_content": item.button_text, "card_button_url": item.button_url, "card_button_modifiers": item.button_mods, "card_url": item.url, "card_img_alt": item.image_alt, } %} {% endfor %}

This is just a brief overview and a look at some interesting parts, there was obviously a lot more work that went in to the site build! Now, as this website was being built to replace our old site, we needed the content from old site to be moved over. In the next article Christian is going to talk through this process.

Dark Souls Remastered angespielt: Vermurkste Neuauflage

heise online Newsticker - 1. Juni 2018 - 14:00
Mit Dark Souls:Remastered will Publisher Bandai Namco alte und neue Fans wieder in das geheimnisvolle Anor Londo schicken. Herausgekommen ist aber nur ein liebloser HD-Patch, den man auch kostenlos liefern könnte.

CrowPi, Programmierkurse für Kinder und AI Edge – neue Projekte auf Kickstarter

heise online Newsticker - 1. Juni 2018 - 14:00
Ob es ums Programmieren lernen geht oder den Einstieg in KI-Projekte: Kickstarter hält wieder Kampagnen für risikofreudige Technikfans bereit.

Third & Grove: A Year Later and Drupal Commerce is Still in Existential Crisis

Planet Drupal - 1. Juni 2018 - 14:00
A Year Later and Drupal Commerce is Still in Existential Crisis justin Fri, 06/01/2018 - 08:00

Microsoft überholt Google-Holding Alphabet beim Börsenwert

heise online Newsticker - 1. Juni 2018 - 13:30
Bei der Marktkapitalisierung überrundete Microsoft nun die Google-Dachholding Alphabet und wird drittwertvollstes Unternehmen an der Börse.

Abgasnormen im Überblick

heise online Newsticker - 1. Juni 2018 - 13:30
Das Thema interessiert die Käufer, doch leicht zu durchschauen ist es nicht: Welche Abgasnorm gilt ab wann? Worauf müssen Neuwagenkäufer jetzt achten?

Angetestet: Früher jubeln beim TV-Streaming der Fußball-WM

heise online Newsticker - 1. Juni 2018 - 13:00
Jubeln die Nachbarn früher, wird jedes Elfmeterschießen zur Qual. Am längsten dauert die TV-Übertragung bisher beim Streamen. Waipu.tv verspricht zur WM nun extrem kurze Latenzen – ein erster Test.