OpenSense Labs: 6 Reasons Why You Need To Upgrade Your Drupal Website

6 Reasons Why You Need To Upgrade Your Drupal Website Esha Banerjee Fri, 01/20/2023 - 11:50

It goes without saying that (software) upgrades improve the overall performance of websites. Drupal is no exception. 

Regular updates to the Drupal core benefit not just the site owners in terms of security but also help deliver better user experience. 
 
Businesses should regularly update their websites to make them faster, secure, and easier to use.

Here’s why upgrading your Drupal website is crucial.

Why upgrading your website is important

Below are a few reasons you should prioritize upgrading your website.

  1. Security: Between November 2020 and October 2021, 5212 organizations worldwide experienced data breaches (source: statista). Delays before security updates are applied on site can result in compromised sites as seen in Drupalgeddon.

    Acquia is known to have observed more than 100,000 attacks a day.

    The scale and the severity of this Drupalgeddon brings to fore the importance of keeping websites updated on time. When enterprises fail to upgrade their sites on time, chances of it being compromised are very high.

    Websites that do not receive security upgrades are vulnerable to hacker assaults. The Drupal Security Team issues security announcements for all core vulnerabilities contributed modules that are very critical (labeled "highly critical"), requiring that available upgrades be implemented as soon as feasible. 
     
  2. Support & Maintenance: Community support is what enables Drupal's continual evolution as an open source CMS. The community support for Drupal 7 will wane as it approaches end of life since the Drupal community is actively prioritizing and concentrating on the security of subsequent versions. 
     
  3. Improved design and cost effective: The design of your website accounts for 94% of consumers' first impressions. So, if your website design is unappealing or unpleasant to users, your visitors will bounce off. Further, 38% of website visitors do not engage with an unattractive website, and the design alone accounts for 73% of your website's trustworthiness. The online equivalent may be your website, which deters potential customers from utilizing your services or purchasing your goods. It might no longer be a symbol of excellence. So an upgrade to the design is absolutely needed. A revamp is necessary, in my opinion, every year or two.
     
  4. New Functionalities: Another consequence of failing to apply timely upgrades  is that certain functionalities may cease to perform as intended. Not only can this cause extra annoyance among website maintainers, but resolving these issues may incur additional expenditures for your company owing to the time and resources required to do so. 
     
  5. Technology Benefit: Technology has also advanced, enabling us to forgo conventional, cumbersome Javascript writing in favor of more user-friendly and feature-rich ways to significantly enhance the user experience (JQuery, Prototype, etc.). corner boxes and shadows. HTML5 and CSS3 may significantly improved websites.
     
  6. Improved Speed: Your website has to load as quickly as possible since Google now considers page load time as a ranking factor. It's possible that your older website might use a speed boost to obtain some additional Google points using the new technologies and techniques for speeding up websites. Images should be optimized, compression should be used on the server, web pages should be cached, and CSS and Javascript should be minified.

Drupal for a better digital experience

Drupal is popular among enterprises because of its flexibility, modularity, and authoring experience. Drupal also provides several more perks and advantages that make it one of the top CMS.

Here are some advantages that businesses might gain by developing a website using a Drupal-based platform:

  • Being an open-source platform, Drupal has strong community support that makes website upgrade/migration for consistent branding simple.
  • Drupal as an enterprise CMS, provides a full range of functionality, including multi site management, themes, SEO, content control, and connectors.
  • It lets companies provide digital experiences consistently and uniformly across all of their journey's channels.

Even if we are aware of the numerous advantages that Drupal provides or the features that are more companies, marketers, and even digital agencies to this CMS, there are a number of factors that set Drupal CMS apart.

  • Content Presentation With A Headless Architecture
  • Personalization With Machine Learning And Predictive UX
  • Chatbots To Drive The Business Value
  • Exploring Markets With Augmented Reality (AR) And Virtual Reality (VR)

New Drupal Upgrades since Drupal 7

As of right now, Drupal 10 has just launched, and Drupal 7 is walking towards it's End of Life. It is advised that companies utilizing Drupal 7 start preparing for their migration to Drupal 10 immediately. Some of the features that set Drupal 10 apart as a unique version with some brand-new feature additions and some feature updates are listed below.

  1. Automatic updates - The goal of Drupal's Automatic Updates is to address some of the most challenging usability issues that arise when managing Drupal websites. Updates to the production, development, and staging environments are included, and certain integrations with the current CI/CD procedures are also necessary.
  2. Project browser - The Project Browser simplifies module discovery for site builders. When you pick a module, you will be given instructions on how to install it on your site. This browser is embedded into the Drupal site, so you don't have to leave it to search for modules.
  3. jQuery, jQuery UI, jQuery Forms- Drupal 10 runs on PHP 8, which will be phased out by November 2022. jQuery UI. Furthermore, Internet Explorer 11 and Drupal 10 are incompatible. Modern JavaScript components could someday take the role of the jQuery user interface.
  4. New themes: Olivero & Claro - The Drupal 7 "Seven" theme from 2009 gave off an out-of-date system impression. Seven was replaced by the new "Claro" theme, which was created in accordance with the most recent requirements. The front-end theme, "Olivero," was created to fit with features that are well-liked by users, such as the Layout Builder. The Olivero theme will be WCAG AA compliant.
  5. CKEditor 5 update from CKEditor 4 - Another outstanding upgrade in Drupal 10 is the new WYSIWYG editor. It is challenging to characterize it as just an upgrade of CKEditor from version 4 to version 5 because all the code was written from scratch.

This is not all here are some more insights on Drupal 10 features and modules

Conclusion 

Drupal's modular design and ready-to-use configurations offer quick market entry and the capacity to keep up with technological advancement. One of the top technologies reshaping the IT sector is Drupal, which gives organizations the adaptability and scalability to develop while keeping in mind the needs and preferences of their users.

As Drupal 10 is here, and most  businesses are planning their migration, We at OpenSenseLabs assist businesses in offering a superior digital experience. Email us at hello@opensenselabs.com so that our Drupal experts can assist you.

Image removed.Articles Off

#! code: Drupal 10: Creating Custom Context Providers

I previously looked at injecting context providers into context aware plugins. This time I will explore more about creating our own context providers to plug into this system.

The context provider system is an ideal way to provide context to context aware plugins, with blocks being the prime example. You would use a context provider to inject an entity or value into the block so that actions can be taken using that data.

For example, we could load the current node from the route using context so that we didn't have to bake the route provider logic into the block.

The values we inject also plug into the cache systems and so we don't need to worry about making sure we integrate the cache systems for each type of context within the block system. Cache contexts is all taken care of in the block plugin code.

In this article I will look at why you might want to create a context provider, how to create one, and some examples of them in use.

By default, Drupal comes with the following context providers:

  • Current language context (provided by \Drupal\Core\Language\ContextProvider\CurrentLanguageContext).
  • The node entity from the current route (provided by \Drupal\node\ContextProvider\NodeRouteContext).
  • The taxonomy term entity from the current route (provided by \Drupal\taxonomy\ContextProvider\TermRouteContext).
  • The current user (provided by \Drupal\user\ContextProvider\CurrentUserContext).

This gives us a variety of contexts that are commonly used, but there are many reasons why we would want to create our own context providers. Here are some examples of potential contexts we could create using this system.

Read more

Peoples Blog: Secure your Web Application's Reset Password flow

Generally any application framework provides users to have a flow to reset the passwords by default, It is more like, use clicking on the Reset Password link and redirects to a page where he will asked for email, and reset link sent to users email, so that user can reset the password on their own. This is a default or general flow that any application framework provides, but developers or archite

OpenSense Labs: Boost developer productivity with Chakra UI

Boost developer productivity with Chakra UI Vidya Roy Fri, 01/20/2023 - 11:26

React component libraries are helpful tools in creating stunning interfaces for react-based applications. Though each website component can be coded from the scratch, component libraries make the development process easier and faster to complete. It allows you to use the exact component in your design without going back to the drawing board. As a result, an efficient application can be developed in less time and cost. 

Chakra UI is a modern component-based library for building interfaces. It provides an accessible and reusable component-based architecture that makes it easy to create complex, responsive web applications. 

With its intuitive design system, Chakra UI helps react developers quickly build user interfaces that are accessible, responsive, and visually appealing. 

In this blog, we’ll learn the essentials of Chakra UI, and its importance in React web development, installation, and uses. 


What Is Chakra?

 

Developers and business owners are always looking for ways to develop quickly and efficiently and a great experience for our clients, and Chakra is a tool helping developers to achieve that. 

Chakra UI is a simple, modular and accessible component library that gives building blocks to build React application


According to their official website, Chakra UI is a simple, modular and accessible component library that gives you the building blocks you need to build your React applications. 
This component-based library helps build React apps with speed and boosts developer productivity.


Why Use Chakra?

 

Chakra is a modern and powerful component library for React that was designed and developed by Segun Adebayo a UX Engineer for developing front-end applications. It provides more components, improved styling API, and accessibility and easy-to-understand documentation that gives us guidelines on how to build reusable components and save time.

It provides improved styling API with easy-to-understand documentation to build reusable components and save time

Chakra UI is customizable and reusable we can easily adjust it with our designs. It is very simple to use if you know how to use react components and this also supports ReactJs, along with some other libraries too.

Its components' names and the prop's names are easy to understand. It provides dark and light mode compatibility for developers to overcome contrast challenges. 

Chakra components

 

Chakra has a lot of prebuilt composable and reusable components. Its components are dark and light mode compatible so we can also create our own dark and light mode experience across our application with a little bit of configuration.

Let's take a look at some components of Chakra UI. 

Typography

Typography is the method of arranging font sizes, line spacing, letter spacing, line height, typeface, and other elements of text formatting to improve readability. It’s an important aspect of digital design and can greatly impact how readers engage with and understand written content.

Image removed.

 

Overlay

An overlay is a method to put something on top of such as an image or video, or text on top of another so that what is in the lower position can still be seen.

Image removed.

Feedback

Feedback refers to giving information about something that anyone has done which tells how good or bad it is.

Image removed.

Data display

Data display is a method to represent the data in a visual format, such as a chart, graph, or map, and make information easy to understand.

Image removed.

Navigation

Navigation refers to moving through a website or application, finding the information you need, and getting to the pages you want to visit.

Image removed.


Disclosure 

The act of revealing or making known information that was previously hidden,or making something known.

Image removed.

Form

A form is a document that contains spaces for users to input information It can be used for a variety of purposes, such as collecting contact information, applying for jobs or loans, and more.

Image removed.

Media & Icon

Media refers to various forms of content such as images, text, audio, and video that can be used to carry, entertain or inform.

Icon refers to the representation of the content this is small graphic images or symbols that are used to represent a specific function, feature, or content on a computer or mobile device.

Image removed.

Others

Image removed.

Uses of Chakra components

 

If we want to add default components of Chakra UI to the project we just have to copy its code and paste it into our project and we can see our effect on the browser. If we want to use some components we just have to import them from ‘@chakra-ui/react’.

import {
  Alert,
  AlertIcon,
  AlertTitle,
  AlertDescription,
} from '@chakra-ui/react'.



 
  Your browser is outdated!
  Your Chakra experience may be degraded.

Import like this and create the structure you want to make it very easy to use. 

Chakra Installation?

 

We can use npm, yarn, and pnpm for the installation of chakra and its dependencies.

After setting up our react projects we have to run this command.

npm
npm i @chakra-ui/react @emotion/react @emotion/styled framer-motion

//or
yarn
yarn add @chakra-ui/react @emotion/react @emotion/styled framer-motion

//or
pnpm
pnpm add @chakra-ui/react @emotion/react @emotion/styled framer-motion

After installation to get initialized, we need to set Chakra provider at the root of our application. This can be our index.js or App.js depending on the framework we use.

For React:

import React from "react"

// 1. import `ChakraProvider` component
import { ChakraProvider } from "@chakra-ui/react"

function App({ Component }) {
 // 2. Use at the root of your app
 return (
   
     
   
 )
}

Conclusion

React component libraries are helpful tools in creating stunning interfaces for react-based applications. With its intuitive design system, Chakra UI helps react developers quickly build user interfaces that are accessible, responsive, and visually appealing.

With emerging technological trends you need a partner that ensures your website is innovative. At OpenSenseLabs, we help enterprises provide a better digital experience with new technologies.

Contact us at hello@opensenselabs.com and let our experts help you out.

Image removed.Articles Off

Greg Boggs: Unleash the Power of Drupal 9 Routing: Create Custom Routes with Page Callbacks & Debug Like a Pro

How do I create a route with a page callback in Drupal 10?

To create a route file with a page callback in Drupal, you can follow these steps:

Create a new file in your module’s src/Routing directory, named module_name.routing.yml. In this file, define your route using the YAML syntax. An example of a basic route might look like this:

module_name.example: path: '/example' defaults: _controller: '\Drupal\module_name\Controller\ExampleController::examplePage' _title: 'Example Page'

The path key defines the URL path of the route, and the defaults key contains the page callback and page title for the route. In this example, the page callback is a method named examplePage in the ExampleController class of the module_name module.

Clear Drupal cache so the new route can be picked up by the system.

That’s it! The new route should now be accessible at the URL /example and will use the specified page callback method. You can also pass a parameter in the path, for example path: ‘/example/{parameter}’ and use it in the controller with $parameter = $route->getparameter(‘parameter’)

How do I debug a Drupal 10 routing file?

There are several ways to debug a routing file in Drupal 10, here are some examples:

Use the Devel module: The Devel module is a popular development tool for Drupal, it provides a suite of debugging tools, including the ability to view the routing information for your site. To enable this feature, you need to install and activate the Devel module, and then navigate to the “Devel” -> “Routes” page to view the routing information for your site.

Use the Drupal Console: The Drupal Console is a command-line interface for Drupal that provides a variety of debugging tools. To use the Drupal Console to debug your routing file, you can use the command drupal router:debug to view the routing information for your site.

Use the dpm() function: The dpm() function is a debugging function provided by the Devel module that allows you to print variables to the message area of the page. By adding dpm($routes) to the routing file, you can see the array of all routes.

Use the kint() function: The kint() function is also a debugging function provided by the Devel module that allows you to print variables to the message area of the page, but with more information than dpm(). By adding kint($routes) to the routing file, you can see the array of all routes and more information about the routes.

Use the browser developer tools: By using browser developer tools, you can see all the requests made by the browser and check if the routing file is working correctly.

It’s important to remember that you should only use these debugging tools during development and remove them before deploying to a production environment, as they can expose sensitive information about your site.

How do I make my route higher priority in Drupal 10

In Drupal 10, you can make a route have a higher priority than others by setting a higher weight for the route in the routing file. Here’s an example of how to do this:

In your routing file, you can set the weight property for your route. The weight property is used to determine the order of the routes. Routes with a higher weight will be matched first.

empty_front_page.content: path: '/' defaults: _controller: '\Drupal\empty_front_page\Controller\EmptyFrontPageController::content' _title: 'Empty Front Page' weight: 10

The default weight is 0. If you want your route to have a higher priority, you can set a higher weight. In the example above, the weight is set to 10, which makes it have a higher priority than any other route with a lower weight.

Keep in mind that if you have multiple routes with the same weight, the order in which they are defined in the routing file will determine which route is matched first.

Clear the cache after making any changes in routing file.

By setting a higher weight for your route, you can ensure that it is matched before any other routes with a lower weight. This can be useful if you have multiple routes that match the same path and you want to ensure that a specific route is always matched first.

And there you have it folks, you’re now a pro at creating custom routes and debugging like a boss in Drupal. Just remember, if you ever get stuck, don’t hesitate to call upon the almighty Drupal gods for guidance… or just Google it. Happy routing!

Drupal Association blog: 5 Reasons To Attend DrupalCon Pittsburgh 2023

If you are involved in the Drupal community in any way, DrupalCon is a great way to become more connected. From the sessions and training opportunities to the community networking and sponsor parties, there are many ways to enjoy your experience at the event. In this blog, I’ll highlight my top 5 reasons for attending DrupalCon Pittsburgh in 2023!

1. The Experience
The DrupalCon experience is something that everyone who has gone to a DrupalCon knows well – a full week of excitement dedicated to Drupal and the Drupal Community. Connecting with the best and brightest minds in the community to talk shop, build friendships, and have a great time. Some key highlights of the event are:

  • Driesnote!
  • Community Summit!
  • Sponsor Swag & Events!
  • High Impact Contribution!
  • Trivia Night!

Image removed.

2. The Community
After the last few years of lockdown, it is great to get out of the office and connect with a group of people that are passionate about Drupal. The opportunity to connect with others who share a common interest and meet many of the people behind the usernames of my favorite modules is an awesome break from the day to day.

Image removed.

3. The Learning Opportunities
The opportunities to learn at DrupalCon are far greater than any other venue available today. From the keynotes and sessions to the live training and contribution sprints, DrupalCon is the one place where you can break away from your current bubble and experience all that Drupal has to offer.
Image removed.

4. The Inspiration
Learning from others and seeing the impact that Drupal has in the world shows how innovative and talented the Drupal community is. Everyone attending the conference is focused and engaged on how to:

  • Build the best content management systems
  • Deliver the most innovative customer experience
  • Master their craft

Image removed.

5. The Networking
Connecting with a group of people who are equally as passionate about Drupal, open-source, and delivering the best digital experiences in the world is not an opportunity that presents itself every day. Taking the opportunity to meet new people and build relationships can go a long way in your career.

Image removed.

There are so many reasons to attend DrupalCon Pittsburgh 2023, and I can’t wait! I look forward to the opportunity to connect with the community, hear about the amazing work that is happening with Drupal and enjoy time with friends and colleagues from all over the world who have been brought together by a common passion. I look forward to seeing you there!

_____

DrupalCon Pittsburgh is happening as an in-person event in Pittsburgh, Pennsylvania from 5-8 June 2023. Early Bird Registration opens on 13 February.

Salsa Digital Drupal-Related Articles: Drupal’s Discover Drupal program

Image removed.About Discover Drupal The Discover Drupal program has been set up to uplift people and close the talent gap for junior developers. It gives students the tools, knowledge and connections to succeed. People from historically oppressed communities who are interested in a career in Drupal can get scholarships, mentorship and hands-on training. They also get a laptop they can use for Drupal work.  Some highlights of the program:  Discover Drupal students are committing to a 1-1.5 year long program  Private Slack channel with a dedicated community support network (consistent engagement in this channel is important for program success!

Nonprofit Drupal posts: Diffy Demo -- January Drupal for Nonprofits Chat

New year, new Drupal for Nonprofits chat! Join us TOMORROW, Thursday, January 19 at 1pm ET / 10am PT, for our regularly scheduled call to chat about all things Drupal and nonprofits. (Convert to your local time zone.)

This month, frequent chat participant Stephen Musgrave of Capellic will be giving us our long-awaited demonstration of visual regression testing, using tools like Diffy. (Thank you, Stephen!) Got thoughts/questions/concerns? Feel free to share ahead of time in our collaborative Google doc: https://nten.org/drupal/notes!

All nonprofit Drupal devs and users, regardless of experience level, are always welcome on this call.

This free call is sponsored by NTEN.org and open to everyone. 

  • Join the call: https://us02web.zoom.us/j/81817469653

    • Meeting ID: 818 1746 9653
      Passcode: 551681

    • One tap mobile:
      +16699006833,,81817469653# US (San Jose)
      +13462487799,,81817469653# US (Houston)

    • Dial by your location:
      +1 669 900 6833 US (San Jose)
      +1 346 248 7799 US (Houston)
      +1 253 215 8782 US (Tacoma)
      +1 929 205 6099 US (New York)
      +1 301 715 8592 US (Washington DC)
      +1 312 626 6799 US (Chicago)

    • Find your local number: https://us02web.zoom.us/u/kpV1o65N

  • Follow along on Google Docs: https://nten.org/drupal/notes

View notes of previous months' calls.