tanay.co.in: Are we ready for browser-based Drupal development?

Planet Drupal - Mon, 2021/08/16 - 6:02am
Are we ready for browser-based Drupal development? tanay Sun, 08/15/2021 - 23:02
Categories:

#! code: Drupal 9: An Introduction To Services And Dependency Injection

Planet Drupal - Sun, 2021/08/15 - 7:06pm

Drupal 8 and 9 are built upon services, with many parts of the system available through dependency injection, so it's important to understand the concepts. Services are a way to wrap objects and use dependency injection to produce a common interface. They are powerful and are used all over Drupal to do pretty much everything.

They can, however, be a little difficult for newcomers to the system to understand, especially if they are coming from Drupal 7 or other non-object oriented systems. When you look at some Drupal source code you are likely to see objects being created out of apparent thin air. It's a little hard to know where they come from if you aren't used to the how they work.

I first came across services when I started using Drupal 8 and it took me a little while to get my head around what they are and what they do. Before I understood them, I saw a lot of people online attempting to help by just pointing people to one service or another using this sort of construct.

$thing = \Drupal::service('thing');

This is helpful if you are familiar with Drupal services, but if you aren't then this doesn't tell you much. It is also bad practice to use this construct in certain situations, which I'll let into later on. If you have seen that construct around the internet but don't know what it means then I hope to clear things up a little.

Read more.

Categories:

tanay.co.in: Moving this website (tanay.co.in) to Drupal 9

Planet Drupal - Sun, 2021/08/15 - 4:09pm
Moving this website (tanay.co.in) to Drupal 9 tanay Sun, 08/15/2021 - 09:09
Categories:

Promet Source: Toward an Optimal Content Editor UX in Drupal

Planet Drupal - Sun, 2021/08/15 - 3:51am
The digital age has sparked an era of self-serve with more and more of the tasks that were once in the domain of the experts being handed over to lay people. Sometimes, the new ways of navigating are met with the resistance. Other times: relief and excitement concerning new possibilities for empowerment, efficiency, and control. 
Categories:

OSTraining: OSTips - How to Force Strong Passwords in Drupal 9

Planet Drupal - Fri, 2021/08/13 - 3:25pm

One of the problems in Drupal core "out of the box" is that you can pretty much use anything you want for a password.  And while your business might have a policy against weak passwords if Drupal doesn't enforce them, well, you know how people are. I get this question in training all the time, "How can we make users have strong passwords?" 

In this video, I want to talk about forcing strong passwords in Drupal 8 and 9. The solution is the Better Passwords module.

Keep reading to learn!

Categories:

Evolving Web: 3 Ways to Avoid Common Information Architecture Mistakes

Planet Drupal - Fri, 2021/08/13 - 3:21pm

We all recognize bad information architecture when we see it on a website. There are some signs that the creators didn't do a great job in terms of content structure and organization:

  • Confusing menu labels
  • Haphazard topic organization
  • Critical information and actions jumbled in with general news and marketing copy
  • Site searches that return useless, obsolete information

While it's frustrating to come across these issues on someone else's website, it feels much worse when we realize we've made those mistakes ourselves.

In this article, we'll look at three common foundational mistakes that lead us into trouble when organizing website content. Let's see how we can do better:

  • Working from a vague audience definition
  • Keeping obsolete content
  • Designing for hypothetical content
First Step: Develop and Rest Your Personas

Before you start thinking about your information architecture, whether for a new site or improving an existing site, take a step back and revisit your personas. Well-developed personas allow you to empathize with your audience and better understand how to help them get what they need.

Try to get beyond demographic profiles and assumptions, and talk to real, live people so you can create an ideal experience for them. (The UX and Content Strategy component of our upcoming Drupal Content Creator Track takes you from audience definition to using that information as a foundation for your entire Drupal site experience.)

Mistake #1: Haphazard Taxonomy Solution: Understand, Plan, and Maintain Your Taxonomy

Intuitively, we use Taxonomy to create menus and topical landing pages, but the power of Drupal's Taxonomy system goes well beyond that. These simple lists of terms provide the backbone for Drupal sites. When used well, they allow for smart, context-aware information architecture that presents users with just what they need when they need it.

Clean, well-structured Taxonomy will enable you to automate everything from menu creation and recommendations to landing pages and customize your analytics reporting. You can even use it to assign CSS and templates or access rules.

Taxonomy is that powerful. The catch, though, is that it must be good. Like, really good.

If we don't plan our Taxonomy well, it loses power. When terms overlap in meaning or don't cover everything, Drupal can't make smart decisions by itself, and we'll miss valuable opportunities. Taxonomy can also decay and get messy if it isn't maintained, especially when there's a large amount of diverse content and many people add terms and tags over time.

Fortunately, you don't need to get too technical to understand how Drupal's Taxonomy does its magic. By focusing on a few key principles, you (yes, you!) can harness the power of Taxonomy. Check out "How to Organize Your Drupal Content with Taxonomies" by Leigh Ryan for a more detailed guide.

Mutual Exclusivity: Avoid Overlapping Terms

One key to optimal Taxonomy is ensuring that each term is distinct, with no ambiguity as to when to use it. Drupal enables this through hierarchical taxonomy structure, where terms can have sub-terms and Taxonomy takes on an "is a" tree structure. Here are two examples of good and bad Taxonomy:

Flat, ambiguous, not distinct Clear hierarchy with "is a" relationships
  1. Purebred
  2. Mixed Breed
  3. Poodle
  4. Shih Tzu
  5. Siberian Husky
  6. Labradoodle
  7. Yorkshire Terrier
  8. Puggle
  9. Cavapoo
  10. French Bulldog
  11. Labrador Retriever

 

  1. Purebred
    1. Poodle
    2. Shih Tzu
    3. Siberian Husky
    4. Yorkshire Terrier
    5. Labrador Retriever
    6. French Bulldog
  2. Mixed Breed
    1. Labradoodle
    2. Puggle
    3. Cavapoo

 

In the first example, each content creator decides for themselves which terms to assign. For an article about Labradoodles, it is apparent that "Mixed Breed" and "Labradoodle" should apply... but should they also assign terms for "Poodle" and "Labrador Retriever"?

Creating a hierarchy of mutually exclusive terms makes it easier to consistently choose the correct terms across a team. In the second example, "Labradoodle" is clearly a concept distinct from "Poodle" or "Labrador Retriever" in our information architecture. Labradoodle "is a" Mixed Breed and not a Purebred, so it should not be assigned as Poodle or Labrador Retriever.

Such clarity and consistency in assigning terms are vital to Drupal's use of Taxonomy.

Collective Exhaustivity: Cover Everything

Ambiguity in "where to put things" can also occur when the available Taxonomy doesn't cover all of your content.

Let's take our dog example: the Purebred sub-terms include Yorkshire Terrier, which is great... until you have an article about Scottish Terriers. There's no term for Scottish Terrier, and the closest thing is Yorkshire Terrier. So, do we assign it to that? Or add a term for Scottish Terrier?

If we add the Yorkshire Terrier term, our Scottish Terrier article will come up in lists, landing pages, and recommendations for content about Yorkshire Terriers. It might not be that bad, but what if, over time, there are also articles on Jack Russell Terriers and Airedale Terriers? Or maybe your audience ends up liking Scottish Terriers, so you do more articles about them, but then your Yorkshire Terrier content list will be mostly not about Yorkshire Terriers.

By adding a term for Scottish Terrier, we'll no longer miscategorize our article. But now, our automated menus and landing pages are serving up a single piece of content. And if we later add terms for Jack Russell and Airedale content, that won't work well either.

This shows us why we need to be careful about not only what we've got but how we're likely to grow. With so many breeds in the Terrier group, we might include Terrier as a sub-term of Purebred and then add the various specific Terrier breeds under that term as needed.

Ad hoc Terriers Clear hierarchy with "is a" relationships
  1. Purebred
    1. Poodle
    2. Shih Tzu
    3. Siberian Husky
    4. Yorkshire Terrier
    5. Scottish Terrier
    6. Labrador Retriever
    7. French Bulldog
    8. Airedale Terrier
  2. Mixed Breed
    1. Labradoodle
    2. Puggle
    3. Cavapoo
  1. Purebred
    1. Poodle
    2. Shih Tzu
    3. Siberian Husky
    4. Terriers
      1. Yorkshire Terrier
      2. Scottish Terrier
      3. Airedale Terrier
    5. Labrador Retriever
    6. French Bulldog
  2. Mixed Breed
    1. Labradoodle
    2. Puggle
    3. Cavapoo

 

Prevent Decay: Minimize and Fix Typos

Back when your website was shiny and new, everything felt tidy and perfect, and you couldn't wait to fill it with exciting, well-organized content. Over time, though, you fed it with lots of content, and multiple people adding terms and tags made your Taxonomy lose its power. As a result, you risk presenting typos, confusing synonyms, and other content mistakes to users.

Fortunately, there are tools and processes to help avoid that:

  • Use more restrictive field types. You can configure the fields for Taxonomy terms in your content types to allow content authors to add new terms. Ask your developer or administrator to disallow term creation from the content type for the tightest control.
  • Limit user permissions. If you want specific content creators and editors to manage Taxonomy terms, a Taxonomy Manager role could enable relevant permissions. Team members who should have that access can be assigned the Taxonomy Manager role. This role can be more granular if needed, with a set of permissions for each vocabulary.
  • Clean up the junk. If you opt to allow authors to add new terms when creating content, make it part of your routine to look for errors and redundancies and clean them up. Modules like Taxonomy Manager provide tools for restructuring and merging terms to keep Taxonomy clean without making corrections node by node.
Mistake #2: Keeping Obsolete Content Solution: Audit Content Constantly

I don't know about you, but something is satisfying about a decluttered, organized closet. It's tidy. You know exactly what you've got, why you've got it, how you will use it, and where it goes. And you like or need everything.

You'd benefit from doing the same with your content. Try periodically sifting through your web pages and removing whatever is no longer helpful, just like in your real-world storage spaces.

The Content Clutter Conundrum

For the last couple of decades, we've all been shouting from the rooftops: "Content is KING!!!" (Trivia: the phrase originated with none other than Bill Gates in this essay from 1996.)

It's still true, but there's a catch. When we discover a shirt with a hole in it, we either mend it or get rid of it, so we stop inadvertently wearing it. The same goes for content: when we have redundant or obsolete content, fix it or kill it.

If we don't make a conscious effort to clear out the things that are no longer worth showing people, they will see those things.

Avoiding this is especially important in the context of government, financial, educational, medical, or non-profit sectors. In these areas, inaccurate and outdated information can have serious consequences for both the organization and its audiences.

Content clutter muddies your message, confuses your audiences, introduces personal and regulatory risk, and makes creating an effective information architecture more challenging.

The Content Audit Solution

You don't want to wait to stumble on bad content passively. You should proactively look for it.

If you're embarking on a whole new website project, congratulations! You have a fresh empty closet you can curate to match your minimalism dreams... erm, you have the opportunity to restructure your entire content pool and information architecture to meet everyone's needs.

If you're just trying to make the website you already have more effective, this will still help you. In fact, content auditing and tracking should be an ongoing part of managing your site's content.

Identify the areas of greatest importance or risk and start there. Then, go through all your content, catalogue it, and question its existence on behalf of your organization and audience. This process is referred to as a ROT analysis (Redundant, Out-of-Date, and Trivial):

  • Do we like this?
  • Do we need this?
  • Does this actually do what it should do?
  • If not, can we fix it?
  • Can we just get rid of (or archive) this?

Keep the best, toss the rest, and regularly check for pieces that no longer serve you well. Then, when it's time to remove them, Drupal's Redirect module lets you, well, redirect visitors to more appropriate content if they stumble upon an old link or search result.

Don't let old, inaccurate, or lacklustre content gunk up your information architecture and detract from your message and services. Check out this post by Suzanne Dergacheva for more decluttering talk and an intro to the card sorting technique.

Mistake #3: Designing for Hypothetical Content Solution: Design With Real Content

Back in the day, most websites were either visual playgrounds where designers showed off the latest special effects or fairly simple pages of articles or general information. A design-first workflow became commonplace, where the first step in creating a new website was to create a mockup, using abstract lorem ipsum text as a stand-in for content that had not yet been written.

It worked for a while. Back then, good information architecture mostly meant organizing pages into tidy sections with user-friendly menus. Things have changed, though. We have loads of content to sift through, in many different formats, on a range of devices. And a CMS like Drupal allows for granular definitions of content types and their relationships. This granularity allows us to create an information architecture for adaptive, context-aware user experiences.

The Trouble With Lorem Ipsum

When designing a project with placeholder text, creating an ecosystem that lets content shine is hard. As a result, the design loses power, even becoming an obstacle to highlight our content effectively. Most of us have had to deal with the results of this practice:

  • Bland intros trimmed too short, so they fit neatly into a box
  • Images omitted because the aspect ratio doesn't work
  • Awkward title wrapping because the homepage blocks are too narrow
  • Misalignments because layouts only work for specific character counts
  • Inconsistencies because editors had to guess how to format content

On the more technical side, hypothetical content can result in poorly configured or vague content types.

Only well-designed content types and granular fields allow us to fully leverage the slice-and-dice remixing capabilities of a CMS like Drupal.

Otherwise, we'll miss opportunities to present relevant messages where they would have the biggest impact.

Content-first Design

Whether you're creating a whole new site, giving an old site a refresh, or just adding a new landing page template to an existing site, start with real content, and do it realistically.

  • Does your voice tend toward titles that border on paragraphs? Design for that.
  • Does your team tend to rely on free images that come in different aspect ratios? Design for that.
  • Do you have collections of related content or information that could lead your audience into a deep dive if you could present the right bits at the right time? Design for that.
  • Did your content audit reveal that users regularly copy and paste structured content into rich-text fields, where they can't be accessed, repurposed, or themed programmatically? Design your content types for that.

The power of your message and your platform rests within your content. Start with that.

Focus on the Foundation and Avoid Mistakes

A building supported by a haphazard foundation is doomed to fall. The same holds for our websites. So if you're embarking on a new site rebuild, resist the urge to dive into talking about new designs and features. That's exciting, I know, but you've got important work to do first.

If you're improving an existing website, do the same. Fix what you can, apply it moving forward, and keep notes, so you know what needs to be done differently for your site's next iteration.

Keen audience insights, content-centric design, and regular content audits can get you further than you might think.

PS - Are you a content creator, editor, or manager trying to get the most out of your Drupal site? We cover Drupal-specific information architecture, SEO, and content management in our upcoming Drupal Content Creator Track.

+ more awesome articles by Evolving Web
Categories:

Innoraft Drupal Blogs: Why Drupal is Best CMS for SEO Friendly Website Development

Planet Drupal - Fri, 2021/08/13 - 12:52pm
Why Drupal is Best CMS for SEO Friendly Website Development Are you opting for Drupal website development? It can readily help in ensuring SEO best practices are being adhered to. Read this article for details. Tanjeet Fri, 08/13/2021 - 16:22 Drupal Planet Drupal Website Development SEO Friendly Website Drupal Development
Categories:

Oomph Insights: From Personification to Personalization: Taking Platform Engagement to the Next Level

Planet Drupal - Fri, 2021/08/13 - 2:00am
In the age of hyper-personalization by the likes of Amazon and Netflix, customized user experiences are now table stakes for digital platforms. Businesses that invest in personalization are rewarded with loyalty and revenue. Those that don’t, get left behind. But making that investment isn’t a straightforward affair. Many services that pitch themselves as personalization tools don’t even come close to creating a truly customized experience. And today’s savvy web users aren’t fooled: 74% of customers feel frustrated when website content isn’t personalized. 84% of consumers say being treated…
Categories:

Tag1 Consulting: How to analyze Goose load testing results using New Relic

Planet Drupal - Thu, 2021/08/12 - 9:00pm

In today’s Tag1 Team Talk, Managing Director Michael Meyers sits down with VP of Software Engineering Fabian Franz, and CEO Jeremy Andrews for a coordinated demonstration of Goose and New Relic. Goose is the highly performant load testing framework written in Rust, and New Relic is one of the most highly regarded performance analysis tools in use today. Jeremy is the creator of Goose and Fabian is a major contributor to the project. In this demonstration, Jeremy and Fabian run a Goose test simulating 1200 users using the Umami profile for Drupal 9, on a R5N 8x large EC2 instance. Join us to see how Goose performs with different types of users, and how and why we use New Relic to troubleshoot issues as Goose pinpoints them. For more Goose content, see Goose Podcasts, Blogs, Presentations, & more! Photo by Su San Lee on Unsplash For a transcript of this video, see Transcript: How to analyze Goose load testing results using New Relic.

Read more lynette@tag1co… Thu, 08/12/2021 - 12:00
Categories:

Security advisories: Drupal core - Moderately critical - Third-party libraries - SA-CORE-2021-005

Planet Drupal - Thu, 2021/08/12 - 8:08pm
Project: Drupal coreDate: 2021-August-12Security risk: Moderately critical 13∕25 AC:Basic/A:User/CI:Some/II:Some/E:Theoretical/TD:DefaultVulnerability: Third-party librariesDescription: 

The Drupal project uses the CKEditor, library for WYSIWYG editing. CKEditor has released a security update that impacts Drupal.

Vulnerabilities are possible if Drupal is configured to allow use of the CKEditor library for WYSIWYG editing. An attacker that can create or edit content (even without access to CKEditor themselves) may be able to exploit one or more Cross-Site Scripting (XSS) vulnerabilities to target users with access to the WYSIWYG CKEditor, including site admins with privileged access.

For more information, see CKEditor's announcement of the release.

This advisory is not covered by Drupal Steward.

Solution: 

Install the latest version:

Versions of Drupal 8 prior to 8.9.x and versions of Drupal 9 prior to 9.1.x are end-of-life and do not receive security coverage.

Drupal 7 core is not affected, although Drupal 7, 8, and 9 site owners should review their site following the protocol for managing external libraries and plugins previously suggested by the Drupal Security Team, as contributed projects may use additional CKEditor plugins not packaged in Drupal core.

Reported By: Fixed By: 
Categories:

Bounteous.com: Customizing Your Drupal Commerce Forms

Planet Drupal - Thu, 2021/08/12 - 4:43pm
Your digital shopping experience and checkout flow can be as distinctive as your brand. Customizing your Drupal commerce forms through these entry points.
Categories:

Axelerant Blog: Managing Third-Party Authentications In Mautic Plugins

Planet Drupal - Wed, 2021/08/11 - 11:54pm

Learn about standard Authentication-Protocol methods supported in Mautic via the Integration bundle.

Categories:

Axelerant Blog: Axelerant Celebrates Drupal By Giving Back

Planet Drupal - Wed, 2021/08/11 - 11:54pm

Open-source has the power to change the world, but, as we depend on it for democratic innovation, open-source also depends on us to thrive. At Axelerant, we know and own this; hence we’re constantly engaging in different open web communities, including Drupal’s.

Why are we writing this? First of all, we are always keen to shine a light on our team members because our people-first culture makes Axelerant succeed. Second, in a knowledge sharing spirit, we are willing to put out what has worked for us (and what we struggle with) regarding contributing and our community involvement.

We are celebrating Drupal’s 20th Anniversary, and we are proud of being part of that history for over a decade. What better way to celebrate than recognizing and sharing the stories of the people involved, the makers that keep the ball rolling.  

Celebrating our people and the community has been among our values since the beginning. Drupal’s 20th anniversary is one of those occasions where both of these values come together in demonstrating Axelerant’s commitment to be a productive part of the amazing Drupal community through its team.

Here, we want to share a few stories from team members who recently contributed and inspired us with their Drupal journey.

Categories:

Axelerant Blog: Developing a custom CSV validator in Drupal 8

Planet Drupal - Wed, 2021/08/11 - 11:54pm

In our recent project, we had a requirement from one of our clients where we need to validate data in CSV files based on custom requirements. This validated CSV would need to be imported into Drupal 8 into various content types.  

In this article, we will look at the requirement, the library, the architecture of the custom module, the different components of the module with some code samples and finally adding some ideas on how this module can be made more reusable and even contributed.

Introduction

Our client is a well known international NGO with offices worldwide, each with different types of data management systems and frameworks. They wanted a centralized system to manage the data from each of these offices. Having concluded that Drupal 8 was the ideal solution to implement that centralized system, the challenge was to set up a migration pipeline to bring in data from all of the offices and their varying frameworks. Consequently, the files generated by these systems needed to be validated for specific constraints before being imported into our Drupal system.

Categories:

Axelerant Blog: Drupal 9.1 Is Here: Are You Ready to Upgrade?

Planet Drupal - Wed, 2021/08/11 - 11:54pm

As expected, Drupal 9.1 was released on schedule at the closure of 2020. We have already talked about the Drupal 9 release and how it’s a testament to the predictable and reliable nature of the Drupal release cycle. Drupal 9.1 takes a step forward by adding more features and releasing them as predicted.

In this blog, we will be discussing the new improvements and more that will follow. 

Is it worth upgrading?

The Drupal 9.1 stable release was out as expected on Dec 2nd, 2020. We previously advocated that if you are on Drupal 8.9, you needn’t hurry to upgrade to Drupal 9.0 as you would not see many new features. But that’s changed.

Drupal 9.1 adds exciting features and updates along with support for PHP 8 (we have previously written about making Drupal 9 compatible with PHP 8).

It’s also worth upgrading as Drupal 9.1 brings significant changes in the user interface for both sighted users and assistive technology.

Categories:

Axelerant Blog: A Guide To Automated Testing With Drupal And Applitools

Planet Drupal - Wed, 2021/08/11 - 11:54pm

Traditionally, Drupal web applications are built using various entities like Content types, blocks, components using Layout Builder, and then the product is made available to the end-user on the front-end using HTML, CSS and JavaScript. The team usually starts with backend stories related to building various content types, related roles, and permissions, and then the frontend team picks it up to make the site more usable and accessible as per the design requirements. 

Of course, with component libraries like Storybook, Fractal, PatternLab, and with designs in place, the frontend team can start implementing them as component libraries in parallel, which are later integrated with Drupal. 

In this blog, we will be talking about testing the application.

By using Applitools Ultrafast Test Cloud, you would be able to execute the automated visual validation tests across several browsers, operating systems, and devices of your choice and at lightning speed as although the test runs once on, say Chrome (assuming Chromedriver is configured in the tests), the capturing of the pages occurs in parallel, in the background for all the configured browsers and viewports.

Signup for a free account with Applitools and feel free to clone this repository to try it out on your own. Integrate automated visual validation tests in your project that will help you build and release visually perfect web applications or websites confidently at a faster rate.

Categories:

Axelerant Blog: Upgrade Drupal to PHP 8: Compiling extensions

Planet Drupal - Wed, 2021/08/11 - 11:54pm

In the last article, we discussed the changes required to get Drupal 9.1 running on PHP 8. At that time, we got the Drupal 9.1 dev release working on PHP 8.0.0 RC4 with a few patches. Since then, a lot has changed with many of those patches being committed and Drupal 9.2 dev open for development. But we’ll talk about all of that at a later date. Today, let’s look at getting some of the common PHP extensions and configure it to run with Drupal.

We left off at a point where we have plain Drupal 9.1 running on a plain PHP 8 RC4 setup. Drupal doesn’t require any extensions, not in PHP core, and that means we only had to enable extensions like gd, MySQL, and others to have Drupal 9.1 running. With that, we were able to install Umami and use the site without any problems at all. To enable those extensions, we only needed our docker-php-ext-enable script, which is part of the PHP base Docker imageSee the Dockerfile in the reference repository for the source code (lines 41-52). Installing other extensions that are not part of the PHP core is not quite that simple. Think of it this way: if a module is present in Drupal core, you can install it right after downloading Drupal. But if it is a contrib module, you have to download and install it separately. It’s the same thing with PHP extensions.

Why test with extensions?

Just as you probably wouldn’t have a Drupal site with at least one contrib module, you probably wouldn’t have a PHP installation without a few of the common extensions. Drupal core utilizes some of these extensions when they are available (such as APCu and YAML), which yields better performance. This means that even though the extensions are not technically required, you would most likely have them.

Categories:

Axelerant Blog: A Complete Overview of Drupal Migration & More

Planet Drupal - Wed, 2021/08/11 - 11:54pm

With the launch of Drupal 9 in June 2020, the topic of Drupal migration is fresh on everyone’s mind. We will be delving deeper into the nitty-gritty around the topic in this blog. 

Migration is the process where the content from the old site, converted into the desired format and is saved in the new site. Sometimes, migration is a simple activity of mapping the source content to the destination content types and sometimes, it is a bit more complicated.

Let's take a comprehensive look at the Drupal migration process in context to the recently launched Drupal 9, and what’s involved in migrating from different versions. Here's what we will be discussing about:

01. Drupal 7, 8, and 9

02. Migrating Then and Now

03. Drupal to Drupal Migration

04. Migration from external sources

05. What’s More?

Categories: