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.
1 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Tech News

News ID Title News Details
115,181 Keeping your Drupal development tools up-to-date

Most folks in the community who are responsible for maintainting Drupal sites know that it’s important to keep them up-to-date with bug fix and (especially) security updates for both Drupal core and contributed modules. But what about the tools we use every day to build and maintain all those Drupal sites? 

As a general rule, I don't recommend updating things when you are near a task deadline, so as a new year begins, this might be a good time to take a look at your development tools and get things updated. This process can lead to improved performance, add new functionality, and maybe even keep your development environment more secure. Of course you need to keep in mind that updating things could introduce new bugs, so be methodical and make sure you understand the updates you apply.

Local development environment

If you use a Docker-based solution (as most of us in the Drupal community appear to be doing), not only should you be considering keeping it up-to-date (especially if you're using DDEV, Lando, or Docksal,) but also research and consider updating their dependencies, such as Docker Desktop or Colima.

I recently updated Colima to the latest version and found an inconvenient issue for those like me upgrading, but luckily was able to figure out an easy workaround with the help of Randy Fay. I was very fortunate that I chose a quiet time to update things where it was no big deal if things weren't working for a day or two.

Docker-based local development environments like DDEV, Lando, and Docksal include commonly-used Drupal development tools like Composer, so by keeping your LDE up-to-date, you'll be sure to be using a recent version of any tools they include. Refer to your LDE's documentation (and release notes) for more information. 

Integrated development environment

Most of us in the Drupal community utilize either PhpStorm or Visual Studio Code as our IDE. Both of these tools have regular releases and introduce new features, so be sure to keep these up-to-date. Furthermore, don't forget about all the extensions and plugins that provide additional functionality. 

In PhpStorm, just go to the Plugins section of Preferences to see which need updating. 

In Visual Studio Code, the Extensions sidebar will similarly display which of your installed extensions have available updates. Visual Studio Code also has a preference to automatically update extensions each time it is restarted.

Non-module Drupal project dependencies

While Drupal's Available Updates report is something that most developers are familiar with, a typical Drupal project has other dependencies that don't appear on that report. This includes dependencies such as Drush, PhpStan, and various Composer plugins. It is always a good idea to check for updates using composer outdated -–direct and then updating any outdated dependencies. 

Code quality tools

Finally, if you install code quality tools globally, then now is also a good time to check for, and apply, updates. For example, I generally install Drupal Coder globally (not as part of each Drupal project) - therefore, a few times a year I make a point to update it in order to keep my code quality top-notch.

Operating system

Going back to the top level (or bottom, depending on your perspective) of your development tools: The operating system of your computer. I normally recommend that folks do not immediately update their operating system when a new version is released - rather wait a month or two to ensure that any potential nasty issues are ferreted out and solved by others who are more interested in living on the edge. 

Tending to your development tools will keep you at the cutting edge of Drupal development, help to ensure that you are catching all deprecations, and keep your code quality pristine. 

DrupalEasy's Professional Module Development course teaches how to properly setup a professional Drupal development environment, including both PhpStorm and Visual Studio Code, PhpStan, and Drupal Coder.

120,764 Easy fix for phantom duplicate custom module files (due to Composer) in popular IDEs

When writing Drupal custom modules, best practice dictates that the module should be written in the project root's /modules/ directory - so that composer require can be used add the custom module as a dependency to the project (with a little help from the composer/installers plugin, of course). In most cases, the module's code is then symlinked from the /modules/ directory to the /web/modules/custom/ directory.

One potential pitfall of this approach is that both PhpStorm and Visual Studio Code will see both the "copies" of the files in the custom modules, leading to duplicates in IDE search results, code quality tools, and other places. 

Luckily, it is an easy fix for both PhpStorm and Visual Studio Code.

The following is an excerpt from the curriculum of Professional Module Development, a 90-hour, best-practice focused course from DrupalEasy.

Visual Studio Code

This issue can be mitigated in Visual Studio Code by navigating to "Preferences | Settings" then searching for "symlink" and disabling "Search: Follow symlinks". Note that Visual Studio Code has per-user and per-workspace (project) settings, so consider disabling this feature for one or both.
 

 

PhpStorm

This issue can also be mitigated in PhpStorm by marking duplicate directories as "Excluded". This can be done by right-clicking on the directory to be excluded in the project browser and selecting "Mark directory as… | Excluded". For example, to exclude the entire web/modules/custom/ directory:


 

120,765 Keeping up with DrupalEasy

With all the new stuff we have in 2023, now is a great time to ensure that you're keeping up with DrupalEasy in the way(s) that suit you the most. Whether you are active on social media, listen to podcasts, or just want to keep up via email, we've got what you need to ensure you never miss out on upcoming DrupalEasy classes and consulting offerings. 

Keeping up with DrupalEasy can also be financially beneficial, as we sometimes offer discount codes to our courses exclusively to those that follow us in a particular medium. 

Social media

No matter where you like to hang out on social media, chances are that we're there as well:

Podcast

The DrupalEasy Podcast, one of the longest-running Drupal-focused podcasts, has recently updated its format and schedule to seasonal. Season 14 debuted recently with af "How to"  theme - each episode of season 14 is focused on how to accomplish a specific Drupal-related task. Listen directly on DrupalEasy.com or just search for DrupalEasy in your favorite podcast app (or on YouTube!)

RSS / Drupal Planet

If you're a bit of a Drupal news junkie, then chances are you're familiar with either RSS or Drupal Planet - or both. In that case, we have you covered as well with our RSS feed (which is automatically pulled into Drupal Planet). 

Newsletter

Finally, if you want to maximize your signal-to-noise ratio, then there's no better option than just subscribing to the DrupalEasy newsletter. Delivered to your inbox once per month, it’s the best direct source of information from us to you. Subscribe using the quick form that appears in the footer of every page of DrupalEasy.com  

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

120,771 Perfecting the Art of Drupal Talent Development

Drupal Career Online Palantir.net Fellowships enrich their corporate character

When George DeMet and Tiffany Farriss brought Palantir.net into being in 1996, they sought to create an organization that strives for excellence not only in client services, but also in a collaborative, creative environment in which its staff brings out the best in each other. They also believe that the more diverse that staff, the better their corporate culture can achieve excellence on all fronts.

When you chat with George, Tiffany, or really any Palantiri, you realize these guidelines are not just words in a value statement; collaboration and creativity truly are the undercurrent of everything they do, including making sure that present and future Palantiri succeed. 

Interns are a key component of Palantir’s team, which includes senior engineers, designers, and architects who started as interns nearly 10 years ago. In addition, they are committed to growing talent in a thoughtful, inclusive way. “Some of our longest-serving team members started with us as interns out of college, and we are always looking for opportunities to help people with passion and potential to build experience and expertise by working with our team on real-life projects,” George beams. 

A few years ago, Palantir pioneered a mentoring initiative to help the Drupal Community become more diverse. In addition to contributing to the community, it also clarified for Palantir that skills training with a paid internship could really help them to achieve the best results from their efforts. “Growing and developing talent has long been a priority for us,” says George, so building out internships with a training component would enable recipients to have more confidence as they gain real-world experience and would make it easier for them to assimilate into the team.

“The other key takeaway was that we needed to have a dedicated partner to help assess whether candidates would be a good fit, provide the upfront training and continue to be available as a resource during the internship period and beyond,” George says. “Given those requirements, DrupalEasy was an obvious choice for our Fellowship program. The Drupal Career Online  curriculum provides a solid foundation for our interns, and the ongoing support provided by DrupalEasy helps them continue to grow and gain confidence as they progress on their career path.”  

Adwoa Kesse, Employee Experience Manager, is on Palantir’s hiring and operations teams and coordinates the newly revived internship program, which, for the past year, has included fellowships through DrupalEasy’s Drupal Career Online. Palantir’s Fellowship program targets those who have experienced marginalization due to racism, misogyny, transphobia, or other forms of discrimination or are members of a marginalized community that has been underrepresented in the technology sector. Several other organizations provide scholarships for the DCO as well.

The Palantir Fellowship program provides participants with underwriting for the class tuition, a laptop once they accept the fellowship (if needed,) a stipend once class starts, and hourly pay once the intern graduates from the DCO and begins working. From Adwoa’s perspective, integrating the DCO Fellowship has really enriched the program. “We really don’t have to worry about the technical side of candidates, as Mike takes care of that piece,” she explains. 

DrupalEasy’s Mike Anello interviews all prospective class applicants, including scholarship seekers, and determines if they have the prerequisites and mindset to be successful in the class.  Only applicants who are accepted to Drupal Career Online are presented to Adwoa for consideration. Often Mike provides a pre-work program that candidates can complete to get up to speed so they can continue the fellowship process and be successful in the 12-week DCO program.

This process allows Palantir to be confident that the team members they are considering have the technical aptitude to be successful in Drupal, so the hiring team can focus on whether the potential intern will be a good fit in the Palantir culture: Do they have a growth mindset? Are they curious and will they be comfortable working remotely?  All key aspects of Palantir’s hiring decisions as they continue to build and enhance the collaborative, creative environment in which everyone encourages and celebrates the best in each other.  

“Everybody has their different journeys, but we are very satisfied with what they are doing,” Adwoa explains about the Fellowship interns. “Every person is different, so each has a different ramp up, but they are all willing to learn and grow.” Positions that interns are working toward include Engineer and Front-End Developer, and each are assigned a mentor once they are awarded a Palantir Fellowship. 

The most challenging part of the program is the transition to employment and determining what each intern needs, including Drupalize.me follow-on training resources, training projects and transitioning them to roles within the team and building confidence on actual projects. 

According to George, “Fellowship program recipients have been full of curiosity, humor, and a desire to learn. We made full-time offers to all of the interns out of the first two Drupal Career Online cohorts, and we are looking forward to working with the graduates of the latest cohort.” 

He explains that they think the “key to the success of the program is the vetting process that is conducted by DrupalEasy before being accepted to Drupal Career Online, as well as the interviews our team members conduct with scholarship applicants. When combined with the ongoing progress reports we receive during the course, we have a very good picture of what a recipient’s skills and growth opportunities are before they begin their internship.”

Another ingredient of the success of the Fellowship program is that ongoing mentorship is essential not just during the Drupal Career Online course, but also during the internship period and beyond. In addition to internal mentors, Palantir engages with DrupalEasy to provide focused mentors and encourages the Fellowship participants to engage in the DrupalEasy Learning Community by attending weekly office hours, which provide a safe space for them to ask questions they may not feel as comfortable asking co-workers.

An unexpected benefit of the program, according to George, is that they are able to reuse many of the resources that were created to help on-board Fellowship recipients for other new hires who did not come through the program.  It also helps them improve support for junior-level developers. “Serving as mentors to our scholarship recipients has been a great experience for our existing team members, helping them to develop and exercise skills that are important to their own career paths at Palantir,” he adds. 

George sums it all up:, “Our partnership with DrupalEasy has enabled us to bring on new team members who not only add value to our project teams, but also contribute to the growth of Palantir’s culture.” 

If you would like to discuss how your organization might join others who participate in the Drupal Career Online Scholarship program, contact us!

120,772 Drupal's OpenAI / ChatGPT / AI Search Integration contrib module - initial impressions

Ever since it was announced, I've been itching to play with the new OpenAI / ChatGPT / AI Search Integration contrib module. From what I had read about it from Kevin Quillen, it was being written in a way that was going to make it flexible and with an eye toward customization. 

On a self-serving note, one of our clients is interested in an AI-based solution for a task we're working on for them, so I had an agenda; test-driving this module for content-related tasks. 

My initial impressions came from using version 1.0.0-alpha10 and within the first 20 minutes:

  • The module only supports text fields (so far…)
  • The module is only compatible with Drupal 10.
  • There's not too much documentation yet - which isn't super-surprising considering it's being actively developed (and is still in alpha state). 

While the module includes nine(!) sub-modules, I decided to focus on only three of them - all related to content generation and manipulation.

While there is a free OpenAI API tier, it is important to note that the experiments below were all made with a paid OpenAI API account - the total cost was less than $0.25 USD.

A note about OpenAI API keys

My OpenAI account has two organizations - my Personal organization and an organization created by our DrupalEasy client. My Personal organization is not yet on a paid plan, but our client's organization is. When creating an API key be sure to select the Default organization first, and then click to create a new API key. It appears that API keys are somehow associated with the organization.

Before I figured this out, none of my initial testing worked, I would always get a OpenAI\Exceptions\ErrorException or a You exceeded your quota… error because my personal account's initial credit has expired ☹️

OpenAI ChatGPT Devel Generate

Being able to generate realistic sample content is the dream (or not) of many Drupal developers - this submodule promises to provide this functionality. Via the Configuration | Generate | Generate content from ChatGPT admin menu item, this allows developers to select the content type, Profile (which is provided as part of the prompt provided to the OpenAI API), and text fields to populate with the OpenAI response. With the following Profile, I was able to populate the Title and Body fields with content.

Profile: Your task is to generate content. I would like you to generate content about Batman.

Sample node content:

Title: The Gadgets and Tech of Batman: Examining the Caped Crusader's Arsenal

Body: Batman is known for his impressive arsenal of gadgets and technology, which he uses to fight crime and protect the citizens of Gotham City. From his iconic Batarangs to his high-tech Batmobile, Batman's gadgets are an essential part of his crime-fighting persona. One of Batman's most famous gadgets is the utility belt, which contains a variety of tools and weapons that he can use in a pinch. These include smoke pellets, grappling hooks, and even a miniature explosive charge…

The content generation process is much slower than standard Devel Generate (for obvious reasons), but it does result in much more engaging sample content. 

OpenAI Content Tools

This submodule provides some interesting tools for updating content. Once enabled, the module provides some options in the sidebar of the Drupal add/edit content page.

Each of the three tools demonstrated below provide their results directly in the sidebar - it is up to the author to copy/paste the results into the appropriate fields in the node's add/edit form. It seems that there are contribution opportunities for further integration. For example, it would be useful to automatically add the summary text to the Summary sub-field, should it exist (with consideration for what, if any summary text already exists…)

Adjust content tone

This allows the author to change the tone of the body text by selecting one of the default options: Friendly, Professional, Helpful, High school level reader, College level reader, and Explain it like I'm 5.

For example, with the original text of:

But we’ve met before. That was a long time ago, I was a kid at St. Swithin’s, it used to be funded by the Wayne Foundation.

The Friendly option returned:

Oh wow! We've actually met before, haven't we? That was such a long time ago when I was a youngster at St. Swithins. I remember it was funded by the Wayne Foundation back then!

The College level reader option returned:

We've met before. That was quite a while ago - when I was a student at St. Swithins. It was funded by the Wayne Foundation back then.

Extending the module to include additional options looks to be currently possible via a hook_form_alter().

Summarize text

This option summarizes the original text as:

The speaker and the listener have met before, when the speaker was a child attending the St. Swithins school. The school was funded by the Wayne Foundation.

When testing with much longer body text (~45,000 words) a summary was provided, but due to limitations of the API, only the first 3,900 characters of the body text were provided to the API. 

Suggest taxonomy

Using the same original text, OpenAI provides the following taxonomy term suggestions:

Funded, Kid, St. Swithins, Wayne, Long

Taking a quick peek at the code, the prompt used is Suggest five words to classify the following text. The words must be nouns or adjectives in a comma delimited list.

Again, poking around the source code for a few minutes showed that there are potential options to extend the current functionality. This includes the ability to add additional content tone and taxonomy term generations options.

OpenAI CKEditor integration

This submodule provides a new OpenAI button that can be placed on any CKEditor toolbar. For this example, I added it to the default Basic HTML text format toolbar (be sure to also enable the OpenAI tools option in the CKEditor 5 plugin settings area for each text format!)

Text completion

When selected, a text field is displayed for the author to provide the prompt to generate text based on (much like ChatGPT). I tested it with the prompt:

Who is Batman's best friend?

The response:

Batman's best friend is his loyal butler, Alfred Pennyworth.

The response is added directly in the text field at the current cursor position. 

Adjust tone/voice

Allows the author to provide an adjective to adjust the tone/voice of the entire (or selected portion of) body field. This is very similar to the OpenAI Content Tools module's Adjust content tone option, but allows for a freeform prompt.

Original text:

Bruce Wayne, eccentric billionaire. I'll be standing where l belong. Between you and the peopIe of Gotham. Does it come in black? No guns, no killing. It's ends here. Hero can be anyone. Even a man knowing something as simple and reassuring as putting a coat around a young boy shoulders to let him know the world hadn't ended.

Using formal resulted in the original text being replaced with:

Bruce Wayne, eccentric billionaire. I'll be standing where I belong - between you and the people of Gotham. Does it come in black? No guns, no violence. Let's put an end to this. Heroes come in all shapes and sizes - even a man who can show a young boy that the world is still a safe and comforting place, simply by draping a coat around his shoulders.

Summarize

Same as the option provided by the OpenAI Content Tools submodule. 

Reformat/correct HTML

Not tested.

Translate

Allows the author to provide language to translate the contents of the body field. Using Flemish on the same original text as above resulted in the original text being replaced with:

Bruce Wayne, excentrieke miljardair. Ik zal staan waar ik hoort. Tussen jou en de mensen van Gotham. Komt het in het zwart? Geen wapens, geen doden. Het eindigt hier. Een held kan iedereen zijn. Zelfs een man die iets zo simpels en geruststellends doet als een jongen een jas omhangen om hem te laten weten dat de wereld niet was geëindigd.

I'm not a native Flemish speaker, but both Google translate and a close-to-fluent Flemish speaker agree that the translation is sound.

Summary

Overall, once I got past the API and (minor) configuration hurdles, the submodules I tested performed as I expected. I did poke around the code a bit with an eye toward expandability/customization to support our client's requests and was not surprised by the high quality of the code.

I continue to think about how scary it is to generate quality content based on a short(ish) prompt - I really worry about the implications of relying on potentially low-quality content generated purely by AI.

I look forward to seeing how this module develops in the next few months. 
 

120,766 DrupalEasy Podcast S14E3 - Leslie Glynn - How to test Project Browser

We talk with Leslie Glynn about the Project Browser initiative with a specific focus on how to check it out and get involved with the project.

URLs mentioned DrupalEasy 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 or Miro. 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.

120,767 DrupalEasy Podcast S14E4 - Ted Bowman - How to test Automatic Updates

We talk with Ted Bowman about the Automatic Updates initiative with a specific focus on how to use it and provide feedback.

URLs mentioned DrupalEasy 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 or Miro. 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.

120,768 DrupalEasy Podcast S14E5 - Rod Martin - How to be a software trainer

We talk with Rod Martin about what it takes to be a software trainer (including informal, one-on-one teaching) and how students can best prepare for a training.

URLs mentioned DrupalEasy 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 or Miro. 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.

120,769 DrupalEasy Podcast S14E6 - Ryan Price - How to start a Drupal project the right way

We talk with Ryan Price about how to start a new Drupal project the right way, including development environment setup, code base setup, initial modules, Git setup, and common newbie mistakes.

URLs mentioned DrupalEasy 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 or Miro. 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.

120,773 Adding fields to the "Authoring information" area on a standard Drupal node add/edit page

Have you been in the situation where you've added a new field to a Drupal content type and you want that field to appear somewhere in the sidebar of the node add/edit page for that content type (instead of in the main column along with all the other fields)?

If so, the following snippet of code, added to a custom module on your site is exactly what you're looking for. In this example, a user reference field with the machine name of field_additional_authors  was added to a Blog content type. This code places the field in the Authoring information accordion item in the sidebar:

/** * Implements hook_form_alter(). */ function my_module_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void { // Move the "Additional authors" field to the "Authoring information" // accordion. if (in_array($form_id, ['node_blog_edit_form', 'node_blog_form'])) { $form['field_additional_authors']['#group'] = 'author'; } }

Note that the add and edit forms have slightly different $form_id values.

Pages

You are here