Drupal Association blog: Drupal Association secures $300,000 in funding from Sovereign Tech Fund
We're thrilled to share that the Sovereign Tech Fund (STF), based in Germany, has generously entrusted the Drupal Association with a $300,000 USD service contract for work done to benefit the public. This funding is set to fuel two crucial projects that promise to strengthen security for Drupal and enhance the Drupal ecosystem.
The Sovereign Tech Fund (STF) supports the development, improvement, and maintenance of open digital infrastructure in the public interest. Its goal to strengthen the open source ecosystem sustainably, focusing on security, resilience, technological diversity, and the people behind the code. STF is funded by the German Federal Ministry for Economic Affairs and Climate Action (BMWK) and hosted at and supported by the German Federal Ag-ency for Disruptive Innovation GmbH (SPRIND).
The Drupal Association, along with the Drupal community, support Drupal with core support, community support, flagship programs, and new innovation. The Drupal Association is a unicorn in the software sector in terms of structure and true community - and is a leader for open source collaboration and an open web.
Project 1: Developer Tools AccelerationThis project will optimize GitLab CI, streamline user authentication with Keycloak, migrate Drupal contribution credits from the old issue queue to a new GitLab integration, create a seamless opt-in process for Drupal.org hosted projects to transition to GitLab issues, and develop an accessible learning guide. The guide will be a valuable resource for project maintainers looking to shift from Drupal.org's custom tooling to GitLab.
Project 2: Community Supply Chain SecurityThis initiative aims to enhance the security of the Drupal ecosystem by securing the signing prototype, conducting a third-party security audit of the PHP-TUF client and Rugged server, and performing a third-party security audit of the Drupal integration code. Additionally, the project will deploy secure signing in a production environment, further bolstering the security measures in place.
This funding aligns perfectly with the Drupal Association's strategic priorities. It enables us to make significant strides towards our goals, particularly in terms of optimizing our workflows through GitLab and enhancing our security measures with secure signing. Both projects will conclude before 31 March 2024.
The partnership with STF allows us to make a positive difference in the Drupal community and advance the open source platform for all users. We are grateful to the Sovereign Tech Fund for their generous support. Their funding shows dedication to open source and their belief in the Drupal Association and the community's ability to innovate and ensure the future of web development.
Nonprofit Drupal posts: DrupalCon Portland 2024 Nonprofit Summit: Breakout Leaders Wanted
Hey nonprofit Drupal users! The DA is interested in supporting community-driven content that is specifically relevant to nonprofit organization staff and related agencies at DrupalCon North America in Portland, Oregon, at the Nonprofit Summit on May 9, 2024.
We are looking for volunteers who would be interested in giving back to the community by contributing some subject matter expertise via a day of informal breakout sessions or other group activities. We are open to ideas!
Who are we looking for?Do you have some Drupal expertise or a recent experience with a Drupal project that you would like to share with others? Is there something about Drupal that you think is really cool that you would love to share with the nonprofit Drupal community?
What’s required?You will not be required to make slides! You don’t need to have lots of (or any) speaking experience! All you need is a willingness to facilitate a discussion group or engaging activity around a particular topic, and some expertise or enthusiasm for that topic that you wish to share.
How to Submit an Idea or TopicPlease fill out this form by February 13th and we will get back to you as soon as we are able. Thank you! https://forms.gle/MJthh68rsFeZsuVc8
Discussion leaders will be selected by the Nonprofit Summit Planning Committee and will be notified by the end of February.
Questions?LN Webworks: How To Use Parameter Upcasting In Drupal
In Drupal 8 and later versions, the routing system allows developers to define routes for various pages in their applications. These routes can include placeholder elements in the path, which are essentially variables or dynamic values in the URL. These placeholders are enclosed in curly braces, such as {node} in the example I have provided.
How upcasting parameters work: Step-by-Step Process Placeholder Elements
These are parts of the URL that are variable or dynamic.In the example, /node/{node}, {node} is a placeholder indicating that this part of the URL can vary. The placeholders are named to make them identifiable. In the example, {node} is named to indicate that it represents a node ID.
Upcasting refers to the process of converting a placeholder value from the URL into an actual object instance.In the example, the system wants to convert the {node} placeholder value into an actual node object.
Web Wash: Getting Started with Gutenberg (Block Editor) in Drupal (2024)
The Gutenberg Editor is a powerful page building tool for Drupal that utilizes a block building system to create and edit content.
This comprehensive guide walks you through each step of setting up and using the Gutenberg Editor.
From downloading and installing the Gutenberg module, to enabling it on your content types, and finally using it to create your content using blocks, this guide has you covered.
To get the most out of this guide, follow the video above.
ImageX: Accessibility Elements, Part 5: Captions, Subtitles, Transcripts, and Audio Descriptions in Drupal
Multimedia content, such as engaging videos, insightful podcasts, and vibrant images, is meant to captivate, inform, and entertain website users. However, while creating an immersive world of multimedia experiences, it’s necessary to be mindful of the people with a wide range of impairments who need alternative ways to perceive the content.
PreviousNext: Real-time: Symfony Messenger Consume command and prioritised messages
The greatest advantage of Symfony Messenger is arguably the ability to send and process messages in a different thread almost immediately. This post covers the worker that powers this functionality.
by daniel.phin / 11 January 2024This post is part 3 in a series about Symfony Messenger.
- Introducing Symfony Messenger integrations with Drupal
- Symfony Messenger’ message and message handlers, and comparison with @QueueWorker
- Real-time: Symfony Messenger’ Consume command and prioritised messages
- Automatic message scheduling and replacing hook_cron
- Adding real-time processing to QueueWorker plugins
- Making Symfony Mailer asynchronous: integration with Symfony Messenger
- Displaying notifications when Symfony Messenger messages are processed
- Future of Symfony Messenger in Drupal
The Symfony Messenger integration, including the worker, is provided by the SM project. The worker is tasked with listening for messages ready to be dispatched from an asynchronous transport, such as the Doctrine database transport. The worker then re-dispatches the message onto the bus.
Some messages may be added to a bus with no particular execution time, in which case they are serialised by the original thread. Then unserialised almost immediately by the consume command in a different thread.
Since Messenger has the concept of delaying messages until a particular date, the DelayStamp can be utilised. The consume command respects this stamp and will not redispatch a message until the time is right.
The worker is found in the sm console application, rather than Drush. When SM is installed, Composer makes the application available in your bin directory. Typically at /vendor/bin/sm
The command takes one or more transports as the argument. For example if you’re using the Doctrine transport, the command would be:
sm messenger:consume doctrine
Multiple instances of the worker may be run simultaneously to improve throughput.
The worker. Messages output to stdout for demonstration purposes.Prioritised messagesThe worker allows you to prioritise the processing of messages by which transport a message was dispatched to. Transport prioritisation is achieved by adding a space separated list of transports as the command argument.
For example, given transports defined in a site-level services.yml file:
parameters: sm.transports: doctrine: dsn: 'doctrine://default?table_name=messenger_messages' highpriority: dsn: 'doctrine://default?table_name=messenger_messages_high' lowpriority: dsn: 'doctrine://default?table_name=messenger_messages_low'In this case, the command would be sm messenger:consume highpriority doctrine lowpriority
Routing from messages to transports must also be configured appropriately. For example, you may decide Email messages are the highest priority. \Symfony\Component\Mailer\Messenger\SendEmailMessage would be mapped to highpriority:
parameters: sm.routing: Symfony\Component\Mailer\Messenger\SendEmailMessage: highpriority Drupal\my_module\LessImportantMessage: lowpriority '*': doctrineMore information on routing can be found in the previous post.
The transport a message is sent to may also be overridden on an individual message basis by utilising the Symfony\Component\Messenger\Stamp\TransportNamesStamp stamp. Though for simplicity I’d recommend sticking to standard routing.
Running the CLI applicationThe sm worker listens and processes messages, and is designed to run forever. A variety of built in flags are included, with the ability to quit when a memory or time limit is reached, or when a certain number of messages are processed or fail. Flags can be combined to process available messages and quit, much like drush queue:run.
Further information on how to use the worker in production can be found in the Consuming Messages (Running the Worker) documentation.
The next post covers Cron and Scheduled messages, a viable replacement to hook_cron.
Tagged Symfony, Symfony Messenger, Symfony Console, CLIThe Drop Times: Essential Drupal Modules that Help you Prevent Spam
Drupal Association blog: DrupalCon 2024 - How to Convince Your Boss (Sample Letter Enclosed)
DrupalCon 2024 is approaching soon, and you can’t wait to head to vibrant Portland. If this is you, you also must be stressed about persuading your boss to invest in your attendance at the Drupal event of the year. But don’t worry, we’ve got you covered! This article is your go-to resource, where you’ll find all the ammo you need to make your case. Let’s get started!
But First, Are You Convinced About Attending DrupalCon?Naturally, your organization has various factors to weigh, with the primary concern being whether sending you to DrupalCon Portland is worth their investment. But the pivotal question is the value you see in it. Explore our list of strong reasons to attend DrupalCon 2024.
- For everyone - DrupalCon, the biggest open-source event in North America, offers a unique experience for all Drupal enthusiasts—whether you're diving into Drupal for the first time or have been a community member for years. The benefits of attending are vast.
- Training - Learn specific skills relevant to your role through targeted training at DrupalCon. Develop a deep knowledge of Drupal directly relevant to your career, ensuring a direct and positive return on investment. (Can we mention some of the Training sessions lined-up for DCON 2024?)
- Sessions - Dive into sessions led by the Drupal experts at DrupalCon. These are not just classes; they're conversations with the thought leaders who know their Drupal inside out. It's not just learning; it's getting hands-on wisdom from the best in the biz. (Can we mention some of the sessions lined-up for DCON 2024?)
- Keynotes - Want a front-row seat to the State of Drupal and the future of the web? Then you cannot miss out on DriesNote. Plus, there are other keynotes that'll fire up your imagination about what's possible in the digital world.
- Networking - Imagine being in a room with thousands of Drupal enthusiasts at DrupalCon. It's a community buzzing with passion. Got Drupal questions? Tap into a wealth of knowledge and enthusiasm at one of the largest open-source communities. Hallway Tracks and Exhibition areas are the heart of networking at DrupalCon. Who knows, you might just score a selfie with Dries on your stroll!
- Industry Summits - It's not just about networking—it's about conversing with peers who've been there, done that. Learn the nitty-gritty of industry best practices at industry summits like Higher Education Summit, Nonprofit Summit, Government Summit, and Community Summit. Discover how to tackle business challenges head-on with Drupal solutions, giving your job skills a serious boost.
- Peer Connection - It’s a chance to connect with folks who share the same passion as you. Swap stories, share insights, and stay in the loop about the latest in Drupal. Learn firsthand from those who get your role and challenges.
- Contribution Sprint - If you’re new to Drupal contributions, get hands-on guidance and sprint mentoring by experts. Whether you’re a coder or a non-coder, they are ways for everyone to participate in community contribution sprints to amplify the power of Drupal together.
Here’s a sample letter to help you convince your boss about attending DrupalCon 2024. We guarantee they'll see the light!
Dear [Boss’s Name],
I am writing to express my strong interest in attending DrupalCon 2024 in Portland, Oregon, and to request your approval for participation in this significant event. I believe that attending DrupalCon will not only benefit my professional development but also contribute to the success of our team and the company as a whole.
Here are several compelling reasons why my attendance at DrupalCon is beneficial for us:
-
Industry Insights: Networking at Industry Summits will keep us updated on best practices and innovative solutions.
-
Strategic Vision: Keynotes, especially DriesNote, offer strategic insights vital for our long-term planning.
-
Community Engagement: Networking with thousands of community members ensures immediate answers and collaborations.
-
Role-Specific Learning: Connecting with peers in our specific roles provides insights into the latest in Drupal.
-
Contribution Sprint: Active participation contributes to Drupal's strength, enhancing our company's reputation.
I am seeking approval for the associated expenditures, which include:
EXPENSE
AMOUNT
Airfare
Visa Fees (if required)
Ground Transportation
Hotel
Meals
Conference Ticket
TOTAL EXPENSE
[Add this line if you’re traveling from overseas] The Drupal Association can issue an official letter of invitation to obtain a visa for my travel to the United States.
The Drupal Association can also issue a Certificate of Attendance for the conference if required for our records.
Please accept this proposal to attend, as I'm confident in the significant return we will receive for the small investment. For more information on the event, please visit the conference website: https://events.drupal.org/portland2024.
I'm available to discuss this further at your earliest convenience.
Sincerely,
[Your Full Name]
[Your Position]
[Your Contact Information]
PreviousNext: Symfony Messenger’s message and message handlers and a comparison with @QueueWorker
This post covers Symfony Messenger’s message and message handlers, which are the day to day code developers using features of Symfony Messenger typically will be working on.
by daniel.phin / 10 January 2024This post is part 2 in a series about Symfony Messenger.
- Introducing Symfony Messenger integrations with Drupal
- Symfony Messenger’ message and message handlers, and comparison with @QueueWorker
- Real-time: Symfony Messenger’ Consume command and prioritised messages
- Automatic message scheduling and replacing hook_cron
- Adding real-time processing to QueueWorker plugins
- Making Symfony Mailer asynchronous: integration with Symfony Messenger
- Displaying notifications when Symfony Messenger messages are processed
- Future of Symfony Messenger in Drupal
The Symfony Messenger integration with Drupal provided by the SM project is the only requirement for the following examples.
A message itself is very flexible, as it doesn't require annotations, attributes, or specific class namespace. It only needs to be a class serialisable by Symfony. For simplicity, don’t include any complex objects like Drupal entities. Opt to store entity UUIDs instead.
At its most simple implementation, a message handler is:
- a class at the Messenger\ namespace
- with a #[AsMessageHandler] class attribute
- an __invoke method. Where its first argument is an argument typehinted with the message class.
Example message and message handler:
namespace Drupal\my_module; final class MyMessage { public function __construct(public string $foo) {} } namespace Drupal\my_module\Messenger; use Drupal\Core\State\StateInterface; use Symfony\Component\Messenger\Attribute\AsMessageHandler; #[AsMessageHandler] final class MyMessageHandler { public function __construct(StateInterface $state) {} public function __invoke(\Drupal\my_module\MyMessage $message): void { // Do something with $message. $this->state->set('storage', $message->foo); } }And dispatch code:
$bus = \Drupal::service(\Symfony\Component\Messenger\MessageBusInterface::class); $bus->dispatch(new MyMessage(foo: 'bar'));Non-autowirable dependency injection
Message handlers use autowiring by default, so you don’t need ContainerFactoryPluginInterface and friends.
In the rare case that dependencies are not autowirable, you can opt to define a message handler as a tagged service instead of a class with #[AsMessageHandler] attribute and define dependencies explicitly. The same __invoke and argument typehinting semantics apply.
services: my_module.my_message_handler: class: Drupal\my_module\Messenger\MyMessageHandler arguments: - '@my_module.myservice' tags: - { name: messenger.message_handler } Comparison with Legacy Drupal QueuesTypically, when setting up a Drupal queue, you’ll be putting together a rigid class with a verbose annotation. When compared to the functionality of the messenger and handler above, the equivalent @QueueWorker looks like:
namespace Drupal\my_module\Plugin\QueueWorker; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Queue\QueueWorkerBase; use Drupal\Core\State\StateInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** * @QueueWorker( * id = "my_module_queue", * title = @Translation("My Module Queue"), * cron = {"time" = 60} * ) */ final class MyModuleQueue extends QueueWorkerBase implements ContainerFactoryPluginInterface { private function __construct( array $configuration, $plugin_id, $plugin_definition, private StateInterface $state, ) { parent::__construct($configuration, $plugin_id, $plugin_definition); } public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static { return new static( $configuration, $plugin_id, $plugin_definition, $container->get('state'), ); } public function processItem(mixed $data): void { // Do something with $data. $this->state->set('storage', $data['foo']); } }And dispatch code
\Drupal::service('queue') ->get('my_module_queue') ->createItem(['foo' => 'bar']);Notice the hard-to-remember annotation, boilerplate dependency injection, and mixed-type processItem argument $data . In comparison, Symfony Messenger messages and message handlers are easier to use thanks to PHP attributes.
Routing messages to transportsAll messages will be handled synchronously by default. To route messages to specific transports, routing needs to be configured.
Behind the scenes, routing is a simple map of class/namespaces to transports defined in a container parameter.
parameters: sm.routing: Drupal\my_module\MyMessage: doctrine Drupal\my_module\MyMessage2: synchronous 'Drupal\my_module\*': doctrine '*': doctrineKeys are either verbatim class names, partial class namespace followed by asterisk, or a standalone asterisk indicating the fallback. The values are the machine name of a transport. SM includes a synchronous transport out of the box, which indicates messages are handled in the same thread as it is dispatched. The doctrine database transport is available as a separate module. I’d recommend always using an asynchronous transport like Doctrine.
Routing configuration UISM includes a configuration UI submodule that allows site builders to build a routing map without needing to mess with YAML. The container parameter is set automatically as soon as the form is saved.
Advanced usage of messages and handlersAdding stamps to messagesA common use case for adding stamps to a message is to delay the message for an amount of time. A stamp is created and attached to the envelope containing the message to be processed:
$envelope = new Envelope( message: new MyMessage(foo: 'bar'), stamps: [\Symfony\Component\Messenger\Stamp\DelayStamp::delayUntil(new \DateTimeImmutable('tomorrow'))], ); $bus = \Drupal::service(\Symfony\Component\Messenger\MessageBusInterface::class); $bus->dispatch($envelope);Multiple handlers per messageFor more advanced use cases, multiple handlers can be configured for a message. Useful if you want to listen for messages that you do not own. For example, additional handling of the Symfony Mailer email message:
namespace Drupal\my_module\Messenger; use Symfony\Component\Messenger\Attribute\AsMessageHandler; use Drupal\Core\State\StateInterface; #[AsMessageHandler] final class MyMessageHandler { public function __construct(StateInterface $state) {} public function __invoke(\Symfony\Component\Mailer\Messenger\SendEmailMessage $message): void { $this->state->set( 'sent_emails_counter', $this->state->get('sent_emails_counter', 0) + 1, ); } }Both this custom handler and the original \Symfony\Component\Mailer\Messenger\MessageHandler::__invoke handler will be invoked.
Multiple messages per handlerHandlers can be configured to handle multiple message types. Instead of using the #[AsMessageHandler] attribute on the class, use it with methods.
namespace Drupal\my_module\Messenger; use Drupal\Core\State\StateInterface; use Symfony\Component\Messenger\Attribute\AsMessageHandler; final class MyMessageHandler { #[AsMessageHandler] public function myHandler1(\Drupal\my_module\MyMessage $message): void { // Do something with $message. } #[AsMessageHandler] public function myHandler2(\Drupal\my_module\MyMessage2 $message2): void { // Do something with $message2. } }The next post covers the worker, the heart of messenger’s real-time capabilities.
Tagged Symfony, Symfony Messenger, QueueWorkerThe Drop Times: The Profound Impact of Mentorship and Guidance
Dear Readers,
Have you ever felt the transformative power of a teacher's or mentor's encouragement? Anatole France, the French poet and journalist, once encapsulated this influence by saying,
"Nine-tenths of education is encouragement."
It's astonishing how teachers can nurture love or sow seeds of positivity, potentially steering an entire future. When a child moves beyond their family circle, teachers often step into a pivotal role. Their impact isn't confined to imparting knowledge; it extends to shaping perspectives, igniting passions, and defining life paths.
Just as many attribute their accomplishments to teachers who unearthed their hidden talents guiding their paths, the Drupal community thrives on mentors who play a pivotal role. Like educators, these mentors guide newcomers, share their expertise, and foster an environment conducive to growth within the Drupal ecosystem. They serve as pillars, offering invaluable guidance and insights enriching the community with their depth of knowledge and experience.
In this context, Michael Anello shines as a beacon within the Drupal realm. His trajectory, from teaching engineering to co-founding DrupalEasy—a hub for Drupal-centric training, career development, and consultancy—mirrors the impact of a guiding force. The DropTimes had the opportunity to interview Michael Anello. He reflects on his journey, the evolution of Drupal, navigating challenges in the learning process and steering DrupalEasy through adaptations to accommodate various skill levels. In essence, his role echoes the influence of those pivotal teachers who shape destinies within the dynamic and ever-evolving landscape of the Drupal community.
In another enlightening interview, the multifaceted expertise of Lyubomir Filipov, a Group Architect and Deputy Program Manager at FFW, takes centre stage. His journey spans various roles—from organizer to academician to mentor—an embodiment of the diverse skills of an expert Drupal developer.
Lyubomir Filipov operates as a leader by example, orchestrating the convergence of talent with opportunity. He's instrumental in shaping career trajectories for over 800 professionals at FFW, ensuring that the right individuals find their niche within the company.
Our adept sub-editor, Alka Elizabeth, skillfully conducted these insightful conversations, shedding light on the depth and breadth of Michael Anello's and Lyubomir Filipov's contributions within the Drupal sphere. Alka also delved into a Reddit discussion about the recent changes to not just Drupal alone but the economy, AI, and growth of other CMSs like WordPress, Wix, and Shopify.
On a side note, I've compiled a thorough overview highlighting TDT's significant milestones of the past year.
Speaking of events, The DropTimes has been announced as the official Media Partner for Drupal Mountain Camp 2024, Switzerland. To learn more about the event, visit the official website. You can also follow our tag Drupal Mountain Camp to catch every update.
February 06 is DrupalCon Portland's registration kickoff—don't miss out! Find all the essential details right here. Stay tuned for more updates and announcements as the event draws nearer.
The highly anticipated return of the PHP Conference Kansai 2024—a momentous occasion for PHP engineers in Japan is back after a notable six-year hiatus. Do check out the details here.
As MidCamp 2024 draws near, it invites organizations to unite and bolster the vibrant Drupal community together.
FLDC 2024's countdown has commenced! Seize the early bird registration before January 12 and save $25 on your attendance fees. Don't wait—the deadline is approaching fast!
Fan tickets for DrupalCamp Poland are available until November 1, 2024—grab yours before time runs out. A list of the Drupal events for the week is published here.
Acquia's latest release, the e-book "Achieving Success with Headless and Hybrid CMSs," provides in-depth insights into the benefits of employing CMS in various architectures—traditional, headless, or hybrid. For more information, dive into this informative resource.
Some notable news highlights include WeebPal's celebration of its 12th anniversary, dubbed the Silk or Fine Linen Jubilee, featuring an enticing offer for website owners. They're offering 12 participants an opportunity to upgrade from Drupal 9 to Drupal 10 free of cost.
Centarro is rejoicing in its most substantial release yet: Drupal Commerce 2.37. Learn more about it here.
A groundbreaking addition to Drupal's arsenal is the newly launched Error Reporting module, poised to transform code analysis and debugging for effortless operations. Dive deeper into its capabilities here.
While more stories beckon for exploration, constraints compel us to halt further selection. To get timely updates, follow us on LinkedIn, Twitter and Facebook.
Keep enjoying your Drupal journey!
Thank you,
With warm wishes,
Elma John
Sub-Editor, TheDropTimes
Tag1 Consulting: Unraveling the ETL Process - Transform
In the second episode of our three-part series on the ETL Migration process, we delve into the most involved stage of Drupal migration: Transformation. This episode features insights from Tag1 Consulting’s experts, including Mike Ryan, co-creator of Drupal Migrate, and notable contributor Benji Fisher. They analyze the Transformation phase in the ETL process, specifically examining Drupal’s unique “row-by-row” approach, and the discussion session revolves around the advantages and challenges of this method, with a strong emphasis on optimizing performance within the transformation pipeline. The episode is a treasure trove for those considering or currently working on Drupal migrations, as it steps into the technical realm while touching on the practical aspects of transforming data during a migration. Benji expresses his fascination with this particular stage, describing it as a playground for innovation and detailing the intricacies that make it the heart of the migration process. This discussion is essential for developers and IT professionals seeking to understand or undertake large-scale Drupal migrations. Part 1 | Part 2 | Part 3 - Coming soon! Please let us know if you have specific migration-related topics you'd like to see us cover. Or, reach out and let us know if we...
Read more janez Tue, 01/09/2024 - 07:33ADCI Solutions: Layout Builder: A Drupal module that makes working with content easy
The advantages of Drupal CMS always include its friendliness to users who cannot write code. In most cases, these users are content managers. How can you give more power to the content manager of your Drupal website? Add the Layout Builder module that makes building web pages as easy as putting Lego bricks together.
LN Webworks: Why Consider Drupal as Your Restaurant CMS Choice in 2024?
The restaurant sector has faced challenges amidst economic downturns, prompting a search for recovery through enhanced business agility. In fact, a staggering 71% of food establishments acknowledge the central role of digital transformation in achieving this objective.
In response to the growing influx of restaurants into the online domain, the demand for an efficient Restaurant CMS has become increasingly evident. A well-suited Restaurant website CMS, such as Drupal, proves instrumental in optimizing business operations.
What Makes Drupal the Right Choice for Restaurants?Drupal has over 20 years of experience in managing restaurant content and has become the top choice for many big companies and restaurants.
Did you know?
Around 89.2% of users believe that Drupal will become even more popular among different types of businesses in the next three years, not just in the restaurant industry.
This means the demand for a Sports CMS and an Education CMS will also increase.
Specbee: How To Use The Power of Cron Jobs for Task Automation in Drupal
PreviousNext: Introducing Symfony Messenger integrations with Drupal
Part one in a series of posts introducing Symfony Messenger, its ecosystem, and unique Drupal integrations to Drupal developers.
by daniel.phin / 9 January 2024The SM project brings Symfony Messenger and its ecosystem together with Drupal.
Symfony Messenger is a powerful alternative to Drupal’s @QueueWorker, enabling real-time or precise execution of scheduled tasks. It’s also a viable replacement for hook_cron enabling you to schedule dispatch and processing of messages according to crontab rules, again in real-time, rather than waiting for server-invoked or request-termination cron.
Messenger can be used as a user-friendly alternative to Batch API, as the user's browser is not blocked, while integrations such as Toasty can be programmed to notify when the last of a “batch” of messages completes, communicating to the user via user-interface toasts.
The Drupal integration includes additional niceties, such as intercepting legacy QueueWorkers for processing data through the Symfony Messenger bus, and end-user UI notifying a user when tasks relevant to them have been processed.
During this and the following series of posts, we’ll be exploring the benefits of real-time processing and user-friendly features that improve the overall experience and outputs.
The workerToasty displaying notifications.MessengerFirst up, we’ll cover the main features of Symfony Messenger and how it works.
As a developer working with Messenger, the most frequent task is to construct message and associated message handlers. A message holds data, while a message handler processes the associated data.
A message is inserted into the bus. The bus executes a series of middleware in order, each of which can view and modify the message.
If a transport is configured, the message may be captured and stored for processing later.
Typically the bus, middleware, and transports are configured in advance and rarely changed. Message and message handlers are introduced often without needing other configuration.
- Message — an arbitary PHP object, it must be serialisable.
- Message handler — a class that takes action based on the message it is given. Typically a message handler is designed to consume one type of message.
- Middleware — code that takes action on all message types, and has access to the containing envelope and stamps.
- Bus — a series of middleware in a particular order. There is a default bus, and a default set of middleware.
- Envelope — an envelope contains a single message, and it may have many stamps. A message always has an envelope.
- Stamp — a piece of metadata associated with an envelope. The most common use case is to track whether a middleware has already operated on the envelope. Useful when a transport re-runs a message through the bus after unserialisation. Another useful stamp is one to set the date and time for when a message should be processed.
- Transport — a transport comprises a receiver and sender. In the case of the doctrine database transport, its sender will serialise the message and store it in the database. The receiver will listen for messages ready to be sent, and then unserialise them.
- Worker — a command line application responsible for unserialising messages immediately, or at a scheduled time in the future. Messages are inserted into the bus for processing.
The stars of the show are buses. One bus is ready out of the box, which comprises a series of ordered middleware. A message is dispatched into a bus, where each middleware has the opportunity to view and modify the message (and its envelope). It's unlikely you’ll need to think about middleware, as the default set may already be the perfect combination.
When a message is dispatched to a bus, you can choose to wrap it in an envelope and apply stamps like the DelayStamp . A message will always be wrapped in an envelope if you don’t do it explicitly.
Buses have a series of default middleware. The main middleware to note are the transport and message handler middlewares. When a transport is configured for messenger, the transport middleware will capture the message, serialise it, and store it somewhere. For example, a database in the case of the doctrine transport. Any middleware after the transport middleware are not executed, for now.
When running the worker, you are opting to choose which bus and transport to run. The command will listen for messages as they are stored, and if the time is right, messages will be unserialised and inserted into the bus. The message will begin its journey yet again, iterating through all the middlewares from the beginning. When the transport middleware is hit, it will detect the message has already been in the transport to prevent recursion. This is done by checking the ReceivedStamp stamp added to the message envelope.
Transports: synchronous, asynchronousOut of the box, when a message is dispatched into the bus in a CLI or web request, it will be processed synchronously. All middleware will operate on the message in a set order, including the message handler middleware.
The greatest advantage of using Messenger is the ability to asynchronously handle messages outside of the thread they were originally dispatched. That is: asynchronously. This can be useful for improving the web request response times and reducing the memory usage and limit of web requests (allowing for more FPM threads on a machine). Bulky business operations that would typically, or should be, constrained by the limits of the web thread have more breathing room. A CLI runner/container may be set up with a little more memory and processing capability with the explicit direction to listen for messages and handle them in real-time, either as soon as possible or as scheduled.
Upcoming posts in this series will dive into aspects of Symfony Messenger and SM:
- Symfony Messenger’ message and message handlers, and comparison with @QueueWorker
- Real-time: Symfony Messenger’ Consume command and prioritised messages
- Automatic message scheduling and replacing hook_cron
- Adding real-time processing to QueueWorker plugins
- Making Symfony Mailer asynchronous: integration with Symfony Messenger
- Displaying notifications when Symfony Messenger messages are processed
- Future of Symfony Messenger in Drupal
The next post covers the implementation of a message and message handler, and a comparison with Drupal core’s @QueueWorker plugins.
Tagged Symfony, Symfony MessengerTalking Drupal: Talking Drupal #432 - Portals & Community Websites
Today we are talking about Portals, Community Websites, and Drupal with guest Ron Northcutt. We’ll also cover Private Message as our module of the week.
For show notes visit: www.talkingDrupal.com/432
Topics- Why are you passionate about community sites
- Different types of portals you’ve worked on
- Common features
- Why is Drupal a great fit
- Why would you choose Drupal over a Saas or PaaS
- What is unique about each community
- How important is UX
- What common content models do you see
- Most important tip
- Lego sorting
- PHPBB
- discourse
- Open Social
- Monday
Ron Northcutt - community.appsmith.com rlnorthcutt
HostsNic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Martin Anderson-Clutz - mandclu
MOTW CorrespondentMartin Anderson-Clutz - mandclu
- Module name/project name:
- Brief description:
- Have you ever wanted to include a full-fledged, ajaxified system for private messages between users on your Drupal site? There’s a module for that
- Brief history
- How old: created in Apr 2017 by Jaypan, a fellow Canadian, but the most recent release is by Lucas Hedding, who hails from Nicaragua, and is a prolific contrib maintainer in his own right
- Versions available: 8.x-2.0-beta18 and 3.0.0 versions available, the latter of which works with D9 and 10
- Maintainership
- Actively maintained, latest release in Oct 2023
- Number of open issues: 130, 4 of which are bugs on the 3.0.x branch
- Test coverage
- Documentation: does have a handbook, though the pages seem to date back to 2017, so hopefully the installation and setup hasn’t changed too much since then
- Usage stats:
- Almost 2,000 sites
- Maintainer(s):
- Module features and usage
- With the Private Message module installed, users on your site can have permissions-based access to send private messages to each other
- Messages and threads are fieldable entities, and in general the module is made to be highly configurable, so you can tailor it to meet your site’s specific needs
- That includes the frequency for asynchronous operations like loading new messages, which can be done without a full page refresh. There’s also a companion module to use Node.js for the asynchronous operations, to reduce load on both the browser and the server
- That also allows for browser push notifications, or you can use the integration with the Message module to send notifications via email, SMS, and more, including aggregating the notifications into digests
- Companies often have a dedicated messaging solution like Slack or Teams that they use internally, but this can be a good solution for an extranet or vendor portal, where the users may represent a variety of organizations
- It’s also worth mentioning that both Private Message and Message are included in the Open Social distribution, so that could be a way to try out a preconfigured setup
Ramsalt Lab: Drupal 7 security support will end - now is the time to plan a migration to Drupal 10!
Drupal has been a robust choice for building and maintaining websites for decades. Like all other CMS systems, technological advancements and security requirements continually evolve at rapid speed and older software versions will be taken off the market.
In January 2025 Drupal 7 will finally reach its End of Life after 14 successful years and the necessity to transition to Drupal 10 has never been more critical.
Source: Drupal 7 End of Life | Drupal.org
This means the Drupal community and the official development team will stop providing support, including crucial security patches and updates. Without these updates, weaknesses in the system remain unaddressed, leaving websites vulnerable to dangerous cyber threats and data exploitation.
46,5% of all Drupal sites are still running on version 7
Source: Usage Statistics and Market Share of Drupal, January 2024 (w3techs.com)Your company isn't just facing a hard deadline to relaunch your new site as January 2025 grows closer. You’re also competing with a vast number of organizations just like yours that need to coordinate the same migration process.
It is important to understand that depending on the complexity of the website the migration from Drupal 7 to Drupal 10 is not just a simple update. The data structure and design need to be rebuilt and major technical updates executed. Ramsalt has migrated numerous of clients from Drupal 7 to Drupal 10 and have built a team of migration experts for a successful migration process.
Get an offer for the migration and make sure that your company stays agile and competitive:
Yngve Bergheim, yngve@ramsalt.com
Why should you migrate from Drupal 7 to Drupal 10?
The foremost reason to migrate from Drupal 7 to Drupal 10 lies in security. Yet, Drupal 10 brings automated updates, improved user experience, along with several other feature improvements. See our blog article: A new year, A new shiny Drupal 10 | Drupal | Ledende leverandør | Ramsalt.
Below we want to list some of the Drupal 10 highlights:
CKEditor 5 update from CKEditor 4 - With a thorough rebuild and an exciting new feature set, CKEditor 5 gives Drupal 10 a modern, collaborative editor experience. Users of programs like Microsoft Word or Google Docs will be used to the new CKEditor's interface. It also offers common tools for collaboration like comments, change suggestions, version histories, and other accepted editing practices.
CKEditor 5 in Drupal
Try it our yourself here: Feature-rich editor - CKEditor 5 demo
Gutenberg Editor - With the latest Drupal 10 update, we are capable of using the most loved content editor. Here are some key points about the Gutenberg editor in the context of Drupal:
User-Friendly Interface: Gutenberg provides a more intuitive and visual editing experience. It uses blocks to represent various content elements like text, images, and videos, making it easy for users to build and design their content layout.
Enhanced Content Creation: With Gutenberg, content creators can design more complex layouts without needing any extensive technical knowledge. It offers a wide range of customization options within each block, making it easier to design diverse and dynamic web pages, we even have our own Gutenberg landing page builder in-house. the limits are your imagination.
Responsive Design: Blocks in the Gutenberg editor are inherently responsive, ensuring that content created in Drupal looks good on all devices.
Extensibility: Just like Drupal, Gutenberg is highly extensible. Developers can create custom blocks to add new functionalities, tailored to specific needs.
Gutenberg in DrupalTry it out for yourself: Drupal Gutenberg demo
Improved Admin and Design ThemesDrupal 10 introduces a significantly enhanced theming system, characterized by its streamlined single-directory component structure. This advancement not only boosts overall performance but also accelerates the rollout of new features. Furthermore, it offers comprehensive editing capabilities, enabling a seamless top-to-bottom customization experience. This modernized approach in Drupal 10 ensures a more efficient, user-friendly, and agile development process, catering to the evolving needs of end-users and editorial teams alike.
Improved Website Performance & SecurityDrupal 10 improves your site security by including up-to-date protocols and technical dependencies such as PHP 8.2, Symfony 6.2. This means a faster and more modern website out of the box.
With enhanced dynamic caching (BigPipe) reduces page load times by invalidating only the content that has changed and therefore provides a faster and better user experience.
Drupal 10 also marks the end of Drupal 7’s jQuery. A large JavaScript library, jQuery was a powerful tool, but modern browsers perform many of the same functions. The up-to-date JavaScript used by Drupal 10 also decreases page load times and snappier behavior for the end users.
Source: Drupal 10 | Drupal.org & Drupal 10.2 is now available | Drupal.org
Lisa Streeter: Setting Order Number before Payment Transaction
In Drupal Commerce, carts do not have order numbers. Order numbers are not set until checkout completion, when the order is placed. If the order type has been configured with a number pattern, that pattern is used to generate the order number; otherwise the order entity ID is used. As a result, when a credit card payment is added during checkout, the cart/order may not have its final Order Number yet. For some payment gateways, this is fine--only the order entity ID is needed.
Lisa Streeter: Payment by Purchase Order
A Drupal Commerce website may want to offer the same payment terms provided to customers purchasing products offline. If up-front payment is not required, then we need to create an option for customers to complete checkout without providing payment. Additional information may need to be collected during checkout for the "payment on account" option in lieu of a traditional payment method. For our business needs, this additional information takes the form of a Purchase Order number entered by the customer.