eiriksm.dev: Could not open connection: unknown error: cannot find Chrome binary

I was just recently starting to get this on projects after (at least I think that's why) I updated to Chrome 120.

Could not open connection: unknown error: cannot find Chrome binary (Driver info: chromedriver=120.0.6099.71 (9729082fe6174c0a371fc66501f5efc5d69d3d2b-refs/branch-heads/6099_56@{#13}),platform=Linux 6.2.0-37-generic x86_64) (Behat\Mink\Exception\DriverException)

That's the error message in behat at least, which I think originates from the actual webdriver (chromedriver) response. If I look at the debug information from the chromedriver logs it says this:

[1703837483,910][INFO]: [0ca18bb59db30d5acd358de02a01da0a] RESPONSE InitSession ERROR unknown error: cannot find Chrome binary

Well the error is clear enough. It can not find the binary. That's fine by me, but where would I go about informing about the binary? Well, for me that would be in behat.yml:

@@ -33,8 +33,9 @@ default: w3c: false marionette: null chrome: + binary: /usr/bin/google-chrome switches:

This probably translates to something like this, while initiating the session with chromedriver (slightly edited for relevance and brevity):

[1703887172,675][INFO]: [95b2908582293fa560a7301661f5e741] COMMAND InitSession { "desiredCapabilities": { "chrome.binary": "/usr/bin/google-chrome", "chrome.extensions": [ ], "chrome.switches": [ "--ignore-certificate-errors", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage" ], "goog:chromeOptions": { "args": [ "--ignore-certificate-errors", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage" ], "binary": "/usr/bin/google-chrome", "extensions": [ ] }, "ignoreZoomSetting": false, "marionette": true, } }

If you are using some other tool that interacts with chromedriver, I am sure you are already setting some parameters there, which you could append this new parameter to.

ImageX: Accessibility Elements, Part 4: Accessible Keyboard Navigation in Drupal

Authored by: Nadiia Nykolaichuk.

Since Douglas Engelbart invented the computer mouse in 1963, it has become a popular device that many people use for browsing the Internet today. However, there are still a great number of people who cannot afford the comfort of using a mouse. A wide range of temporary or permanent impairments make them rely on keyboard-only navigation.

Four Kitchens: Responsive image best practices for Drupal

Image removed.

Amanda Luker

Senior Frontend Engineer

As a Senior Frontend Engineer at Four Kitchens, Amanda is responsible for translating visual designs and applying them to Drupal sites.

January 1, 1970

Drupal provides a system for site administrators to add their own images and have them appear uniformly on the website. This system is called Image Styles. This tool can resize, crop, and scale images to fit any aspect ratio required by a design.

When creating responsive websites, a single image style for each image variation is insufficient. Each image, such as a hero image, a card image, a WYSIWYG image, or a banner image, requires multiple versions of one image. This ensures that the website delivers only what visitors need based on their screen size. For instance, a mobile user may only require a 320-pixel-wide image, while a large desktop user may want an 1,800-pixel-wide image (doubled for double-pixel density). For this reason, Drupal has Responsive Image Styles, which will group your images into a set of styles that will each show under different conditions.

Practical approach to convert images from design to Drupal

  • Determine your image’s aspect ratio. If you find that the images in the design are not in a common aspect ratio (like 1:1, 2:1, 4:3, or 16:9) or if they vary by a little bit, consider running the dimensions through a tool that will find the closest reasonable aspect ratio.
  • Determine the smallest and largest image sizes. For example, for a 16:9 aspect ratio, the smallest size might be 320 pixels x 180 pixels, while the largest could be 3,200 pixels x 1,800 pixels (doubled for high-density screens).
  • To generate all variations, you can use an AI tool to print images with 160-pixel increments between each size. 160 increments tend to hit a lot of common breakpoints. Here’s an example using GitHub CoPilot:

There are likely more ways to streamline this process with Copilot. I’ve also used ChatGPT to rewrite them using a prefix, making it easy to add them in Drupal like this:

Image removed.

If adding all of these steps seems like a lot of work, consider using the Easy Responsive Images module! This module can create image styles for you, allowing you to set your aspect ratios and the increment between each style.

Once you have all your styles in place, create your responsive image styles by following these steps:

  • Choose a name for your responsive image style based on its usage
  • Select the “responsive image” breakpoint group
  • Usually, I choose to select multiple image styles and use the sizes attribute. Use the sizes attribute to craft your “sizes.” For example:

(min-width:960px) 50vw, (min-width:1200px) 30vw, 100vw

In this example, choosing an image that is smaller than 960 pixels will best fit the full width of the viewport. At 960 pixels, the image will be selected to best fill half of the viewport width, and at 1,200 pixels, 30%. This approach is nimble and allows the browser to choose the most appropriate image for each case.

After setting the size rules, choose all of the image styles that you want the browser to be able to use. You don’t have to use them all. In some cases, you might have two responsive image styles that are pulling from the same aspect ratio image styles, but one uses all of them and the other uses a subset of them.

Image removed.

After adding your responsive image style, you need to map your Media View Mode:

  1. Go to https://[your-site.local]/admin/structure/display-modes/view/add/media
  2. Add the media view mode as a new Display for Images: https://[your-site.local]/admin/structure/media/manage/image/display
  3. Choose “Responsive image” as the Format and select your new responsive image style

Image removed.

Once you have set this up, you are ready to use the View Mode to display the image field for your entity.

Image removed.

In this example, all the images have the same breakpoint. There may be times when you need to have different aspect ratios at different breakpoints. In those cases, you may want to use your custom theme’s Breakpoint Group. This will allow you to manually select each image style on for each breakpoint (instead of letting Drupal choose it for you).

The post Responsive image best practices for Drupal appeared first on Four Kitchens.

The Drop Times: Think Licensing to Ensure Responsible Use of AI Tools, Says Lyubomir Filipov

Explore the evolution of Lyubomir Filipov's career from his initial encounter with Drupal to his current role as a Group Architect at FFW Agency, delving into his strategies for team management, overcoming multilingual challenges, community involvement, and the intersection of artificial intelligence with the digital field. Filipov's diverse experiences reflect a multifaceted professional journey, offering insights into Drupal, community engagement, academic pursuits, and the future landscape of digital expertise.

DinoTechno.com: Unlock the Power of Drupal 10: Discover its Key Features and Benefits

Drupal is an open-source content management system (CMS) that has gained significant popularity for its ability to power some of the most prominent and frequently visited websites globally. With a vast developer community of 1.4 million strong, contributing over 50,000 free modules, Drupal offers unparalleled flexibility and power, making it our preferred CMS choice for […]

Golems GABB: How to Leverage Drupal's Layout Builder to Create Complex Pages

How to Leverage Drupal's Layout Builder to Create Complex Pages Editor Fri, 01/05/2024 - 15:42

Sometimes, creating a modern design with high functionality is problematic. Especially when it comes to large-scale and complex projects. There are various solutions to make the process of creating layouts easier and more convenient. One of the most influential and popular is Drupal Layout Builder.

Michael J. Ross: Web Is Still in Beta

The Web Is Still in Beta Michael J. Ross 2024-01-04

Back in the early 1990s, when the World Wide Web was being discovered by the worldwide computer users — at least those with Internet connections — new websites were being crafted and made public at a rapid pace that accelerated as a growing number of creative or just plain curious people taught themselves how to format text and images using simple HTML. Only later did Cascading Style Sheets (CSS) allow for a much cleaner separation between content and its layout and other visual styling.

At that time, most websites — including those of major corporations — suffered from a clunky appearance that, by today's standards, would be judged as rather primitive or at least unpolished. This was much more pronounced in sites created by overenthusiastic amateurs who couldn't resist spicing up their web pages with jarringly bright colors, annoying auto-playing music tracks, and an assortment of groan-inducing images, such as animated mailboxes, spinning envelopes, or any of the other aesthetic sins characteristic of the personal web pages that composed GeoCities. Even the most staid websites would use various "under construction" images to indicate that a particular page or entire section of the site was still under development.

Image removed.

While few Internet users today would lament the passing of the more garish GIFs and other appalling web page decorations, it is notable that we almost never see the relatively conservative digital construction signs anymore, or even text notifications that a page is unfinished . And what about the web applications, such as Google Maps, that would remain for years in a state of "beta" — which presumably means the app is unfinished and has not reached the stage of an initial release, version 1.0 — and yet is being used by millions of people? Nowadays, simple sites and rudimentary web apps will be published with no mention of being in beta or under construction. Why is that?

Is it because all websites are now operationally and aesthetically flawless and all web apps are performing wonderfully, with no need for future planned updates? Clearly not. Instead, it is probably due to a combination of factors, including the following:

  • The state of web flux is now a given. Most if not all of us, especially web designers and developers, learned long ago that the sites and apps that we create will be called upon to meet ever-changing needs, whether necessitated by paying customers, demanding project managers, or just our own evolving sense of what we want the software to do and how it can look even better than before. The functionality and thus complexity of our present-day sites and apps are multiples of what was deemed acceptable three decades earlier — to say nothing of the ever-increasing security vulnerabilities and needed countermeasures. Any expectations of reaching a final state of perfection are simply unrealistic.
  • These days it is easier than ever to build a new website or web app, using a wide range of tools, including tried-and-tested web frameworks, content management systems (such as WordPress and Drupal), and third-party services to do much of the heavy lifting. Through the use of prepackaged themes, products built with a modest or even no budget can be quickly given an attractive look and feel.

The Web is unfinished, and that's a good thing.

Copyright © 2024 Michael J. Ross. All rights reserved.

Nextide Blog: Oxford's Mathematical Institute: Streamlining Academic Visitor Applications with Maestro

In the dynamic world of academia, managing academic visitor applications efficiently is crucial. The University of Oxford Mathematical Institute has embraced the power of Drupal  and the Maestro module to streamline and enhance their academic visitor application process. Let's delve into the seamless workflow that facilitates this crucial task.

 

The General Design

Initiation: Academics or their assistants initiate the process by filling in a comprehensive multi-page webform tailored to their needs.

Confirmation and Workflow Trigger: Upon submission, a confirmation email is sent to the initiator by the webform email handler, and the workflow is triggered.

Image removed.

Matt Glaman: My Dependabot configuration for Drupal (and other PHP projects)

I use GitHub to host my repositories, such as this website. To keep my dependencies up-to-date, I leverage Dependabot. The product has matured a lot over the past few years. Before, it was a standalone service and then acquired by GitHub. It did not support dependencies managed by Composer. It was pretty spammy and very noisy. However, it has drastically improved over the past few years. Thanks to all of those at GitHub who have worked to improve it (that includes you, Mike Crittenden.)

My Dependabot configuration consists of a few items, nothing overly specific.

LN Webworks: How Skilled Drupal Developers Can Benefit Your Business

Image removed.

Drupal is a cutting-edge and versatile content management system regarded as an incredible solution for a diverse range of web development projects. However, building a Drupal project that aligns with your business goals and produces the desired results can be quite challenging. To effortlessly navigate through all the complexities, it is best to hire proficient Drupal web developers who know how to unleash the true power of the CMS.

As a product of their rigorous training and vast experience, Drupal experts are well versed in the do’s and don’ts to tap into the unfathomable potential of the CMS. This implies that they can certainly take your business on an upward growth spiral with Drupal. Now, let’s delve into some more incredible benefits of hiring experienced Drupal developers.