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

OpenSense Labs: Why Low Code Development Is Not As Great As We Think

Tue, 2020/07/07 - 2:30pm
Why Low Code Development Is Not As Great As We Think Tuba Ayyubi Tue, 07/07/2020 - 18:00

Low-code development replaces the traditional method of hard coding and allows us to create our own applications without any help from the IT developers. It requires minimal hand-coding and enables faster delivery of applications with the help of pre-packaged templates, drag and drop tools, and graphic design techniques.

From leading low-code development platforms like Mendix and Outsystems to Acquia Cohesion (suited for Drupal websites), the low-code approach has been making waves as a great option for easy application development.

I am sure after reading the above lines you are left confused, that if low-code is an easy way out then why does the title talk about low code not being the right code. Well, if anything looks too good to be true, it’s not always that great. Let me tell you why!

Functionality-first and user needs later

Even though low code is a great help in making the lives of developers easier, it is unfortunate that it puts user experience at stake. A design-led approach or a progressive approach becomes harder to achieve with low code. Functionality over the need of the user never ends well.

Low code, as we know, saves time. And hence is said to be efficient. Whereas the truth is that it is efficient only with respect to time. The applications made on low code are hardly optimized for efficiency. If you want your web app to run smooth and fast, low code is not the go-to option for you.

No technical requirement: a myth

Low code is easy and can be done without including the technical team: True
Low code does not require any technical skill: false

For anyone of us to start working with the low code, the understanding of the development of low code is the first and the least requirement. It takes time to learn and understand the process. So, before one starts using the tools, it is important to ensure that they have the basic technical skills that are required.
Limited functions 

In a low code development tool, the number of functions that you can implement is limited. It is definitely a quick way to build applications but in case you want to try out something different, you do not have many options.

Also, once an app is created on low code, it is not very easy to add custom code or any other required functionality to it.

Does it help in cost-cutting?

When it comes to low code, the cost is both a draw and a drawback. 

Because of its flexibility, low code is easier to use and requires a small set of skills. So, you don’t have to specially hire someone and pay a hefty amount to do that.

Although it is easy to drag and drop building blocks that fulfil your requirements, once you need a special feature that is unavailable, you will need custom code. Merging the custom code can cost a lot more than a completely customized solution as a whole.

When a company starts, it starts small, and hence it is advised to have a provision in its low code contract for ramping up in the future. If not, the company has to face major downfall before they are even able to start properly.

Is it secure?

Low code has been giving rise to the question: Is it secure enough?

When you build an application using low code, it requires your complete trust. You don’t have control over data security and privacy and no access to source code which makes it difficult to identify the possibility of any sort of vulnerabilities.

Using low code to produce code that does not adhere to established best practices could violate an organization’s compliance measures. Doesn’t matter if the resulting application is secure.

Vendor Lock-In Risks

Vendor lock-in is one of the major limitations of low code development.

In the case of the teams that use low code, vendor lock-in can create poorly documented or even undocumented code that is difficult to maintain outside of the platform.

Hence, it is important to understand each vendor’s policies before licensing any tool and ensure that you know whether or not you are able to maintain applications outside of the platform.

Conclusion

Low code is indeed a useful tool but it comes with cons you can’t ignore. Platforms that have been using low code will only tell you that it’s faster and easier but lack of options and functions, security risks, and other major drawbacks make us rethink if it is actually the solution that we want for an enterprise application.

blog banner blog image Low-code Low-code application development website development Blog Type Tech Is it a good read ? On
Categories:

Specbee: Stop Spam! How to use the Captcha and ReCaptcha module in Drupal 8

Tue, 2020/07/07 - 12:58pm
Stop Spam! How to use the Captcha and ReCaptcha module in Drupal 8 Suresh Prabhu 07 Jul, 2020 Top 10 best practices for designing a perfect UX for your mobile app

Have you had enough of the spam comments, form submissions and email submissions by bots trying to infiltrate your website? Then you need a guard called Completely Automated Public Turing test to tell Computers and Humans Apart. Yes, and that is short for CAPTCHA. As annoying as it may be making us prove time and again that we are not bots, Captcha and ReCaptcha are the most effective against fighting automated programs trying to get into our websites. The Captcha module and ReCaptcha module in Drupal 8 are extremely helpful in protecting your Drupal website against spambots and used widely in user web forms and other regions of a web page where user inputs are required. Let’s learn more about the modules and how to implement them in your Drupal 8 website.

What is Captcha and ReCaptcha?

When we try to login to or register on a website, we are sometimes asked to identify and type the distorted numbers and letters into a provided box. This is the Captcha system. Captcha helps us to verify whether the visitor of your site is an actual human or a bot. ReCaptcha does the same in terms of protecting your website from spam except that it makes it tougher for spambots and more user friendly for humans.

How to use the Captcha module in Drupal 8

The Captcha module in Drupal 8 is an easy to use module largely used in forms to identify if the user is a human or a bot. The Captcha module is also compatible with Drupal 9. Let’s get started with installing and using the Captcha module in Drupal 8.

Download and Enable the captcha module

Download the captcha module from here and enable it. To enable the module, go to Extend and in the spam control category, you will find the CAPTCHA option. Click on the checkbox and then click install.

 

 

Enable both Captcha and Image Captcha. Image captcha provides an image-based captcha.

Configure the Captcha module

After installing the module, we must configure the module as per our requirements.

To configure the module, go to Configuration > People > CAPTCHA module settings.

Select the Default challenge type. This type is used on all the forms. You can change the type for an individual form. This module has two built in types -

  • Math : This will provide a simple math problem to the user to solve. 

  • Image : It provides an image of a word that can’t be read by bots.

The example of this type is given in the CAPTCHA examples tab on the same page.

To change the type for an individual form, go to Form Settings tab on the same page. Here we can see the list of forms in the site. Click on the enable button to enable the captcha to form.

To change the challenge type to a particular form, click on the down-arrow and click edit.

Give the form ID for which you want to change the challenge type and can change the type in the dropdown provided under challenge type.

This is not required unless the structure of the form does not change.

Adding the description to the Captcha for the visitor

Click on the checkbox to show the Challenge description box. This is not visible by default. Just click the checkbox, the description is already written. This description is editable and can display any message of your choice to the visitor.

Set validation and persistence

These are some of the features to the validation of the captcha. Here, we can make the validation difficult by requiring case sensitive validation. We can also change the appearance of the challenges. The second option under persistence makes the process simple for the visitor by hiding the challenge once the visitor is logged in and successfully completes the challenge.

Permissions

The captcha can be controlled by giving permissions.

One can change the captcha settings who has the Administer CAPTCHA settings permission. Those who have the skip CAPTCHA permission are not given any challenge. To test the captcha the user should not have the skip CAPTCHA permission. Administrators cannot test as they have this permission by default.

  ReCaptcha module in Drupal 8

The Captcha works as required, but there are some drawbacks to this. It is not user-friendly to visitors with visual disabilities. Reading distorted numbers and letters can be annoying to regular users. This may end up with the user not getting a chance to enter the site.

The solution for this problem is the ReCaptcha module. ReCaptcha module uses Google reCAPTCHA to improve the captcha system.

Download and Enable the ReCaptcha module

Download the captcha module from https://www.drupal.org/project/recaptcha and enable it.

Configure the module

After installing the module, go to Configuration > People > CAPTCHA Module Settings.

Select ReCaptcha in Default challenge type and click save configuration. After saving, go to ReCaptcha tab on the same page.

As the ReCaptcha uses Google ReCaptcha service, the site key and the secret key is required to use the ReCaptcha module. These keys are given by google once we register our site in google ReCaptcha. To register click on the register for reCAPTCHA link.

Once we click on it, we will see this form. We have to provide some information such as domain name, type of ReCaptcha. Accept the Terms of Service before clicking on submit. After the submission, you will get the site key and secret key. Enter it in the reCAPTCHA tab.

Choose which form you would like to use ReCaptcha. And then test the form.

 

If you want to test it in a local environment disable the domain name validation in reCAPTCHA configuration in google.

 

Captcha is used in almost all the sites these days. Captchas are an efficient way to reduce spam and fight the bots. They will distinguish between humans and robots and prevent them from automated attacks on systems and applications. Captchas are now being replaced by ReCaptcha, as ReCaptcha is more user friendly than captcha. ReCaptcha is a type of captcha which is easier for humans to solve but not for the bots. Drupal 8 has tons of functional modules like the Captcha and ReCaptcha to help out with securing your website from these spambots. Specbee is a Drupal development company having years of experience in leveraging the best of Drupal to build compelling websites. Have a requirement for your next Drupal project? Feel free to connect with us!

Drupal Planet Shefali ShettyApr 05, 2017 Subscribe For Our Newsletter And Stay Updated Subscribe

Leave us a Comment

  Shefali ShettyApr 05, 2017 Recent Posts Image Stop Spam! How to use the Captcha and ReCaptcha module in Drupal 8 Image How to manage Google Ads by integrating DFP (DoubleClick for Publishers) with your Drupal 9 website Image Functions and filters to get you started with Twig Tweak in Drupal 8 (with examples) Featured Success Stories

Know more about our technology driven approach to recreate the content management workflow for [24]7.ai

link

Find out how we transformed the digital image of world’s largest healthcare provider, an attribute that defined their global presence in the medical world.

link

Discover how a Drupal powered internal portal encouraged the sellers at Flipkart to obtain the latest insights with respect to a particular domain.

link
Categories:

ComputerMinds.co.uk: Recovering deleted content

Tue, 2020/07/07 - 11:00am

Drupal 7 introduced the brilliant feature of letting users cancel their own account and with it various options for what to do with content they've created when they are cancelled. One of these options is to:

Delete the account and its content.

Which can prove somewhat problematic if used incorrectly.

You see, Drupal is very good at the latter part: deleting all the content created by the user. It's not very good at warning someone that they are about to delete potentially a lot of important content.

The scenario

Let me set the scene for you. Someone had an account on a Drupal site and did a lot of work, making pages etc. Then they left the organisation. Someone else comes along and after a while thinks: I should clean up all these old user accounts and delete them, we don't need them any more.
Unfortunately they use the aforementioned Delete the account and its content option.

A few days pass and then they notice that the cookie policy page has gone missing. And they are sure that the FAQ section had more than 3 questions in it.
Oh dear.

They now face a serious problem. They have two 'easy' options to resolve it:

  1. Restore a database backup from before they deleted the user to recover all the lost content.
  2. Attempt to manually re-create all the content that was deleted.

However, they've been using the site in the interim and have changed lots of content. So have other users of the site. They can't simply restore a database backup from before all the content was deleted because they'd lose all the changes since then. But they also size up the volumes of missing content, and they simply aren't sure what content has gone missing, but know that it's hundreds of pages. Also the references between content have been broken, content that still exists on the site is trying to reference content that isn't there. So now not only do they need to re-create content but they have to go around fixing all the other site content that references that content. Oh my.

The third option

There is another way:

  1. Automatically re-create all the content that was deleted.

But how?

If you've got a decent backup from before the deletion happened then you contact your friendly ComputerMinds and we'll help you out by following something along the lines of the below. If you don't have a decent backup, then you're toast: Learn your lesson and start making backups of your data that you can restore from!

But you've got that backup, right? Ideally from as close as possible to, but not after, the account and content being deleted. So let's see what you/we do with it:

We're going to repeat the deletion and work out how to put it all back.

Begin by restoring the code, files and database from your backup to a development machine.
Load up the site in your browser and get ready to perform the exact same operation that caused the problem in the first place, but don't perform it yet!

Now, identify tables that contain changes that you don't really care about, the more the merrier. I'm thinking the watchdog table, any cache_* tables etc. You might need expert knowledge of the site to make this list as long as possible, it'll help later because you can really cut down the amount of noise and work you'll have to do later.

Once you've done that you want to make a 'pre-delete' database dump. Something like this:

drush sql-dump --structure-tables-list='sessions,cache,watchdog' > pre-delete.sql

Now, go back to your browser and cancel the account in the same way that was done before, so: Delete the account and its content.

Once the deletion has happened we want to run the same drush command as before, but save the results to another file.

drush sql-dump --structure-tables-list='sessions,cache,watchdog' > post-delete.sql

Now we essentially have two database snapshots, the difference between the two is all the content that was deleted. So we'll aim to produce a set of SQL queries to restore all that to the production database.

I had very mixed results with trying to get two MySQL dump files that would diff easily in a way that would leave the correct INSERT/UPDATE statements to put all the content back. Comparing the two dump files pre-delete.sql and post-delete.sql directly just didn't seem to work.

Percona to the rescue!

There's a tool in the Percona suite called pt-table-sync that will diff two databases and produce a set of SQL statements that would make the data consistent between the two, i.e. the SQL 'diff'.

There's a final wrinkle that means that you actually need another database server at this point, because pt-table-sync can only sync from one server to another, not between two databases on the same server. However, in the age of Vagrant or Docker getting multiple MySQL servers running on your machine is no big issue. I'm going to suppose you have two database servers running on ports 3306 and 3307 on your local machine.

Restore each of the SQL dump files from before to an identically named database on the servers respectively. Then you can get pt-table-sync to produce the magic:

pt-table-sync --print --databases=db_name h=127.0.0.1,P=3306 h=127.0.0.1,P=3307 > content-restore.sql

To make the diff go the right 'way' make sure the server with the post-delete.sql file is listed first in the command line. And you may need to adjust the command to get it to connect to your servers correctly.

Once you've done that content-restore.sql should contain a set of SQL commands that you could run on the production server to restore all the deleted content. However, I'd recommend doing one final manual look through the file and making sure that nothing is going to run against tables that don't really matter or that can't be recovered in other ways.
It's a text file so review it line by line and understand what each line is going to do and make sure they are the expected changes!

Once you've done all that you can execute the content-restore.sql file on your production server and that should restore everything that was deleted from the database!

Wrap up

So we've done this twice now, for different clients. We were happy that we were able to recover their content and not force them to either lose all other changes made or have to re-create a lot of pages.
We learnt so much the first time we did this, that the second time it was actually a fairly smooth process that didn't take very long at all despite having to restore thousands of pieces of content. We've also taken steps to stop people from using this particularly dangerous option when cancelling a users account.

Obviously all of the above relies on having backups of your database, and being able to retrieve a point-in-time, not just the 'latest' one. If you don't have this in place already, go now and get that sorted!
If you have backups, maybe bookmark this page so that if you ever need to recover a large amount of accidentally deleted content you'll know a (fairly) easy way that works well.

Categories:

Drupal Atlanta Medium Publication: Attention All Event Organizers — Call for Board Nominations — Deadline Today

Mon, 2020/07/06 - 3:53pm
Attention All Event Organizers — Call for Board Nominations — Deadline Today

It feels like a lifetime ago that the event organizers’ request to become an official working group was approved by the Drupal Association at DrupalCon Amsterdam. Since then, 2020 has been a year that no-one will forget-from a global virus to social justice demonstrations-the world as we know it has been forever changed.

Lessons We Are Learning in 2020

So far in 2020, we have learned some valuable lessons that we think will help us be a better working group moving forward.

Organizing Events is Hard. Organizing volunteer-led events is difficult already, let alone during complete uncertainty. Many event organizers have had to make very difficult but swift decisions by either canceling or trying to pivot to a virtual conference format.

Finding the Right Time is Hard. Organizing a global group of volunteer event organizers is also hard. As someone who has had little time on international teams, I admittedly thought of finding a meeting time a breeze. I was completely wrong.

Global Representation is Hard. One of our top priorities was to have global representation to help foster growth and collaboration around the world but unfortunately due to either the meeting times or not enough focused marketing on international event organizers the participation was just not where the board felt it should be.

Changes We are Making

After a few emails and some friendly debates, the board looked for opportunities for change that can help solve some of the lessons we have learned.

Alternating Meeting Times in UTC Format. To help foster more international participation, all scheduled meetings will alternate times all marketed and posted in the Coordinated Universal Time (UTC) format. Public meetings will now be at 12:00 pm UTC and 12:00 am UTC.

Increase Board Membership to 9. The group decided to expand the board members to 9. We are highly encouraging organizers from around the world to submit their names for interest to increase our global representation.

Maintain and Recruit Advisory Board Members. Succession planning is critical for any operation, and our advisory board provides more flexible commitment in participation which we hope will be our number one resource for new members down the road.

Board Members Nominations. In addition to expanding the number of board seats, Suzanne Dergacheva from DrupalNorth (Canada) and Matthew Saunders (DrupalCamp Colorado) have accepted their nominations from advisors to board members.

Current Board Members
  • Camilo Bravo (cambraca) — DrupalCamp Quito — Ecuador / Hungary
  • Baddý Sonja Breidert (baddysonja) — DrupalCamp Iceland, Germany, Europe, Splash Awards — Europe
  • Kaleem Clarkson (kclarkson) -DrupalCamp Atlanta — Atlanta, GA, USA
  • Suzanne Dergacheva (pixelite) — DrupalNorth — Montreal, QC CANADA
  • Leslie Glynn (leslieg) Design 4 Drupal Boston, NEDCamp — Boston MA
  • Matthew Saunders (MatthewS) — Drupalcamp Colorado — Denver, CO, USA
  • Avi Schwab (froboy) — MidCamp, Midwest Open Source Alliance — Chicago, IL, USA
Things We are Working On

There are so many things that all of us organizers would like to get working, but one of our goals has been to identify our top priorities.

Event Organizer Support. We are here to help. When volunteer organizers need guidance navigating event challenges, there are various channels to get help.

Drupal Community Events Database. In collaboration with the Drupal Association, the EOWG has been working on putting together a new and improved event website database that will help market and collect valuable data for organizers around the world.
Submit your event today: https://www.drupal.org/community/events

Drupal Event Website Starter kit. To help organizers get events up and running quickly, an event website starter kit was identified as a valuable resource. Using the awesome work contributed by the Drupal Europe team, JD Leonard from DrupalNYC has taken the lead in updating the codebase. It is our hope more event organizers will help guide a collaborative effort and continue building an event starter kit that organizers can use.

Join the Event Organizer Slack here and Join #event-website-starterkit

Seeking Event Organizers Board Members and Advisory Committee Members — Submit Your Nomination Today

The Drupal Event Organizers Working Group is seeking nominations for Board Members and Advisory Committee Members. Anyone involved in organizing an existing or future community event is welcome to nominate.

EOWG Board Members. We are currently looking for nominations to fill two (2) board seats. For these seats, we are looking for diverse candidates that are event organizers from outside of North America. Interested organizers are encouraged to nominate themselves.

EOWG Advisory Committee. We are looking for advisory committee members. The advisory committee is designed to allow individuals to participate who may not have a consistent availability to meet or who are interested in joining the board in the future.

Nomination Selection Process: All remaining seats/positions will be selected by a majority vote of the EOWG board of directors.

Submit Your Nomination: To submit your nomination please visit the Issue below and submit your name, event name, country, territory/state, and a short reason why you would like to participate.

Issue: https://www.drupal.org/project/event_organizers/issues/3152319

Nomination Deadline: Monday, July 6th, 11:59 pm UTC

Originally published at https://www.drupal.org on June 17, 2020.

Attention All Event Organizers — Call for Board Nominations — Deadline Today was originally published in Drupal Atlanta on Medium, where people are continuing the conversation by highlighting and responding to this story.

Categories:

Kalamuna Blog: 5 Tips To Get Top SEO Results

Mon, 2020/07/06 - 2:38pm
5 Tips To Get Top SEO Results Jaida Regan Mon, 07/06/2020 - 05:38

Every marketing professional knows that being at the top of search engine results is important and that SEO will help to get them there. You may have also heard that SEO can be challenging to learn, but the truth is, SEO doesn't have to be difficult, and sometimes it can be pretty fun!

These 5 basic SEO techniques are easy to implement and will have you on your way to the top of search engine results:

Categories Analytics Strategy Author Jason Blanda
Categories:

OpenSense Labs: The definitive guide to Drupal 9

Mon, 2020/07/06 - 12:12pm
The definitive guide to Drupal 9 Shankar Mon, 07/06/2020 - 15:42

Technology is changing at the speed of light. Fuelled by the democratisation of innovation, the tempo of change and adoption is multiplying. Today, 5G is a major talking point in the industry. IoT is changing at scale. Data is becoming the centre of the IT universe with digital twins, spatial computing, artificial intelligence, deep analytics and new applied versions of technology all being dependent on data platforms. And, Hyperloop is leveraging magnetic levitation and big vacuum pumps to let those bus-sized vehicles zip along at speeds approaching Mach 1. In a world, where disruptive technologies are changing the ways we see everything around us, what happens to the existing technological solutions? Continuous innovation is the biggest mantra that can help them sustain in the long run and evolve with changing technological landscape. This is exactly how Drupal, one of the leading open-source content management systems, has remained powerful after almost two decades of existence. Introducing Drupal 9!


Since Dries Buytaert open-sourced the software behind Drop.org and released Drupal 1.0.0 on 15th January 2001, it has come a long way. It has weathered headwinds. It has grown rapidly. It has powered small and medium businesses to large enterprises around the world. Supported by an open-source community, which is made up of people from different parts of the globe, it has kept on becoming better and better with time. Drupal 9, the new avatar of Drupal, with intuitive solutions for empowering business users, cutting-edge new features that help dive into new digital channels, and easy upgrades, is the future-ready CMS. Amidst all the changes that are happening in the digital landscape, Drupal is here to thrive! Websites and web applications, built using Drupal 9, will be much more elegant!

The excitement in the air: Launch of Drupal 9

When the Drupal 8 was released back in 2015, it was a totally different world altogether. The celebrations were in full swing. But, as a matter of fact, Drupal 9 launch in 2020 wasn’t a low-key affair either. In spite of the Covid-19 pandemic, the Drupal Community and the Drupal Association made sure that the virtual celebrations were right on top. The community built CelebrateDrupal.org as a central hub for virtual celebrations and enabling the Drupal aficionados to share their excitement.


Even since Drupal 9.0.0-beta1 was released, which included all the dependency updates, updated platform requirements, stable APIs, and the features that will be shipped with Drupal 9, it raised the excitement levels to the sky-high. The beta release marked Drupal 9 as API-complete. Eventually, on June 3, 2020, the world saw the simultaneous release of Drupal 9.0.0 and Drupal 8.9.0.


Drupal 8.9 is a long-term support version, or the final minor version of Drupal 8, which will receive bug fixes and security coverage until November 2021 with no feature development. On the contrary, Drupal 9 development and support will keep on continuing beyond 2021. Drupal 8.9 includes most of the changes that Drupal 9 does and retains backwards compatibility layers added via Drupal 8’s release. The only difference is in the Drupal 9’s updated dependencies and removal of deprecated code.

Source: Drupal.org

If you have an existing Drupal site, opting to update to Drupal 8.9 is a perfect option. This will make sure maximum compatibility and the least possible alterations required for the Drupal 9 update. Or, if you are creating a new Drupal website, it gives you the option of choosing between Drupal 8.9 and Drupal 9. Going for Drupal 9 would be the most logical option as it gives you forward compatibility with later releases.

Traversing the world of Drupal 9


First things first - with the onset of Drupal 9, a rebranding has taken place as well. The new Drupal brand represents the fluidity and modularity of Drupal in addition to the Drupal Community’s strong belief system of coming together to build the best of the web.


If one asks what exactly is Drupal 9, all you can say is that it is not a reinvention of Drupal. It is a cleaned-up version of Drupal 8. So, what’s new in Drupal 9?

Drupal 9 has not only removed deprecated code but updated third-party dependencies for ensuring longer security support for your website’s building blocks and leverage new capabilities.

Since the adoption of semantic versioning in Drupal 8, adding new features in minor releases of Drupal has been possible instead of waiting for major version releases. To keep the Drupal platform safe and up to date, Drupal 9 has revised some third-party dependencies:

  • Symfony: Drupal 9 uses Symfony 4.4. But, Drupal 8 uses Symfony 3 and the update to Symfony 4 breaks backwards compatibility with Symfony 4. Even though Symfony 3’s end of life is November 2021, Drupal 8 users get enough time to strategise, plan and update to Drupal 9.
  • Twig: Drupal 9 will also move from Twig 1 to Twig 2.
  • Environment requirements: Drupal 9 will need at least PHP 7.3 for enhanced security and stability. If Drupal 9 is being run on Apache, it will require at least version 2.4.7.
  • Database backend: For all supported database backends within Drupal 9, database version requirements will be increased.
  • CKEditor: Soon, CKEditor 5 will be added in Drupal 9.x and CKEditor 4 will be deprecated for removal in Drupal 10.
  • jQuery and jQuery UI: While Drupal 9 still relies on jQuery, most of the jQuery UI components are removed from core.
  • PHPUnit: Drupal 8 requires PHPUnit 8.

Drupal 9 comes with the same structured content-based system that all the Drupalers love about it. Layout Builder in core enables you to reuse blocks and customise every part of the page. Built-in JSON:API support helps you develop progressively and fully decoupled applications. BigPipe in core ensures fantastic web performance and scalability. Bult-in media library helps you manage reusable media. There is multilingual support as well. You get better keyboard navigation and accessibility. Its mobile-first UI would change your mobile experience forever. The integrated configuration management system could be used with development and staging environment support.

Therefore, other than those provided by the updated dependencies, Drupal 9.0 does not include new features. It has the same features as Drupal 8.9. Drupal 9.x releases will continue to see new backwards-compatible features being added every six months after Drupal 9.0.

Migration to Drupal 9


While Drupal 9 is definitely the way to go, one needs to know certain things before upgrading from Drupal 7 or Drupal 8 to Drupal 9. Drupal 7 and Drupal 8 are not completely lost yet. They are here to stay for a while.

Drupal 7, which was slated to be end-of-life in November 2021, will now be getting community support till November 28, 2022. The decision comes after considering the impact of the Coronavirus outbreak and that a large number of sites are still using Drupal 7 in 2020. On the other hand, Drupal 8, which is dependent on Symfony 3 and since Symfony 3 will be end-of-life in November 2021, will, as a result, see the end of community support on November 2, 2021.

Symfony 4 will be end-of-life in November 2023. With Drupal 9 using Symfony 4.4, it is bound to stop receiving support at the end of 2023. (There is no official confirmation on dates yet for Drupal 9 EOL.) If that happens, Drupal 10 will be released in 2022 which means it will be released before Drupal 9 becomes end-of-life.


To upgrade to Drupal 9, the know-how of upgrade tools is essential:

  • For migrating your content and site configuration, Core Migrate module suite is perfect. 
  • The Upgrade Status Module would give your details on contributed project availability.
  • In case of Drupal 8 websites, the Upgrade Rector module would automate updates of several common deprecated code to the latest Drupal 9 compatible code.
  • In case of Drupal 7, the process of scanning and converting outdated code on your site can be handled by Drupal Module Upgrader.
  • Using drupal-check and/or the Drupal 8 version of Upgrade Status in your development environment helps you ensure whether or not a Drupal 8 update is also compatible with Drupal 9. You can also make use of phpstan-drupal from the command line or as part of a continuous integration system to check for deprecations and bugs.
  • You can use IDEs or code editors that understand ‘@deprecated’ annotations


The best option is to upgrade directly from Drupal 7 to Drupal 9 as this ensures that your upgraded site has maximum expected life. When your site requires a functionality provided by modules that are available in Drupal 8 but not yet in a Drupal 9 compatible release, you can also migrate to Drupal 8 first (Drupal 8.8 or 8.9) and then eventually move to Drupal 9.

While updating from Drupal 8 to Drupal 9, it is important to ensure that the hosting environment matches the platform requirements of Drupal 9. You need to update to Drupal 8.8.x or 8.9.x, update all the contributed projects and make sure that they are Drupal 9 compatible. Also, you need to make the custom code Drupal 9 compatible. Once set, all you need to do is update the core codebase to Drupal 9 and run update.php.

Future of Drupal 9

It’s very important to make Drupal more and more intuitive for all the users in the coming years. One of the foremost achievements of Drupal 9 is the streamlined upgrade experience. Upgrading from Drupal 8 to Drupal 9 is a lot easier than moving from Drupal 7 to 8. And, it will continue to be a smoother process when the time comes to migrate from Drupal 9 to Drupal 10.

Drupal 9 will continue to receive feature updates twice a year just like Drupal 8 did. For instance, the experimental Claro administration theme is being stabilised. The new Olivero frontend theme is already being developed and is being optimised for accessibility and tailored to frontend experiences. It is specifically being designed for marketers, site designers and content editors with a lot of emphasis on responsive design. Automated Updates Initiative, which began in Drupal 8, is also in the works.

There’s an awful lot of development going on behind-the-scenes. The upcoming releases of Drupal 9.x would definitely come packed with exciting new features. We are waiting!

Conclusion

Drupal is awesome because it’s always on the cutting edge. It has always been a CMS that provides extensibility, flexibility and freedom. Drupal’s foundation has always been in structured data which works really well in today’s demand for multichannel interactions. Having one of the biggest open source communities, it has the support of thousands and thousands of people adding more features to it, enhancing security and creating new extensions.

The large community of Drupal embraces change right away as the big developments happen. That is exactly why Drupal has been able to offer fantastic web experiences all these years. Drupal 9 is the result of its community’s commitment to enabling innovation and building something great.

Undoubtedly, Drupal 9 is the best and most modern version of Drupal yet. It marks another big milestone in the realm of web content management and digital experience. It’s time for you to start planning a migration path if you are still on Drupal 7 or Drupal 8. If you are starting out a new website project in Drupal, there shouldn’t be any ambiguities over choosing Drupal 9. Contact us at hello@opensenselabs.com to build the most innovative, creative and magnificent website ever using Drupal 9 or to migrate from Drupal 7 or 8 to Drupal 9.

blog banner blog image Drupal 9 Blog Type Articles Is it a good read ? On
Categories:

eiriksm.dev: Set id of CSV migration row based on line number

Sun, 2020/07/05 - 1:49pm

Migrate in core is among my favorite parts of Drupal 8 and 9. The framework is super flexible, and it makes migrating content from any source you can dream up pretty straight forward. Today I want to show a trick that I use when I receive a csv (or Excel file) from clients, where they want all of the contents in it migrated to Drupal. One very simple example would be a list of categories.

Typically the file will come with one term on each line. However, migrate would want us to set an ID for all of the terms, which currently none of the rows have. One solution to this is to place an ID on all of the rows manually with some sort of spreadsheet software, and then point our migration to the new column for its IDs. But since that both involves the words "manual" and "spreadsheet software" it immediately makes me want to find another solution. Is there a way we can set the row id programmatically based on the row number instead? Why, yes, it is!

So, here is a trick I use to set the ID from the line number:

The migration configuration looks something like this:

id: my_module_categories_csv label: My module categories migration_group: my_module source: # We will use a custom source plugin, so we can set the # ID from there. plugin: my_module_categories_csv track_changes: TRUE header_row_count: 1 keys: - id delimiter: ';' # ... And the rest of the file

As stated in the yaml file, we will use a custom source plugin for this. Let's say we have a custom module called "my_module". Inside that module folder, we create a file called Categories Csv.php inside the folder src/Plugin/migrate/source/CategoriesCsv.php. And in that file we put something like this:

<?php namespace Drupal\my_module\Plugin\Migrate\source; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; use Drupal\migrate_source_csv\Plugin\migrate\source\CSV; /** * Source plugin for Categories in csv. * * @MigrateSource( * id = "my_module_categories_csv" * ) */ class CategoriesCsv extends CSV { /** * {@inheritdoc} */ public function prepareRow(Row $row) { // Delta is here the row number. $delta = $this->file->key(); $row->setSourceProperty('id', $delta); return parent::prepareRow($row); } }

In the code above we set the source property of id to the delta (the row number) of the row. Which means you can have a source like this:

Name Category1 Category2 Category3

Instead of this

id;Name 1;Category1 2;Category2 3;Category3

The best part of this is that when your client changes their mind, you can just update the file instead of editing it before updating it. And with editing, I mean "manually" and with "spreadsheet software". Yuck.

To finish this post, here is an animated gif called "spreadsheet software yuck"

Categories:

Vardot: DrupalAudit

Sun, 2020/07/05 - 2:19am
DrupalAudit Type Tool/Template Firas Ghunaim Sun, 07/05/2020 - 03:19

Your comprehensive Drupal website auditing tool is here!

Vardot released the beta-version of DrupalAudit to aid Drupal website owners and developers just before the release of Drupal 9 early June 2020.

Frequent performance audits are essential to guarantee that you benchmark your desired KPIs and website efficiency in alignments of the objectives of your digital strategy.

The tool will assess your Drupal website across the following key areas:

  • Performance
  • SEO
  • Accessibility
  • Best Practices

To use DrupalAudit, follow these 3 simple steps:

  1. Enter your Drupal site’s URL and test the performance across all site aspects.
  2. Find out how your Drupal site is performing in the areas you care about.
  3. Automatically generated tips will guide you on what to do next.
Form Form title Audit Your Drupal Website Performance Solutions by industry Media and Entertainment Healthcare Financial Services High Tech Travel and Tourism Retail Government Higher Education Nonprofits and NGOs Solutions by need Enterprise CMS Drupal Managed Services E-Commerce Knowledge Management On-Site SEO Omnichannel Marketing Automation Social Business Community Related services Web Development Support and Maintenance Drupal Migration and Upgrades DevOps and Engineering Digital Marketing UI/UX Design Digital Strategy Product Varbase Vardoc Marketing Automation Uber Publisher Open Social
Categories:

DrupalEasy: Drupal 8 entity query across (through?) an entity reference field

Sat, 2020/07/04 - 4:09pm

If you write custom Drupal 8 (or 9) modules, then you've probably used the entity QueryInterface - which is accessible from the Drupal::entityQuery() static method. If not, then you're missing out on this incredibly useful tool that allows you to easily query a Drupal site for entities of any kind. 

For example, if you are looking for all nodes of type Movie that have a Release year of 2009, you can do something like this:

$result = \Drupal::entityQuery('node') ->condition('type', 'movie') ->condition('field_release_year', '2009') ->execute();

But what if you want to base the condition on a value of a referenced entity? Maybe you want to find all nodes of type Movie where the director of the movie was born in 1981? Assume nodes of type Movie have an entity reference field to nodes of type Director, where one of the fields on the Director content type was Birth year. It's almost as easy to write an entityQuery condition for this situation as well:

$result = \Drupal::entityQuery('node') ->condition('type', 'movie') ->condition('field_director:entity:node.field_birth_year', '1981') ->execute();

Note the entity:node bit in the second condition - this is what allows you to access fields in the referenced entity.

Categories:

wishdesk.com: Why upgrade to Drupal 9: guide for Drupal 7 website owners

Fri, 2020/07/03 - 5:06pm
Today, we will be discussing why you should upgrade to Drupal 9. A special focus will be on Drupal 7 websites — what’s important for their owners to know.
Categories:

Gábor Hojtsy: Learn about and shape the future of Drupal at DrupalCon Global

Thu, 2020/07/02 - 6:24pm

Drupal 9 was just released last month, and in less than two weeks we get together to celebrate it (again), learn, grow and plan together for the future at DrupalCon Global.

I presented my "State of Drupal 9" talk at various events for over a year now, and while the original direction of questions were about how the transition would work, lately it is more about what else can we expect from Drupal 9 and then Drupal 10. This is a testament and proof to the continuous upgrade path we introduced all the way back in 2017. Now that Drupal 9.0 is out, we can continue to fill the gaps and add new exciting capabilities to Drupal core.

DrupalCon Global will have various exciting events and opportunities to learn about and help shape the future of Drupal 9 and even Drupal 10. Tickets are $249 and get you access to all session content, summits and BoF discussions. As usual, contributions do not require a ticket and will happen all week as well, including a dedicated contribution day on Friday. Here is a sampling of all content elements discussing, planning on and even building the future of Drupal.

Sessions about the future of Drupal
Photo by Austin Distel on Unsplash

First there is the Driesnote of course. Dries will share the result of the Drupal 2020 Product Survey and discuss plans for Drupal 10. There is a followup Q&A session to discuss the keynote and other topics with Dries live.

The Drupal Initiatives Plenary coordinated by yours truly is going to feature various important leaders in our community working on diversity and inclusion, accessibility, events, mentoring, promotion as well as core components like the Claro admin theme and the Olivero frontend theme. This is the best way to get an overview of how Drupal's teams work, what are their plans and challenges. Even better, the plenary session is followed by a BoF where we can continue the discussion in a more interactive form.

In Drupal Core markup in continuous upgrade path Lauri Eskola will dive into why the deprecation process used for PHP and JavaScript code is not workable for HTML and CSS. This informs the direction of where markup is going in Drupal 9 and 10 onwards.

In the Drupal.org Panel the Drupal Association team discusses how key initiatives are supported on Drupal.org including Composer, Automatic Updates and even Merge Requests for Drupal contribution and plans for the future.

Mike Baynton and David Strauss will discuss Automatic updates in action and in depth showing what is possible now and what are the future plans.

There is not one but two sessions about the new proposed frontend theme. In The Olivero theme: Turning a wild idea into a core initiative Mike Herchel and Putra Bonaccorsi discusses the whole history and future plans while in Designing for chaos: The design process behind Olivero will cover the design specifically.

Moshe Weitzman leads a core conversation to take stock of the current command line tools for Drupal and discuss what a more complete core solution would look like in A robust command line tool for all Drupal sites.

In Let’s Make Drupal Core Less Complicated Ted Bowman will propose ways to simplify Drupal core for existing uses and to achieve an easier learning curve.

Finally Drupal 9: New Initiatives for Drupal offers a chance to discuss new initiatives proposed by Dries in the Driesnote. If you are interested to join in either or discuss the plans, this is your opportunity!

Birds of a Feather discussions about the future of Drupal

Attendees with tickets for DrupalCon Global will be able to participate in live discussions about key topics. BoF submission is open, so this list will possibly grow as time goes.

Ofer Shaal leads a discussion titled Standardize Rector rules as part of Drupal core deprecations to make sure the transition from Drupal 9 to 10 will be even easier than Drupal 8 to 9 is.

Submit your Birds of a Feather discussion now.

Contribute to the future of Drupal
Photo by WOCinTech Chat on Flickr

Just like in-person DrupalCons, DrupalCon Global contribution will be free to attend and does not require a ticket. The contribution spaces are especially good to go to if you are interested in the future of Drupal and making a difference.

If you've been to a DrupalCon or a DrupalCamp before, a contribution event usually involves one or more rooms with tables that have signage on them for what they are working on. This is not exactly possible online, however, we devised a system to replicate tables as groups at https://contrib2020.getopensocial.net/all-groups which allows you to see what topics will be covered and who the leads are. (Huge props to Rachel Lawson at the Drupal Association for building this out!)

If your topic is not yet there, you should create a group now. Groups indicate what they are working on and what skills they need from contributors. You should join groups you are interested to help and read their information for guidance. Teams will post group events to let you know when certain activities (introduction, review sessions, co-working on specific problems or meetings to discuss issues) will happen. Events will also be used to signify when you are most likely to find people working on the topics. The OpenSocial site is a directory of topics and events, contribution itself will happen on drupal.org with discussion on Drupal Slack for most groups.

There are already groups for Configuration Management 2.0, the Olivero theme, the Bug Smash initiative and Media. Stay tuned for more appearing as the event comes closer.

Categories:

DrupalCon News: Makers & Builders

Thu, 2020/07/02 - 4:46pm
Categories:

Srijan Technologies: What’s New in Drupal 9 and Why Do You Need To Upgrade

Thu, 2020/07/02 - 3:15pm

Drupal 9 was launched on June 3, 2020. Given this, it would be necessary for enterprises to upgrade to it later or sooner to acquire complete functionality and retain the ability to receive security updates within the bi-yearly cycles.

Categories:

OpenSense Labs: Reasons Why Drupal Is The Best Fit For Your E-Commerce Website

Thu, 2020/07/02 - 2:08pm
Reasons Why Drupal Is The Best Fit For Your E-Commerce Website Tuba Ayyubi Thu, 07/02/2020 - 17:38


Evolving technologies and marketing strategies have changed the way shopping is experienced. With time, the charm and challenges of eCommerce have increased. How do you plan to overcome these challenges?

As an online brand, you have your challenges when eyeing expansion and opportunities. To achieve the right numbers it is important to engage with customers and sell quality products, all through the right platform.

Talking about the right platform, you can always trust Drupal. Drupal is a content management system with hundreds of modules and themes ready to drive your business online. Drupal adds the magic that your website needs.

The State Of Digital Commerce

Drupal provides amazing features for your eCommerce website, but before jumping to that, let’s take a glance at some stats and understand where the eCommerce industry is heading.

According to Statista, online sales reached $2.5 trillion for the global eCommerce market at the end of 2019 and represented 14% of its global market share. The same data says that by the end of 2020, global commerce sales are predicted to reach $4.2 trillion and the representation will increase to 16%.

Source: Statista

The way that people have been shopping online has changed. Keeping up with trends is important for the growth in the retail landscape of 2020. The future looks bright for eCommerce in the coming time.

Personalization is the key if you want to earn the trust of your customers and give them an experience that makes them come back to your website again. Contactless payment has become the shopping trend and has been continuing for a long time. People prefer paying online instead of cash on delivery. So, providing diverse options for payments is important to keep your customers’ experience a happy one. Subscriptions are an ongoing trend that has helped brands get a lot of long term customers. Similarly, Chatbots have been a great help in enhancing the experience of the users. Experts have predicted that 80% of businesses will be using chatbots by the end of 2020. Voice search has become popular with time. 26.1% of consumers have made a purchase on a smart speaker in 2019. 

To leverage all these ongoing trends, and drive sales of your product online, you need a robust and future-ready eCommerce website and Drupal is ready to help!

Why Using Drupal Brings You A Lot Of Benefits

One of the most comprehensive open-source CMSes available, Drupal, is the perfect fit for eCommerce businesses. It gives you the perfect way of modeling your content, integrated marketing, payment, and fulfillment tools, which helps in bringing in a bigger audience. All the features of Drupal are accessible to merchants of every size.

There are so many brands out there using Drupal for their online business. Here are a few of them:

Honda Brazil

The website of Honda Brazil, built using Drupal, gives the users an engaging experience with easily accessible information.


Timex

With the help of Drupal, Timex, a famous American Watchmaker, is able to provide its customers a seamless, engaging, and consistent online experience.


Lush

Lush, with its website powered by Drupal, has seen dramatic spikes in both online and traffic sales.


Puma

Puma, one of the leading sports brands, has its website built on top of Drupal.


Why do such great brands choose Drupal for their online business? Let’s look at the reasons that show why Drupal is the best fit for your eCommerce website:

Commerce Kickstart

It’s a distribution for the quickest way to get up and running with Drupal for eCommerce features. If you are launching an online store, commerce kickstart is a great resource that will get you up and running with the production environment. 

Commerce Kickstart is made for modern PHP lovers and is available only for Drupal 7. The categories in this distribution include shipping and payment providers, data migration, search tools, product catalogs, etc.

Drupal Commerce

Drupal Commerce is a dedicated solution for your eCommerce needs. It is basically a set of modules for Drupal that enable the host of eCommerce features. Drupal Commerce being a framework itself, focuses on the solutions that can be built by using it. In simpler words, Drupal Commerce brings to your website the basic functions like order, product details, cart item, and payment options.

There are many features of Drupal Commerce that are further extended with the help of modules. Here are a few of them:

  • Modules like Commerce Stock and Commerce Inventory make inventory management easy. 
  • Commerce shipping is Drupal commerce contributed module that is used in cases where the shipping address and the billing address is different by making use of the customer profile.
Essential modules for an e-commerce site

There are plenty of Drupal modules that can be added to your eCommerce site and will help you in building intuitive and powerful websites. Here are some of the modules provided by Drupal for eCommerce:

  • Commerce Shipping takes care of the shipping rate calculation system for Drupal Commerce. It is used with the combination of other shipping method modules like Commerce Flat Rate, Commerce UPS, etc.
  • The Currency module helps your website with currency conversion and information and does the work of displaying the price of the product.
  • Commerce Stripe makes sure that the customers can pay securely without having to leave your website.
Essential themes for an e-commerce site

The first thing that attracts a user when they visit your website is the appearance of your website. Drupal provides amazing themes for your eCommerce websites which come in handy.

  • eStore is Bootstrap based and easy to install and is designed in a way that it solves any eCommerce website’s needs.
  • Flexi Cart is a global theme that makes sure that your products sell fast and easily online.
  • Belgrade is a Drupal Commerce template specially designed to create business websites.
  • SShop is among those Drupal 8 themes which are responsible for providing the users with inbuilt support for Drupal Commerce.
Content-Driven Commerce

Content marketing is the most popular way and for sure gets you the best SEO results. A good story behind your brand will definitely drive sales for you. If the content on your website is engaging, the users will keep coming back to your website.

The stories can be anything that relates to your product. For example, if you are selling lipsticks, you can write an article that says which shade is the perfect one for your different colored outfits.

It is really important to decide the kind of content you want to post on your website. Your content can include blog posts, ebooks, guides, tips, hacks, etc.

Drupal covers the need for content-driven experience. No matter what the case may be, content types are at the core of Drupal that include, mobile editing, in-place authoring, easy content authoring, content revisioning and workflows, and modules for multimedia content.

Headless Commerce

Headless Commerce, which acts as a great catalyst to upscale content-driven commerce, gives immense flexibility to create a great shopping experience for the users. It is future-focused and stays relevant. JavaScript interface communicates with backend Drupal via REST API. Also, in Decoupled Drupal, there is a separation between the presentation layer and eCommerce backend.

Headless Drupal commerce comes with a lot of benefits including high speed, interactive features, and freedom in front-end changes. These features provide a great shopping experience to the customers online by providing a content-rich experience.

Read our article on the implementation of Decoupled Drupal Commerce and React Native to learn more about the benefits of a headless commerce approach.

Performance

It is important to take into account the speed of your website. It is seen that a site that loads in five seconds has 70% longer average conversions. A slow website will deter your efforts and investments. 79% of the shoppers who faced the slow- loading issue say that they don’t return to the websites. These bounces bring a direct effect on revenue generation.

To maintain a top-notch web performance, Drupal comes packed with plenty of offerings. Some of them include:

  • Blazy module helps the pages load faster and saves data usage if the user is not using the whole page.
  • CDN module helps with the integration of Content Delivery Network for the websites and mitigate the page load time and rapidly deliver the web page components
  • In case, your server hardware is reaching its limits, Drupal gives you the option to upgrade the server hardware for a faster way of scaling.
Mobile Ready

If your website runs smoothly on mobile devices, it will be able to run better on other devices too! Creating user scenarios will help you understand what kind of content the user will appreciate on their mobile. This approach will help you design the important elements required for your website.

Mobile compatibility has become an irreplaceable feature for any eCommerce site. In today’s world, everything needs to be mobile-ready. Drupal’s websites not only wow the clients by their looks but also by their mobile responsive design. Drupal websites are easily accessible on mobile and tablets.

Multilingual

The world is on the internet, and with so many people using similar platforms and so many brands expanding globally, multilingual websites are the sine qua non! 

China has the highest number of internet users which is a massive 772 million. Although the maximum number of people on the internet prefer English as their language, 10 other languages that account for 90% of the top 10 million websites.

Source: Internet World Stats

Drupal is the best choice for your multilingual website. It provides numerous languages to choose from and 4 core modules specially designed for language and translation support. This feature by Drupal has shown great results that include higher conversions, rise in SEO, unrivaled translation workflows and has also been a great help in widening the audience. It also allows the detection of the user’s preferred language by identifying users’ IP address, sessions, browser settings, etc.

Personalization

Every eCommerce brand wants to make sure that the content created by them leaves a mark on the users’ minds. And it has become a necessity today because there is a lot of competition out there. Hence, personalized content makes the user experience better and helps create trust between you and the customer.

According to an Adobe report on personalization, 92% of the B2B marketers say that personalization is important.

This is the marketing opportunity that no eCommerce business should miss out on. Tapping the different demographics and varied audiences not only improves your market reach but your bottom line as well. 

Following are examples of modules that can aid your web personalization efforts:

  • The Smart Content module gives real-time anonymous personalization for the users. It also allows the site administrators to display different content for anonymous users based on browser conditions
  • Acquia Lift Connector module helps organizations in delivering personalized content and experience across all platforms and devices by merging content and customer data into one tool. 
SEO

E-commerce websites are buried with huge data. While for a consumer, it might be a desirable situation, for a marketeer it increases the burden of implementing SEO on every page and indexing every product. 

Drupal has various modules that help in improving the SEO of your eCommerce website. Some of them are:

  • Pathauto is an SEO module that ensures that the URL of your website is search engine friendly. It converts complex URLs to simpler ones.
  • Metatag module is a multilingual module and controls all the metatags on all the web pages.
  • XML Sitemap module provides you the resilience to exclude or include a few pages on your Sitemap.
Security

With the increase in cases of hacking and security breaches, basic security do-it-yourselves are not sufficient. The security breaches affect your brand image and your market shares and stock price. According to a report, more than $3.5 Billion was lost to Cyber Crime in 2019. 

Drupal has a dedicated team that regularly works on the security side of it. It is frequently tested for issues and bugs. Drupal also provides various security modules for your eCommerce website. Some of them are:

  • The Password policy module provides the password policies that help users to create a strong password. The password entered by the user is not accepted until it meets the constraints set by this module. 
  • Security Kit module provides various security- hardening options. This helps in reducing different risks coming from different web applications.
  • Two-factor authentication module is a second step for your security check, where a set of codes is defined for a user to be able to sign in. 

If you open a webpage from your mobile device and at the same time open it on your PC/laptop, you will be forced to close one of the pages. The session limit module does the same work of limiting the number of sessions by a user at the same time.

To Sum Up

The substantial development in the concept of ‘eCommerce’ has kept the online brands on their toes. And this is where Drupal provides its unmatched services for your eCommerce platform. 

Be it building your eCommerce website or migrating to Drupal, we at OpenSense Labs will help you do your job smoothly until you get a desirable finish.

Feel free to contact us at hello@opensenselabs.com to drive sales on your website!

blog banner blog image Drupal Ecommerce website Ecommerce Drupal websites Drupal Commerce Blog Type Articles Is it a good read ? On
Categories:

Agaric Collective: Drupal migrations reference: List of configuration options in YAML definition files

Thu, 2020/07/02 - 2:00pm

In today’s article we are going to provide a reference of all configuration options that can be set in migration definition files. Additional configuration options available for migrations defined as configuration will also be listed. Finally, we present the configuration options for migrations groups.

General configuration keys

The following keys can be set for any Drupal migration.

id key

A required string value. It serves as the identifier for the migration. The value should be a machine name. That is, lowercase letters with underscores instead of spaces. The value is for creating mapping and messages tables. For example, if the id is ud_migrations, the Migrate API will create the following migrations migrate_map_ud_migrations and migrate_message_ud_migrations.

label key

A string value. The human-readable label for the migration. The value is used in different interfaces to refer to the migration.

audit key

A boolean value. Defaults to FALSE. It indicates whether the migration is auditable. When set to TRUE, a warning is displayed if entities might be overridden when the migration is executed. For example, when doing an upgrade from a previous version of Drupal, nodes created in the new site before running the automatic upgrade process would be overridden and a warning is logged. The Migrate API checks if the highest destination ID is greater than the highest source ID.

migration_tags key

An array value. It can be set to an optional list of strings representing the tags associated with the migration. They are used by the plugin manager for filtering. For example, you can import or rollback all migrations with the Content tag using the following Drush commands provided by the Migrate Tools module:

$ drush migrate:import --tag='Content' $ drush migrate:rollback --tag='Content'source key

A nested array value. This represents the configuration of the source plugin. At a minimum, it contains an id key which indicates which source plugin to use for the migration. Possible values include embedded_data for hardcoded data; csv for CSV files; url for JSON feeds, XML files, and Google Sheets; spreadsheet for Microsoft Excel and LibreOffice Calc files; and many more. Each plugin is configured differently. Refer to our list of configuration options for source plugins to find out what is available for each of them. Additionally, in this section you can define source contents that can be later used in the process pipeline.

process key

A nested array value. This represents the configuration of how source data will be processed and transformed to match the expected destination structure. This section contains a list of entity properties (e.g. nid for a node) and fields (e.g. field_image in the default article content type). Refer to our list of properties for content entities including Commerce related entities to find out which properties can be set depending on your destination (e.g. nodes, users, taxonomy terms, files and images, paragraphs, etc.). For field mappings, you use the machine name of the field as configured in the entity bundle. Some fields have complex structures so you migrate data into specific subfields. Refer to our list of subfields per field type to determine which options are available. When migrating multivalue fields, you might need to set deltas as well. Additionally, you can have pseudofields to store temporary values within the process pipeline.

For each entity property, field, or pseudofield, you can use one or more process plugins to manipulate the data. Many of them are provided by Drupal core while others become available when contributed modules are installed on the site like Migrate Plus and Migrate Process Extra. Throughout the 31 days of migrations series, we provided examples of how many process plugins are used. Most of the work for migrations will be devoted to configuring the right mappings in the process section. Make sure to check our debugging tips in case some values are not migrated properly.

destination key

A nested array value. This represents the configuration of the destination plugin. At a minimum, it contains an id key which indicates which destination plugin to use for the migration. Possible values include entity:node for nodes, entity:user for users, entity:taxonomy_term for taxonomy terms, entity:file for files and images, entity_reference_revisions:paragraph for paragraphs, and many more. Each plugin is configured differently. Refer to our list of configuration options for destination plugins to find out what is available for each of them.

This is an example migration from the ud_migrations_csv_source module used in the article on CSV sources.

id: udm_csv_source_paragraph label: 'UD dependee paragraph migration for CSV source example' migration_tags: - UD CSV Source - UD Example source: plugin: csv path: modules/custom/ud_migrations/ud_migrations_csv_source/sources/udm_book_paragraph.csv ids: [book_id] header_offset: null fields: - name: book_id - name: book_title - name: 'Book author' process: field_ud_book_paragraph_title: book_title field_ud_book_paragraph_author: 'Book author' destination: plugin: 'entity_reference_revisions:paragraph' default_bundle: ud_book_paragraphmigration_dependencies key

A nested array value. The value is used by the Migrate API to make sure the listed migrations are executed in advance of the current one. For example, a node migration might require users to be imported first so you can specify who is the author of the node. Also, it is possible to list optional migrations so that they are only executed in case they are present. The following example from the d7_node.yml migration shows how key can be configured:

migration_dependencies: required: - d7_user - d7_node_type optional: - d7_field_instance - d7_comment_field_instance

To configure the migration dependencies you specify required and optional subkeys whose values are an array of migration IDs. If no dependencies are needed, you can omit this key. Alternatively, you can set either required or optional dependencies without having to specify both keys. As of Drupal 8.8 an InvalidPluginDefinitionException will be thrown if the migration_dependencies key is incorrectly formatted.

class key

A string value. If set, it should point to the class used as the migration plugin. The MigrationPluginManager sets this key to \Drupal\migrate\Plugin\Migration by default. Whatever class specified here should implement the MigrationInterface. This configuration key rarely needs to be set as the default value can be used most of the time. In Drupal core there are few cases where a different class is used as the migration plugin:

deriver key

A string value. If set, it should point to the class used as a plugin deriver for this migration. This is an advanced topic that will be covered in a future entry. In short, it is a mechanism in which new migration plugins can be created dynamically from a base template. For example, the d7_node.yml migration uses the D7NodeDeriver to create one node migration per content type during a Drupal upgrade operation. In this case, the configuration key is set to Drupal\node\Plugin\migrate\D7NodeDeriver. There are many other derivers used by the Migrate API including D7NodeDeriver, D7TaxonomyTermDeriver, EntityReferenceTranslationDeriver, D6NodeDeriver, and D6TermNodeDeriver.

field_plugin_method key

A string value. This key must be set only in migrations that use Drupal\migrate_drupal\Plugin\migrate\FieldMigration as the plugin class. They take care of importing fields from previous versions of Drupal. The following is a list of possible values:

  • alterFieldMigration as set by d7_field.yml.
  • alterFieldFormatterMigration as set by d7_field_formatter_settings.yml.
  • alterFieldInstanceMigration as set by d7_field_instance.yml.
  • alterFieldWidgetMigration as set by d7_field_instance_widget_settings.yml

There are Drupal 6 counterparts for these migrations. Note that the field_plugin_method key is a replacement for the deprecated cck_plugin_method key.

provider key

An array value. If set, it should contain a list of module machine names that must be enabled for this migration to work. Refer to the d7_entity_reference_translation.yml and d6_entity_reference_translation.yml migrations for examples of possible values. This key rarely needs to be set. Usually the same module providing the migration definition file is the only one needed for the migration to work.

Deriver specific configuration keys

It is possible that some derivers require extra configuration keys to be set. For example, the EntityReferenceTranslationDeriver the target_types to be set. Refer to the d7_entity_reference_translation.yml and d6_entity_reference_translation.yml migrations for examples of possible values. These migrations are also interesting because the source, process, and destination keys are not configured in the YAML definition files. They are actually set dynamically by the deriver.

Migration configuration entity keys

The following keys should be used only if the migration is created as a configuration entity using the Migrate Plus module. Only the migration_group key is specific to migrations as configuration entities. All other keys apply for any configuration entity in Drupal. Refer to the ConfigEntityBase abstract class for more details on how they are used.

migration_group key

A string value. If set, it should correspond to the id key of a migration group configuration entity. This allows inheriting configuration values from the group. For example, the database connection for the source configuration. Refer to this article for more information on sharing configuration using migration groups. They can be used to import or rollback all migrations within a group using the following Drush commands provided by the Migrate Tools module:

$ drush migrate:import --group='udm_config_group_json_source' $ drush migrate:rollback --group='udm_config_group_json_source'uuid key

A string value. The value should be a UUID v4. If not set, the configuration management system will create a UUID on the fly and assign it to the migration entity. Refer to this article for more details on setting UUIDs for migrations defined as configuration entities.

langcode key

A string value. The language code of the entity's default language. English is assumed by default. For example: en.

status key

A boolean value. The enabled/disabled status of the configuration entity. For example: true.

dependencies key

A nested array value. Configuration entities can declare dependencies on modules, themes, content entities, and other configuration entities. These dependencies can be recalculated on save operations or enforced. Refer to the ConfigDependencyManager class’ documentation for details on how to configure this key. One practical use of this key is to automatically remove the migration (configuration entity) when the module that defined it is uninstalled. To accomplish this, you need to set an enforced module dependency on the same module that provides the migration. This is explained in the article on defining Drupal migrations as configuration entities. For reference, below is a code snippet from that article showing how to configure this key:

uuid: b744190e-3a48-45c7-97a4-093099ba0547 id: udm_config_json_source_node_local label: 'UD migrations configuration example' dependencies: enforced: module: - ud_migrations_config_json_sourceMigration group configuration entity keys

Migration groups are also configuration entities. That means that they can have uuid, langcode, status, and dependencies keys as explained before. Additionally, the following keys can be set. These other keys can be set for migration groups:

id key

A required string value. It serves as the identifier for the migration group. The value should be a machine name.

label key

A string value. The human-readable label for the migration group.

description key

A string value. More information about the group.

source_type key

A string value. Short description of the type of source. For example: "Drupal 7" or "JSON source".

module key

A string value. The machine name of a dependent module. This key rarely needs to be set. A configuration entity is always dependent on its provider, the module defining the migration group.

shared_configuration key

A nested array value. Any configuration key for a migration can be set under this key. Those values will be inherited by any migration associated with the current group. Refer to this article for more information on sharing configuration using migration groups. The following is an example from the ud_migrations_config_group_json_source module from the article on executing migrations from the Drupal interface.

uuid: 78925705-a799-4749-99c9-a1725fb54def id: udm_config_group_json_source label: 'UD Config Group (JSON source)' description: 'A container for migrations about individuals and their favorite books. Learn more at https://understanddrupal.com/migrations.' source_type: 'JSON resource' shared_configuration: dependencies: enforced: module: - ud_migrations_config_group_json_source migration_tags: - UD Config Group (JSON Source) - UD Example source: plugin: url data_fetcher_plugin: file data_parser_plugin: json urls: - modules/custom/ud_migrations/ud_migrations_config_group_json_source/sources/udm_data.json

What did you learn in today’s article? Did you know there were so many configuration options for migration definition files? Were you aware that some keys apply only when migrations are defined as configuration entities? Have you used migrations groups to share configuration across migrations? Share your answers in the comments. Also, I would be grateful if you shared this blog post with friends and colleagues.

Read more and discuss at agaric.coop.

Categories:

Electric Citizen: Introducing DrupalCon Global

Thu, 2020/07/02 - 11:07am

DrupalCon North America is an annual tradition, where thousands of people come together in a great American city for a week-long conference of learning, networking and socializing.

Things are different this year, for obvious reasons. But DrupalCon lives on in DrupalCon Global! This is the first-ever virtual edition of DrupalCon. Running from July 14-17, 2020, this online-only conference is open to anyone and everyone, worldwide. If you haven’t done so, consider registering today!

Categories:

Kristof De Jaeger: Indigenous for iOS, IndieWeb and ActivityPub for Drupal

Thu, 2020/07/02 - 9:08am

I'm glad to announce that I've been awarded a grant as part of the European Next Generation Internet initiative (NGI) by the Dutch NLnet Foundation to work on my (currently) favorite projects: Indigenous and IndieWeb1. I didn't count on being selected when I submitted my proposal when looking at the other entries, but I guess I made a good case. I'll be spending a lot of time the following months working on them, so you can expect some exciting releases. The status of all projects and work done within this grant will be tracked here.

Indigenous for iOS

The app was originally started by Edward Hinkle and was the main trigger for me to build the Android equivalent. The project is currently unmaintained and lacks many features which are available in the Android version. Thanks to the grant, I can now revive the project so iOS users will be able to enjoy IndieWeb with a more richer and mature application.

Edward was so kind to transfer the existing repository over to me so all issues are preserved. I'll be creating projects and milestones so everyone can track progress. At some point, I will start rolling out releases in a beta program, so watch this space or announcements on Twitter to know when you can sign up for testing.

Multiple user support for the Drupal IndieWeb module

One of the last major missing pieces for the module is support for multiple users. All features currently work great for one account and the Micropub server supports multiple authors posting to the same domain. However, it's far from perfect, and especially the built-in Microsub server is not compatible at all for more than one user.

Work started in a separate branch a couple of months ago, but progress is slow as dragons are everywhere and I only work on this when I have some free time. With this grant, I'll be able to focus 2 weeks in a row to rewrite the critical pieces, not to mention all the tests.

I haven't decided yet whether I'm going to write an upgrade path, but I will keep on supporting both branches as I'm using the module on my site which only has one user, so no need to worry in case you are using the module already.

Kickstarting ActivityPub module for Drupal

It's been on my mind for so long, but I will finally will be able to work extensively on the Drupal Activity module. My work will happen on Drupal.org instead of the existing repository on GitHub, which will be used for a more extended version somewhere in the future. The 1.0.x branch on d.o will contain the lite version.

Open Web

Besides these 3 major goals, I'll focus as well on the interoperability of both app clients (Android and iOS) with more software, e.g. Mastodon and Pixelfed. I'm brainstorming to figure out the best approach to contribute and how to integrate them with both clients, more details will be released in future blog posts and notes.

All those projects have a place in my personal vision on the Open Web, so I feel incredibly lucky to be able to work on them almost full time, hoping to convince more people to jump onboard ultimately. It would be great if we could get something into Drupal Core one day, or at least make some more noise around it. If you have questions, feedback or just want to have a chat, I'm (still, yes I know) on IRC on irc.freenode.net (indieweb or drupal channels). Ping swentel and I'll be all ears.

Footnotes

1. to be fair, Solfidola might come close to become my new favorite, but it's not related with IndieWeb at all :)

Categories:

DrupalCon News: Plenary Speakers Announced For Drupalcon Global Open Source Digital Experience Conference

Thu, 2020/07/02 - 6:00am

Mitchell Baker and Dries Buytaert join a diverse lineup of speakers at annual conference 
encouraging attendees to “Be Human, Think Digital”
https://drupal.org

Categories:

Agaric Collective: Free Drupal 9 webinars on site building, migrations, and upgrades

Wed, 2020/07/01 - 9:00pm

On Tuesday, July 7, Agaric will host 3 free online webinars about Drupal 9. We invite the community to join us to learn more about the latest version of our favorite CMS. We will leave time at the end of each presentation for questions from the audience. All webinars will be presented online via Zoom. Fill out the form at the end of the post to reserve your seat. We look forward to seeing you.

Getting started Drupal 9

Time: 10:00 AM - 11:00 AM Eastern Time (EDT)

This webinar will cover basic site building concepts. You will learn what is a node and how they differ from content types. We are going to explain why fields are so useful for structuring your site's content and the benefits of doing this. We will cover how to use Views to create listing of content. Layout builder, blocks, taxonomies, and the user permissions system will also be explained.

Introduction to Drupal 9 migrations

Time: 11:30 AM - 12:30 AM Eastern Time (EDT)

This webinar will present an overview of the Drupal migrations system. You will learn about how the Migrate API works and what assumptions it makes. We will explain the syntax to write migrations how different source, process, and destinations plugins work. Recommended migration workflows and debugging tips will also be presented. No previous experience with the Migrate API nor PHP is required to attend.

Drupal 9 upgrades: how and when to move your Drupal 7 sites?

Time: 1:00 PM - 2:00 PM Eastern Time (EDT)

This webinar will present different tools and workflows to upgrade your Drupal 7 site to Drupal 9. We will run through what things to consider when planning an upgrade. This will include how to make site architecture changes, modules that do not have D9 counterparts, what to do when there are no automated upgrade paths.

Agaric is also offering full-day trainings for these topics later this month. Dates, prices, and registration options is available at https://agaric.coop/training

Read more and discuss at agaric.coop.

Categories: