Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 2 hours 34 min ago

Four Kitchens: A more modern, sustainable approach to higher ed websites with YaleSites

Tue, 2023-05-30 15:29

Jim Vomero

Senior Engineer

As a tech lead, Jim works with clients through the full project cycle, translating their business requirements into actionable development work and working with them to find technical solutions to their challenges.

January 1, 1970

Running the digital experience is a large-scale operation for most higher ed institutions. Whether your architecture was established five or 15 years ago, the departments, offices, and entities you need to manage may add up to hundreds or even thousands of websites. And each new addition is increasingly challenging to maintain.

Some sites use shared modules, while others do not. If you want to make an update to one website, you have to cross your fingers and hope it doesn’t break something on 500 others. Every day, another stakeholder presents a new request in support of an upcoming project.

Facing all these compounding issues, the IT department at Yale understood that a lift-and-shift of their existing sites was impossible. Upgrading their digital platform presented an opportunity to reset their architecture and processes to start fresh.

In a preview of our upcoming presentation at DrupalCon 2023, here’s what happened next — and what your institution can learn from it.

Why reinvention makes sense for higher ed institutions

Universities are facing significant challenges related to budgets, economic uncertainty, and reduced admissions applications. The pandemic introduced further uncertainty balanced with an increased need to sharpen digital presentations.

As one of the most prestigious institutions in the world, Yale needed to find a new, more sustainable way to manage its digital needs. The institution had stretched the limits of a very mature Drupal 7 site with more than a decade’s worth of modules, themes, and custom code.

It was difficult for the IT team to test with confidence, because they manage more than 1,100 sites that were all created in different ways. In addition, the more impressive a new site looked, the more other offices and departments wanted to emulate it.

The unintended consequences of an overtaxed website platform

With the university’s website system at critical mass, Yale’s teams lacked incentive to add new features to its legacy platform. Consequently, some larger departments found the platform inflexible, leading them to Wix and Squarespace for new projects. If the university didn’t find a workable platform solution, it ran the risk of increased site errors, design inconsistencies, and a diminished user experience.

Resetting Yale’s approach to digital required a sizable upfront capital investment. As the work comes to fruition, the organization is gaining a flexible, scalable platform that will benefit every department into the next decade — and beyond.

YaleSites: A transformational approach to higher ed websites

YaleSites is the product of years of examining the university’s needs. Through our previous work with the institution’s cybersecurity office and the Schwarzman Center, we developed a new platform that incorporated the following elements:

A unified brand identity and design system

YaleSites offers many departments the ability to create unique digital experiences that are aligned with the institution’s overall design. Instead of a conventional CMS, Yale’s team uses a customized drag-and-drop page builder drawn from a library of proven components powered by Emulsify.

The YaleSites Welcome page Inclusive and accessible development for all customers and devices

Institutions like Yale need to offer an equitable digital experience for every audience. YaleSites upholds and prioritizes the university’s accessibility standards by making sure every content block follows best practices for usability and accessibility.

User-focused experience and design

YaleSites prioritizes the needs of the organization’s audience and its end users. Across the organization, content authors of every skill level can access a full library of templates, starter kits, and media libraries to produce what they need.

Adding blocks in the YaleSites administrative interface. Standardized practices for development

The organization’s development process has been streamlined. Rather than asking “What do you need in a website?”, work begins with the question, “How can our tools help with your strategy?” Developers don’t have to reinvent the wheel for a new site. Instead, they have the support of a system that’s performant, on-brand, and secure.

Sustainable governance

We implemented YaleSites with an eye toward thoughtful and sustainable growth. Universities often set digital priorities based on the loudest or most powerful voices in the organization. Now, Yale uses processes that enable them to focus on the organization’s most pressing needs. Plus, a core group meets regularly to collect feedback, respond to requests, and adjust priorities as needed.

Shifting from a project-based to a product-based perspective

After launching YaleSites, the institution will enter the maintenance phase of protecting its system. The university’s new platform required a significant financial investment — now it must invest in the long-term work of governance.

The success of Yale’s platform hinges on a seismic internal shift. YaleSites isn’t a project that concludes with a specific end date. It’s a product that the organization must refine and support in perpetuity.

Since YaleSites is a product, its resources are finite. For example, if IT plans to add six new features in a quarter, any new request is a negotiation. Something may need to get bumped from the product roadmap. Rather than rushing a new feature into development for a short-term need, the organization follows a multiyear roadmap and measures the needs against all of the priorities in the queue.

Eliminate deadline pressure by focusing on constant improvement

Thinking long-term about your organization’s website removes the need to squeeze as many improvements as possible into a project’s deadline. Following the principles of Agile development frees your team from solving every use case before launch. Instead, you can launch a minimally functional feature like an events calendar, see how people use it, and refine how it works according to actionable feedback.

YaleSites allows the institution to implement site improvements with confidence. Rather than working on whatever makes sense in the moment, they see their work progress from ideation to development, testing, and release.

From the flexibility of its digital tools to a more managed, Agile-driven approach to website improvements, YaleSites marks a dramatic shift for the better. If this sounds like a shift that would benefit how your organization works, we should talk. We can help you view your site and its planning from a new perspective.

Megan Bygness Bradley and the Yale team contributed to this post.

The post A more modern, sustainable approach to higher ed websites with YaleSites appeared first on Four Kitchens.

Categories: FLOSS Project Planets

Chromatic: Drupal 7 End-of-Life Ep 08: Building a Bridge to Drupal 7 with Matt Glaman

Tue, 2023-05-30 14:16
Matt Glaman joins us! Mark, Dave, and Matt examine how Drupal 7’s end-of-life challenges are symptomatic of a widespread approach to development. Matt dives deep into the drawbacks behind software maintenance, and unveils his plans to release Drupal Bridge by DrupalCon 2023.
Categories: FLOSS Project Planets

Tag1 Consulting: On 20 Years of Drupal: an interview with Matthew Saunders

Tue, 2023-05-30 09:09

In continuing our 20 years of Drupal series, Tag1 Consulting's, Managing Director Michael Meyers interviews leaders from the Drupal Community who have been instrumental in creating one of the largest open-source communities and one of the most popular Content Management Systems that powers over 3% of the Internet. In this installment, join us for our talk with prolific contributor Matthew Saunders. Currently at Pfizer, Matthew shares his journey into technology by way of the Arts, where he discovered his passion for technology after becoming a Webmaster for an experimental dance company back in 1995. With over 15 years of continuous involvement in the Drupal Community - former board member of the Drupal Association and long-time organizer of Drupalcamp Colorado, we hope you will enjoy this trip down memory lane. --- For a transcript of this video, see On 20 Years of Drupal with Matthew Saunders. --- Photo by Jason Hafso on Unsplash

Read more michaelemeyers Tue, 05/30/2023 - 06:15
Categories: FLOSS Project Planets

Matt Glaman: Factories and dependency injection

Tue, 2023-05-30 09:08

Last week I wrote about dependency injection anti-patterns in Drupal. These anti-patterns occur when your service's constructor has logic that interacts with the injected dependent services beyond assigning them to properties. These anti-patterns include creating a new object from a factory or retrieving an object from a stack. However, Symfony's service container supports defining services built from factories. This can streamline your code and follow best practices when using dependency injection. Drupal uses this factory service design pattern for cache bins, loggers, and the HTTP client service.

Categories: FLOSS Project Planets

Peoples Blog: Drupal LMS Features for Your Education Business

Mon, 2023-05-29 23:45
If you're running an education business and considering Drupal as the platform for your Learning Management System (LMS), there are several features and capabilities you should look for to ensure a robust and effective solution. Here are some key Drupal LMS features to consider: Course Management: A Drupal LMS should provide comprehensive course management capabilities. This includes the ab
Categories: FLOSS Project Planets

Talking Drupal: Talking Drupal #401 - HTTP Headers

Mon, 2023-05-29 14:00

Today we are talking about HTTP Headers with our hosts.

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

Topics
  • What are HTTP Headers
  • Why are they important
  • Exploring headers
  • Types of headers
  • What can you discover from headers
  • Modifying headers
  • Tools to validate
Resources Hosts

Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Stephen Cross - stephencross.com @stephencross Martin Anderson-Clutz - @mandclu

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Content-Security-Policy Adds a Content-Security-Policy header which allows your Drupal site to inform browsers of trusted sources for JavaScript, CSS, and other external resources.

Categories: FLOSS Project Planets

LN Webworks: The Ultimate Drupal Security Checklist to Safeguard Your Website

Mon, 2023-05-29 03:13

Cyber threats are escalating, and individuals are actively prioritizing their online safety by verifying website authenticity and safeguarding private data. Even with considerable efforts, websites are not immune to malware, brute force attacks, SQL injections, and DDoS attacks, posing a constant risk of unauthorized access and the compromise of customer information.

Hackers don't just target large corporations, but according to a report by AdvisorSmith, 42% of small-medium businesses are affected by these cyber attacks. That's why following a proven Drupal security checklist is imperative to safeguard your business against hackers or other malicious actors. With the right strategy and careful planning, you can make your website robust and avoid these potential threats. Read the full article, consider these 17 security checklists, and thrive in your business.

Categories: FLOSS Project Planets

The Drop Times: A Journey of Growth and Transformation

Mon, 2023-05-29 02:27

Today, let us deeply explore life's journey and the various phases we all experience. Like a captivating story, life unfolds through diverse chapters that offer unique lessons, challenges, and opportunities for personal growth and transformation. Let's embark on this exploration together and discover the beauty in embracing the different phases of life.

The Spring of Youth: Embracing Boundless Possibilities

Youth—the phase of exuberance and discovery. During this period, we plant the seeds of our dreams and ambitions, exploring the world with curiosity and an unyielding spirit. Let's celebrate the energy and potential of youth and cherish the memories we create along the way.

The Summer of Exploration: Embracing Self-Discovery

As we transition into adulthood, we enter the summer of our lives. This phase invites us to embark on a journey of self-discovery, to dive deep into our identities, values, and aspirations. It's a time to explore various paths, make important life choices, and build the foundation for our future. Let's embrace this season of exploration and savor the joy of discovering who we indeed are.

The Autumn of Wisdom: Embracing Growth and Reflection

In the autumn of life, we find ourselves at a crossroads—a time of introspection and reflection. This phase offers an opportunity to reap the wisdom accumulated through experiences, reflect on our achievements, and redefine our priorities. Let's celebrate the wealth of knowledge we have acquired and embrace the beauty of personal growth that continues to unfold.

The Winter of Serenity: Embracing Transformation and Legacy

Winter, a season marked by serenity and introspection, represents the later stages of life. During this phase, we reflect on our accomplishments, pass down our wisdom to future generations, and leave a lasting legacy. Let's embrace the winter of life with grace, appreciating the profound impact we can make and the beauty of our journey.

As we navigate these phases, it's important to remember that life is not a linear path but a cycle of growth and transformation. Each stage brings challenges and rewards; by embracing them, we can fully appreciate the richness of our existence.

Now, Let's dive into the essential picks from the past week.

Last week, The Drop Times was privileged to conduct two insightful interviews. Our first interview was with Martin Anderson-Clutz, a distinguished speaker at EvolveDrupal in Montreal. In this interview, Martin shares his valuable insights on the challenges and prospects of Drupal. The second interview was with Marcin Maruszewski, an experienced Drupal professional. Marcin graciously shared his personal journey and extensive Drupal experience, offering valuable perspectives for newcomers and seasoned practitioners.

Kwall blog post delved into the intricacies of two of the most popular platforms in the web development realm: Drupal and WordPress. RS Websols published an informative blog titled "The Benefits of Using Drupal: Unleashing its Potential for Web Development."

A recently released research report focusing on the Content Management Systems (CMS) market for 2023-2030 provides valuable insights into the fundamental dynamics driving the sector. AltaGrade, a leading web development company, has published an informative blog post titled "Upgrading to Drupal 10: Why It's Important and How AltaGrade Can Help."

Drupar, a reliable source of Drupal tutorials, recently shared a step-by-step guide demonstrating how to create a new text format in Drupal without relying on CKEditor. DrupalCon, the premier conference for the Drupal community, has announced an enticing giveaway exclusively for attendees of DrupalCon Pittsburgh 2023. To know more information, visit here.

In a recently shared blog post, Drupal India highlights the compelling reasons for choosing Drupal CMS when developing fully functional and easily navigable travel agency websites. SystemSeed, a trusted source of Drupal expertise, has published a blog post offering tips and tricks for finding the ideal Drupal maintenance partner.

Stay tuned for more updates, interviews, and informative articles in the upcoming editions of The Drop Times. Feel free to contact us if you have any suggestions, contributions, or feedback. Thank you for being a part of our community!

That is all for the week.
Your's sincerely,

Kazima Abbas
Sub-Editor, TheDropTimes

Categories: FLOSS Project Planets

#! code: Drupal 10: Using A Lazy Builder To Create A Dynamic Button

Sun, 2023-05-28 13:30

Adding dynamic and interactive elements to a web page can be a challenge, and there are a few techniques available in Drupal to allow for this.

One solution might be to add a form to the page, but this can cause problems with the cache system. Adding forms actually makes it slightly difficult to cache the page properly and you can easily see poor caching levels from pages containing forms.

Rather than adding a form to the site (and the complexities that come with that) it is possible to create a fully dynamic element that can be used to perform actions by the user. This is done using a combination of different techniques, all of which are built into Drupal and just need to be plugged together.

In this article I will look at using lazy builders to create a dynamic button that won't cause problems with the page cache, and will even work for anonymous users.

The Problem

For some context I thought I would talk about some of the work that went into putting this example together.

I was recently tasked to create a button on an Event content type that would act as the registration action for that event. The button needed to take into account different factors like the role of the user, the type of event, and the remaining capacity of the room. When the user clicked on the button they would be booked onto the event and the content of the button would change to inform them of this.

The button, therefore, needed to be fully dynamic for the user and the page they were visiting. In order to allow the button to be unique to each user and event I used a lazy builder to offset the generation of the button so that it wouldn't interfere with the caching of the page.

Read more

Categories: FLOSS Project Planets

Lisa Streeter: Payment by Purchase Order

Sat, 2023-05-27 11:44
Payment by Purchase Order Saturday 27, May 2023 Lisa Streeter Sat, 05/27/2023 - 11:04 The Goal

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.

Categories: FLOSS Project Planets

Palantir: DrupalCon Pittsburgh Preview

Thu, 2023-05-25 08:00

Britany Acre, George DeMet, Jill Farley, Joseph Meersman, Ju Vanderwater, Ken Rickard, Tiffany Farriss, Travis Porchia discuss the sessions they'll be presenting at DrupalCon Pittsburgh, what they're looking forward to at the event, and tips for those who have never been to a DrupalCon.

Transcript

George DeMet:  Hello and welcome to the Plus Plus podcast from Palantir.net where we talk about what's new and interesting in the world of open source, technologies and agile methodologies. I'm your host George DeMet, the founder and Co-CEO of Palantir.net. And today, We're here to talk about DrupalCon Pittsburgh which is coming up June 5th through 8th. For the uninitiated, DrupalCon is a place where people from all over the world's world's largest open source content management communities get together, it's a social occasion, it's a place for learning. It's a place for networking and it's a really fun time. 

George DeMet:  Today we've gathered together a number of folks on the Palantir.net team who are going to be speaking at DrupalCon Pittsburgh and looking forward to hearing them share what they're going to talk about, what they're looking forward to, and some tips and tricks for those who may have never been to a DrupalCon before. So further ado, let's go ahead and get started with introductions. I'm going to start with  Britany Acre. Britany, tell us a little bit about who you are and how many DrupalCons you have been to.

Britany Acre: I am Britany Acre and I am a Palentier.net senior client success manager. so I deal with client relationships, I do a little bit of sales, all that stuff. I supported the team also in those endeavors, let me think very hard. This will be my second DrupalCon. Last year was an absolute blast. I met a llama. So who knows what surprises this one holds?

George DeMet: Thank you and then we have Travis Porchia. Travis, do you want to introduce yourself?

Travis Porchia: Hey guys, I'm Travis Porchia, front end Web developer here at Palantir.net. So Drupal site building and theming. I just celebrated my one year anniversary. So woot woot to that. This is my first DrupalCon so I'm very very excited to see all the things, meet all the llamas. Actually this will be the first time. I'm actually meeting a lot of my lovely coworkers in person, so there’ll be a lot of time chatting it up and gauging who's taller than me or not. So definitely a great time, very, very excited.

George DeMet: Awesome. Thank you, Travis. I can't guarantee that there will be a llama at Pittsburgh. I think that that might have just been a Portland thing, but you never know. I do hear the llama travels. So next up we have Ju Vanderwater. Ju, do you want to introduce yourself?

Ju Vanderwater: Yeah, my name is Ju Vanderwater. I'm a senior friend and developer here at Palantir.net and I also serve the role of a product owner for a few of our clients. And this is, this will be my fourth DrupalCon, but first US DrupalCon since Washington DC which was in 2009. It was a long time ago, so I'm super excited but this is the first time I am attending as a speaker-ish. So that's really awesome.

Ju Vanderwater:  Yeah, but I will be taking my own advice that I would give other people here. During this DrupalCon is just to pace my energy, rest, if I need to not feel pressure to attend every social event and maybe go out and get to know a smaller group of people instead, which is good for people like me who are introverts. 

George DeMet: Thank you. Yeah I remember DC and that was a while ago but that was a fun event and what I'll say is DrupalCon's have gotten a little bit bigger since then. So yeah, that’s some good advice about finding your own quiet space Tiffany farriss, do you want to go next?

Tiffany Farriss: Sure, so, I'm Tiffany Farriss, I'm the CEO and co-owner of Palantir. I'm also the longest serving director of the Board of the Drupal Association, other than Dries, of course. And so I'll be wearing both of those hats while I'm in Pittsburgh. So this will be my 25th DrupalCon. I've been to 11 in North America, 11 in Europe. And of course, there were the two online so this will be 25 for me.

George DeMet: Tiffany, is there anything in particular you're looking forward to about Pittsburgh?

Tiffany Farriss: So as someone who is Rust Belt born and bred, I am totally looking forward to some comfort food. I think I'm definitely gonna have a Pittsburgh salad, not sure. I'm gonna go all the way for a primanti's but you know, certainly wouldn't object to some pierogies.

George DeMet: Awesome. Thank you, Joe. You're up next.

Joseph Meersman: Hi. I'm Joe Meersman. Technical architect at Palantir.net. I play the role of a product owner on the Continuous Delivery Portfolio team. I've been working in Drupal for over a decade, and I'm coming up on four years at Palantir. I have been to three DrupalCon so far. So, not a vet but not a novice, really either. And I'm really taking a page from Travis' book. I'm excited to see people.

George DeMet: Thank you. Jill Farley. You're up next.

Jill Farley: Hi, my name is Jill Farley. I have been a senior digital strategist at Palantir.net for almost five years. I currently spend much of my time in the Continuous Delivery Service line along with Joe and Ju. And I actually have been in the Drupal space for about eight or nine years and this is my first DrupalCon. So I'm a strategy practitioner and I also do a lot of agile team coaching and individual coaching within our organization. I kind of say, I always bring the 10,000 foot view to whatever team or project that I'm working on. So yeah, as far as what I'm looking forward to at this DrupalCon?

Jill Farley:  I'm just going to keep repeating it. I'm so excited to see my colleagues in person and many, many of them. For the first time, even though I've been at Palantir for five years, I'm a total extrovert and I really get my energy from connecting and learning from people. So this environment is my jam. I have been waiting patiently for this for a few years and very selfishly. I have two small kids and I'm really looking forward to maybe sleeping in a little bit for five days, so that's me.

George DeMet: Thanks, Jill. If my experience of DrupalCon is anything like other folks I can't guarantee that there will be a lot of sleeping in but good luck. So, so then Ken, we have you next.

Ken Rickard: Yeah, I suppose you do. I'm Ken Rickard, the senior director of consulting here at Palantir and I'll just throw you a bunch of numbers. This week actually marks my 15th year at Palantir. I've been working on Drupal since 2005, that's for those of you who know, that's Drupal 5, which is a long, long time ago and this will officially be my 29th DrupalCon.

Ken Rickard: So there's that, I am excited to get back. I haven't been to a DrupalCon in person since 2019, just like many people and apparently. Half of our inquiries at the booth last year were where's Ken? That's all I heard when people got back. So I will be there. Hanging out.

George DeMet: Yeah, there were a lot of people looking for you Ken and so I know it will be a very special treat to have you at DrupalCon. So that brings us to me, George DeMet, Founder and co CEO of Palantir. I do a  lot of things at Palantir, including moonlighting as a podcast host. I think I have been to just  one fewer DrupalCon than you, Ken. So so 28 is where I'm at going back to Sunnyvale back in 2007

Ken Rickard: George and I actually met in Sunnyvale for the first time.

George DeMet:  That's right. Yeah.

Ken Rickard: I met Ju at DrupalCon. I'm just trying to remember which one it was. It might have been Barcelona the first time. But I don't quite remember.

Ju Vanderwater: No, it was longer than that. I think it was DC or Hungary.

Ken Rickard:  It could be. It could have been that it would have been said it would have been Hungary.

George DeMet: Yep. That was a fun one. Yeah.

Ju Vanderwater:  Second. Yep.

Tiffany Farriss: That's where I met you.

George DeMet:  Yes, Szeged, Hungary, the tiny little university town that took a very long train to get to, but it was a really nice place when you got there.  What am I looking forward to? So I think Pittsburgh has a whole dedication to Mr. Rogers of Mr. Rogers Neighborhood. So I'm looking forward to that. I'm looking forward to DrupalCon in general. Just again reconnecting with folks. Really you know, like I said at the outset, DrupalCon is a social event. To me it’s almost like a summer camp reunion for people who haven't seen each other in a long time but everyone knows each other. So it's a really great occasion and very welcoming as well to new attendees.

George DeMet:  We always like to bring new people into the fold. Awesome. So what I thought I would do next is kind of go around and, since each of you are speaking at DrupalCon, maybe have you talk a little bit about the different sessions that you'll be doing, what your session is about, why you chose this topic, and why you think it's important. And so I thought I would do it in sort of the order in which these sessions will be presented at DrupalCon, which means that actually Travis, the session that you and Cori, who unfortunately isn't here, are doing, would be first up. So you want to talk a little bit about that?

Travis Porchia: Yeah, let’s do it. I'm excited. All right so as George mentioned, I'm one of two. My lovely counterpart Cori Neslun is in Italy right now but she is the brains and the beauty of this whole thing. I just carry the cue cards. No, we came up with this awesome session together, Playing as a Team: Strategies for Better Communication. So not terribly technical as a topic but still very, very important. So, we decided to bring this session to life because working in a flat self-organizing structure full of brilliant developers, we do notice that communication sometimes gets pushed to the back for some and we wanted to offer tools to promote ways to get unblocked and ways to promote psychological safety.

Travis Porchia:  So that's essentially what this talk is going to be about. Tools that we're going to use that are defining what psychological safety is. How can we adopt a leader-leader mindset. Leader-leader is essentially a tool that was kind of conceived by L. David Marquette in the book, Trying to Turn the Ship Around, which if you haven't read it, read it. It's absolutely phenomenal. It challenges kind of like a hard hierarchical structure of workflow and then adapting like a more collaborative workflow in leader-leader. We're going to be talking about non-violent communication and then concepts from the book Radical Candor, which is essentially how to provide safe, but effective feedback. So a lot of interesting topics. We’ll have a lot of fun. There might be music, we'll see. But yeah, I'm very very excited.

George DeMet: That sounds like a really fun session. And yeah, I'm so glad that you're talking about the ways that people work with each other, the way we interact. And how we can all learn how to communicate better, and be more open with each other. So that sounds like a really fantastic session and so that one will be on Monday of DrupalCon. And so I believe it's at 9:00 in the morning. So if you're looking for something to kind of kick off your DrupalCon with, definitely check out Paying as a Team: Strategies for Better Communication. All right, so next up we have Tiffany, you're going to be on a panel on How to Make Big Things Happen in Drupal. What's that going to be about?

Tiffany Farriss: I think it's gonna be fun. I'm on the panel with Gábor Hojtsy, who is serving as the moderator. So Gábor was the D6 release manager and he's been a core committer since 2007. But his current title is the Drupal Core Initiative Coordinator Coordinator because his role of late has really been to help things continue to move forward. Mike Herschel, who is at the SBA right now. He's also a DA board member with me and he was the initiative lead on Oliveiro theme. He  will be on the panel as well as Kristen Pol who is independent now. But she was a former CTO of a Drupal agency and has been involved in pretty much anything there is to be involved in in Drupal. So these are amazing human beings who've contributed a lot. 

Tiffany Farriss:  The panel really is going to focus on how to make larger contributions. And this is I think a particularly important topic as the complexity of Drupal has increased we have really good pathways as a an open source project for smaller patch level contributions, but I think one of the places where we have the opportunity to grow more is in some of the bigger things that we need done in Drupal. You know, Drieslikes to talk about Drupal as being for ambitious experiences, but the project itself is ambitious and there's always big things we want to do. So, you know, we're each going to bring our perspective on how we have organizationally helped support, you know, really big things. Palantir has done it a couple of times now, most recently, with Drupal Rector as part of the upgrade and then we also wrote Workbench. 

Tiffany Farriss:  So we'll just talk about the strategies that we use.  I think Drupal has well and truly for many years now, been a professionalized project so we're well past those hobbyists enthusiast days where people would just volunteer to code into the night. So we need to really establish more sustainable patterns for how we have big contributions happen. And so yeah, this is a great panel for those who want to see their companies or organizations make more big contributions, kind of knowing the ins and outs so that you can learn from our experiences of what does and doesn't work. Or what we might not have thought about and how to really if you're a company, how to engage with your local community in a really productive way. So, that's, that's Monday, I think, for, for 10 something like that. But I am also on a panel. I'm gonna just plug briefly. It's on Tuesday, the Drupal Association will be meeting in public again. So if you want to come and chat with the board. That'll be around lunch time, like 11:30 in the ballroom.

George DeMet: Very exciting. Yeah, thank you. And I really love that you're taking that focus of helping give organizations or even people at organizations the tools to help be contributors to Drupal because you're absolutely right. I mean it is very difficult to just as a single person really be able to make ongoing and sustainable contributions to a major project but if we can work together and maybe get more organizations on board, I think that's key to the innovation of the platform. So thank you. And yeah the Drupal Association panel as well. That's always a fun place to kind of get to meet the folks who kind of oversee  the care of the project, right? 

Tiffany Farriss: We keep the lights on.

George DeMet: That's right. Yeah. But you know I mean it's but you help put on DrupalCon, right? So that's important and maintain drupal.org and all of the infrastructure that keeps the project in community going. So thank you. All right, so moving on actually our next session is on Tuesday morning and Britany, that's your session. Authenticity is Contagious. On Tuesday afternoon, I apologize. You want to tell us more about that.

Britany Acre: Yeah. So, its Authenticity is Contagious.. Being real and showing emotion both long lasting client relationships. So this is not at all technical, it's more so about the soft skills needed to bring longevity to our client relationships. So this came out of a couple of experiences I had here, kind of retroing situations that happened during client calls, and one that comes to mind in particular, was essentially at the very beginning of the project. The clients said in passing something that we knew was going to majorly impact the way the team was able to carry out work. and then we essentially went on to see exactly that thing happen. 

Britany Acre:  So they had a decrease in how much time they could resource to the project. We needed them to resource all the time that we had agreed upon. We knew it was gonna have a major impact and it did. And so in listening to the retro, one of the questions asked was like, “Well, you know, when they said that, how soon did we know that that was only an issue?” Right away. And I said, “Oh great. So how did we relay that to the client?” And we didn't. And so it was one of these things was, how could we have indicated in words and with a strategic emotional response to indicate to the client and give them true pause. Oh. This is something that we need to think about. And so, I had said, I've had several conversations like situations, like that. So it's how can we instead of doing that thing that we've all been taught to do where we keep stoic and, and pretend like everything's gonna be okay no matter what.

Britany Acre:  How do we flip that? And say? Actually, this thing is not going to be okay, no matter what. And how can we show that? And let that show to our client in a way that gives them pause and makes it for the better of our, our engagement together? So, not only is it about allowing myself to show emotion, allowing ourselves to be real people in these engagements. But how is that for the better of our team, the better of ourselves and the way that we show up in those relationships and those engagements? And then just also and I know we're gonna talk about this, but using emotion as a tool. And sometimes that sounds a bit manipulative. That's not what we're talking about. We're saying an emotional response should not be inappropriate, that's not what we're saying.

Britany Acre: But how can you use it as a tool strategically to indicate when something is alarming? And it's something that we want to tackle together. So I don't want to babble forever, but it's a topic that I'm truly interested in. I think it's very much a new way of thinking. When we're talking about the way that we show up in professional business settings, and I think it's something that we're going to see more and more. So we're gonna talk about how to do that when it's safe to try to show that with clients. What do those situations look like? How to identify them? And we'll just talk about the benefits of bringing that part of ourselves to work everyday.

George DeMet: Awesome. Thank you. Britany Yeah I mean I think that it is absolutely key, right? Because I think there's very often a tendency for client relationships to be viewed as transactional. And they're not, it's a real relationship that you have with your client and it's a partnership really. And with any partnership there has to be, you know, people have to be able to be real with each other. Right? And so you know I really appreciate you bringing that and and and helping others understand how they can as you say, bring their full selves to their work. Thank you. All right, so now the next one is another panel we have. And so Joe, I think you're gonna kind of kick off this one. This is our panel “In for the Long Haul: Growing Living Sites in the Post Drupal 8 Landscape. Tell us a little bit more about what that is about.

Joseph Meersman: Yeah, absolutely. And I'll let you Jill and Ju chime in as they would like to. So. I work on the Continuous Delivery Portfolio team which is a lot of big words. But basically we continue to work with our clients that we've worked with to either build a new site or some of the occasional clients that we have brought in from elsewhere that have an existing Drupal site. The importance of our department, and what this talk is really all around is the lifecycle of Drupal sites, post Drupal 8. So when Drupal 8 came out, it's really no longer a requirement that you're going to rebuild your site from the ground up when the next major version of Drupal comes out. Which is fantastic.

Joseph Meersman:  But I think, I know, Palantir was really forward thinking setting up a team of people to continue to manage sites into the future because with the longevity of a site, there's a lot of opportunity for features and enhancements there's a lot of opportunity to actually get real data and look at your ROI and see where you can improve things. And then there's also some problems that arise with maintaining sites as libraries get deprecated through multiple versions of PHP, and through multiple version changes of Drupal. So yeah, our talk is really how we approach all of that and how we work together as a team. To think strategically. And to make incremental improvements for maintaining healthy websites.

Jill Farley: And I can jump in just to give a little bit of perspective around what my lens will be on the panel. So I'm a strategist by trade. I don't have an engineering background. And I was really excited to bring that lens to the Continuous Delivery practice. When I joined the team last year. I'd spent a lot of my career working on what we would call solution delivery projects which are redesigns or replatforming projects. So this is new territory for me and In this panel, I'll be talking about really how we help clients, see the value in longer-range planning, as Joe mentioned, sort of from a strategic perspective.

Jill Farley:  Planning for their, their sites based on business goals, content needs SEO, looming integrations, and not just thinking about site maintenance is reactive or short-term fixes. So I think this is something that we've done uniquely and has really yielded a lot of amazing creative conversations with our clients about how they think about their site maintenance. I'm doing air quotes, you can't see me.

Jill Farley:  So specifically, you know what, what I'm hoping to share is just the fact that a live site has to provide ROI however, or an organization defines it and so much concentrated energy and focus and investment usually happens during a full-on, redesign or rebuild. There's just a lot of momentum and, and team collaboration, but your site doesn't really do anything for your organization until it's out in the wild. So, you know, our team really feels like the action happens once you're kind of managing it ongoing and with the need for back to front rebuild decreasing with this new landscape. How do we keep that energy going around sight improvement when the site isn't really that brand new and shiny? How do we keep that exciting? So we'll be sharing some success stories around how we've started to catalyze more strategic and longer range planning conversations with our clients and maybe sometimes when that's not gone. So well, And how we've how we've pivoted or iterated on those conversations and also which I think Ju will be talking about in a second and Joe already mentioned how our team operates and how that's been a mind shift for our team, in addition to our clients and how we are making continuous delivery fun again.

Ju Vanderwater: Right. Well, I think sometimes ongoing support gets a bad rap because people think, “Oh, well, you know, the team just does bug fixes or boring upgrade work or and I guess that can be true”. But with our mindset shift into future strategy, I feel like we've brought on a lot of fun and exciting opportunities for team members that's outside of maybe what normal support teams might address. And we spend a lot of time building trust and a fun environment for our team members and also with our clients. So, those relationships really give our team a lot of energy and lots of learning opportunities and growth opportunities for everybody. And we'll be addressing some of our tips on how we do that.

George DeMet: Awesome. Thank you so much. Yeah, this is I really love the approach that, you know, our Continuous Delivery Portfolio team takes to again managing that ongoing strategic relationship with folks after their sites have launched? And I think it's a really great point about how this is not just about bug fixes or security updates. This is a journey and this is something that is gonna be ongoing as the needs of your organization change, right? So are the needs of your site. And so I really appreciate, you know, how this team works as a partner for those folks. So thank you. 

George DeMet:  So the next session actually is going to be the one I'm presenting. So I will be speaking at the community summit. The summits at DrupalCon this year are on Thursday, which is a little bit of a shift. They've changed the schedule format around a little bit. So I will be after the introductions kind of kicking things off to present a little session on how we updated the Drupal Code of Conduct. And so this is a project that I've been working on along with a group of other folks from the community from the Community Working Group’s Community Health Team. Drupal is one of the first open source projects to adopt a code of conduct way back in 2010. 

George DeMet:  And so, I spent a number of years serving on the committee that helped enforce and uphold that code of conduct and do conflict resolution between community members and experienced a lot during that time. I was on for, I think about six or seven years, and really, kind of understanding the places where our code of conduct worked well, for our community and where some of the gaps were. And since 2010, there's been a lot of evolution in open source codes of conducts. Pretty much every project now has a code of conduct, and a lot of them include elements that just nobody had quite yet thought of or thought to include back in 2010. And so, last year, we started on a process to kind of overhaul and update Drupal's code of conduct and so I'll be talking about how we went through that process, how we incorporated feedback, you know, historical feedback from the community. We looked at other open source, project codes of conduct and then we reached out to different community stakeholders to get their feedback and input. And before we basically took all of that and shared with the community at large. 

George DeMet:  And so where things are at as of this moment that we're recording it's that we expect to be announcing the new code of conduct in the next week or so. So before DrupalCon, everyone will have a chance to see the new language in the new text anticipating that the code of conduct will probably not officially take effect until you know a few weeks after DrupalCon. So folks will have time to absorb and ask questions and you know, and I'll be there at DrupalCon to answer them. And so looking forward to that, it's been a big project. I personally learned a lot along the way, one of the big lessons was really, you know, making sure that you have a diversity of voices in the input process, finding things that I don't think I would have thought of on my own. Or that even just the group of folks in our committee would have really discovered had we not reached out to people across our global community. So I'm excited about that.

George DeMet:  And then finally, Ken we have you you're going to be presenting a case study session at the government summit which is also on Thursday. The title is “Developing a Testing Strategy for the Wisconsin Department of Health Services.You want to tell us a little bit about what that's about?

Ken Rickard: This  is a fascinating session that actually ties in a lot to the, the CDP session that we were talking about which is, hey, Wisconsin is a legacy project. So it's a Drupal 7 project that's been shifted to Drupal 9 and then is going to move to Drupal 10. And the question becomes. How do you take such a big site that’s quite large and quite complicated because of the version shift and make sure it's got adequate testing for long-term maintenance. The trick there, and what we'll be talking through, are the sort of decisions you have to make in the priorities you have to set because it's very common for say, people to say, “Well, we'd love to test everything”.

Ken Rickard:  And that's great. And that might take you three to four months to implement. And so how do you start gradually introducing testing in a way that's sustainable. And so, we'll talk about how we break down those questions. We'll talk about the different types of tests you might write. We'll talk about the things that are most important to test. So the difference between saying, like an access control test versus content creation test, and why those things are important and why that matters. So it's one of those sessions that sounds technical but really isn't. It's going to be targeted towards project managers and product owners, the kind of people who have to make resourcing decisions about how their sites get built and maintained.

George DeMet: Thank you Ken. And I think this is particularly important being part of the government summit. As you know, public sector web platforms are ones that have a really long lifespan and so that kind of like very strategic long-term proactive planning is absolutely key to their ongoing success and so definitely looking forward to that one, as well.

George DeMet:  So thank you all for sharing information about the sessions you're going to be presenting. I think we've got a really great lineup and, as I was listening to everyone, I was kind of hearing this kind of common theme right about how to ensure kind of long-term, sustainable success with projects. And again going back to the idea that it's not just a one-off project when you're building a new website or launching a new platform, it really is a journey and really making sure that we're thinking about the entire lifespan of that journey as we approach it. 

George DeMet:  So, with that I actually want to switch gears a little bit and talk about what other events that might be going on at DrupalCon or other sessions that you might be looking forward to. Ken, go ahead.

Ken Rickard: Yeah again I'm running behind so I haven't even looked at the schedule yet, but for people like Travis and even Jill who are going to their first event. The thing that I would always stress is that there are a lot of sessions. There's a lot of things going on and, and I always encourage people to go to sessions that are outside their current discipline. So I'm primarily a developer these days, but I like to go to design sections. I like to go to project management sessions because it gets me exposure to things that I wouldn't normally think about, and most of the technical stuff I can pick up on my own as part of the normal work that we do. So I think it's really interesting and really important to be able to do that. So having that exposure and having the different perspectives can really be beneficial.

Ken Rickard:  I'll even drop into a marketing session once in a while, to see what they're saying, and what they, what they're concerns are, because Britany you talked about it earlier, it helps with empathy and understanding what clients are asking for. Understanding what end users need when you're writing code. So that's my, that's my pitch. And then one other thing, I'll say, since I've been to so many of these things, which is, especially if you're speaking for the first time, everyone wants you to be successful, everyone who's coming to this event is coming to collaborate and to share. So you don't have to worry so much about like, “Who am I going to meet? And how am I going to meet people?”  It will happen and it's really easy to just walk up to people saying, “Hey, I'm new. What do I need to know today?”

George DeMet: Thank you, Ken. Tiffany, what are you looking forward to? What tips do you have?

Tiffany Farriss: So I think one of the most important and favorite parts of your book, any DrupalCon for me, have always been the hallway track. So, you know, all the DrupalCon sessions are recorded and they are put up extremely quickly. So if even if there's a session that you were just dying to see, but you're in the middle of a really deep conversation, with someone about another thing, prioritize that conversation. Prioritize the fact that this is that face-to-face time you have with the rest of the community, you know, I think one of the challenges that faces many open source communities, but especially Drupal, is that we are such a global community and not everyone has English as their first language. Communication is hard in general. So if you can actually talk with people face to face, it just has such a lasting impact. It's a little bit easier and there are just tons of people there who make the work that we do every day possible. So I also really like the gratitude culture of Drupal, so you know, definitely use Drupalcon is that opportunity to grab a beverage of choice or a meal with someone who's work, you know you appreciate it. Just make that personal connection. Drupal is built by people and they're, you know, we're all pretty nice. So those are the things I would say is definitely, you know, prioritize people over sessions.

George DeMet: Well, said Tiffany. What other things are folks looking forward to or tips do people have for first-time attendees? I know one that I have, and it's gonna sound kind of cheesy, but don't don't skip the exhibit hall. There's a lot of great networking and great conversations and great people to meet at the different booths. There's some good swag as well, so, you know, if you're looking for something maybe to bring home for a family member or something, there will always be something really cool to find and it's also another kind of really great place to just have those conversations. You know, it's not not just the place, you kind of breeze through on the way to lunch, or or coffee. 

George DeMet: It's a good place as well to hang out and, you know, and we're gonna have a really great booth at DrupalCon. I'm really excited about it. We're gonna have some chairs, make it kind of a social area where people can come and hang out and chat and, you know, as far as our swag. I'm not going to say too much. But I am “totes” excited about what we are going to be giving away at our booth, if that's enough of a clue. So yeah, that's my tip. Jill, did you have any tips or things you're looking forward to?

Jill Farley: I don't have tips because I've not been to DrupalCon, but I've been to many a conference in my day. And I think the thing I'm looking forward to the most especially given how long it's been since, you know, a lot of us have attended conferences or opportunities to network is the sort of the stories of, “Hey, I did that too”. Or, “I struggled with that too. And here is how I solved it.” I'm such an example person that I just soak up all of the common challenges that a lot of us have and the creative solutions of how people have addressed them. Also, just to feel not alone with, “Oh my gosh, we've been banging our heads against the wall” on this particular problem for a while now when actually everybody else is too. So, super excited to hear the stories. You know, you get a little bit in your bubble when you're working with your colleagues and your clients on a daily basis and it's definitely hard to proactively go out and find those kinds of stories and case studies and examples just on a day-to-day basis. So, I feel like this is just, it's like, it's kind of it will be coming to me, I don't have to go out and seek it. So, looking forward to those stories.

George DeMet:Thanks Jill. Yeah, that's so many stories come out of DrupalCon and being able to share stories with each other, but also the stories that we share afterward as well. So, yeah, that's really good advice. So thank you all, you know, for sharing all your insights today. I know, I'm super excited about DrupalCon Pittsburgh. I hope that other folks are as well. You know, again, if you're planning to attend please, you know, say hi to one of us or stop by our booth. If you're not planning to attend, definitely check out the sessions online once they get posted and you know and we'll also if you're a subscriber to our newsletter, we'll also be sharing those recordings with folks as well, so you won't miss out.

George DeMet:  So until next time that is it for this episode of the Plus Plus podcast. We'll be back in a couple weeks with our next episode and until then, take care and goodbye. 

Community Drupal Events Open Source People Government
Categories: FLOSS Project Planets

Drupal Association blog: RSVP for the Black in Drupal Roundtable at DrupalCon Pittsburgh!

Wed, 2023-05-24 15:56

The Black in Drupal Roundtable at DrupalCon Pittsburgh will serve as a forum to exchange ideas and information relevant to the experiences of being black in Drupal. Through this affinity space, we hope to create an environment for open dialogue that can support opportunities for community building and shared experiences. We will discuss topics that help foster a culture of collaboration by providing opportunities to share resources for advancing professional, social, and cultural growth. 

The Black in Drupal Needs Assessment is scheduled for 7 June 2023 at 12:30 pm in Room 326. During this meeting, we will fellowship over lunch and conduct the needs assessment so that we can hear directly from those who identify as Black. This includes anyone who identifies as a member of the African diaspora, from any country, multi/bi-racial and/or multinational. 

We hope you’ll add the Black in Drupal Roundtable to your conference schedule, and we look forward to being in community with you! RSVP now.

If you have any immediate questions please reach out to Joi Garrett (she/her) Community Contribution Coordinator, Joi@drupal.association.org.

Categories: FLOSS Project Planets

Promet Source: Must-See DrupalCon 2023 Picks for Government

Wed, 2023-05-24 15:20
The City of Washington, D.C., the State of New York Governor’s Office, Orange County, Calif., the U.S. General Accounting Office, and NASA are just a few of the thousands of public sector websites worldwide that are on Drupal. Why does Drupal have such a strong appeal for federal, state, local government sites? Lots of reasons.
Categories: FLOSS Project Planets

Web Omelette: Overriding/extending configuration schema in Drupal

Wed, 2023-05-24 05:12

In this article we are looking at how we can override configuration schema that is already defined by a core or a contributed module.

Categories: FLOSS Project Planets

LN Webworks: 5 Key Benefits of Drupal 10 Migration for Your Business

Wed, 2023-05-24 04:29

If you are a website owner or a developer, Drupal 10 migration will keep your website up-to-date and offer numerous benefits and advancements. In the fast-growing technology landscape, staying current with the latest version of a content management system and available Drupal migration services is crucial. 

Staying relevant to the industry trends provides benefits ranging from bulletproof security to immersive user experience, and you reach new heights with your website and captivate your audience like never before. In order to fully understand the significance of advancements, it is crucial to have a deep understanding of the migration requirements and how they would contribute to long-term benefits. So, buckle up and read this complete article to understand the five sensational benefits that Drupal 10 migration brings to the table.

Categories: FLOSS Project Planets

Matt Glaman: Dependency injection anti-patterns in Drupal

Tue, 2023-05-23 09:18

Whenever I have done an audit for a Drupal codebase, one of the first things I manually review and profile is dependency injection anti-patterns in custom code and any contributed modules used. The anti-pattern isn't for accessing services statically through \Drupal: service. These anti-patterns live within the class's __construct method.

Categories: FLOSS Project Planets

Specbee: How to Adhere to Drupal Coding Standards with Git Hooks

Tue, 2023-05-23 05:05
How to Adhere to Drupal Coding Standards with Git Hooks Prabhu 23 May, 2023 Subscribe to our Newsletter Now Subscribe Leave this field blank

Good code is like well-built Lego creations - it's strong, looks good, and is easy to change if you need to. The importance of good coding standards is especially high when you're coding in a team, working on a scalable project, or participating in an open-source community like Drupal.  

As with any other open-source project, Drupal has thousands of developers working on the project. And each of them comes with their own level of expertise. How do you ensure everyone on your team or in the community follows good coding practices? Git Hooks!

Git Hooks are an easy and automated way of ensuring your code always meets Drupal’s coding standards. Implementing Drupal Coding Standards with Git hook will help developers to commit and push the code with proper coding standards as declared by the Drupal community. It can also help improve your project management skills and allows developers to commit code with proper commit message standards. Learn more about Git hooks and how to put them into action.

What is a Git Hook

Git Hooks are scripts that will run automatically every time a Git command is invoked. Just as you would use hook_form_alter to alter the forms in Drupal, you can have separate pre-defined hooks for every Git action.

The Pictorial Representation of Git hook

Finding Git hooks

You can find Git hooks within your project folder (provided Git is initialized) under .git/hooks.  There, you will find all the hooks with .sample extension to prevent them from executing by default.

To make use of the required hooks, you need to remove the .sample extension and edit your code for the execution.

There are many Git hooks available but we are going to use pre-commit Git hooks for initiating Drupal coding standards. 

Pre-commit Git hooks are hooks that will run before the code gets committed. It checks for the line of code that's getting committed.

Implementing Git Hooks

Before you start, make sure you have these basic requirements ready:

  • Composer
  • Git
  • Php-code-sniffer
  • drupal/coder:8.3.13

The below procedure is for installing it in Mac devices. You can find the reference link here for installing instructions on other devices.

  • brew install php-code-sniffer
  • composer global require drupal/coder:8.3.13
  • phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer
  • phpcs -i  → Will give you installed coding standards.
Let's begin!

I am creating a new Drupal project called demo. You can use it in your existing project as well.

 

→ Using cd command we got into the project folder.
     cd demo

→ initializing git into the project
    Git init

→ Adding and making my first commit.
    git commit -m “Initial commit”

 

→ Installing php code sniffer using below command for Mac.
    brew install php-code-sniffer

 

→ Installing Drupal coder using composer
composer global require drupal/coder:8.3.13

→ Once the coder and its path are defined you will get the following output as shown below image. 
phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer

→ phpcs -i
The above command will give you Drupal and DrupalPractice

→ Now you can commit your code. If you have any syntax or coding standard error, you will be notified in the display and your commit process will be aborted.

→ Below is the code to fix the error automatically

phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/custom/demo

Any other issues will need to be fixed manually. Commit your code once done.

Once your code is clean it will allow you to commit the code

Just copy and paste the code in pre-commit.sample within .git/hooks. Don’t forget to remove sample extensions.

Pre-commit code sample:

#!/bin/bash

# Redirect output to stderr.

exec 1>&2

# Color codes for the error message.

redclr=`tput setaf 1`
greenclr=`tput setaf 2`
blueclr=`tput setaf 4`
reset=`tput sgr0`

# Printing the notification in the display screen.

echo  "${blueclr}"
echo "................................. Validating your codes  ……..…………....."
echo "-----------------------------------------------------------${reset}"

# Mentioning the directories which should be excluded.

dir_exclude='\/kint\/|\/contrib\/|\/devel\/|\/libraries\/|\/vendor\/|\.info$|\.png$|\.gif$|\.jpg$|\.ico$|\.patch$|

\.htaccess$|\.sh$|\.ttf$|\.woff$|\.eot$|\.svg$'

# Checking for the debugging keyword in the commiting code base.

keywords=(ddebug_backtrace debug_backtrace dpm print_r var_dump  dump console\.log)

keywords_for_grep=$(printf "|%s" "${keywords[@]}")
keywords_for_grep=${keywords_for_grep:1}

# Flags for the counter.

synatx_error_found=0
debugging_function_found=0
merge_conflict=0
coding_standard_error=0

# Checking for PHP syntax errors.

changed_files=`git diff-index --diff-filter=ACMRT --cached --name-only HEAD -- | egrep '\.theme$|\.module$|\.inc|\.php$'`
if [ -n "$changed_files" ]
then
  for FILE in $changed_files; do
  php -l $FILE > /dev/null 2>&1
  compiler_result=$?
  if [ $compiler_result -eq 255 ]
  then
    if [ $synatx_error_found -eq 0 ]
    then
      echo "${redclr}"
      echo "# Compilation error(s):"
      echo "=========================${reset}"
    fi
    synatx_error_found=1
    `php -l $FILE > /dev/null`
  fi
  done
fi

# Checking for debugging functions.

files_changed=`git diff-index --diff-filter=ACMRT --cached --name-only HEAD -- | egrep -v $dir_exclude`
if [ -n "$files_changed" ]
then
  for FILE in $files_changed ; do
    for keyword in "${keywords[@]}" ; do

      pattern="^\+(.*)?$keyword(.*)?"
      resulted_files=`git diff --cached $FILE | egrep -x "$pattern"`
      if [ ! -z "$resulted_files" ]
      then
        if [ $debugging_function_found -eq 0 ]
        then
          echo "${redclr}"
          echo "Validating keywords"
          echo "================================================${reset}"
        fi
        debugging_function_found=1
        echo "Debugging function" $keyword
        git grep -n $keyword $FILE | awk '{split($0,a,":");
          printf "\found in " a[1] " in line " a[2] "\n";
        }'
      fi
    done
  done
fi

# Checking for Drupal coding standards

changed_files=`git diff-index --diff-filter=ACMRT --cached --name-only HEAD -- | egrep -v $dir_exclude | egrep '\.php$|\.module$|\.inc$|\.install$|\.test$|\.profile$|\.theme$|\.js$|\.css$|\.info$|\.txt$|\.yml$'`
if [ -n "$changed_files" ]
then
    phpcs_result=`phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml --report=csv $changed_files`
  if [ "$phpcs_result" != "File,Line,Column,Type,Message,Source,Severity,Fixable" ]
  then
    echo "${redclr}"
    echo "# Hey Buddy, The hook found some issue(s)."
    echo "---------------------------------------------------------------------------------------------${reset}"
    phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml $changed_files
    echo "<=======> Run below command to fix the issue(s)"
    echo "# phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml your_custom_module_or_file_path"
    echo “<====================================================>"
    echo "# To skip the Drupal Coding standard issue(s), Please use this commands << git commit -m your commit Message --no-verify >>"
    echo "-----------------------------------------------------------------------------------------------------------------------------------------${reset}"
    coding_standard_error=1
  fi
fi

# Checking for merge conflict markers.

files_changed=`git diff-index --diff-filter=ACMRT --cached --name-only HEAD --`
if [ -n "$files_changed" ]
then
  for FILE in $files_changed; do

    pattern="(<<<<|====|>>>>)+.*(\n)?"
    resulted_files=`egrep -in "$pattern" $FILE`
    if [ ! -z "$resulted_files" ]
    then
      if [ $merge_conflict -eq 0 ]
      then
        echo "${redclr}"
        echo "-----------------------Unable to commit the file(s):------------------------"
        echo "-----------------------------------${reset}"
      fi
      merge_conflict=1
      echo $FILE
    fi
  done
fi

# Printing final result

errors_found=$((synatx_error_found+debugging_function_found+merge_conflict+coding_standard_error))
if [ $errors_found -eq 0 ]
then
  echo "${greenclr}"
  echo "Wow! It is clean code"
  echo "${reset}"
else
  echo "${redclr}"
  echo "Please Correct the errors mentioned above. We are aborting your commit."
  echo "${reset}"
  exit 1
fi

Final Thoughts

I hope you found this article interesting and that it helps you write better code because better code means a better web! Liked what you just read? Consider subscribing to our weekly newsletter and get tech insights like this one delivered to your inbox!

Author: Prabhu

Meet E. Prabu, Drupal Developer, and a State Level Handball Player. Prabu remains occupied with his codes during his work hours. And when not, you’ll find him binge-playing outdoor games like Badminton. He fancies a vacation amidst the hills of Kashmir and enjoys petting the local dogs around. If you want to play handball, you know whom NOT to challenge.

Email Address Subscribe Leave this field blank Drupal Drupal Development Drupal Planet

Leave us a Comment

  Recent Blogs Image How to Adhere to Drupal Coding Standards with Git Hooks Image Testing Drupal Websites for Accessibility with WCAG 2.1 Image Understanding Update and Post Update Hooks for Successful Drupal Site Updates Want to extract the maximum out of Drupal? TALK TO US Featured Case Studies

Upgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology

Explore

A Drupal powered multi-site, multi-lingual platform to enable a unified user experience at SEMI

Explore

Great Southern Homes, one of the fastest growing home builders in the US, sees greater results with Drupal

Explore
View all Case Studies
Categories: FLOSS Project Planets

PreviousNext: CKEditor5 scoped styles with PostCSS

Mon, 2023-05-22 20:23

The Drupal 10 update is moving to CKEditor 5. What’s different? It’s no longer an iframe! So how do we scope any custom styles we want to include?

by rikki.bochow / 23 May 2023

First and foremost, if you haven’t read the Drupal docs about including custom styles, then please read that. It will give you the necessary context.

This article is specifically about a theme setup that already uses PostCSS (as opposed to Sass - this is much easier with Sass), has various component stylesheets, and includes some level of theme CSS to the CKEditor window to help improve the content editor experience.

Simply including the same styles used in CKEditor 4 to CKEditor 5 now bleed out into the admin theme, so we need to scope them to the .ck-content class.

Let's just say the theme's original ckeditor.css file looks something like this:

@import "./custom-properties.css"; @import "./base/base.css"; @import "./button/button.css"; @import "./layout/layout.css"; body { font-family: var(--font-family); padding: .5rem; }

We use a couple of PostCSS plugins already, notably postcss-import and postcss-preset-env but in order to wrap everything here in a certain class, including everything we’re importing…

We need a new plugin

I tested a few class prefixing plugins, but the only one that suited my requirements was postcss-prefixwrap. With it installed, here’s our basic postcss.config.js:

module.exports = { plugins: [ require("postcss-import"), ... other plugins require("postcss-prefixwrap")(".ck-content", { whitelist: ["docroot/themes/my_theme/src/ckeditor.css"], nested: "&", ignoredSelectors: [":root", /^\\.ck-(.+)$/], }), ], }

We place it last; we add the class to use as the prefix .ck-content and specify our options;

  • whitelist: our ckeditor.css, so this plugin only applies to that file.
  • nested: because we use ampersand for nested selectors
  • ignoredSelectors: include the :root where we have some global custom properties and any class that starts with .ck- because it’s already scoped.

The only change we need to make to our ckeditor.css file is to change our body styles to live on .ck-content instead. Otherwise, they’ll come out at .ck-content body and be ignored.

Now every selector in our generated ckeditor.css file (that we didn’t ignore) is prefixed with .ck-content; thus all the styles are scoped to CKEditor 5 and no longer bleed into the admin theme.

A note on CSS Custom Properties

If you (like me) prefer to preserve your custom properties, you may find the need to scope them as well, to avoid clashes with custom properties the admin theme might have.

For this, I added one more PostCSS plugin postcss-variables-prefixer;

module.exports = { plugins: [ require("postcss-import"), ... other plugins require("postcss-variables-prefixer")({ prefix: "pnx-", }), require("postcss-prefixwrap")(".ck-content", { whitelist: ["docroot/themes/my_theme/src/ckeditor.css"], nested: "&", ignoredSelectors: [":root", /^\\.ck-(.+)$/], }), ], }

This isn’t specific to the ckeditor.css file, but that’s ok with me; they can be unique everywhere.

Hopefully, this helps make the transition to CKEditor 5 a little smoother for your content editors when updating to Drupal 10.

Categories: FLOSS Project Planets

Acquia Developer Portal Blog: Evaluating Drupal Community Modules

Mon, 2023-05-22 16:53

When looking to use a module from the Drupal community there are a number of factors to consider, beyond its functional use, that determine suitable quality and support for your organisation to use.

When you deploy a Drupal site into production, who is responsible for maintaining it? How long will that site live for? These types of questions shape the risk tolerances of the project. E.g. Lower Drupal competencies means you need greater community support and more stable modules.

All modules on Drupal.org are open source and fall under the GPLv2 open source license. They are free to download and use at your own risk. Each project has its own set of maintainers and a sub-community that uses the module, interacts through issues and contributes bug fixes and feature enhancements.

Categories: FLOSS Project Planets

Acquia Developer Portal Blog: Drupal: cache tags for all, regardless your backend

Mon, 2023-05-22 16:52

This blog has been re-posted and edited with permission from Matt Glaman's blog.

Phil Karlton is quoted as having said, "There are only two hard things in Computer Science: cache invalidation and naming things." As someone who suffers horribly from the latter, I'm glad Drupal's caching APIs make the former a breeze. The long short of it is that caching of data improves performance by not having to perform the same operations multiple times after it has been done the first time until you need to re-run that operation again. It involves some storage (static variable in memory, memory backend storage, or the database.) Generally, you store the data with a given identifier for later retrieval, the actual data to be cached for later reuse, and possibly an expiration time for automatic invalidation.

Categories: FLOSS Project Planets

Pages