Noch ein Klassiker: HMD legt das Nokia 8110 neu auf

heise online Newsticker - 27. Februar 2018 - 8:00
Der ikonische gebogene Slider ist wieder da: Das Nokia 8110 soll für Furore sorgen, obwohl es nur ein einfaches Handy ohne Smart-Funktionen ist. Im vergangenen Jahr ist Hersteller HMD Global das mit dem Nokia-Klassiker 3310 gelungen.

Huawei MediaPad M5: Android-Tablets mit Stift als iPad-Pro-Konkurrenten

heise online Newsticker - 27. Februar 2018 - 8:00
Mit Stiftunterstützung, vier Lautsprechern und 10,8-Zoll-Display will es das Huawei MediaPad M5 10 Pro mit den Tablet-Flaggschiffen von Apple und Samsung aufnehmen. Auch eine kleinere 8-Zoll-Variante der Android-Tablets wird es geben – ohne Stift.

Domain Pulse: Registries sperren proaktiv und hoffen auf weitere Haftungsfreiheit

heise online Newsticker - 27. Februar 2018 - 8:00
Der Ton in Bezug auf die Filterung von illegalen oder mutmasslich illegalen Inhalten im Netz wird schärfer. Manche Registries für nationale Top Level Domains bemühen sich schon jetzt „proaktiv“ um Schadensbegrenzung.

LG V30S: Smartphone mit mehr Speicher und kleinen Software-Verbesserungen

heise online Newsticker - 27. Februar 2018 - 8:00
Das neue Spitzen-Smartphone von LG kommt mit weitgend gleicher Hardware wie der Vorgänger. Stattdessen preist LG einige kleinere Fortschritte an der Software als KI-getrieben an.

OSTraining: How to Create Responsive Off-canvas Menu in Drupal 8

Planet Drupal - 27. Februar 2018 - 7:17

An off-canvas menu is the best way to offer a pleasant experience to those visiting your site from mobile devices. It is rapidly becoming a standard for any website.

In this tutorial, you will learn how to create and configure an off-canvas menu with the "Responsive and off canvas menu" Drupal 8 module.

Ermittlungen gegen Top-Manager aus VW-Motorentwicklung

heise online Newsticker - 27. Februar 2018 - 7:00
Die Staatsanwaltschaft ermittelt im Rahmen des Dieselskandals gegen einen weiteren Manager von Volkswagen.

Oliver Davies: Queuing Private Messages in Drupal 8

Planet Drupal - 27. Februar 2018 - 2:00
Queuing a Message

The module provices a PrivateMessageQueuer service (private_message_queue.queuer) which queues the items via the queue() method.

The method accepts an array of User objects as the messsage recipients, the message body text and another user as the message owner. (I’m currently considering whether to make the owner optional, and default to the current user if one is not specified)

Here is an example:

$recipients = $this->getRecipients(); // An array of User objects. $message = 'Some message text'; $owner = \Drupal::currentUser(); $queuer = \Drupal::service('private_message_queue.queuer'); $queuer->queue($recipients, $message, $owner);

These three pieces of data are then saved as part of the queued item. You can see these by checking the "queue" table in the database or by running drush queue-list.

$ drush queue-list Queue Items Class private_message_queue 19 Drupal\Core\Queue\DatabaseQueue Processing the Queue

The module also provides a PrivateMessageQueue queue worker, which processes the queued items. For each item, it creates a new private message setting the owner and the message body.

It uses the PrivateMessageThread class from the Private Message module to find for an existing thread for the specified recipients, or creates a new thread if one isn't found. The new message is then added to the thread.

The queue is processed on each cron run, so I recommend adding a module like Ultimate Cron so that you can process the queued items frequently (e.g. every 15 minutes) and run the heavier tasks like checking for updates etc less frequently (e.g. once a day).

You can also process the queue manually with Drush using the drush queue-run <queue-name> command - e.g. drush queue-run private_message_queue.

$ drush queue-run private_message_queue Processed 19 items from the private_message_queue queue in 3.34 sec.

Tandem's Drupal Blog: Migrating to a Drupal 8 Date Range

Planet Drupal - 27. Februar 2018 - 2:00
February 27, 2018 Migrating a date range to Drupal 8 is a lot easier now than it was a year ago. Below I will show you how to transform the data to get the date ranges to migrate to Drupal 8 properly. The Situation before us Right now we are using the Migrate Source CSV module to handle the migration. In the CSV that we used, dates were export...

Niedersachsen will Windenergie weiter ausbauen

heise online Newsticker - 27. Februar 2018 - 1:15
Umweltschützer kritisieren die negativen Folgen von Windenergieanlagen und Überschussproduktion. Die Landesregierung von Niedersachsen will den Bereich aber trotzdem massiv forcieren.

Evolving Web: Install a Specific Version of PHP or Drush on Acquia Dev Desktop

Planet Drupal - 26. Februar 2018 - 22:20

While working on a project with Acquia Dev Desktop (ADD), we needed to run a specific version of PHP which is not included with ADD by default. We started hacking ADD and came up with our own solution. For those in a hurry, you can go directly to the solution.

The Problem

While working for one of our clients, we had to work with some tools which were a part of their workflow. Their websites were hosted on Acquia Cloud so they were using Acquia Dev Desktop (ADD) - Acquia's development stack and cloud client. This tool allows developers to "run and develop Drupal sites locally and to optionally sync them with Acquia Cloud".

At the time of writing this post ADD is was version 2.1 and it supported only up to PHP 7.0.14. At first, we thought it was good enough. But soon we discovered that the cloud servers were running more cutting-edge versions such as PHP 7.1.8. 

The first issue came when we had to update our Composer packages. Running composer from different environments running different versions of PHP may result in each environment downloading a different version of the same package. A workaround is to always have the same environment run the composer update. However, we needed to ensure that the environment with the oldest version of PHP was able to run all the updated libraries. For example, the latest doctrine/common libraries require PHP ~7.1, so using ADD 2 with PHP 7.0.14 we couldn't run it.

Another issue arose when we decided to update to Drupal 8.4.x. According to an issue on drupal.org, Drupal 8.4.x requires Drush 8.1.12+, but ADD 2 ships with Drush 8.1.10.

Facing such issues, we asked Google, "how to add a version of PHP to Acquia Dev Desktop?" No good results came up so we decided to start hacking ADD and ultimately found a solution.

Adding a specific version of PHP to Acquia Dev Desktop

Our solution worked on a Mac, but we believe it should work somewhat similarly on Windows.

Step 1: Install the required version of PHP

Install the desired PHP version with Brew, in our situation it was PHP 7.1.8_20:

$ brew install homebrew/php/php71Step 2: Copy PHP files into Acquia Dev Desktop

Stop ADD if it's running and copy the PHP files into the Acquia Dev Desktop directories:

$ cp -r /usr/local/Cellar/php71/7.1.8_20/ /Applications/DevDesktop​/php7_1 $ cp /usr/local/etc/php/7.1/php.ini /Applications/DevDesktop​​/php7_1/bin/php.ini

Note: We tried to create a symlink to prevent file duplication but it didn't work, so we ended simply copying the files into ADD, respecting its directories nomenclature and structure.

Step 3: Make Acquia Dev Desktop detect the new version of PHP

Edit /Applications/DevDesktop/Acquia Dev Desktop.app/Contents/MacOS/static.ini and after the last contiguous line under [php/4] add the following lines:

[php/5] id=php7_1 executablePath=php7_1/bin/php cgiExecutablePath=php7_1/bin/php-cgi configPath=/Applications/DevDesktop/php7_1/bin/php.ini

Note: If you are using Finder to navigate to the file, you may have to right click on the Acquia Dev Desktop application icon to see its content.

Step 4: Configure Acquia Dev Desktop

Open the ADD Preferences and select the Config tab. Now, in the Default PHP Version, select the one we just added. Make sure you select PHP mode Fast CGI and have PHP use the php.ini we previously copied into ADD in Step 2. Back in the ADD Preferences main window, in the left panel select the site you are working on, and then in Default PHP Version select the desired version. Then, click Ok and restart Apache.

Step 5: Configure Drush to use the same PHP version

To configure ADD's Drush to use the same PHP version, edit /Applications/DevDesktop/tools/drush and replace the following:

# Before [ -z "$PHP_ID" ] && PHP_ID=php5_5     # After export PHP_ID="php7_1"Step 6: Update Acquia Dev Desktop's version of Drush

To udpate Acquia Dev Desktop's Drush, edit /Applications/DevDesktop/tools/composer.json and make the following change:

// Before "drush/drush": "8.1.10" // After "drush/drush": "^8.1.12"

Note: Drupal 8.4.x requires Drush 8.1.12+.

Now, in the terminal, go to the same directory as composer.json and run this command to finish:

composer update --optimize-autoloader

Et voilà! We have just installed a custom version of PHP on Acquia Dev Desktop. Feel free to share your experiences in the comments below to help other fellow readers.

+ more awesome articles by Evolving Web

Evolving Web: Install a Specific Version of PHP on Acquia Dev Desktop

Planet Drupal - 26. Februar 2018 - 22:20

While working on a project with Acquia Dev Desktop (ADD), we needed to run a specific version of PHP which is not included with ADD by default. We started hacking ADD and came up with our own solution. For those in a hurry, you can go directly to the solution.

The Problem

While working for one of our clients, we had to work with some tools which were a part of their workflow. Their websites were hosted on Acquia Cloud so they were using Acquia Dev Desktop (ADD) - Acquia's development stack and cloud client. This tool allows developers to "run and develop Drupal sites locally and to optionally sync them with Acquia Cloud".

At the time of writing this post ADD is was version 2.1 and it supported only up to PHP 7.0.14. At first, we thought it was good enough. But soon we discovered that the cloud servers were running more cutting-edge versions such as PHP 7.1.8. 

The first issue came when we had to update our Composer packages. Running composer from different environments running different versions of PHP may result in each environment downloading a different version of the same package. A workaround is to always have the same environment run the composer update. However, we needed to ensure that the environment with the oldest version of PHP was able to run all the updated libraries. For example, the latest doctrine/common libraries require PHP ~7.1, so using ADD 2 with PHP 7.0.14 we couldn't run it.

Another issue arose when we decided to update to Drupal 8.4.x. According to an issue on drupal.org, Drupal 8.4.x requires Drush 8.1.12+, but ADD 2 ships with Drush 8.1.10.

Facing such issues, we asked Google, "how to add a version of PHP to Acquia Dev Desktop?" No good results came up so we decided to start hacking ADD and ultimately found a solution.

Adding a specific version of PHP to Acquia Dev Desktop

Our solution worked on a Mac, but we believe it should work somewhat similarly on Windows.

Step 1: Install the required version of PHP

Install the desired PHP version with Brew, in our situation it was PHP 7.1.8_20:

$ brew install homebrew/php/php71Step 2: Copy PHP files into Acquia Dev Desktop

Stop ADD if it's running and copy the PHP files into the Acquia Dev Desktop directories:

$ cp -r /usr/local/Cellar/php71/7.1.8_20/ /Applications/DevDesktop​/php7_1 $ cp /usr/local/etc/php/7.1/php.ini /Applications/DevDesktop​​/php7_1/bin/php.ini

Note: We tried to create a symlink to prevent file duplication but it didn't work, so we ended simply copying the files into ADD, respecting its directories nomenclature and structure.

Step 3: Make Acquia Dev Desktop detect the new version of PHP

Edit /Applications/DevDesktop/Acquia Dev Desktop.app/Contents/MacOS/static.ini and after the last contiguous line under [php/4] add the following lines:

[php/5] id=php7_1 executablePath=php7_1/bin/php cgiExecutablePath=php7_1/bin/php-cgi configPath=/Applications/DevDesktop/php7_1/bin/php.ini

Note: If you are using Finder to navigate to the file, you may have to right click on the Acquia Dev Desktop application icon to see its content.

Step 4: Configure Acquia Dev Desktop

Open the ADD Preferences and select the Config tab. Now, in the Default PHP Version, select the one we just added. Make sure you select PHP mode Fast CGI and have PHP use the php.ini we previously copied into ADD in Step 2. Back in the ADD Preferences main window, in the left panel select the site you are working on, and then in Default PHP Version select the desired version. Then, click Ok and restart Apache.

Step 5: Configure Drush to use the same PHP version

To configure ADD's Drush to use the same PHP version, edit /Applications/DevDesktop/tools/drush and replace the following:

# Before [ -z "$PHP_ID" ] && PHP_ID=php5_5     # After export PHP_ID="php7_1"Step 6: Update Acquia Dev Desktop's version of Drush

To udpate Acquia Dev Desktop's Drush, edit /Applications/DevDesktop/tools/composer.json and make the following change:

// Before "drush/drush": "8.1.10" // After "drush/drush": "^8.1.12"

Note: Drupal 8.4.x requires Drush 8.1.12+.

Now, in the terminal, go to the same directory as composer.json and run this command to finish:

composer update --optimize-autoloader

Et voilà! We have just installed a custom version of PHP on Acquia Dev Desktop. Feel free to share your experiences in the comments below to help other fellow readers.

+ more awesome articles by Evolving Web

Drupal.org blog: Drupal Association Technology Partner JetBrains offers free PhpStorm licenses for contributors

Planet Drupal - 26. Februar 2018 - 21:16

We are happy to announce today that JetBrains is continuing their support of the Drupal Association and the Drupal project in a new way:

  • JetBrains is offering any contributor on Drupal.org with more than 35 contribution credits in the past year a free PhpStorm license.

It has been part of JetBrains mission to give back to key contributors in the open source world, and we're grateful that they want to offer this opportunity as a benefit for Drupal.org contribution credits.

To receive the free PhpStorm Open Source license, please fill out this open source license request form. Be sure to include a link to your profile on Drupal.org, as it will be checked to ensure you meet the 35 contributions threshold. You can read more about PhpStorm and the Open Source support program by JetBrains.

Many thanks to JetBrains, we’re excited for their continued partnership.

Begrenzte Diesel-Fahrverbote geplant – Beeinflussung des Gerichts?

heise online Newsticker - 26. Februar 2018 - 20:00
Am Dienstag wollen die höchsten deutschen Verwaltungsrichter über die Zulässigkeit von Diesel-Fahrverboten entscheiden. Jetzt wird eine Initiative des Verkehrsministeriums bekannt, diese teils einzuführen.

Studie: Social-Media-Nutzung führt nicht generell zu schlechteren Schulnoten

heise online Newsticker - 26. Februar 2018 - 19:30
Wenn Schüler ihre Zeit auf Snapchat, Facebook & Co. vertreiben, ist nicht unbedingt deren schulischer Lernerfolg gefährdet. Es kommt auf die Art und Dauer der Nutzung an.

Konferenz: Einschnitte bei Whois-Datensammlungen bereiten Probleme

heise online Newsticker - 26. Februar 2018 - 19:00
Domainregistrare und Registries bereiten sich auf radikale Einschnitte bei der Sammlung von Whois-Daten vor. Strafverfolger und IP-Anwälte versuchen, das Ruder in letzter Minute doch noch herumzuwerfen.

Dropbox will 500 Millionen US-Dollar bei Börsengang erlösen

heise online Newsticker - 26. Februar 2018 - 19:00
Dropbox hat ambitionierte Börsenpläne. Trotz Millionenverlust im vergangenen Geschäftsjahr streben die Kalifornier eine Listung an der Technologie-Börse Nasdaq an.

Afrika: Smartphones verlieren Marktanteile im Mobil-Markt

heise online Newsticker - 26. Februar 2018 - 19:00
Der Marktanteil von Smartphones ist in Afrika rückläufig. Ein chinesischer Hersteller einfacherer Feature-Phones aber auch Smartphones verkaufte 2017 dort sogar mehr Handys als Samsung.

Dank Ryzen, Vega und Epyc geht es bei AMD aufwärts

heise online Newsticker - 26. Februar 2018 - 18:30
AMD ist 2017 nach fünf Verlustjahren erstmals wieder leicht in der Gewinnzone: Der Intel-Konkurrent feiert das stärkste Produktportfolio seit einem Jahrzehnt.