Specbee: When ChatGPT Meets Drupal: The Future of Intelligent Websites

Unless you have been exceptionally out of touch with current events lately, there’s a good chance you have heard about ChatGPT. Since it was released by OpenAI last year, it has taken the world by storm. ChatGPT is a conversational AI tool, where we can throw a question at it and it answers. At the moment, it's all the rage, and it's being used in a variety of ways. Regardless of your personal stance, we are witnessing a huge change in technology from an AI perspective. The way end users get used to it might change with time from here on. ChatGPT is one major breakthrough or the first time in the AI world where a human-like interaction is possible. This will only keep getting better. There are multiple module projects being implemented in the Drupal contrib space for integrating ChatGPT technology. In this article, let’s take you through one such Drupal module today: OpenAI / ChatGPT / AI Search Integration. Before we dive into the module, let us understand something about OpenAI. What is OpenAI OpenAI is a research lab based out in California and it focuses on developing AI and finding ways to make AI useful in our everyday lives. Apart from exploring AI technologies, OpenAI provides an API to interact with their software. Integrating with a good API has become relatively easy in Drupal in 8/9/10 versions. Before we get into the module, you will need to register on the OpenAI site, create a secret key, and get yourselves ready to use the Drupal module. Here’s a short and straightforward video to help you get started with this. Integrating with the Drupal OpenAI / ChatGPT / AI Search Module This is one of the contributed modules that bring ChatGPT’s capabilities into Drupal. The OpenAI/ChatGPT/AI Search Integration module is compatible with only Drupal 10 and only has an alpha release right now. We can install this module using Composer. composer require 'drupal/openai:^1.0@alpha' The module consists of 9 submodules which provide different functionalities. To mention a few:•    ChatGPT/Prompt explorer•    Content Tools•    CKEditor integration•    Log analyzer•    Text Embeddings We will be dealing with the functionalities that are involved with content generation and manipulation in this blog. 1. Setting up→ For setting up the module, please create an account on the OpenAI website. → Create a secret key.→ Make sure to copy the Organization ID as well. → Finally, enter the values in the OpenAI settings from the Drupal admin. Image: OpenAI settings interface from Drupal setup 2.    ChatGPT/Prompt Explorer→ ChatGPT/Prompt Explorer enables administrators to experiment with the OpenAI services→ These work exactly like ChatGPT, where you will have a textbox for asking a question, and the answer is received in a response in another textbox.→ Apart from this, you will have different form options like model, max tokens, and temperature. Using these options, a user will have different responses. GIF: ChatGPT/Prompt Explorer 3.    CKEditor→ This is the most important implementation of this module.→ There is a CKEditor button provided which lets you ask OpenAI ChatGPT a question and retrieve a text response.→ The button must be enabled from the “Text format and editor” settings.→ Apart from content generation, you also have a few other functionalities such as Summarizing, Translating, Adjusting content tone, and Correcting faulty HTML.→ Every function sends a question to ChatGPT and receives a response back.   Image: Pull the button to active toolbar option in Text format settings. Image: Enable the option from Text Format Settings. Image: CKEditor settings from article content type 4.    Content Tools→ The Content Tools functionalities are very similar to CKEditor ChatGPT.→ With this module, the ChatGPT functionality is available for all the entity forms.→ The difference between CKEditor and Content Tools functionality is that we can use any field to generate a response.   Image: Content Tools options on node form. Image: Content Tools options on node form. 5.    Log Analyzer→This functionality adds an extra message to Drupal’s logging system.→The logger messages sometimes are easily understandable for developers with less or no experience.→OpenAI adds a very generic simple message explaining that error in a simple way Image: Logger Analysis Final Thoughts As we have seen, the OpenAI ChatGPT module provides various functionalities that bring AI capabilities into Drupal. Also, there are enhancements that can improve this module and add some more new features. There are similar other modules that provide similar functionality in different ways. That being said, the OpenAI ChatGPT must be used with a lot of caution and content has to be verified before we publish it as this is machine-generated content. We must handle the content responsibly and refrain from sharing sensitive information while interacting with ChatGPT or any similar AI tools. Explore our Drupal Services for innovative web experiences. Let's build forward together!  

Talking Drupal: Talking Drupal #419 - Drupal 7 EOL & Backdrop CMS

Today we are talking about Drupal 7 EOL, Backdrop CMS, and Upgrade strategy from Drupal 7 with guests Jen Lampton & Laryn Kragt Bakker. We’ll also cover Acquia Migrate: Accelerate as our module of the week.

For show notes visit: www.talkingDrupal.com/419

Topics
  • When is Drupal 7 EoL
  • If someone is on Drupal 7 what are their options
  • If someone does not have the resources to upgrade to Drupal 10 what can they do
  • Can someone stay on Drupal 7 after EoL
  • What is Backdrop CMS
  • Listener question - James: Some people have mentioned that Backdrop has changed significantly since forking, does this affect upgrading from drupal 7
  • Listener question - James: Will there be another fork
  • How can Backdrop help people get off of Drupal 7
  • Tell us a bit about Backdrop’s annual online event
  • Is Backdrop negatively affecting Drupal 10 adoption
  • How does someone get involved with Backdrop
  • What are some big features on the Backdrop roadmap
Resources Guests

Laryn Kragt Bakker - atendesigngroup.com - laryn

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Jen Lampton - jenlampton.com - jenlampton

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Acquia Migrate: Accelerate

  • Brief description:
    • Have you ever wanted to add a layer of automation to Drupal’s migrate API, to simplify the process of migrating content and site architecture from Drupal 7 to Drupal 9? There’s a module for that.
  • Brief history
    • How old: created in July 2020 by Aaron Winborn-award winner webchick
  • Versions available:
    • 1.8.0 release which works with Drupal 9
  • Maintainership
    • Actively maintained - latest release, its first as open source, was in the last week
  • Number of open issues:
    • 3 issues, none of which are bugs, and all labeled as fixed
  • Usage stats:
    • None, officially
  • Maintainer(s):
    • Current release by Wim Leers, a longtime Drupal contributor and core subsystem maintainer
  • Module features and usage
    • The goal of Migrate Accelerate is to make Drupal core’s migrate API something that can be used by less technical users to migrate a Drupal 7 site to a modern version of Drupal
    • Relies on an Acquia CLI command to analyze your Drupal 7 site, so it can generate a composer.json file using an existing matrix of hundreds mappings from legacy modules to modern Drupal equivalents, including patches
    • That composer file becomes the basis for your migrated site, into which it will begin to migrate your content architecture
    • It provides a dashboard that lists out the various kinds of content found on the origin site, with an ability to control the order in which the migrations will be performed
    • At any point it’s possible to see a live preview the content that’s been migrated, within the same UI
    • There’s also a drush command to trigger the same process, which actually runs more efficiently but still allows for live preview
    • If you want to get an estimate on how much of your Drupal 7 site can be migrated automatically, there is also a Flightpath report you can generate (using a drush command) which is an HTML file that summarizes how much of your Drupal 7 site can be migrated automatically
    • Migrate Accelerate used to be available only to Acquia customers and partners, but with this new release anyone in the community can use it to help them migrate their Drupal 7 site forward

The Drop Times: Write, Erase, Rewrite and Repeat

Dear Readers,

In all its forms, writing often appears as a daunting task, a paradox of creativity and precision that demands perseverance and hope. Moving pen against a piece of paper or fingers over a keyboard requires an unshakeable commitment to bringing forth thoughts and ideas, whether they emerge as authentic expressions or mechanical arrangements of words.

In the timeless verses penned by Katsushika Hokusai, we are privy to the gentle whisper of creativity's muse:

"I write, erase, rewrite 
Erase again, and then 
A poppy blooms."

—Katsushika Hokusai, A Poppy Blooms

These lines serve as a poignant reflection of the creative journey, where the path to brilliance is often obscured by layers of revisions and rewrites. Indeed, I am no stranger to the backspace key, a constant companion in crafting this very newsletter. Much like the poppy that buds and withers before its triumphant bloom, we, as writers, are bound by the intrinsic human inclination to err yet also to redeem ourselves through the transformative acts of erasing and rewriting. In this very process, the metaphorical poppies of our creativity ultimately flourish.

But what of the Drupal community, you may ask? When change is the only constant, the Drupal community is much like the poppy described in Hokusai's haiku. It, too, experiences its cycles of growth, refinement, and blossoming. The collaborative efforts of developers, designers, and enthusiasts mirror the writer's journey of writing, erasing, and rewriting, with each iteration bringing Drupal closer to its full potential.

In this delicate dance of imperfection and aspiration, we embark on a voyage through the intricate realms of writing—a journey replete with missteps, yet one that, through tenacity and determination, yields the exquisite blossoming of ideas, narratives, and the quintessence of human expression. It is a journey where every word, every stroke, and every backspace key press leads us closer to realising our creative aspirations, each revision chiselling our narrative until it shines its brightest, much like the Drupal community itself, where innovation and collaboration, the act of writing, erasing, and rewriting is an artistry that blooms with the promise of continuous growth and transformation.

In the past week, The DropTimes published an interview with Sven Schüring, a distinguished consultant in KRZN, known for his expertise and unwavering advocacy of open-source principles and web accessibility. Engaging in a profound conversation with Thomas Alias K, a former sub-editor at TDT, Sven delved deep into the imperative of demystifying the web development culture from 'them' to 'us'.

On our constant quest to find the greatness of Drupal, I sought the expertise of Italo Mairo, a prominent contributor to Drupal's GIS module habitat. Together, we compiled a comprehensive list of Geographic Information System (GIS) modules available within the Drupal framework, further enriching our readers' knowledge.

In the realm of digital innovation, NETNODE AG, a Swiss-based digital agency renowned for its prowess in Drupal and NextJS development, introduced NodeHive—a pioneering, eco-conscious headless Content Management System (CMS) tailored to organisations committed to sustainability and innovation. In a stimulating conversation, Lukas Fischer, Founder and Product Steward of NodeHive, shared insights with me about their journey towards a sustainable and greener digital future.

Drupal enthusiasts take note of the upcoming DrupalCon Lille, a mere two weeks away! The event's website now features an extensive list of accommodations to ensure a comfortable experience for all attendees. Meanwhile, DrupalCon Portland 2024 has commenced its Call for Papers, and registration for Drupal GovCon 2023 in Bethesda is now open. The New England DrupalCamp has unveiled its session agenda, promising knowledge-sharing opportunities. TDT has also compiled a list of events within the Drupal Community for the week.

In recognition of excellence, the Acquia Engage Awards 2023 has unveiled its list of finalists, selected from an impressive pool of 85 entries. Acquia has also released an e-book, "Setting The Record Straight on Drupal Myths," promising to debunk common misconceptions surrounding the platform. Furthermore, the transformative impact of LocalGov Drupal Microsites on the digital outlook of UK Councils is worth celebrating.

amazee.io has recently announced a strategic partnership with Tag1 Consulting, Inc., marking a significant development in the industry. Meanwhile, Swiss Splash Awards has returned triumphantly after a three-year hiatus, and Unic's Graubuenden.ch swept the accolades. The latest API Resilience podcast episode explored Composable Web with John Doyle and Henk Beld.

In a substantial regulatory update, the latest iteration of the European Accessibility Act (EAA) will introduce stricter accessibility requirements for digital products, focusing on websites. This landmark regulation is scheduled to come into effect on June 28, 2025, emphasising the growing importance of web accessibility.

LN Webworks generously shared ten vital tips for Drupal site maintenance in a recent article, offering practical guidance to website administrators. Furthermore, cmsMinds has undertaken the task of demystifying the intricate Drupal domain, providing an extensive guide that elucidates 16 essential Drupal terms, their significance, real-world applications, and best practices.

Exploring the role of Drupal as a Content Management System (CMS) in the education sector, Anastasia Rats authored an article published by Five Jars. Similarly, LN Webworks delves into the compelling reasons behind Drupal's popularity among higher education institutions, shedding light on its suitability for their unique needs.

That concludes the highlights of the week's developments in Drupal. Let us collectively celebrate the continued growth and innovation within this thriving community.

Sincerely, 
Alka Elizabeth 
Sub-editor, The DropTimes

Metadrop: Drupal Updater: Streamlining Drupal Maintenance Updates from CLI

Drupal, a powerful content management system, relies on a multi-component ecosystem comprising Drupal modules, themes, vendor packages, and external libraries. Regular updates are essential to keep your Drupal project secure, efficient, and equipped with the latest features. However, managing these updates manually can be time-consuming and error-prone.

The update process typically involves package updates, thorough testing (both automated and manual), and ensuring stability. Automating this process can alleviate the burden of manual labor and allow teams to focus on critical tasks. Furthermore, having a standardized update procedure ensures consistency across the development team.

Additionally, in Drupal, individual modules may introduce configuration changes, making it crucial to isolate these changes in separate commits, combining package updates with the associated configuration. This practice allows for easy rollbacks and commits revert when necessary.

Drupal Updater to the Rescue

The Drupal Updater is a versatile tool compatible with any Drupal 9 and above installation. Its primary function is to detect and update outdated packages listed in the `composer.json` file, along with their associated configuration. 

More info and full documentation on GitHub…

LN Webworks: Drupal BigPipe Module: The Phenomenal to Improve Website Performance

Image removed.

According to intriguing research, pages with a load time of 1 to 2 seconds have the maximum conversion rates, and with every additional second of load time, the conversion rate drops by 4.42%. Surprising. We live in a world where speed is everything. If your website performance cannot meet the expectations of the visitors, the stakes are quite high. So, what can you do to boost website performance? Gladly, there are numerous techniques available and the BigPipe technique is one of them. If your site relies on Drupal, you can install the BigPipe module with incredible Drupal 10 compatibility to leverage the power of this technique. It is interesting to note that the BigPipe technique was initially developed by Facebook but today, a plethora of organizations are utilizing it across the globe.

Centarro: Commerce Stripe release adds Apple Pay + Google Pay support

Drupal Commerce has long integrated with Stripe through the Commerce Stripe project. Multiple members of our team have contributed to the integration over the years, including the Stripe Connect implementation on Drupal 7 and Card Element improvements for the Drupal 9/10 version. However, until recently, we never had significant time to focus on the integration.

That all changed this summer as multiple merchants hired Centarro to expand the module's capabilities. Each one benefited from the contributions funded by the others, while their own funding ensured the specific features they needed were incorporated into the whole. Most of this work centers around a Payment Element integration, which is now available as of yesterday's 8.x-1.1 release. 🥳

Read more

Drupal Core News: Drupal core's GitLab CI testing is now five times faster than DrupalCI

While Drupal moved its code hosting to GitLab five years ago, moving testing from our home-grown DrupalCI to GitLab CI has been a gradual process. We are announcing several important changes and future plans in this post that affect all developers working on code on Drupal.org.

Contributed projects should now use Gitlab CI

As of July 2023, contributed projects are fully equipped to adopt GitLab CI, and should do so.

The DrupalCI system will be retired once its functionality for Drupal core and the Security Team has been fully replaced by GitLab CI. While we don't have a specific date for that yet, it will be retired within a year.

Testing core is now five times faster

We've been adapting our GitLab CI configuration for better core testing. Core testing on GitLab CI is more modern and significantly faster than Drupal CI. Drupal CI core runs take just over 50 minutes, but GitLab CI can run the same test suite in under ten minutes!

How did we do it?

You don't need to know the internal details of how this was achieved to benefit from it, but here is a high level summary, if you are interested:

  • Mounted MySQL and the filesystem on ramdisks for faster access.
  • Introduced different jobs for different linting types and test suites so they start at the same time.
  • Specified explicit job dependencies with the 'needs' keyword so that jobs can start sooner.
  • Made tests run concurrently on each runner via run-tests.sh.
  • Used parallel test runners for functional tests to allow over 100 tests to be executed simultaneously.
  • Identified the slowest tests and tagged them with @group #slow. Using this, we then distribute the slowest jobs at the beginning of each run and between runners. This means they finish as early as possible, instead of continuing to run when all the shorter jobs have finished.
  • Refactored the slowest tests that take more than six minutes for a single test class into multiple classes so those can run in parallel.

Core on-commit testing and scheduled testing now moved to GitLab CI

Due to the performance improvements, we moved several testing setups from DrupalCI to GitLab CI. Drupal core is automatically tested on GitLab CI following each commit and on a set schedule to give early warning of possible regressions.

Image removed.
GitLab CI test matrix results shown for a commit

Take advantage of fast test runs and early feedback in core merge requests today!

Merge requests filed in GitLab for core issues will automatically benefit from all these improvements. When coding standards are not met or test failures occur, the GitLab UI makes it easier to see which parts of the pipeline have failed and why, and will report back on GitLab as soon as they're done. No more waiting for the full pipeline to complete!

If you have an existing merge request from before GitLab CI support was added to core, rebase it on the 11.x branch to automatically gain support.

Test-only runs are now automated in GitLab CI

To prove that added test coverage for a bugfix is working as intended, we often require a patch or merge request that has only the test coverage additions (without the code for the bug fix). This has meant that either two patches or two merge requests for each issue were needed. Now, we have an automated solution to run only the changed tests. So, in most cases a separate merge request will no longer be needed! If an issue using patches is missing a test-only patch, it will be marked "Needs work" and must be converted to a merge request (so that the test-only CI job can run without the need to manually create a test-only patch).

Image removed.
GitLab CI child pipeline showing automated test only option

Code quality checks are now integrated in the merge request user interface

Another major developer experience improvement is that code quality checks are now integrated into the merge request user interface, with reports displayed separately from test results and even displayed inline in the code review interface.

Image removed.
GitLab integrated code quality check report

GitLab CI jobs are re-run when failures are encountered outside tests

Another improvement over DrupalCI is that GitLab CI jobs will re-run automatically (up to 2 retries) if there were failures outside of tests, such as timeouts, scheduling issues, etc.

Thank you!

All of these improvements are thanks to tremendous work by Moshe Weitzman, Lee Rowlands, Kirill Roskolii, Chris Burgess, Nick Schuch, Fran Garcia-Linares, Luhur Abdi Rizal, Michael Strelan, Alex Pott, Nathaniel Catchpole, Dave Long, Björn Brala, Neil Drumm, Wim Leers, Juraj Nemec, and the Drupal Association for prioritizing developer tools improvements. This will be an incredible benefit for developer productivity!

Future milestones

Automated performance testing is coming

OpenTelemetry Application Performance Monitoring capability was recently added to Drupal core. More infrastructure is needed to collect that data including GitLab CI configuration updates to run performance testing on a schedule.

Internal Security Team testing will move to a private GitLab.com mirror

DrupalCI is still used for testing core patches privately for security releases. We plan to move this to a private GitLab.com mirror with issues privately submitted on GitLab.com.

Drupal 7 core and contributed projects will move to GitLab CI

We are currently preparing Drupal 7 core for Gitlab CI and preparing CI templates for Drupal 7 contributed projects. Drupal 7 test run times on GitLab CI are down to three minutes and include PHP compatibility checks, which were previously not run on Drupal 7 patches. Once those are finalized, only GitLab CI will be used for testing Drupal 7.

Electric Citizen: Cookie Compliance and Privacy

Image removed.

You probably noticed it for the first time several years ago. You were trying to visit some website or online article–but before you could read or do anything else, there was suddenly a pop-up window or banner blocking you.

Image removed.

And the message wasn’t trying to sell you anything. It was simply about “cookies”. Most followed some version of the following– ”this site uses cookies, and I hope you’re ok with that.” They often didn’t say more than that. Just that this website relies on cookies and they thought you should know. Don’t like it or understand what they’re talking about? Well, too bad.

I guess you could always turn and run, but then you wouldn’t get to read or find whatever it was you were looking for. As they advanced in technology, these “cookie compliance” banners or “cookie walls” have become a little more useful. Now they may include a lot more info, such as a list of the different types of cookies being used, and what they are for. Even better, they often now give you the option to say “no, I don’t want your cookie” (aka, don’t track what I do).

But where the heck did these come from and why did it seemingly start out of the blue? We never got asked this before. Ever wonder why everyone started asking you to “approve” their use of cookies on websites? And perhaps equally important, should you be doing this on your own websites? Let’s take a run through the cookie madness.