Hello our valued visitor, We present you the best web solutions and high quality graphic designs with a lot of features. just login to your account and enjoy ...

<none>

Hello our valued visitor, We present you the best web solutions and high quality graphic designs with a lot of features. just login to your account and enjoy ...

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
11 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Tech News

News ID Title News Details
120,774 DDEV integration plugin for PhpStorm can increase your Drupal development efficiency

If you use DDEV and PhpStorm, then the DDEV Integration plugin should definitely interest you (especially if you're into code quality tools like phpcs and PhpStan). If you don't use DDEV and PhpStorm, then the DDEV Integration plugin might entice you to take a fresh look...

It can be arduous to configure PhpStorm to integrate with phpcs and/or PhpStan to show code quality issues in the PhpStorm Problems area as shown here:

In the past, we've often recommended to students and client that they install Drupal Coder alongside their Drupal projects and then point to its binaries of phpcs and PhpStan (utilizing the host operating system's PHP) in order to (somewhat) easily integrate those tools with PhpStorm.

The DDEV integration plugin makes it easy to point to phpcs and PhpStan in each project (assuming drupal/core-dev dependencies are included in the project) and then (here's the magic) utilize the automatically configured (by the DDEV integration plugin) command-line access inside the DDEV web container - awesome!

This configuration allows you to point to your phpcs.xml configuration file using the file path inside the DDEV web container!

DrupalEasy's Professional Module Development course (Full version) includes configuring both Visual Studio Code and PhpStorm to integrate phpcs, phpcbf, and PhpStan in an efficient manner.

120,770 A method for utilizing multiple authors for a single Drupal node

A client recently asked me to figure out how to allow additional authors to not only be listed on a single node, but also to let them have the same edit and delete permissions as the main author of the node. I thought it might be helpful to put together an article that details one potential solution to this not completely uncommon task.

This is not something I have implemented in any modern version of Drupal (8, 9, or 10), so I took a fresh look at the problem by reaching out to my Drupal network via Slack and social media - I even asked ChatGPT (with poor results in this case.) I received several suggestions, including the very new Node Co-Authors module, the not-at-all-new Access by Reference module, and the full-of-momentum ECA module.

I also decided to use this as a topic of discussion during the weekly DrupalEasy office hours (exclusively available to our long-form training course students and graduates.) I did some initial research and decided to try the Access by Reference module first - mainly because it seemed rather flexible as well as straight-forward to use. I really liked the fact that I could configure it to use any user reference field I add to a particular content type to specify additional authors.

The Access by Reference module allows you to specify additional authors via several methods, including via a reference field (this is the obvious choice, IMHO,)  user email address, a shared profile value, or via a reference parent (interesting) For this use case, via a user reference field was exactly what I was looking for.

Spinning up a fresh Drupal 9 install to test it on, I installed the Access by Reference module and added a standard multi-valued "Additional authors" entity reference field on the Basic page content type (image above).

Next, I navigated to the "Set access by reference" configuration area and added a new "abr configuration." This is where I told the Access by Reference module about the user reference field I had just added. Setup was pretty straight forward:
 

There really wasn't anything tricky to setting up the abr configuration. I basically pointed to the "Additional authors" field I added, set the "Reference type," and then specified that I wanted additional authors to inherit read, update and delete permissions from the main author. Easypeasy.

The final step was to give the "Access By Reference" permission to the role of users I wanted to be able to become additional authors. For example, by giving this permission to "Authenticated users", then any user can be added as an additional author for a particular node and then have edit and delete permissions for the node (probably not the best configuration.)  In my client's case, they have something akin to an "authors" role that makes perfect sense for this scenario.

While this completed the functional aspect of the task, I really wanted the "Additional authors" field to be listed in the "Authoring information" accordion of a standard Drupal node add/edit form (when using Claro). This was accomplished with a very small custom Drupal module (named multiauthor) that implements a single Drupal hook:
 

/** * Implements hook_form_alter(). */ function multiauthor_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { if (in_array($form_id, ['node_page_edit_form', 'node_page_form'])) { $form['field_additional_authors']['#group'] = 'author'; } }

This hook alters the Basic page add and edit forms, setting my custom "Additional author" field (field_additional_authors) to the "author" group (this is the "Additional authors" accordion).

With that in place, the somewhat elegant solution is complete.
 

At this point, any users added to the "Additional authors" field will have the same read, update, and delete permissions at the owner of the node. Success!

133,357 PHP Sniffer & Beautifier extension for Visual Studio Code

If you've been a user of Visual Studio Code for your custom Drupal development, then you're probably (hopefully) familiar with this Drupal.org documentation page that provides an overview of recommended extensions and configuration

In the past, I've recommended using the phpcs extension for integration with Visual Studio Code. I did this knowing full well that there haven't been any new commits to the extension's code since 2018! It worked fine, and it was also the recommended phpcs-related extension on the doc page mentioned above, so I didn't think about it too much.

Recently, in an effort to use phpcs and phpcbf in a slightly different way (more on that another time), I needed to find a more up-to-date extension - I found (and have been using for several months now) the PHP Sniffer & Beautifier extension. This includes all the necessary functionality to display coding standard issues in Visual Studio Code's Problems tab and has been better maintained the past few years (although the maintainer is looking for others to help). 

Here's my configuration when using a separate install of Drupal Coder (although different configurations are possible depending on your project and local development stack).

/* PHP Sniffer & Beautifier */ "phpsab.snifferEnable": true, "phpsab.executablePathCS": "/Users/michael/sites/drupal_coder/vendor/bin/phpcs", "phpsab.fixerEnable": true, "phpsab.executablePathCBF": "/Users/michael/sites/drupal_coder/vendor/bin/phpcbf", "phpsab.standard": "/Users/michael/sites/drupal_coder/phpcs.xml", "phpsab.snifferMode": "onType", "phpsab.debug": false, "phpsab.fixerArguments": [],

If you're a Visual Studio Code user and you utilize phpcs and phpcbf as part of your everyday workflow, you may want to consider using this module. 

DrupalEasy's Professional Module Development course (Full version) includes configuring both Visual Studio Code and PhpStorm to integrate phpcs, phpcbf, and PhpStan in an efficient manner.

The pixel art image used in this blog post was generated by the DALL-E project of OpenAI.

133,358 Termageddon.com for keeping your site's policies up-to-date

Privacy and terms of use policies seem to be in constant state-of-flux due to various legal jurisdictions often updating requirements for businesses that operate in their area. Keeping up with all the changes is challenging, to say the least. 

For the past few years, DrupalEasy has been using Termageddon.com to help keep our various site policies current. To get started, we provided Termageddon with some details about our business and what type(s) of policies we were looking for. The service then provided us with some HTML/Javascript code snippets that we include on our various policy pages that automatically pull up-to-date content from Termageddon. 

While we are notified each time one of our policies change, it all happens automatically. This notification gives us the opportunity to review the changes and discuss with our legal representation, if necessary.

Using a service like this is not a replacement for legal representation - consider it a supplement, at best. 

If you're unsure if  your site requires a service like this, then it is worth your time investigating. If your site captures user data in any manner (contact forms, Webforms, analytic tools), it probably is a good idea to have a sound set of policies. Termageddon can help make the process of setting up your site's policies easier.

DrupalEasy is an affiliate of Termageddon.com and receives consideration for client referrals. 

133,359 DrupalEasy Podcast S15E1 - Randy Fay - DDEV project governance and health

We talk with Randy Fay about the health of the DDEV project, his recent Drupal community recognition, and the DDEV testing infrastructure.

URLs mentioned

DDEV interactive support on Discord  
Aaron Winborn Award
Randy's DrupalCon Pittsburgh wrapup  
2023 Drupal Local Dev Survey results
Platform.sh sponsorship 
Github sponsors 
Localdev (DDEV) Foundation 
New ddev.com 
DDEV Advisory Group
Recruiting DDEV maintainers 
DDEV automated testing (link from 2019) - (from January 2022
Current windows/mac test runners

DrupalEasy News

Professional module development - 15 weeks, 90 hours, live, online course.  
Drupal Career Online  - 12 weeks, 77 hours, live online, beginner-focused course.

Audio transcript  

We're using the machine-driven Amazon Transcribe service to provide an audio transcript of this episode.

Subscribe

Subscribe to our podcast on iTunes and Google Play. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.
 

133,360 DrupalEasy Podcast S15E2 - Rosie Le Faive - Islandora (Drupal-powered Document Asset Management system)

We talk with Rosie Le Faive about Islandora, a Drupal 9 powered Document Asset Management system.

URLs mentionedDrupalEasy News

Audio transcript 

We're using the machine-driven Amazon Transcribe service to provide an audio transcript of this episode.

Subscribe

Subscribe to our podcast on iTunes, Google Play, iHeart, or Spotify.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.
 

133,361 Curious about DrupalEasy’s Professional Module Development Course? We’ve got a free webinar for that!

Join us at 10:00 am ET on July 14, 2023 for a Closer Look at Professional Module Development, a new no-cost mini-webinar that provides an overview of what the two versions of our Professional Module Development course covers and insight into all of the benefits and resources that come with it. The Full version of the Summer 2023 session begins August 8, with the Lite version starting August 22nd.  

The 30-minute Closer Look webinar includes a curriculum overview, including the topics and modules that you will build during both the 90-hour full version and the 60-hour Lite version of the course. The curriculum and all materials of the PMD are continually updated to ensure that participants are learning the latest version and best practices.  

Mike Anello (@ultimike) will also cover who might benefit from the course, and the awesome resources that registration provides, including becoming part of the active DrupalEasy Learning Community and weekly office hours both during and after the course and access to screen casts and class recordings in perpetuity. Sign up for a Closer Look at Professional Module Development.

133,362 Jacqui Young: Came for the community, stayed for the code

After 20 years of swinging a gavel as a licensed auctioneer, Jacqui Young bravely picked up her laptop and filled out the application for Drupal Career Online so she could transform her lifestyle and pursue a passion. This began her official bid to become a full-on contributing member of the Drupal Community, which she had become acquainted with, and intrigued by, for several years as she accompanied her partner to Drupal events. 

Tagging along to various Camps and Cons, Jacqui became drawn to the mobile lifestyle that a career in web development has to offer. She also felt connected to the community, explaining “I really love the Drupal Community; it is generous, kind and intelligent.” Her technical background helped fuel her aspirations as well, having mastered some fairly complicated auction software and acing a few computer science courses that built her background in coding, the command line and Git. She looked into Drupal Career Online, made sure she had the prerequisites, applied and was accepted to the Fall 2018 session. 

From there, Jacqui’s outlook, abilities and attitude drove her along a relatively condensed path to her current position as Evolution & Support Engineer at Interpersonal Frequency, a Drupal agency that prides itself on building easy-to-use digital experiences that empower public organizations and the citizens they serve.Working for Interpersonal Frequency is the first and only time she has worked for someone other than herself. “ It’s kind of fun, she explains.  “It’s fun to have access to other smart people.” 

Her journey and rapid success is not typical, but then again, Jacqui is not ordinary either. She is fearless in taking on new things, knows how to communicate, and does it all with an amazing attitude. She also leverages every skill and experience she has, and can’t hide her sincere passion for Drupal and all that is good about the community. “I look at Drupal as getting paid to solve a puzzle,” she beams. “It’s important to be positive. “I think attitude is everything,” she continues. 

Shortly after she graduated from Drupal Career Online, she gave a presentation at DrupalCamp Atlanta, and made such an impression that she was approached immediately after with an offer of an internship, which she jumped on. She spent six months performing nothing but site audits, which gave her a great foundation for more technical tasks. She had planned to work as a developer for a few years, and then potentially move into managing people and projects. But for now, she is still really enjoying and focusing on becoming a better developer. 

Composer is a favorite tool of Jacqui’s as she loves to build micro-sites, and is now also going more into decoupled architecture as the agency’s new direction. Even with all of her skill and experience built on her technical skills, Jacqui is convinced that much of her success, and most developers’ success, is because of their soft skills.  “Communication is number one” she explains. And continues, “Listen well and repeat back.” She also adds building relationships and using patience as main ingredients in performing any role successfully in tech. 

She continues to enjoy and draw a lot of value from Drupal events. “You learn as much in the hallway, bars and parties as you do in presentations,” she muses. Her DrupalCon Pittsburgh experience included some technical conversations, some great sessions, especially enjoying Owen Bush’s talk on how to contribute. She was even inspired by fellow alumni and members of the DrupalEasy Learning Community who gathered for a semi-official lunch; becoming encouraged to suggest hiring junior developers as a way to build a strong dev team. 

When asked what she would share with people just getting into Drupal to support their career, Jacqui suggests “Find what you can give away, and give it away. Contribute to the project, go to meetups and be helpful; and opportunities will present themselves.” She continues, “ It is hard to do, (especially if you have no income) but you still should do it. I really think that’s the way to get in the door.” She believes that by going to local camps and sprints and not just meeting people but giving them help, new developers can learn and make a name for themselves. 

When asked what she’d like to share about her journey to this new career, Jacqui reflects, “It has been a really good career for me. I love open source values and it is good for the world.” She adds, DrupalEasy changed my life, you gave me an amazing launch.” Drupal Career Online, it is clear, was a tool that Jacqui fully leveraged to build a life around her aspirations, and we are proud to have been a part of it. 

The next session of Drupal Career Online begins in a few weeks.  For more information, join us for one of our no-cost Taste of Drupal information sessions. 

140,156 Honeypot and Antibot contrib modules make a great anti-spam team on Drupal sites

Site spam is a thing that most Drupal developers have to deal with. Even if the site(s) you manage don't allow for non-admin authenticated users, we're willing to bet there are still some anonymous-facing forms, including the main site Contact form and probably a Webform or two.

We've built and maintained a large number of Drupal sites over the past decade+ and for the past few years, we've settled on the combination of Antibot and Honeypot for most sites. Both modules are well-maintained, have support for Drupal core versions 7-10, and minimally impact real users.

While Antibot requires that real users have Javascript enabled, both modules have easy-to-understand configuration settings, with reasonable default values. One nit-pick - we wish the module maintainers would put their configuration links in the same Admininstration menu sub-menu.

If you're fighting the good fight, we recommend this combination of contrib modules.

The pixel art image used in this blog post was generated by the DALL-E project of OpenAI.

144,153 Smart Trim module - past, present, and future

The Drupal Smart Trim module is used by more than 65,000 sites, including over ⅔ on modern Drupal (8+) sites. It has proven to be a valuable tool to improve Drupal's core functionality to trim long text fields in an intelligent manner.

Late in 2022, we released a major update (2.0.0) to the module. Among other improvements, we delivered Drupal 10 compatibility and much improved automated tests. Since then, a 2.1.0 release (completed during the DrupalCon Pittsburgh community contribution day) has brought even more automated tests and functionality.

During DrupalCon Pittsburgh, Mark Casias (markie) and I discussed the future of the Smart Trim module and agreed on a few conceptual ideas that will guide our decisions about the module for the foreseeable future. We decided to share these ideas as a mission statement for the module:

Smart Trim is designed to be a focused, lightweight improvement over Drupal core's current formatter trimming capabilities. The maintainers' focus is stability and ease-of-use. Customizations to the module are encouraged with template overrides and Smart Trim hook implementations.

In short, we don't necessarily want to add more dials and levers to Smart Trim formatter's configuration; rather we are going to focus on stability and ease-of-use while at the same time ensuring that those who want to do more with Smart Trim have the necessary tools at their disposal.

To this end, one of the most significant additions to the 2.1.0 version of the module is that of a smart-trim.html.twig template file. This will allow Drupal developers to have complete control over the output of the module; reducing the need for Smart Trim formatter configuration options. In fact, the current version of the module includes a deprecated configuration setting in the UI that we plan on removing in a future release (other configuration settings that we consider edge cases will also be deprecated in the future.) 

Other improvements to the module over the past few months include:

Another decision that Mark and I made regarding the future of the module is that all commits must have test coverage. This makes a huge difference in the stability and quality of releases.

Most significantly, it cannot be overstated how much community effort, with time contributed by more than a few individuals, has resulted in the progress over the past few months. Among them, I'd like to mention Julian Pustkuchen (Anybody) and James Shields (lostcarpark) for the ongoing efforts. James is a recent graduate of DrupalEasy's Professional Module Development course and has been putting his new skills to use in this and other community projects.

The future of the Smart Trim module is bright. Changes implemented since the 2.1.0 release include:

Our current focus in the short term is on fixing bugs and continued improvements of our automated tests. We are excited about the direction the module is going and look forward to our next release.

Pages

You are here