Drupal

GitLab API with Library

New Drupal Modules - 23 September 2019 - 8:11am
Categories: Drupal

CIDR

New Drupal Modules - 23 September 2019 - 7:41am

CIDR notation based auto login.

Categories: Drupal

wishdesk.com: Drupal 8 for content editors: new Claro admin theme is coming!

Planet Drupal - 23 September 2019 - 6:28am

The friendliness of Drupal 8 for content editors and website administrators grows every day. New handy features come thick and fast — updated Media Library interface, built-in drag-and-drop Layout Builder, media embed button in CKEditor, and so much more. 

Today, we are happy to announce another lucrative improvement — a new and modern administration theme Claro is supposed to come to D8.8 core! 

Why Drupal 8 needed a new administration theme

The idea of a new administration theme arrived as part of the Drupal team’s striving to make Drupal more competitive in everything. 

Categories: Drupal

PreviousNext: How to fix WebDriver HTTP error 400 Bad Content-Length

Planet Drupal - 22 September 2019 - 11:34pm

It's a Monday morning and you push your first bit of code for the week. Suddenly all your Javascript tests start failing with crazy errors you've never seen before! And it's not just happening on one project! This post will hopefully help you track down the fix to the Bad Message 400 errors plaguing WebDriver.

by Adam Bramley / 23 September 2019

Here at PreviousNext, we have automated processes to ensure our PHP images are updated on a weekly basis. On September 22nd 2019, that update included a version bump to the curl library from 7.65.1 to 7.66.0. This had a cascading effect which resulted in builds across all of our projects failing javascript tests running against selenium/standalone-chrome containers.

The errors looked something like this:

WebDriver\Exception\CurlExec: Webdriver http error: 400, payload :Bad Message 400reason: Bad Content-Length

We were able to compare an old version of the PHP image (from a week ago) and track down that version change in CURL. But why was that failing? We didn't want to just go about pinning curl back to the old version and dusting our hands off.

Let's dive into the void (stacktrace)

WebDriver\Exception\CurlExec: Webdriver http error: 400, payload :Bad Message 400reason: Bad Content-Length

/data/vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php:155
/data/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:132
/data/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:218
/data/vendor/instaclick/php-webdriver/lib/WebDriver/Container.php:224
/data/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:781
/data/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:769
/data/vendor/behat/mink/src/Element/NodeElement.php:153

When inspecting the code through the above trace, we found that the instaclick/php-webdriver library was responsible for issuing the actual cURL command and was throwing the exception.

Op to the Rescue

When looking through the recent commits of the library, Nick Schuch noticed a suspicious commit that sounded a bit fishy. Sure enough, manually applying those changes got all the tests green again!

But how do we fix it for good? That's where it gets a bit tricky due to some composer constraints (as per usual).

Unfortunately the instaclick/php-webdriver library's HEAD is quite far aHEAD of the latest stable release (1.4.5), and we aren't able to simply bump to dev in our composer file due to behat/mink-selenium2-driver (a Drupal core dev requirement) constraining us to 1.x.

The Fix

The easiest approach for now is to commit a patch locally to your repository and manually patch it until the maintainer releases a new stable release

First download a custom patch file I've prepared against 1.4.5:

wget https://gist.githubusercontent.com/acbramley/c2809699c4dbf1774a14d89722743395/raw/e2c1479a73e7e9faff200802671bf982b6f3ac56/gistfile1.txt -O instaclick-curl-fix.patch

Then patch the library (using cweagans/composer-patches) with the new patch file by adding the following to the patches key in your composer.json:

"instaclick/php-webdriver": { "fix cURL POST": "instaclick-curl-fix.patch" }

Then simply run composer update instaclick/php-webdriver

Tagged Drupal testing
Categories: Drupal

Facet API XML sitemap

New Drupal Modules - 22 September 2019 - 1:53pm

Walks through all your facets, collects the links and adds them to XML sitemap.
Can be run manually of configured to be executed with Cron.

Requirements

XML sitemap
Facet API

Categories: Drupal

Entity hierarchy field

New Drupal Modules - 22 September 2019 - 9:00am
Categories: Drupal

GTFS Utilities

New Drupal Modules - 22 September 2019 - 8:08am

This module provides schema and utilities for importing and working with GTFS feeds in Drupal. It is under active development.

Categories: Drupal

Commerce Exchanger

New Drupal Modules - 22 September 2019 - 6:43am

Currency exchange rates module for Drupal Commerce 2.

Categories: Drupal

Media Expire Email

New Drupal Modules - 22 September 2019 - 6:09am

Media expire Email

This module enables you to opt of email alert and send emails to the respective media authors before expiry based on set interval.
Instructions:
- "Enable Media Expire Email Alert" on admin/config/media-expire/email
- Set Email subject and Email message
- Set single or multiple intervals in days for getting email alert ex: 1 day, 3 days, 7 days, 14 days, 31 days before media expire.

Installation:
- Should be enabled with Media Expire module.
- Follow normal installation process.

Categories: Drupal

Bootstrap 4 Modal

New Drupal Modules - 21 September 2019 - 11:31pm

This module provides a bootstrap 4 modal.

Installation By composer (Recommended):

composer require drupal/bootstrap4_modal

Usage

<a href="[some-links]" class="use-ajax" data-dialog-type="bootstrap4_modal" data-dialog-options="{&quot;modalDialogClasses&quot;:&quot;modal-dialog-centered&quot;,&quot;modalDialogShowHeader&quot;:false}">Open in Bootstrap 4 Modal</a>

Categories: Drupal

Theme Black and White

New Drupal Modules - 21 September 2019 - 5:55pm
Introduction

This module provides a block to change the theme to it's grayscale version by adding a simple css to the body tag.

Features
  • Adds a css class to the body tag on the block image click.
  • Remembers the user choice by storing it's value in the user session.
  • Provides a twig template to make it easy to change the styling.
Installation

Simply enable the module.

Setup

Add the 'Black and white image' block to your choice of region from the 'Block Layout' interface.

Categories: Drupal

CKEditor Autocomplete

New Drupal Modules - 21 September 2019 - 8:58am
Categories: Drupal

CkEditor Textmatch

New Drupal Modules - 21 September 2019 - 8:53am
Categories: Drupal

CKEditor Textwatcher

New Drupal Modules - 21 September 2019 - 8:47am
Categories: Drupal

CKEditor Floatpanel

New Drupal Modules - 21 September 2019 - 8:41am
Categories: Drupal

CKEditor Xml

New Drupal Modules - 21 September 2019 - 8:30am
Categories: Drupal

CKEditor Ajax

New Drupal Modules - 21 September 2019 - 8:16am
Categories: Drupal

Broadcast Message

New Drupal Modules - 21 September 2019 - 3:26am

Admin can create messages to broadcast all the users of his/her domain. Aim of this module is to show message as soon as user get logs in.

Categories: Drupal

CKEditor Better Collapse

New Drupal Modules - 20 September 2019 - 6:15pm

This module adds a text format setting that adds a collapse button that does not collapse the first toolbar row, but all subsequent ones.

Categories: Drupal

Tasty Backend Commerce

New Drupal Modules - 20 September 2019 - 10:02am

Add a bit of Commerce to your Tasty Backend!

Tasty Backend Commerce is an extension to Tasty Backend that provides a user role, menu items, and administration screens for Drupal Commerce.

This project is currently under active development and may not yet be suitable for a live environment.

Categories: Drupal

Pages

Subscribe to As If Productions aggregator - Drupal