Jul 03 2019
Jul 03

The information that follows is not meant to diagnose or treat specific medical issues regarding the hands but rather is a list of habits that have kept me healthy and able to continue doing the things I love with either greatly reduced or no pain. I am not a doctor. Proceed with caution and common sense.

I grew up playing video games. Many, many hours were spent leveling up, collecting every collectible, wringing every last hour I could out of each game I got ahold of. When I got to high school, I started getting interested in music. First was the drums, then piano, and finally the guitar. My first career was as a guitar teacher. I would play guitar and teach throughout the day, then unwind by playing video games in the evening. Then I started learning to build websites and write code. I eventually shifted careers into web development, got back to playing guitar strictly for fun, and continued to play video games when I made the time. This is when things started to fall apart.

With the exception of time spent walking, running, or sleeping, I was using my hands all day long. Even while watching television, I’d have my guitar in my hands running exercises over and over. Without giving myself regular breaks, my hands began hurting and it became difficult to continue doing the things I wanted and needed to do in my life. I saw a hand specialist who suggested I either wear braces all the time or stop doing certain activities. Neither of these was really an option. I needed to figure out how to continue to do the things I enjoyed doing without hurting myself.

Below are 4 habits I’ve formed in the years since my pain was at its worst that have allowed me to work a full-time computer job, practice guitar daily for upwards of two hours, and play video games as long as I’d like with little or no pain.

Habit #1: Stretch

I’ll start with the habit that has brought me the most benefit, which is stretching. I begin every single day, even non-working days, by going through a specific series of stretches that takes about 5 minutes to do. After seeing that doctor, buying books on hand problems, reading many articles, and wearing hand braces, I stumbled upon a video on YouTube from a man who’d had even more serious hand pain than I did. His short video details his experience and demonstrates the series of stretches that were recommended to him by a physical therapist. To his series of stretches, I’ve added a standing side bend because it just feels good.

I can’t overly stress just how important this routine has been to my hand health. I strongly suggest you give it a go.

Habit #2: Move

The advent of activity trackers and the proliferation of standing desks reveals that keeping your body moving throughout the day is becoming a priority for many people. My doctor suggested I stop doing the activities that were causing me pain. Instead, I’ve made an effort to do the activities that were causing me pain for shorter stretches of time. If you’re working at a computer for 8 hours a day, that’s fine so long as you take breaks frequently and change things up just as often.

For me this means using my laptop with an external monitor at my desk, both sitting and standing, or sitting on a cushion on the floor with the laptop on a low stool, or using the laptop on the kitchen table. Variety is an important part of this, not the individual tools. I personally don’t like external keyboards and mice. The way my Mac is laid out is the most comfortable for me. But I can still become fatigued if I stay long enough in the same position. My watch reminds me to move each hour if I haven’t. A calendar alert or Pomodoro timer would work just as well. Don’t get too mired in the numbers or any kind of “system” if you don’t need to. Just move!

Habit #3: Move More

Habit #2 is all about changing up how you’re working throughout the day, but it’s important to take breaks from working entirely to give your hands a break and your body some exercise. This can take many forms. My go-tos are taking walks and meditating.

Walking is just plain wonderful. It gets all your limbs moving, it’s basically stress-free on your body, gets the heart rate up, and gets your mind working. I can’t count the number of times I’ve been banging my head against a problem for hours only to have the answer pop into my head once I was out walking. There’s something about stepping away from a problem for a while that allows one’s mind to process it more clearly. Even when I don’t come up with the actual solution to a problem, I invariably come up with at least something new to try.

Meditating is also just plain wonderful. Have a seat, close your eyes, focus your attention on your breathing, and try to relax tense parts of your face and body. Unlike walking, the goal here isn’t necessarily to have eureka moments. Quite the opposite; it’s to allow your mind to rest, improve your patience and focus, and allow you to think more clearly when you need to. The topic of meditation is worthy of an article of its own, but it’s easy enough to try it out now. You’ll be surprised at how much more productive (and happier) you can be after just a few minutes of “doing nothing.”

Habit #4: Strengthen

If you went through the stretches detailed in the video above you may have noticed that many of them stretch large muscles in the forearms, arms, and shoulders rather than the small muscles of the wrists and hands. You can think of the body as being structured much like a pyramid. Our large bones and muscles support successively smaller ones as our limbs extend out from the torso. When we perform fine motions with our fingers and hands repeatedly, we put undue stress on muscles that aren’t strong enough to handle them. The solution to this problem is to strengthen the larger muscles that support our hands going up our arms to provide a sturdier base for these more intricate motions.

Include exercises in your weekly routine that target your upper body, like pull-ups, push-ups, and kettlebell swings. It isn’t important to be able to do large numbers of repetitions, especially if you’re new to upper body workouts. Focus instead on getting the motion right and not doing too much. A little strength training goes a long way and for our purposes we’re looking only to build muscle, not to become a bodybuilder or fundamentally change our overall body composition.

Conclusion

Serious hand problems are serious and you should seek the help of a professional hand doctor and/or physical therapist to diagnose and treat your specific issue. But if you haven’t quite developed a serious condition and want to practice habits that will allow you to live a life free of hand pain, I highly recommend you give the ideas above a try. They cost only your time and time spent working to prevent injury and pain is always time well spent.

Jul 02 2019
Jul 02

The end of May brought two exciting releases for PHPStan and the PHPStan Deprecation Rules extension. With the version of PHPStan v0.11.8, descriptions added to the @deprecated tag can be parsed and returned in rule checks. The v0.11.2 of the PHPStan Deprecation Rules extension implements this feature and returns that description instead of a generic "Call to deprecated X Y" messaging.

Profile module deprecated message output

It is exciting to see this functionality in the wild. The original feature request, from November 2018, required feature development on PHPStan's phpdoc-parser and PHPStan itself. The first bits of code landed in mid-March and the complete functionality released by the end of May. Gábor Hojtsy has already updated the Upgrade Status module to take advantage of these features.

Drupal Check was a little behind, but the ability to display messages now exists. The v1.0.11 release will display deprecated code usage descriptions. The tool currently requires a development tag of PHPStan until v0.11.9 is released. Drupal Check performs some unique loading techniques to support various ways users are installing the tool which broke in PHPStan v0.11.8.

Here are those commits, for those interested:

  • Ignore files using a stream wrapper, loading configurations which prefixed with phar:// were causing errors when using the Drupal Check binary
  • Support PhpAdapter for configurations, to support project-level installations and global Composer installs, PHP configuration is used to discover the vendor directory dynamically. Support for the PhpAdapter had to be added back.

Contributing to another project has been a fun and challenging experience. PHPStan uses the Nette framework, and this has been my first experience working with its components. It also involved contributing to different projects to ensure a piece of functionality was available. My initial work was done in PHPStan itself, which was hacky. Ondřej identified it should belong in the phpdoc-parser library. I have briefly worked with PHP in an abstract-syntax tree format or as tokens but never trying to extract description messages based off a tag in a document block. All I can say is thank you Derick Rethans for creating and maintaining Xdebug. Without the ability to use Xdebug for step debugging, I would have spent many more days working through this code.

Support Open Source

If you are using any of these open source tools, I highly recommend supporting their maintainers.

All of my work for Drupal Check and PHPStan has been supported by Centarro for our Centarro Toolbox + Support, as part of our Quality Monitor service.

Support PHPStan development through its Patreon page: https://www.patreon.com/join/phpstan

Support Xdebug through Derick Rethans' Patreon page: https://www.patreon.com/bePatron?u=7864328

Jul 02 2019
Jul 02

In the last article we managed to set up all commerce types and additional modules to import the data from our csv files. Now we need to do this regularly in order to provide users with the latest updates from our remote Hotellinx server.

Importing data from the server and writing them into the csv files is done by hook_cron() in our custom module from the first article. We want to do this once every hour, so we use the ultimate cron module in order to set up different execution times for different cronjobs.

Feeds can also be called via cron which imports the data every hour. As mentioned in the second article, the feeds have to be imported in the correct order for the Commerce variations to actually become visible. Unfortunately, we cannot specify the order in the feeds module but because we repeat this process every hour, it takes maximal two hours for the variations to be correctly imported.

Jul 02 2019
Jul 02

As of May 31, 2020, Apigee will no longer sponsor hosting of Drupal 7-based developer portals (D7P). Prior to this, starting on May 31, 2019, Apigee will no longer provision Drupal sites for customers. 

Developer portals are expected to give flexibility and control to the developers and keep users’ data secure on a daily basis.

In our previous blog - Should You Migrate Your Developer Portal To Drupal 8? - we detailed on the security challenges your Drupal 7 developer portal could face, after all, security is important.

In this blog, let us understand the best action plan you can take to secure your developer portal. 

Action Plan to Secure Your Developer Portal

As a service provider, you have developed a set of APIs to provide access to your backend services. The announcement can put you in a fix but whatever your choice of action steps, ensure the end result can: 

  1. Keep your data secure
  2. Should not hamper the current flow of work
  3. Should be able to integrate with Apigee

Currently, you have three options in place:

  • Remain on Drupal 7 and assume hosting responsibility
  • Move to Apigee's integrated portal
  • Migrate your developer portal to Drupal 8

Remain on Drupal 7 and assume hosting responsibility

If you need (more) time to decide whether to opt for migration or not, depending on the existing running projects - you can consider remaining on D7P until you finalize on your choice. 

The support of the modules which integrate Drupal 7 with Apigee Edge will not be affected, however, cloud customers would need to assume direct account responsibility with their hosting providers.

After May 31, 2020, all Apigee-hosted Drupal 7 developer portal will be decommissioned and will be unavailable. You would not be able to administer or develop any post-May 2020. 

Remaining on Drupal 7 could make you vulnerable to several security concerns as discussed in our previous blog.

Move to Apigee's integrated portal

Consider moving to an Apigee integrated portal, if you have been using Drupal 7 with a minimal amount of customization or prefer an all-in-one solution. 

It is integrated directly into Apigee Edge and includes a powerful API catalogue and a compelling markdown-based CMS with robust audience management tools.

However, if you are someone who has leveraged the functionality of Drupal 7 in conjunction with a high degree of customization and investment in crafting a specific developer experience, then you should consider switching to Drupal 8. 

Migrate your developer portal to Drupal 8

Drupal 8 remains to be a compelling option for those who wish to remain on Drupal for their developer portal. It is the option preferred by the customers to head towards a self-managed developer portal and as a path forward to leverage the latest functionalities of Drupal.

There is a host of functionalities in Drupal 8 which makes it a better option from the three. It is more secure than Drupal 7, more features than on Drupal 7 and proves to be an ideal option for the developer portal to be built on. Let’s learn about them.

Your Drupal 8 Developer Portal will be Secure

Here is a list of new features introduced in Drupal 8 which aims to enhance the security of your developer portal:

  • Twigs: A new theming layer which comes with a whole bunch of security features.
  • Configuration management: You have a list of all configurations of your site in your code so as to let you know what all settings have been changed and who is responsible for that, when and why and to know what all settings have been changed.
  • No PHP filter: Simplifies the process by allowing developers to code inside a node.
  • Session IDs hashed: Now session IDs in the code are hashed, so even when the session IDs are known, the sessions cannot be hijacked.
  • Trusted Host Patterns: Code knows when it is in a trusted environment and alerts  when it is not. 
  • Single Statement Limitations to DB queries: Doesn’t allow multiple statement query in a single database.
  • Mixed Mode SSL removed: Implying the SSL will be used anyway and is no way an option now.
  • Automated CSRF token protection: Able to detect if the forms have cross-site scripting going on.

Some Best Practices To Mitigate API Threats

To secure your digital property from any possible threats, you need to follow certain best practices to ensure safe usage of APIs and prevent any critical customer information leakage.

  • Encrypt the APIs: Decrypting the API keys by authorised users will protect the critical data from being misused.
  • Ensure Role-Based User Authorization: Authorizing registered users as per roles to access APIs can work to identify a user and classify them as per varying levels of permissions.
  • Allow only Registered users: The first and foremost step is to authenticate users using the API in order to protect information. It becomes easy to track the API usage and identify who is making what request.
  • Deploy Rate Limiting: It can detect and prevent an unusual number of requests from a given user at a given frame of time. In an exceptional case, wherein the attacker manages to bypass your encrypted authentication and authorization protocols, rate limiting can prevent your API from being compromised.
  • Build Security in Layers: If the above steps don't work, try adding an extra level of security through an outer firewall.
  • Security is required in back-end too: Another checkpoint on the way out of the network can thwart the attacks is to secure the system down up so you can track him down on the way out. 

Srijan Can Help

Srijan is committed to providing customized developer portal to help you attract and engage developers with a comprehensive, customizable developer portal that offers a seamless onboarding experience. We offer secure migration of your existing developer portals to Drupal 8. 

Want to upgrade your developer portal? Let’s start the conversation

Jul 02 2019
Jul 02

Pull, Fetch, Commit, Push, Merge, Rebase – have these terms have managed to make their way into your everyday lives yet? When Linus Torvalds created his very first version of Git, he described it as “the stupid content tracker”. Fast-forward to today, this free open-source software is now the most popular version control system.

What is Git? 

Don’t you wish you could turn back time sometimes, so you could have made a better decision or done things differently? Well, in the world of technology and coding, you can. Git is an open-source distributed version control system that saves versions of your precious code every time you make any changes/additions to it. So whenever you need to rollback, you just pick the working version and voila! Git also allows disruption-free working within teams as developers work on their individual local copies concurrently. Every change by every team member is tracked, thus maintaining transparency in an organized flow. So what is GitHub then? GitHub is a repository hosting service for Git that also has plenty of features to optimize your version control system. 
Git Workflow

Every organization has a different Git workflow. The most successful Git workflow is the one that gives your team enough space for productivity while maximizing the effectiveness of their outputs. It should be scalable with your team’s size and should minimize the number of conflicts that can arise. The Centralized Git workflow is the base upon which other Git workflows are built, like the Feature branching workflow, the forking workflow, the Gitflow workflow, etc. A workflow should be planned to enhance and complement your organization’s culture. To each Team, their own Git Workflow. 

Why use Git?
 

1. The distributed architecture 

Unlike Centralized version control systems that force developers to access the single central repository to be able to “checkout” and commit changes to the individual files, Git follows a distributed approach. In the distributed architecture, every developer has their own local copies of the entire central repository, allowing them to work offline, access complete revision history and easy branching and merging.

2. Powerful performance

Branching, merging, committing, etc. are really easy and fast with Git workflow because of its intelligent deep knowledge algorithms that understand the access patterns to the T.


3. It is Secure

Git stores all file content including relationships between versions and directories, cryptographically using a SHA1 as its hashtag algorithm. Any accidental or malicious code change is completely traceable.


4. Open-source

Being open-source, Git is free, enjoys good community support, continuously scrutinized for quality and is backed-up with loads of documentation and tutorials for learners.


5. Faster releases

Git’s distributed development and easy branching and creating of new features encourages developers to make more frequent changes in an agile workflow
 

Git - Distributed Architecture                       
                           Git - Distributed Architecture

Best practices for Git

  • New project? New repository

It just makes good organizational sense to create a new repo for every new project you want to start working on. Once done, push it to GitHub.

  •  New feature? Branch out

Now that you have created a new project, how about creating some new Git features? Git Branching lets you create and manage an organized workflow within your repo. Team members can be assigned various Git branches allowing them to work concurrently but in an isolated manner. Always give a meaningful to your git branch so others know what exactly you are working on. 

  • Start your day by staying current

Always “rebase” or get the latest, the most current version of your project (master) before you start working on the features you created/ assigned to you. You don’t want to make changes on outdated files.

  • Have periodic check-points

Don’t save your commits for a big change. “Commit” small changes frequently so the code is easier to comprehend for you and your team members. Reverting back and tracking is also easier when the changes are small and frequent. 

  • Stash your work

Often, you might come across situations where you are working on one Git branch but you have suddenly remembered that you need work on another branch but don’t want to “commit” those half-done changes. Or you might simply want a clean working copy. “git stash” to the rescue. Stashing lets you save your unfinished changes on a stack where you can get back to anytime!

  • Squashing them commits

Having lesser commits in your history makes it easier to monitor and track where you went wrong. If you want to keep a clean commit history, this one’s for you. Squash and merge all your commits into one when the pull request is merged.

  • Commit messages

Always provide clear and understandable information in your commit message. Start by writing a short summary of your changes, leave a blank line and then follow it up with a detailed description of the change. You don’t want your commit history to end up looking like this :/ 

git-commit message                      
                         https://xkcd.com/1296/
  • Don’t change history

Once you have committed your changes the repository, do not go back and change history. Although Git allows you to do that and rewrite pubic history, it is never a good practice to do so. Both for you and your team.

  • Apply a Git patch

At times when you don’t have write access to the repository but you still want to fix a bug – apply a Git patch. Always remember to clone the master repository and then create a branch for the new feature. When you have your .patch file ready, always preview it and do a dry run to check for errors. Git apply the patch (git apply -R path/file.patch) once done. DO NOT forget to test and check for 

  • Don’t leave Pull requests out for too long

An open “pull” request can create conflicts sooner or later. Don’t leave them unattended for more than 2 days. Always review the code and if it is ok to deploy, merge the pull request. This will not only fasten the shipping process but also avoid code conflicts.

  • Better organizing with project management tools

If you have been using project management tools like Redmine, it is a good practice to use it in conjunction with Git to be able to manage multiple team members and their tasks better. Creating your Git branches with the Redmine task as the name is one of the best Git best practices as it allows for better transparency and organizing. 

Git Project Management tools                                                               
                                                                       Task created in Redmine Creating git branch
                                                              Creating a branch with the Task id and name
 
  • GitLab CI/CD

Using a Continuous Integration/ Continuous Deployment tool like this one allows you to test and check for bugs and errors and ensures compatibility with code standards. These jobs are performed after the code is pushed to the staging server.

Gitlab CI
                                                                                GitLab CI/CD list of jobs
  Git best practices infographic
Jul 02 2019
Jul 02

If you are planning on upgrading your site, you may be wondering if you should upgrade to Drupal 8, or if you should wait for Drupal 9. Why not both?

We have been promised that the upgrade between Drupal 8 and Drupal 9 will be simple. If you don't fall under these two specific use cases, why wait? Drupal 8 offers many improvements over Drupal 7 in many areas. Although the more modern architecture of Drupal 8 adds a little bit to the learning curve, the enhancements to caching, configuration management, and the templating system make it a worthwhile investment.

Here are my top 5 reasons to upgrade to Drupal 8 now:

Configuration Management

Drupal 8 has configuration management baked into core. You can create entities, you can export those entities and can ultimately import those entities on another environment. Sure, Drupal 7 had features, but features is not as complete. Need to enable some modules, and disable others? Need to install that view you have been working on? Drupal 8's core configuration management can do all of those in a single call.

RESTful Apis

You could create an API in Drupal 7, but it took a little bit of work. In Drupal 8, RESTful web services are baked right in. With a default Drupal install, you are just a few clicks away from exposing a web service that third parties can integrate with.

TWIG Templates

Of this list, the introduction of TWIG in Drupal 8 is my personal favorite item. Drupal 7 used PHPTemplate for its templating engine. Although PHPTemplate is pretty simple and has served well, it is also wildly insecure. TWIG is fast, secure, and extendable -- it's a perfect fit for Drupal and has been largely welcomed by the community.

Contrib is Ready

Although it was a little bit slow, the Drupal contributed modules that you used for Drupal 7 are ready for use with Drupal 8. At this point, most modules have either been ported or their function has been forked into a different module.

Future Proof

Since upgrading to Drupal 9 from Drupal 8 will be simple, there really is not much to lose. Drupal 8 is secure and has a modern, extendable architecture. Since the Drupal team is dedicated to future upgradability, you can take advantage of Drupal 8 now, so you don't have to wait.

Jul 02 2019
Jul 02

Here at ComputerMinds, we think of ourselves as Drupal specialists for the UK, but we don't limit ourselves to that. We offer clients a close working relationship and our general flexibility to get stuck into applying our skills to most problems. One of our clients, Alfresco, has come to trust us with more than just our Drupal wisdom. They wanted a new hub that would bring together documentation for a variety of their open source products, which are already on Github. Their documentation was written as Markdown files, so the hub would need to import and transform those files into HTML pages for the web. Essentially, a static site generator was needed.

GatsbyJS is one of these static site generators, based on the incredibly popular React javascript library. It's very easy to get it to work with Markdown files, it's blazing fast, and helps us fulfil a variety of other requirements too. As much as we love Drupal, it's not the right tool for every job. (That's a subject for another day!) A 'JAMstack' approach was appealing for this project because the site would be a clever front-end for content that already existed elsewhere. There would be no need to have user authentication, content workflow, moderation, or many other dynamic website features that Drupal excels at.

A documentation page on the completed Alfresco Builder Network.

For many of us at ComputerMinds, this was our first dive into working with React, let alone Gatsby itself. So the wonderful documentation and tutorials for Gatsby were a huge help. As our project was for displaying documentation, the Gatsby documentation site itself was a helpful influence on the eventual design and user interaction of our site.

The most obvious difference between Drupal and GatsbyJS, was that the coding was mainly in javascript, rather than PHP. It was great to use much more modern javascript code patterns and tools - even if it took a bit of head-scratching to get there! All credit should go to Steve Tweeddale in our Coventry office for his patience with my million questions as we worked towards building a Minimum Viable Product early on in the project timeline. As the site took shape beyond that, we drew on more and more concepts from the GatsbyJS and React ecosystems. Here's a few that were particularly interesting:

No doubt someday we'll be turning our hands to bring the best of Gatsby and Drupal together! 'Headless', or 'decoupled' Drupal has become one of the new trendy ways to use Drupal. This means using Drupal to define your app's information architecture or as a content repository. Other applications can then connect to it to display content to users. Those applications could be made in Gatsby, React, Drupal, or almost anything else. We still feel this is usually only worthwhile when Drupal is used as a back-end system for multiple front-ends. But regardless we are looking forward to using GatsbyJS again!

Jul 02 2019
Jul 02

“DrupalCamp is a unique experience that you have to attend to understand” 

On the weekend of 15-16 June, I seized the opportunity to be a part of DrupalCamp, that happened in India's capital city, New Delhi. A 2-day camp, it was full of experience from keynote to engaging sessions to Drupal Trivia to a stupendous after-party.

anul-tweetThe fun giveaways at DrupalCamp Delhi captured in an image by Anul Khadija

It wasn’t just my first DrupalCamp, but first Drupal event in general and it is quite true to acknowledge the event by the professionalism and dedication of the organizing team. There were sponsor booths, giveaways and at least three sessions going parallelly at any time of the day.

I was quite amazed to see the event standing by Drupal’s commitment towards inclusiveness with specially-abled artists from Kumawat Pahal Charitable Trust (KPCT) Foundation attending the camp. It was accurate to call the event - Drupal with a cause. As part of the Drupal Association, I understand Drupal’s commitment to all and was pleased to see it happen at the camp.

KPCT-PAINTINGSpecially-abled people from KPCT foundation impressed the audience with their paintings (with feet).
Picture by Ankit Singh

Day 1 started with a prenote by Shadab Ashraf, who took everyone to the early beginning of Drupal and how everything started, followed by an inspiring keynote by Sudhanshu Mani-- the man who had an out-of-the-box idea and lead of the project of Train 18, India’s First Engineless Train -- who enlightened us with some of the biggest challenges and success, followed by plentiful interesting sessions.

The two days were a mix of fun and inspiration. It was compelling to see speakers from various backgrounds speak at the platform with a deeper insight around Drupal and on various cutting-edge technologies.

Additionally, there was a launch of Drupal India Association (DIA), aimed to build more momentum for the local chapter incorporated in India. Being a Drupal Association staff, I believe it is important to have local associations which lead to support the local communities. The DIA will be a great place to collect stories, share resources, and raise the problems that Indian Drupal community faces and together with Drupal Association we can work to better things.

Sunday morning (Day 2) started with a plethora of knowledge shared by camp’s second keynote speaker Prashant Singh, VP - Product Management PayTM, who took us for a ride to the road on lessons and learnings from where to start and what one’s approach should be. He also talked about how to build technology in a startup, followed by another jam-packed schedule, full of regular sessions and workshops.

Birds of a Feather (BOF) was organized to know various chances of challenges commonly faced by some people while contributing. I was surprised to know that infrastructure is also a challenge given the fact that Delhi has many social places.

Came the time for the most special part when Akanksha Singh and I hosted Trivia Night-- a fun-filled part quiz of the event. It was the first time I organized and hosted something like this, which I think was an absolute fun while geeking out. We grouped people into teams and asked them head-scratching questions around Drupal and other trending web technologies.

trivia-nightCandid snap of hosts (Akanksha and I) of Trivia Night by Suhail Lone

I was able to attend a few inspiring sessions given by various founders and co-founders, which motivated me but these three had a lasting impact -

  1. Kickstart your success story by Sarita Chauhan
  2. Serendipity as a Business Strategy by Rahul Dewan
  3. Writing content like a pro by Aditi Syal

I also loved spending in-person time at the contribution sprint where we discussed how to contribute to documentation on drupal.org. Kimi Mahajan did her first contribution by editing a few documentation and improving the content quality. It was exciting to see a happy Kimi making her first contribution.

Contribution sprint is not just for developers, but also for the people who can contribute through non-code to Drupal. This makes us love Drupal even more, as almost anyone can get involved in contributing, making the community vibrant and full of inspirational contributions.

The act of contributing starts from getting involved and connecting with different people involved in various ways to make Drupal better. I found renewed motivation from the sheer joy of learning together and by volunteering to make the camp happen.

The energy and enthusiasm of organizers and volunteers were contagious, and it was inspiring to see them bring great ideas to make the event end on a high note.

Although I’ve been a part of DrupalCamps from quite some time, but from a distance. DrupalCamp Delhi made me realize what I missed. It was encouraging for me to see through my eyes the great work and efforts put in by the community to turn the event into a success.

Drupal community events are an interesting place to be at and I would not want to miss another. Such events give space and resource to get people together under one roof to contribute and giving high-fives in the hallway for their amazing work. I am absolutely looking forward to attending the next Drupal event.

Maybe DrupalCon Amsterdam?

InShot_20190618_121033584

Also revisit the journey at Google drive  -

https://drive.google.com/drive/folders/1-7xbDM7Do5RlaGPVoMXg_6hpS5aCy0qd

Jul 02 2019
Jul 02

The majority of communications regarding digital accessibility tend to focus on websites only. Too often, it’s overlooked that PDFs  are also required to be accessible. Here are some guidelines to help in the review and remediation of existing documents, along with guidance for ensuring accessibility of PDFs as they are created.  

PDF Maps

  • For larger, more detailed maps:
    • Upgrade to the latest version of ERSI.
    • Use ESRI for all large/detailed maps from departments such as Zoning, GIS, and Public Works.
    • Link to these larger maps in meeting agendas and minutes.
       
  • Options for simpler maps:
    • Convert to Google Maps whenever possible
    • Keep it as a PDF document but make it accessible by following these steps:
      • Run the PDF map through the Acrobat accessibility checker tool.
      • Address all accessibility issues revealed.
      • Note: This process is more time-consuming as it will involve tagging each of the images or image hot-spots.

Scanned and Inaccessible PDFs

If the PDF document is not accessible (i.e. scanned document), there are a few options for how to deal with it:

  • Convert scanned PDFs to instantly editable text using automatic OCR software in Acrobat Pro.
  • Create an accessible alternative version of the document in one or more of the following formats:
    • Google Maps
    • ESRI GIS
    • Large Print
    • CD
    • Braille
    • Audio
  • List it on the site as a historical document where your users can contact you to get access to it in various forms that can include:
    • Electronic copy
    • Printed copy
    • Reading it aloud for users who are blind
  • Important note: If one of these three options cannot is not possible, then the document should be completely removed from the site to avoid litigation and confusion.

Static and Fillable PDFs

Decide whether the PDF should be:

  • Converted to an online HTML form (recommended)
  • Made to be an accessible PDF

If you decide to convert it to an online HTML form:

  • Create an online HTML form based on the fields in the fillable PDF. If there are any fields that aren’t necessary, remove them.
  • Test the form to make sure that it meets all WCAG Level A/AA standards

If you decide to make it an accessible PDF:

  • Run the fillable PDF through the Acrobat accessibility checker tool
  • Fix all accessibility issues using the Acrobat accessibility checker tool
  • Offer alternative formats. In order to give your users more accessible alternatives, content within PDFs should also be available in the following formats:
    • Google Maps
    • ESRI GIS
    • Large Print
    • CD
    • Braille
    • Audio

When creating new documents

  • Always start from a source document (i.e. Word, Excel).
  • Make the source document accessible by using its accessibility checker tool.
  • Convert the source document to PDF format using the recommended steps.
  • Check the new PDF file with the accessibility checker tool.
  • Address all accessibility issues using the Acrobat accessibility checker tool.

Consider the above guidelines to be a start, and most importantly, a reminder that document accessibility is not an option but a requirement.

For help or further guidance with the full range of your online accessibility issues, Promet Source offers expert, targeted expertise and support. Contact us and let us know how we can help with ensuring the accessibility of your digital assets.

For a deeper dive:

Jul 01 2019
Jul 01

Our lead community developer, Alona Oneill, breaks down highlights from Drupal Core Initiative Meetings this past June. You'll find that the meetings, while also providing updates of completed tasks, are also conversations looking for community member involvement. There are many moving pieces as things are getting ramped up for Drupal 9, so if you see something you think you can provide insights on, we encourage you to get involved.

CMI 2 Initiative Updates

Status of CMI 2

Major patches are being reviewed and hopefully will land after it gets a change record.

Next steps for CMI 2

  • A final review from Lee to be completed.
  • The config environment module, different configuration in different environment, is in production.
  • At a stage where nothing is needed from Core Cm or FM’s.

Composer Updates

Status of Composer

A patch went in to use composer as a dev requirement and we're on the road to making core test builds and upgrades. The scaffolding patch was reviewed and moved to RTBC.

Next steps for Composer

  • Need core maintainers to review the testing framework from miles 23.
  • Need core team to help with the scaffolding issue.

Workflow Updates

Status

There are two major patches being worked on at the moment:

Would also like to see the issue to allow 'syncing' content to be updated in content moderation without forcing the creation of a new revision be updated. Content moderation is working with this as it allows people to moderate any content within the workspace via the user interface.

Stable release

Upgrade path is on hold until this approach is validated or approved. Workspace merging is currently in need of an issue.

Next Steps for Workflow

Get release managers and fm review is needed on issue #3062434. Get FM review on issue #2803717 because it currently needs additional input. An issue for workspace merging also needs to be created. We're trying to get the first 2 issues into 8.8 (and 8.7).

Drupal 9 Updates

Status

  • Drupal check got a release last week by mglamman with all deprecation error messages.
  • Upgrade Status has new features in dev that categorizes error messages on actionability. The action items are, supported, deal with it now, not supported, deal with it later, or deprecated for Drupal 9.
  • Explaining in the UI of the module to help them engage with contribution maintainers.
  • There is low-level planning in the works to:
    • Identifying work to manage dependencies and defining the process to do this work.
    • Issues related for info:
    • We are asking for investment from Acquia to complete some of the work.
    • Core jQuery UI discussions are continuing.
    • Symfony 5 branch is now open! The branch requires a min php 7.2. For Symfony 4 the php requirement is 7.1.

Drupal 9 Blockers

Cannot complete deprecation list for 8.8 because November is when we’ll get the list from Symfony for the SF5 release.

Next steps for Drupal 9

  • Continue to keep tabs on what is happening with Symfony 4 and 5 changes.
  • Review the list of items being deprecated for 8.8 with RM/FM.
  • Make a decision on if the team goes with Sf4 or Sf5.
  • Confirmation on the resourcing ask for Drupal 9 work.
  • Confirming the front end deprecation process.
  • Identifying critical path items and sequencing for Drupal 9 work.

Claro Updates

Status

We have one group working on admin ui theme, Claro. There is a lot of contribution progress from both front-end developers and designers. The Alpha 3 release of Claro was released in the middle June.

Another team is working on react-based decoupled admin ui, however there is not much momentum at the moment. So far, a component library has moved forward with limited resources.

Next steps

The team is on track for getting in 8.8, likely as a beta. This will address open issues with designers,  address changes that developers need to make which have already been found, and work on get approval from RM/FM on moving the theme toolbar CSS to the Seven theme.

Status

  • At Devdays++ accessibility improvements and fixes were worked on and signed off by RM/Media team consensus.
  • Drag and drop zone for file uploads was discussed at the UX meeting as the current design was causing accessibility issues.
  • The plans for WYSIWYG are complete and ready to be worked on moving forward. 
  • Media metadata issues are now unblocked.

Next steps

  • Continue prototyping on the accessibility solutions to be compatible with drag/drop zone for file uploads.
  • Keep working with contributors and community members to find solutions that could incubate there.
  • Keep working on WYSIWYG.
  • Resource and allocate people to work on metadata.

Migrate Updates

Problem

The current migration is not as user-friendly as we’d like. We need a better user experience.

Solution

There is a large list of things generated from Angie Byron on the experience:

  • Running a pre-flight check will reveal if your data has an issue. We need a better way to check that issues you’d run into are uncovered and fixed before they migrate.
  • Solution needs to not mess with the command line and be more intuitive.
  • Working with UX to find an appropriate solution.
  • Currently have 4 migration maintainers with limited additional resources. We need more people writing code!

Next steps

We will continue with the multilingual upgrade path and keep working on preflight check to improve the migration experience. 

It Takes A Village

Thank you for being involved in the community, we're happy to be helping spread the word about the progression of a great platform. Please check back for frequent meeting recaps to gather insights on the latest Drupal Core developments and find ways to get involved. Our community thrives when we all come together!

Jul 01 2019
Jul 01

I'm very pleased to announce that we (hopefully) have a new help system in Core that will actually serve the needs of module, theme, and distribution developers! It is called "Help Topics", and is currently in "Experimental Module" status in Drupal core 8.8.x.

The way it works:

  • Modules, themes, and distributions can have a help_topics subdirectory in their projects, where they can write help topics in the form of Twig template files. Each project can have as many topics as they want/need to document their project.
  • The Twig files have meta-data (in HTML meta tags) at the top to define the title of the topic, whether the topic is "top-level" or not, and a list of other topics to mark as "related".
  • When a user visits the admin/help page (assuming the Help and Help Topics modules are enabled), they will see a list of the top-level topics, and can click through to read them. When reading a topic, at the end they'll see a list of all the topics that are "related" (and "related" is automatically a bi-directional relationship).

So... The module is currently in "Experimental" status, and we need your help to get it to "Beta" and then "Stable" status in Drupal Core:

This effort is being led by andypost, Amber Himes Matz, and jhodgdon... if you have questions, we can all often be found on Slack or on drupal.org.

Jun 30 2019
Jun 30

Version 1.9.0 of DDEV-local introduced the ability to share your local project online via a temporary, public URL using ngrok.

This allows you the ability to quickly and securely provide access to your local site to other developers and stakeholders as well as an easy way to test your local site on other devices.

ngrok is a service that exposes local servers behind NATs and firewalls via public URLs over secure tunnels. Once the small ngrok client is installed on your local machine, the ddev share command will enable the sharing and provide you with a public URL for your local site.

While there are paid tiers for the ngrok service, a free tier is provided with reasonable limits on usage. See the ngrok web site for details. In the first example, we'll utilize the free, anonymous tier.

The free, anonymous tier does not encrypt your data between your local and the ngrok servers, even though an https connection is provided from the ngrok servers to connected clients. Therefore, it is strongly suggested that once you get the free, anonymous tier working, create a free account and authenticate your local ngrok client to ensure your data is encrypted the entire trip.

Note that this is a one-time setup for your machine, and does not have to be repeated for each of your DDEV-Local projects.


Step 1: Install the ngrok client

Download and install the client specific to your OS from https://ngrok.com/download. While there are instructions to download and install ngrok on various operating systems, I found that using Homebrew (Mac OS X and Linux) was easiest:

brew cask install ngrok

If you're using Windows 10 and Chocolately, then I recommend installing with:

choco install ngrok

Step 2: Sharing your local site

Run the following:

ddev share

If successful, this command will return some information about the share, including public URLs with which you can access the site.

As requests are made to the site, the screen will update detailing each request.

ngrok status

Note that in the screenshot above, that the "https://94d5c548.ngrok.io" public URL is forwarding the insecure "http://127.0.0.1:32786". If we were to set up a ngrok account and authenticate our local ngrok client, it would be forwarding "https://127.0.0.1:32786" instead.

Use Crtl-C to stop the sharing.

Additional ngrok features and functionality

Secure your data by signing up for a free ngrok account and then authenticating your local ngrok client with your account credentials using the command provided by the ngrok web site:

./ngrok authtoken <a-long-string-of-characters-that-is-your-token>

ngrok authtoken

Once your local ngrok client is authenticated, the next time you do a ddev share, you'll be able to see that your connection uses https from end-to-end.

While the free ngrok plan is normally sufficient for smaller projects, paid ngrok plans include multiple users, custom domains and subdomains, additional connections, static IP addresses, and other features.

This tutorial is an excerpt from version 3 of Michael Anello's Local Development with DDEV Explained book - coming soon! Version 3 will include everything new to DDEV-Local through version 1.9.1. Pick up an electronic copy of Version 2 for less than $10 and you'll automatically get free access to Version 3.

Jun 30 2019
Jun 30

On Thursday, June 27, 2019, Acquia held a webinar on the topic of content as a service, titled “Shifting from Single Channel to Multichannel Content”. 

Speakers Dries Buytaert and Jake Wilund presented the challenges of multichannel content and what a content-as-a-service (CaaS) platform looks like, topped with a sneak peek into an upcoming new feature of Acquia - Content Cloud. 

While the slides and video will be available publicly in the coming days, we wanted to provide a way for everyone who missed the webinar to get some insight into what it was all about without having to wait for said slides and video, or without having to watch the entire video if they don't have the time.

For this reason, we decided to write up a recap of the most salient and relevant points from the presentation and the subsequent discussion. So, if you were unable to attend the webinar or just want a refresher, this blog post is for you.

We’ll make sure to update it as soon as the slides and videos are available so that you’ll have all the information easily accessible from one place (which is very much in line with the topic of the webinar). 

Challenges users face with relation to content

A user experiences a brand and its content through different channels along their digital journey. This means that every touchpoint you have with your customers is a chance to strengthen the relationship they have with your brand - or to weaken it.

Basically, we’ve moved beyond simply the web; we’re now in a multichannel world. Because of this, organizations must deliver great customer experiences across different channels: experiences that are relevant, personalized, easy to navigate and work across different devices. 

Content is the fundamental building block of a good digital experience, so you need to make sure that the content you produce is of a high quality and experientially relevant. 

Multichannel content challenge

A multichannel approach, naturally, demands that more content is created for more channels, and the creation of this content needs to happen at a faster pace. 

Additionally, each new channel means a new system for both authors and developers, which translates into more time and resources needed for onboarding. Because of this, having a single source of truth for the latest content is critical, as is the use and reuse of this content. 

Reducing complexity is a cross-organization problem. With a lot of authors working across numerous sites, it’s hard to keep track of and reuse content, as well as manage all of these content creators across different platforms. 

Working in silos creates disjointed digital experiences. Each time you add a channel, you need a new technology system which supports that channel (e.g. e-commerce -> Magento). These solutions are independent platforms, disjointed already when there’s just a few of them - but what if there are hundreds of these technology systems?

Best practices for multichannel experiences

There are three key steps to starting the shift from single to multichannel experiences from a content perspective. They are:

  1. Standardize content structures across all systems and channels. Experience builders and authors need to have consistency, so make content structures uniform across channels.
  2. Audit your existing content repositories. It’s already been pointed out that content reuse is imperative, but if you don’t know where the content is located, it’s easy to miss it.
  3. Define the critical roles and responsibilities involved in content creation. You need standardization and governance of your content structures, so that you always know who’s responsible for creating and/or publishing content.

Content-as-a-service platform (CaaS platform)

A CaaS platform provides simplified, headless content creation that is independent of delivery channel, which enables organizations to support multichannel digital experiences with the “COPE” model (create once, publish everywhere). 

Structured content is the content that can be used to power digital experiences. A CaaS platform should enable a great authoring experience. 

Sneak peak into Acquia Content Cloud

Attendees of the webinar even got a sneak peek into Acquia Content Cloud, an upcoming new tool for content creators to easily create headless experiences and integrate APIs. 

If you’re eager to give Content Cloud a try, you can apply for a private beta. In the meantime, here are the features that stood out to us from the presentation and the demo video:

  • Marketers can write, edit and approve content, independent of where it will be used.
  • Content can be maintained through multiple disconnected systems.
  • It allows for easy inclusion of rich media: images, videos, animations, etc.
  • API-first means that it supports decoupled/headless experiences on any channel. 
  • It integrates with new and existing Drupal sites, allowing for easy content syndication. 
  • It’s built for teams and enterprises to streamline content creation. Enterprises need a lot of control over who gets access to what content, so governance capabilities are a priority. 

In a nutshell, Content Cloud provides a SaaS-based content authoring experience. It caters to the different desired capabilities of managers, who want governance and insights into authors, and developers, who need to build content-driven applications and need fast headless capabilities. 

Q&A session

Q: Is Content Cloud built on Drupal?
A: Yes, Acquia started investing heavily in headless Drupal, and this investment can be carried forward into this project. But, not to worry - you won’t need to install and set up Drupal when using Content Cloud, you’ll have everything already enabled.

Q: How does Content Cloud support integrations with other channels?
A: Any piece of content authored in Content Cloud can seamlessly flow into any other existing Drupal 8 application - it will provide a central authoring experience. Out-of-the-box JSON:API functionality will be included. The long-term goal is to build more native integrations, but the team must first determine which of these will have the most impact, as maintaining them can be very costly.

Q: Which version of Drupal is Content Cloud built in?
A: It’s built with the newest versions of Drupal - the beta is in 8.7, for example. But, since it’s CaaS software, customers won’t need to worry about the version.

Q: Does Content Cloud replace the need for a CMS for each of your websites?
A: No, Content Cloud is a content repository, but it still needs to be displayed out in the web. It doesn’t replace websites per se, but it does simplify them and makes it easier to maintain them - all the authoring happens in one place, the website then functions only as the presentation and interaction layer. It can also help accelerate new site builds, since configuration is also retained. A channel is essentially a destination for content, and CMS will remain just that.

Q: How will Content Cloud integrate with the personalization solution Acquia Lift?
A: Any piece of content authored in Content Cloud will be stored in the Acquia Content Hub, which is the source of personalization; this means that any piece of content authored in Content Cloud will be immediately available in Acquia Lift. The view mode will also be stored in Content Hub.

Q: What’s the difference between decoupled and headless CMS?
A: Dries uses these two terms interchangeably, though, technically, they aren’t the same thing. Headless means no head, it is an API-only platform to which you need to add the head. Decoupled, on the other hand, means that there is both an API and a head. You can use APIs to build a new head or additional heads. Content Cloud is headless as it has no presentation layer for the content. The newly emerging terms “CaaS” and “Agile CMS” also overlap with these two definitions. 

Q: Will there be a data analytics component to Content Cloud?
A: Analytics is a key piece of Acquia’s vision, they want to give content creators insights into the performance of their content. The long-term vision is to build tools for content creators to create better, more effective content. This doesn’t just include analytics, but also guidance to authors while they’re creating content (real-time suggestions, e.g. if something won’t work well for SEO, or if something is off-brand). The goal is to create an authoring experience that outputs really good structured content, something that is perfect for authors and marketers. 

Q: Can Content Cloud post directly to a Drupal 8 site?
A: Generally speaking, publication will be orchestrated across channels via releases, but technically it can also post directly if the workflow is such. 

Q: Is there a predefined set of content types? Or can you create your own?
A: It will be shipped with some default content structures (primarily a predefined set of media types), but all the other content types are going to be completely customizable.

Q: When will Content Cloud be available to the general audience?
A: The plan is to ship it at the end of the year, but the insights they learn from the beta phase might push back the release date. 

Conclusion

Well, this is it for our recap of Acquia’s webinar. We hope you were able to get a better grasp of the topic and the capabilities of Content Cloud, or rediscovered something that you missed or that has slipped your mind since the webinar. 

The shift to multichannel content is likely to become an important topic as the technologies and devices via which we consume content become more and more diverse, so it makes sense to start planning for it now rather than wait until the last possible moment.

We can probably expect a lot more content on the subject matter. Preston So's idea of a "distributed CMS" is also very much in line with multichannel content and the Caas platform; check out his blog post if you want to find out more about it.

As promised, we'll update this post when the slides and video are available. Hopefully this recap has given you enough food for thought until then.

Jun 28 2019
Jun 28

We recently had the opportunity to dive into developing a site using the layout builder as the primary method of layout and block placement. Although we were apprehensive to rely on a currently experimental module to handle all the layout and content organization once we dug in, we were pleasantly surprised with how it handled what we threw at it. That being said there was a fair amount of setup needed to really get it working how we wanted it to. In this post I’m going to go over the basic setup we used and in a future post I will examine some of the more advanced tools we developed to get the most out of it.


In addition to Layout Builder and Layout Discovery, we used two other modules Layout Builder Restrictions and Block Blacklist. These enabled us to have a little more control over what the client has access to placing and helped make the list of items available to place feel a little less daunting. 


Setting up your defaults with Block Blacklist


Once you’ve enabled all the modules the first thing I’d recommend doing is a little bit of housekeeping with your blocks. We can go over to /admin/config/block_blacklist/settings and start globally removing all of the blocks that come in core that are rarely used. This is done by entering the corresponding block id’s into the global blacklist.

Block Blacklist


You can also choose to disable them for the layout builder only if it’s something you might be placing elsewhere and just want to restrict the client from accessing.


Customizing your content types with Layout Builder Restrictions


The second bit of setup to cover is enabling the layout builder for all the content types you wish to let the client modify. To do this we’ll head over to the manage display page of your content type and tick off the “Use Layout Builder” box under the “Layout Options” section and hit save.

Layout Builder Restrictions

You should now see some extra sections under “Layout Options”, “Blocks available for placement” and “Layouts available for sections” These are added by Layout Builder Restrictions. Here we can set what blocks can be placed on a particular content type and define what layouts are available for them to use in sections. This allows us to maintain control over the look and feel of sections while still giving the client the freedom to customize pages as they see fit. We can choose to allow or deny access to all blocks supplied by a specific module or pick and choose what we allow/deny.


Layout Builder Restrictions


Once you have your blocks and layouts set you can click “Manage Layout” and set the default blocks and sections you want to be placed whenever a new node of this type is created. Setting a default layout will also allow the client to play around with layout ideas and always be able to revert back to the default at any time if they are unhappy with the results.


Creating your own layout templates


The templates that come with the module are a good start to get you going but once you really dig in you’ll probably want to start creating your own custom layouts. This is really easy to do. With the Layout Discovery module you can set them up in your theme or in a custom module. We decided to place them in the utility module we include in every site we build. 


First, we’ll create the templates we’d like to use and place them in a folder called layouts within the templates folder of your theme or module. This is an example of a two column layout, with the exception of our layout classes it's pretty standard. You'll want to make sure you have the region_attributes printing out on your regions so the layout builder can include the classes it needs to function correctly. Without them, you will not get the correct styling within the edit mode, or the JS to drag and drop blocks between sections.

{#
/**
 * @file
 * A two-column layout.
 *
 * Available variables:
 * - content: The content for this layout.
 * - attributes: HTML attributes for the layout <div>.
 *
 * @ingroup themeable
 */
#}
{%
  set classes = [
    'layout',
    'layout--two-column',
  ]
%}
{% if content %}
  <div{{ attributes.addClass(classes) }}>

      <div class="l-grid--gutter l-grid l-grid-md--two l-grid-lg--two l-grid-xl--two">

        <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first', 'l-grid__item') }}>
          {{ content.first }}
        </div>

        <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second', 'l-grid__item') }}>
          {{ content.second }}
        </div>

      </div>

  </div>
{% endif %}


Once you’ve got all of the templates created you simply have to declare them in your layouts.yml file for Layout Discovery to pick them up. You can call this file my_module.layouts.yml or my_theme.layouts.yml. The snippet below illustrates the correct format for them to be picked up by Layout Discovery. Including the icon_map section will give you a nice visual representation of the layout, you can learn more about that here.

ignite_two_column:
  label: 'Two Column'
  path: templates/layouts
  template: two-column
  category: 'Ignite Layouts'
  icon_map:
    - [first, second]
  regions:
    first:
      label: First Column
    second:
      label: Second Column


In a future post I’d like to discuss some of the work we’ve done to allow custom styling to blocks and sections within the layout builder using config options and utility classes. Between controlling what blocks and layouts you’re providing clients, and creating some custom layouts, this should give you a pretty good starting point to provide a powerful tool for your clients. We’ve only scratched the surface of what can be done with the tool but we’re already pretty happy with the results.

Photo by José Alejandro Cuffia on Unsplash

Jun 28 2019
Jun 28

Next step in our journey after Part 1 Caching and Part 2: Aggregation of our ultimate guide to Drupal performance is all about Drupal theming and this will be our part 3

The next part will be some general tips and tricks about CSS/JS and then we will release a full blown article containing all parts. so lets cut the intro and get right into it.

 

Faster Drupal - Part 3: Drupal Theming

  • Automate optimizing of CSS, JS & Images. The thing is, it really depends on the node packages that you use on your theme level and how you can take advantage of it, for instance, there are many (I MEAN MANY WITH ALL CAPS) packages that can help you achieve that using a build system such as gulp, grunt or the new favorite webpack.

  • Avoid using unnecessary bootstrap packages as much as possible. Usually, Starterkit themes load bootstrap packages one by one, why not remove the ones you don’t need? WHY? JUST TELL ME WHY?

  • Is your theme using fontAwesome or any other kind of font out of box? But you are using SVG icons from your design file! Well… why not just remove the built-in icon font from your theme then?

  • Fonts are nice, And it seems our designers usually like to use 12 billions of them in a single page, but you should never listen to your designer (Or should you?) Always remember to load fewer fonts and fewer font weights as much as possible.

  • While we are on the fonts topic:
    Control font performance with font-display - Resource

  • Are you the type that invents the wheel each time yourself? Then don’t use a base theme that comes with a lot of good stuff! we usually don't use half of those goodies. Create a new base theme off of Drupal core's "stable" theme and go with the bare minimum. Or use a proper Starterkit, strip off the unnecessary parts, get your own Starterkit and get rid of all the Drupal themes excessive wrappers and classes.
    On this note, it’s a good practice to get your DOM size less than 1500 nodes (recommended from Google Page Speed)
    For Drupal 7 also maybe just consider Fences module if nothing else works for you

  • Reduce the scope and complexity of style calculations

  • Prioritizing Your Resources with link rel='preload' and yes you can use <link> for scripts as well - Resource

  • When we were kids (Back in Windows XP era) you’d read everywhere that do not use inline styles for your HTML files, but now you should use inline-styling to avoid render blocking CSS files. All the CSS Styles loaded from external files is considered render blocking. Why You asked?
    In order for the browser to display your web page and use the styles you specified in the external CSS files, it has to load them first. This means that your web page won't be displayed until these files are loaded. In order to speed up the loading of your website, you can inline the parts from the external CSS files which are needed to render the above the fold content. After loading the page you can instruct the browser to load the rest of the CSS files via JS - There are many tools that you can use to achieve this but this one explains good enough and works: https://www.sitelocity.com/critical-path-css-generator
    Also, check penthouse as well, Can be set up easily as a task runner task!
    https://www.npmjs.com/package/penthouse - includes CSS for critical path above the fold in the HTML head.
    By the way, there’s a Drupal module for that (but we didn’t test it,  do so at your own risk)
    Our very own Sven played around with both penthouse and critical and let me just quote him in our slack chat here:
     

    critical is a wrapper for penthouse with the main advantage that it delivers critical css for several breakpoints in one file. 
    Note: To generate critical css, `link_css` module must be enabled, and you can not be using deter css loading in AdvAgg, otherwise you get an empty file. (Needs testing)


    Critical_css module on Drupal
  • Now that you have the critical CSS, the proper tool to load the rest of your CSS: https://github.com/filamentgroup/loadCSS

  • Remove unused CSS, there are tools inside the IDEs that can help you with that, you should search this part yourself since it depends on your weapon of choice for coding, also there are node packages that you can set up but I’d still go with the IDE approach and do it manually, just to be safe.

  • Use video tag instead of gif images (Yup, it loads faster)

  • Avoid using document.write, specifically for scripts injection - Resource

  • Images must not be delivered larger than they are actually displayed to avoid loading unnecessary data. Resizing images on the browser side to reduce their rendering size is not recommended.

 

Written by Sohail LajevardiSohail Lajevardi 
Developer at Ramsalt Lab 

 

Jun 28 2019
Jun 28
Go to the profile of Deirdre Habershaw

Oct 19, 2018

Today, more than 80% of people’s interactions with government take place online. Whether it’s starting a business or filing for unemployment, too many of these experiences are slow, confusing, or frustrating. That’s why, one year ago, the Commonwealth of Massachusetts created Digital Services in the Executive Office of Technology and Security Services. Digital Services is at the forefront of the state’s digital transformation. Its mission is to leverage the best technology and information available to make people’s interactions with state government fast, easy, and wicked awesome. There’s a lot of work to do, but we’re making quick progress.

In 2017, Digital Services launched the new Mass.gov. In 2018, the team rolled out the first-ever statewide web analytics platform to use data and verbatim user feedback to guide ongoing product development. Now our researchers and designers are hard at work creating a modern design system that can be reused across the state’s websites and conducting the end-to-end research projects to create user journey maps to improve service design.

If you want to work in a fast-paced agile environment, with a good work life balance, solving hard problems, working with cutting-edge technology, and making a difference in people’s lives, you should join Massachusetts Digital Services.

Check out some of our current postings here:

Creative Director (posting coming soon, submit your resume here)

Director of Technology (posting coming soon, submit your resume here)

Senior Drupal Developer (posting coming soon, submit your resume here)

Didn’t see a good fit for you? Check out more about hiring at the Executive Office of Technology and Security Services and submit your resume in order to be informed on roles as they become available.

Jun 28 2019
Jun 28

Valuable, easy to navigate, useful and (most of all) usable content. This is the criterion that we use for selecting our favorite Drupal blog posts in a month.

And this is precisely what all the pieces of content that we're about to highlight in this post here have in common.

From:
 

  • inspiring lessons learned while working on a specific Drupal project
  • to actionable insights and valuable advice on how to keep up with Drupal's own advancement
  • to highlighted modules, that make the perfect fit for particular types of projects and challenges
     

… each one of these blog posts provided us with content with... an impact.

But let's just get started: here are the 5 Drupal-related blog posts that won the “popularity contest” in our team this month:
 

Kemane Wright, from Texas Creative, challenges us imagine (or to recall) a scenario where we'd need to remove/style a field in a Drupal form.

Say you:
 

  • find one of your forms to be uneccesarily “cluttered” and you just want to reduce the number of fields for the end-user to fill in
  • just want to update that particular fied's functionality (say turn it from an input field into a select field)
  • realize that there's no module available that you could use
     

Next, he reveals and details upon his 2 solutions to this dead-end, both of them applicable to your code directly.

Now, don't expect me to devulge them to you here. Do head to this team's website and delve deep into the enlightening information there.

Another both useful and usable piece of content that we've added to our list of ressources to tap into. And that because we're on a constant “quest” for new ways of integrating artificial intelligence into our Drupal projects. 

In this respect, we're more than grateful to the InternetDevels team for sharing their selection of Drupal modules that are using AI, all while outlining each one's functionalities.

If the topic of using Drupal for AI applications is of a particular interest to you, we kindly recommend you this post, one of the best Drupal blog posts in June.
 

Justin Toupin, Aten's CEO, is altruistic enough to share with us mortals here, his team's discoveries while working on one of their previous Drupal projects.

More precisely, their set of 6 tools to keep at hand when dealing with data-intensive challenges and data visualization issues.
 

With this post, those at ADCI Solutions launched their “Drupal best practices series”.

For us — and particualrly for the front-end developers here, at OPTASY — it turned out to be a true gem, “stuffed” with valuable best practices on how to optimize one's front-end code:
 

  • segmenting code into smaller chunks
  • integrating dynamic imports
  • ...
     

With everyone asking “How do I prepare for Drupal 9?” these days, Drudesk's piece of content stands out as one of the most useful Drupal blog posts of the month.

It lists all the critical preparations and To-Do's to consider for planning properly for Drupal 9:
 

  • from removing all deprecated code
  • to migrating your website from Drupal 7 to Drupal 8 instead of waiting to take the leap straight to Drupal 9, once released
     

The END!

These have been the 5 Drupal blog posts in June that had an impact here, at OPTASY:
 

  • on how we'll be using Drupal from now on
  • on how we'll be approaching our future Drupal projects
  • on how we'll improve our workflow to incorporate the best practices and the useful Drupal tools highltihed in these posts

Photo by Tony Hand on Unsplash

Jun 28 2019
Jun 28

Go back in time and you’ll realize that every Drupal version upgrade has been drastically different from their predecessors. This caused compatibility issues and upgrade between major versions has always been a complicated task. Contributed modules and themes needed to be upgraded for compatibility, content migration was a hassle, and the list goes on. Gradually Drupal has adopted semantic versioning which allows for continuous improvements without waiting for major version launches and allows for a more continuous upgrade.

Be rest assured that upgrading to Drupal 9 in June 2020 will be a cake walk!

Drupal 9 roadmaphttps://dri.es/drupal-7-8-and-9

Drupal 8 minor version upgrades 

With Drupal 8, we welcomed the concept of continuous innovation and new features/libraries were introduced in minor version upgrades e.g. The recent version of Drupal 8.7 came with the new and improved layout builder, media library, workflow, etc. Read more about Drupal 8.7 here.

Drupal 9 is going to be similar to a minor version upgrade where the community will work on removing deprecated code and upgrading underlying libraries like Symfony.

Drupal 8 to Drupal 9 https://www.drupal.org/docs/9

Drupal 6 website & Drupal 7 end of life 

8,24,301 websites are currently on Drupal 6 or 7 versions. With  D7 end of life in November 2020, and extended support till 2021. Now is the time to decide the course of action for your website to thrive with optimum performance and security. In case you are still on D6, we are here to help! 

At a recent Drupal Meetup hosted by QED42, a sense of indecisiveness clouded majority of the members. Yes, everybody was excited for the new version release and what came with it. But we ended up discussing more about ‘When’ and ‘Why’ should we upgrade to Drupal 9! 

Upgrade or Wait? 

Drupal 9 will be released one year prior to Drupal 7’s end of life. Even with the extended support for D7, eventually, the community will no longer provide updates, security fixes, and enhancements. (may be available on a limited basis from select commercial vendors at a cost)

If your current website isn’t facing any issues at the moment, it tends to induce a laid back outlook. Sure your website might perform perfectly right now, but without the necessary upgrades, eventually, she will get rusty and creaky. Know more about the implications of stalling an upgrade.

Why upgrade to Drupal 8https://www.drupal.org/psa-2019-02-25

So is there any scenario in which I should wait? 

The only scenario that we can think of in which it makes sense to wait is if your organization plans to club design refresh of your website with the upgrade and if for some reason redesign is delayed (Budget, Resourcing) as re-design often comes with layout & content strategy changes. Order of execution if Redesign and upgrade don't overlap will be:

Drupal 6/7 -> Drupal 8 -> Redesign -> Re-do the layouts / content strategy in Drupal 8 or Drupal 9 --- (Rework / Inefficient)

If there are no budget or other constraints then Design Refresh is the best milestone to think about Upgrade as you can get face and tech lift in one go and also turns out to be much cheaper. 

Upgrade to Drupal 8 at Next Chance Available!

As discussed before, Drupal 9 is being continuously built on top of Drupal 8 making it backward compatible with Drupal 8. This allows for a smooth upgrade from Drupal 8 to 9 and once you are on Drupal 8, as long as you are upgrading to minor versions of Drupal 8 regularly there won’t be any major surprises from Drupal 9! Considering that, We recommend that you upgrade your Drupal 6/7 site to Drupal 8 at the next chance available because why would you want to lose out on all the benefits of Drupal 8 today if Drupal 9 upgrade is gonna be smooth and cheap?

Once you are on Drupal 8, the next question that arises is:

What do I need to prepare for Drupal 9? 

The best approach is to just keep your Drupal 8 website upgraded with the minor version as Drupal 8 minor upgrades are gradually transitioning and preparing your website for Drupal 9. Contributed modules should be regularly updated, this ensures deprecated code removal. There are a few ways to check if your site is using the deprecated code.

Drupal Deprecated Code Removal Guide

Drupal Deprecated Code Removal Guide

Still confused?

All this information may seem overwhelming and difficult to make a decision. We’ve got you covered! Reach out to us at [email protected] for a free consultation about your Migration Dilemma.

Jun 28 2019
Jun 28

Just imagine: you update content on one of your Drupal websites and content across your whole network gets automatically synchronized! That's Drupal on Blockchain in just a few words...

Say you manage a national library's infrastructure of Drupal websites. One for each one of its local branches.

Now, here's how moving all the user data stored in there from your centralized database onto a decentralized blockchain system would benefit you:
 

  • readers get to validate their own user data since there's no central entity having full (and exclusive) control over it
  • once they've updated their user data on one of the library's websites, it'll get synchronized across the entire network
  • the well-known vulnerability to errors of centralized multi-site structures gets eliminated; there's no longer a centralized database acting as a single point of failure
  • the decentralized architecture speeds up any operation that gets performed across the network
  • you'd avoid scenarios where the same reader enters his login credentials on one of the library's websites and gets asked to enter them, once again, when accessing the website of another library branch
     

And I would also add: increased transparency, lower transaction costs...

But I'd better dive into more details on how Blockchain and Drupal can work together and how you can benefit from the decentralized architecture that they'd put together:
 

1. Blockchain: What You Need to Know About Its Potential

But first, here's Blockchain in plain words:

A decentralized shared system where multiple participants store their data, interact directly with each other, manage and keeping a record of their transactions.

How is it different from the “old” way of managing transactions across a network?
 

  • there's no more a centralized database for storing data and transactions; participants (nodes) store it among themselves
  • … this grants them total control over their own data/created content
  • users involved in a blockchain network get to interact with one another freely, with no need of a third-party as an intermediary
  • it establishes a system of rule-based transactions
  • each transaction — editing, deleting content, etc. — gets documented
  • it enhances communication between nodes/participants
  • transactions get carried out at higher speed and, implicitly, with fewer costs
  • with no central entity as a unique storage source, there's no single source of failure anymore
  • enhanced transparency
     

In short: blockchain enables you to set up a secure and immutable architecture for your network.
 

2. Blockchain and a New Content Distribution Model

“Transparency” is the keyword here. Decentralizing a content distribution platform would benefit both content creators and content consumers:
 

  • digital publishers become the only ones allowed to update or delete their own content
  • consumers pay producers directly for the content they consume (written content, songs, videos etc.)
     

This way: content creators get full control over their own content — there's no platform owner who could remove it to his/her liking — and get paid fairly and in real-time, for each piece of content that gets “consumed”.
 

3. Drupal on Blockchain: Why, How, and With What Costs?

Why would you want to decentralize your CMS — in this case, Drupal — and store your data on Blockchain? 

To answer your question, let me highlight just a few of the inconveniences of managing your content on a centralized Drupal database:
 

  • each transaction is explicit and irreversible
  • it poses a higher vulnerability to errors
  • multiple-user functionality can turn out to be a serious dread
  • the centralized database acts as a single point of failure: if something crashes in there, the whole system is at risk
  • updating content in your database doesn't automatically update it across your entire network of Drupal websites...
     

And how would the 2 technologies work together? Considering the fundamental differences between them:
 

  • Drupal uses a centralized architecture to manage content
  • Blockchain uses a decentralized, middleman-free workflow based on a verification element
     

Before I try to answer your legitimate question, let me ask you this:

Do you seize any similarity between Drupal's “open data” phylosophy and Blockchain's “decentralized data” principle?

Now, here's how your hypothetical “Drupal on Blockchain” architecture would look like:
 

  • it'd be a much more secure, decentralized structure (you'd remove the single point of failure, remember?)
  • since a blockchain workflow would use an immutable validation of data, it'll act as a guarantee that no content can get modified by other than its creator/distributor
  • user data/content would be easily accessible across the entire infrastructure (take the example of an enterprise-level business, running a multi-site Drupal network)
  • … and it'd synchronize in real-time across all your Drupal instances, as well...
  • transactions performed within this architecture would be rule-based: every single content update or removal will get documented
     

“But at what costs?” you might ask. What compromises would you need to make to run Drupal on Blockchain? 

What challenges should you get prepared for?

Here are 2 potential “dares” to ponder upon:
 

  • first of all, integrating your current Drupal data into a blockchain system won't be quite a “piece of cake”
  • secondly, getting the consensus of all the participants (say users whose data would be easily accessible network-wide) is also a serious issue to consider
     

4. Drupal Development Efforts in this Direction: The Blockchain Module

This duo — Drupal and Blockchain — has generated quite a lot of talk these years. And quite a handful of promising initiatives and even prototypes have been presented (integrations with Etherium and bitcoin...)

From all these initiatives of the Drupal community, I've decided to put the spotlight onto the Blockchain module (not yet covered by Drupal's privacy policy).

Take it as a “scaffolding” to support your future “Drupal on Blockchain” architectures. It provides the functionality you need to:
 

  • set up your Drupal installations as blockchain nodes; ”nodes” that are independent, meaning they can get configured independently
  • ensure that your newly set up nodes are compatible with each other
     

The END!

This is the “why, how and at what costs” of this topic. One which has been on the lips (and on the Drupalcon slides) of members of the Drupal community for quite a while now.

What do you think?

Would such a decentralized Drupal on Blockchain architecture suit your own project's needs and constraints? Would you trade your central point of storage for the convenience of automated content synchronization?


Photo by Clint Adair on Unsplash

Jun 28 2019
Jun 28

Agiledrop is highlighting active Drupal community members through a series of interviews. Now you get a chance to learn more about the people behind Drupal projects.

For this week's interview, we spoke with Cindy McCourt, consultant at IDCM Innovations, Drupal trainer, and author and co-author of several books ranging from Drupal to fantasy fiction. Give it a read to see what drew her to Drupal and why she thinks it'll continue to be a great solution to site builders' and developers' needs.

1. Please tell us a little about yourself. How do you participate in the Drupal community and what do you do professionally?

Professionally, my passion is empowering future site owners to understand their options for creating a Drupal site. Then, if I can’t be in on the front end, I help site owners learn how to use their new site. The books I have authored and co-authored on Drupal reflect my desire to help as well. 

As for the community, I do what others do. I give back using my skill sets. Coders give code. I am a builder, so I teach people how to build sites with Drupal as part of the Drupal Global Training Days

2. When did you first come across Drupal? What convinced you to stay, the software or the community, and why?

I discovered Drupal 4.5 when performing an open source content management system review for a client. Of the 20+ systems that I reviewed fourteen years ago, I chose Drupal for my own use. I felt that Drupal offered what I like to call a data management system, versus a page management system. I liked where Drupal was going with this idea and haven't been disappointed. 

3. What impact has Drupal made on you? Is there a particular moment you remember?

When I found Drupal, I walked away from HTML pages and Dreamweaver. I’ve never been one that looks for the opportunity to code. It’s just not my thing. I like tools that help me get a job done. 

For example, if you've ever managed hundreds or thousands of HTML pages, like I have, you know that code and content reuse is required if you want to be efficient. Drupal offers that.

Also, if you have ever built an online data management system, you know the power of databases and what's required to integrate web pages and said database (even if coding is fun). So, to have that done for you, for free? To me, selecting Drupal is a no-brainer. 

As for a moment in time that I remember, the day I installed Drupal on my server to test it for my client. That was a game changer for me, as you can guess from my comments. Today's version of Drupal might be light years from D4.5, but even back then Drupal's concepts were where websites needed to be.

4. How do you explain what Drupal is to other, non-Drupal people?

"Drupal is an open source content management system used to build websites and online applications." I assume I heard this somewhere from someone, or something similar. Anyway, I usually get nods of understanding with that statement. 

If someone is interested in knowing more, I let them guide the discussion based on their needs. Given I can fill many pages of a book, I can also go on and on about several aspects of Drupal if you let me.

5. How did you see Drupal evolving over the years? What do you think the future will bring?

Like I mentioned before, I saw Drupal as a data management system and over the years, it has exceeded my expectations. Nothing has happened to make me believe that Drupal will not continue to provide site builders with the micro tools needed to create what they need.

6. What are some of the contributions to open source code or to the community that you are most proud of?

Compared to the actual coders in the community who enabled Drupal’s success, I have nothing to brag about. I do my best to submit observations when I see something wrong. I try to be respectful when asking for help. And, when I teach Drupal classes, I speak firmly on the fact that there is no room for curt and disrespectful behavior when communicating with the community. Drupal is free because a lot of really smart people have contributed their time and know-how to make it so. They didn't have to.

7. Is there anything else that excites you beyond Drupal? Either a new technology or a personal endeavor. 

I am talking with a developer colleague and friend about writing a Drupal 9 how-to book. 

If we can come up with something fresh, it will be a combination of a planning and click instruction book with insights based on the 20+ cumulative years of experience between the two of us. The development approach being used as Drupal moves towards D9 offers us a chance to plan now for next year.
 

Jun 28 2019
Jun 28

Acquia is growing its presence in the Asia-Pacific region with a new Pune, India office.

This week, Acquia announced the opening of its new office in Pune, India, which extends our presence in the Asia Pacific region. In addition to Pune, we already have offices in Australia and Japan.

I've made several trips to India in recent years, and have experienced not only Drupal's fast growth, but also the contagious excitement and passion for Drupal from the people I've met there.

While I wasn't able to personally attend the opening of our new office, I'm looking forward to visiting the Pune office soon.

For now, here are a few pictures from our grand opening celebration:

Acquians at the opening of the Pune, India officeAcquians at the opening of the Pune, India officeAcquians at the opening of the Pune, India office

June 28, 2019

27 sec read time

db db
Jun 27 2019
Jun 27

Drupal Association appoints Executive Director

We announced on April 30, 2019 that Heather Rocker has been selected as the next Drupal Association Executive Director.

Heather Rocker joins the Drupal Association with a strong history of leadership in technology and the nonprofit world. She was the first executive director of the Women in Technology Foundation, as well as the CEO of Girls Incorporated of Greater Atlanta. Most recently she acted as the Managing Principal of Systems Evolution, Inc. in Atlanta, Georgia. She also serves as Immediate Past-President of the Board of Directors of Georgia FIRST Robotics.

GitLab phase 1 Completed!

For the past 18 months, interoperability between the current Git infrastructure and migration to GitLab was a much larger effort than expected.  With several challenges: optimization of project syncing, disaster recovery, replication, high availability, and phasing out our old Git servers, to name a few. Each member of the Engineering Team has put a lot of time and effort in testing and addressing these challenges. We thank GitLab, The Drupal Association Engineering Team, and Partners for helping us achieve this launch date.

I hope you are excited as we are in achieving this milestone. 

The goals of phase 1 were to:

●      Transparently replace Drupal’s current underlying Git infrastructure (as part of this migration git.drupal.org’s SSH host key will change) for: repository hosting, maintainer permissions, code viewing with GitLab repositories, GitLab roles and permissions for maintainers, and the GitLab code viewing UI.

●      Enable inline code editing for project maintainers.

●      To unblock allowing pull requests, inline code editing for all contributors, and more in phase 2.

Read more about the Drupal Association partnership with GitLab at:  https://www.drupal.org/drupalorg/blog/developer-tools-initiative-part-5-gitlab-partnership

Please feel free to review our FAQs about GitLab at:  https://www.drupal.org/drupalorg/docs/gitlab-integration/gitlab-frequently-asked-questions

If you have questions, please join us in Drupal Slack on channel #gitlab.

Beginning of Gitlab Phase 2

This phase is focused on:  enabling merge requests, inline code editing, and web-based code review.  Phase 2 will enable benefits to developer velocity and collaboration:

●      By adding merge requests, contributing to Drupal will become much more familiar to the broad audience of open source contributors who've learned their skills in the post-patch era.

●      By adding inline editing and web-based code review, it will be much easier to make quick contributions. This not only lowers the barrier to contribution for people new to our community, it also saves significant effort for our existing community members, as they'll no longer need to clone work locally and generate patches.

●      Finally, by creating a tight integration between the Drupal.org issue queues and GitLab's development tools, we'll be able to transition to this new toolset without disrupting the community's existing way of collaborating.

The Engineering team and our partners are currently evaluating the timeline for Phase 2 and will update our issue tracker once it’s established.

Drupal Steward Program

The program will focus on protection that closes the gap between security releases and site updates. The Security Team and the Drupal Association have been developing this program for over a year.

The goals are:

●      Provide a new service to the Drupal community, from small site owners to enterprise-scale end users, to protect their sites in the gap from security release to the time it takes them to patch.

●      Create a new model for sustainability for the Security Team, generating funding that 1) covers the operating costs of the program 2) can support security team operations and 3) can support additional Drupal Association programs.

Drupal Steward will offer sites a form of mitigation through the implementation of web application firewall rules to prevent mass exploitation of some highly critical vulnerabilities (not all highly critical vulnerabilities can be protected in this fashion, but a good many can be—this method would have worked for SA-CORE-2018-002 for example).

It will come in three versions:

●      Community version - for small sites, low-budget organizations, and nonprofits, we will offer a community tier, sold directly by the DA. This will be effectively at cost.

●      Self-hosted version - for sites that are too large for the community tier but not hosted by our vendor partners.

●      Partner version - For sites that are hosted on vetted Drupal platform providers, who have demonstrated a commitment of contribution to the project in general and the Security Team in particular, protection will be available directly through these partners.

We will announce more details of the program over the coming weeks and months as we get it up and running.

If you are a hosting company and are interested in providing this service to your customers, please reach out to us at [email protected].


Updates to Drupal.org metrics and visualizations

Please visit our new graphical display of project usage information at:  https://www.drupal.org/project/usage/drupal. The usage graph now displays a stacked chart by version. In the long term, we have plans to revise how our usage data is tabulated to provide more accurate and useful data. 

Changes in credit attribution

We have made available by default giving commenters credit attribution as we believe comments are an important part of the development process. Although we deployed this successfully, we had to roll this back so we can refine our guidelines a bit. For now this issue is in backlog and expect to have our guidelines by the end of the year.

Introducing Community Group Sections in the Community Portal

/Community has been expanded to include more targeted sections upon landing at the /Community page. We’ve defined these sections in groups. We also have a framework that will enable these groups to tell us:

  • Who they are
  • What they do
  • How they work
  • Their latest updates
  • How you can get involved

Some of the early adopters that are now posted are:

Each section will have “standard” home page content, detailing the info above, as many content pages as the group can muster, and a blog that will go on to Drupal Planet.

Drupal 7 Extended Support - request for partners

With the upcoming release of Drupal 9 in June 2020, it's time to start thinking about migration. Drupal 7 will be supported through November 2021, but after that any end-users who haven't yet updated will want to partner with a Drupal 7 Extended Support vendor.

The Drupal Security Working Group is accepting applications for vendors who want to be part of the extended support program.

A renewed push on the Composer Initiative

At DrupalCon Seattle there was also renewed interest in the Composer Initiative—this initiative seeks to rationalize the way that Composer is used in Core, to make it easier to manage sites using Composer, and also to make it easier for sites set up using a non-Composer method to be converted to using Composer, something increasingly important as contributed modules add Composer dependencies.

———

As always, we’d like to say thanks to all the volunteers who work with us, and to the Drupal Association Supporters, who make it possible for us to work on these projects. In particular, we want to thank:

  • Srijan - Renewing Signature Supporting Partner
  • FFW - Renewing Signature Supporting Partner
  • Sixeleven - Renewing Signature Supporting Partner
  • Acquia - Renewing Signature Hosting Supporter
  • Nexcess.net - *NEW* Signature Hosting Supporter
  • Specbee - *NEW* Premium Supporting Partner
  • EPAM - Renewing Premium Supporting Partner
  • Elevated Third - Renewing Premium Supporting Partner
  • publicplan - Renewing Premium Supporting Partner
  • CI&T - Renewing Premium Supporting Partner
  • Capgemini - Renewing Premium Supporting Partner
  • Zoocha - Renewing Premium Supporting Partner
  • 1XInternet - Renewing Premium Supporting Partner
  • Message Agency - Renewing Premium Supporting Partner
  • Lullabot - Renewing Premium Supporting Partner
  • Aten - Renewing Premium Supporting Partner
  • Contegix - Renewing Premium Hosting Supporter
  • Platform.sh - Renewing Premium Hosting Supporter
  • Contegix - Renewing Premium Hosting Supporter
  • KWALL - Renewing Classic Supporting Partner
  • ANNAI - Renewing Classic Supporting Partner
  • Softescu - Renewing Classic Supporting Partner
  • SymSoft - Renewing Classic Supporting Partner
  • Vardot - Renewing Classic Supporting Partner
  • Forum One - Renewing Classic Supporting Partner
  • Berger Schmidt - Renewing Classic Supporting Partner
  • Catalyst IT - Renewing Classic Supporting Partner
  • Old Moon Digital - *NEW* Classic Supporting Partner
  • AddWeb Solution - *NEW* Classic Supporting Partner
  • Urban Insight - *NEW* Classic Supporting Partner
  • Asentech - *NEW* Classic Supporting Partner
  • One Shoe - Renewing Classic Supporting Partner
  • Hook 42 - *NEW* Classic Supporting Partner
  • Electric Citizen - Renewing Classic Supporting Partner
  • Beaconfire RED - Renewing Classic Supporting Partner
  • University Of Virginia - *NEW* Classic Supporting Partner
  • Bear Group - *NEW* Classic Supporting Partner
  • Dropsolid - *NEW* Classic Supporting Partner
  • ezCompany - *NEW* Classic Supporting Partner
  • Spry Digital - Renewing Classic Supporting Partner
  • Perpetuum - *NEW* Classic Supporting Partner
  • Factorial - Renewing Classic Supporting Partner
  • Acro Media - Renewing Classic Supporting Partner
  • Third & Grove - Renewing Classic Supporting Partner
  • Digital Circus - Renewing Classic Supporting Partner
  • Bounteous - Renewing Classic Supporting Partner
  • Cybage - Renewing Classic Supporting Partner
  • QED42 - Renewing Classic Supporting Partner
  • Digitalist Group - *NEW* Classic Supporting Partner
  • Red Crackle - *NEW* Classic Supporting Partner
  • SeeD - Renewing Classic Supporting Partner
  • Last Call - Renewing Classic Supporting Partner
  • CivicActions - Renewing Classic Supporting Partner
  • Morpht - Renewing Classic Supporting Partner
  • Tata Consultancy Services - Renewing Classic Supporting Partner
  • Wunder - Renewing Classic Supporting Partner
  • Promet Source - Renewing Classic Supporting Partner
  • Unleashed Technologies - Renewing Classic Supporting Partner
  • Digital Echidna - Renewing Classic Supporting Partner
  • Evolving Web - Renewing Classic Supporting Partner
  • Adapt - Renewing Classic Supporting Partner
  • Microserve - Renewing Classic Supporting Partner
  • ImageX - Renewing Classic Supporting Partner
  • Therefore - Renewing Classic Supporting Partner
  • Sevaa Group - Renewing Classic Hosting Supporter
  • DRUD - Renewing Classic Hosting Supporter
  • Smartling - Renewing Classic Technology Supporter

If you would like to support our work as an individual, consider becoming a member of the Drupal Association.

Follow us on Twitter for regular updates: @drupal_org, @drupal_infra

Jun 27 2019
Jun 27

8 already provides the necessary configuration files and PHP plugins to migrate files from Drupal 6. But if you are using the Drupal 8 core media module for your files you need to add a second migration.

I assume that you are doing a Drupal 8 migration using the migrate tools and migrate plus modules.

File migration

Copy /core/modules/file/migrations/d6_file.yml to config/install/migrate_plus.migration.d6_file.yml in your custom module and set the source file path:

# Every migration that references a file by Drupal 6 fid should specify this
# migration as an optional dependency.
id: d6_file
label: Public files
audit: true
migration_group: d6
migration_tags:
  - Drupal 6
  - Content
source:
  plugin: d6_file
  constants:
    # The tool configuring this migration must set source_base_path. It
    # represents the fully qualified path relative to which URIs in the files
    # table are specified, and must end with a /. See source_full_path
    # configuration in this migration's process pipeline as an example.
    source_base_path: '/path/to/drupal6/files/to/migrate'
...

Drupal 8 refuses to install a module whose configuration has already been imported. To avoid such error add a dependency on your custom module to the migration file. If you uninstall the module, Drupal 8 will also remove the configuration:

dependencies:
  enforced:
    module:
      - custom_migrate_module

Media entity migration

Copy /core/modules/file/migrations/d6_file.yml to config/install/migrate_plus.migration.d6_media_entity.yml in your custom module.

Change plugin id and label, process and destination configuration in order to create media entities:

Before (excerpt)

id: d6_file
label: Public files
...
process:
    # If you are using both this migration and d6_user_picture_file in a custom
    # migration and executing migrations incrementally, it is strongly
    # recommended that you remove the fid mapping to avoid potential ID
    # conflicts. For that reason, this mapping is commented out by default.
    # fid: fid
  filename: filename
  source_full_path:
    -
      plugin: concat
      delimiter: /
      source:
        - constants/source_base_path
        - filepath
    -
      plugin: urlencode
  destination_full_path:
    plugin: file_uri
    source:
      - filepath
      - file_directory_path
      - temp_directory_path
      - is_public
  uri:
    plugin: file_copy
    source:
      - '@source_full_path'
      - '@destination_full_path'
  filemime: filemime
  # No need to migrate filesize, it is computed when file entities are saved.
  # filesize: filesize
  status: status
  changed: timestamp
  uid: uid
destination:
  plugin: entity:file

After (excerpt)

id: d6_media_entity
label: Media entities
migration_group: d6
...
process:
  langcode:
    plugin: default_value
    default_value: 'en'
  field_media_file/target_id:
    plugin: migration_lookup
    migration: d6_file
    source: fid
  field_media_file/display:
    plugin: default_value
    default_value: 0
  field_media_file/description:
    plugin: default_value
    default_value: ''
  status: status
  changed: timestamp
  uid:
    plugin: migration_lookup
    migration: d6_user
    source: uid
destination:
  plugin: entity:media
  default_bundle: file

Or if you migrate images:

id: d6_media_entity
label: Media entities
migration_group: d6
...
process:
  langcode:
    plugin: default_value
    default_value: 'en'
  field_media_image/target_id:
    plugin: migration_lookup
    migration: d6_file
    source: fid
  field_media_image/alt: filename
  field_media_image/title:
    plugin: default_value
    default_value: ''
  status: status
  changed: timestamp
  uid:
    plugin: migration_lookup
    migration: d6_user
    source: uid
destination:
  plugin: entity:media
  default_bundle: image

At last, add the migration dependencies to config/install/migrate_plus.migration.d6_media_entity.yml:

migration_dependencies:
  required:
    - d6_user
    - d6_file
dependencies:
  enforced:
    module:
      - custom_migrate_module

Running these 2 migrations will copy your files from the Drupal 6 to the Drupal 8 file directory and create a media entity for each of them.

Assign media entities to nodes

In order to assign media entities to media fields on nodes, you have to assign the media entity id (instead of the file id) to the field, e.g.:

id: d6_node
label: Nodes
audit: true
migration_group: d6
migration_tags:
  - Drupal 6
  - Content
deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
source:
  plugin: d6_node
process:
  field_media:
    plugin: sub_process
    source: uploads
    process:
      target_id:
        plugin: migration_lookup
        migration: d6_media_entity
        source: fid
        no_stub: true
      display: list
      description: description
...
destination:
  plugin: entity:node

You may have to create a custom source plugin in order to retrieve the id of the file that is attached to a node.

Jun 26 2019
Jun 26

by David Snopek on June 26, 2019 - 11:42am

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Critical security release for the Advanced Forum 6.x-2.x module to fix an Cross Site Scripting (XSS) vulnerability.

Advanced Forum builds on and enhances Drupal's core forum module.

The module doesn't sufficiently sanitise user input in specific circumstances relating to the module's default functionality. It is not possible to disable the vulnerable functionality.

This vulnerability is mitigated by the fact that an attacker must have a role with permission to create forum content.

See the security advisory for Drupal 7 for more information.

Here you can download the Drupal 6 patch or the full release.

Note: This only affects Advanced Forum 6.x-2.x -- not 6.x-1.x.

If you have a Drupal 6 site using the Advanced Forum 6.x-2.x module, we recommend you update immediately! We have already deployed the patch for all of our Drupal 6 Long-Term Support clients. :-)

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on Drupal.org).

Jun 26 2019
Jun 26

Streamlining the content creation and approval processes is necessary on many websites. Editorial workflows in Drupal 8 are easy to create and manage. This is achieved by the Content Moderation and Workflows modules.

These modules are Drupal 8’s innovation — they have appeared in the core and reached stability during the time between the introduction of Drupal 8.2 and Drupal 8.5. So welcome on this tour of creating and managing editorial workflows with them!

Drupal 8 editorial workflows with Content Moderation in a nutshell

By default, Drupal offers you the “Published” and “Unpublished” states for content, as well as a system of permissions for particular roles to manage it. However, with the Content Moderation and Workflows modules, the process gets much more advanced.

With them, you, out-of-box, have an editorial workflow that has such content states as “Draft,” “Published,” and “Archived”, as well as configurable transitions between them. Transitions look like “Publish” (move from Draft to Published), “Archive” (move from Published to Archived), and so on.

The workflow can be customized to your liking. This is achieved by adding custom content states (like “First edit”, “Second edit,” “Needs review,” “Needs work,” or any other) and creating the appropriate transitions.

An important benefit is that you can have a published version of content available to visitors, and at the same time have a working copy to review or edit. The content revisions are stored in the database.

You are also able to create multiple content workflows and apply each to a specific content type. And, of course, granular content moderation permissions are available.

Our Drupal development team will be happy to help you create the content moderation workflows to meet your organizations’ needs.

A closer look at managing editorial workflows in Drupal 8

Enabling the modules

It begins with enabling the Content Moderation and Workflows modules on the Extend tab.

  • The Workflows module provides a UI and an API for managing the states and transitions between them. The states and transitions are supplied by other modules (in our case, Content Moderation).
  • The Content Moderation module provides the content states and transitions for editorial workflows.

Enabling modules for editorial workflows in Drupal 8

As soon as the two modules are enabled, we see the built-in “Editorial” workflow in Configuration — Workflow — Workflows.

Built-in editorial workflow in Drupal 8

Managing the states and transitions

We see states and transitions listed and provided with the options to “Add a new state” and “Add a new transition.”

Managing states and transitions in Drupal 8 editorial workflows

The transitions should be named clearly, with the use of verbs. They should show from which state and to which state they lead. In this example, the “Restore to Draft” transition restores the content from Archived to Draft:

Transition between states in Drupal 8 content workflows

Applying the workflow to specific content types

Our workflow can be applied to particular content types, custom block types, or media types (the latter is true if you have the Media module enabled). So you can have different editorial workflows for articles, news, blog posts, photos, videos, and so on.

Applying Drupal 8 editorial workflows to content types

Setting content workflow permissions

It’s important to make sure that all workflow participants have the necessary permissions. This is configured on the People — Permissions tab. The appropriate roles like Author, Editor, and so on, can be created on your website according to your workflow needs.

The permissions are in the “Content Moderation” section and many of them are in the “Node” section. Both thesesections should be carefully checked.

For example, the Author should be able to create new content, edit their own content, view their own unpublished content, have the permission to “Create New Draft” transition, and so on. The Editor should be able to restore content from draft to publish, view any unpublished content, and so on. Both should be able to view the latest version, view revisions, and revert revisions.

Permissions for content workflows in Drupal 8

With everything configured, your editorial workflow could look, for example, like this.

  • The author creates a draft and the editor checks it and transfers it to the published state.
  • The author then suddenly decides to change something and edits this piece of content. The edited copy is saved as draft and is seen to the Author and the Editor in the “Latest version” tab of the content piece.
  • The editor reviews the content again.
  • All this time, the published version remains available all readers as before.

Let’s create an editorial workflow for your team

No matter how complex your desired workflows are, they can be configured with just Drupal 8 core features. Entrust our development team with creating editorial workflows for your website. Enjoy efficiency in content editing!

Jun 26 2019
Jun 26

We are proud to announce that Zürich Tourism has been chosen as this year's recipient of the annual German Brand Award in the categories of Excellence in Brand Strategy and Creation, and Brand Communication (Web and Mobile) for its work on zuerich.com -- a collaborative project with Amazee Labs and Studio Marcus Kraft.

Zürich Tourism is at the helm of the region’s national and international destination marketing.The province of Zürich receives hundreds of thousands of visitors from all corners of the world each year. The Zürich Tourism website serves a wide range of tourists from different cultural backgrounds, as well as online interests and needs. 

zuerich.com is now a central content hub within Zurich Tourism’s content marketing strategy to show the city and region at its best. Since the site was relaunched, the new website for zuerich.com has impressed visitors and users by balancing abundant content with exceptional navigation and UI.  

This project is a milestone for the client. Amazee Labs was tasked with overhauling an extensive amount of code made from multiple agencies over time. The result is a state-of-the-art Drupal CMS that allows for smooth content editing, a dynamic filter with theme pages tailored to the users with a modern CI / CD and exciting visual experience created by Studio Marcus Kraft, a Zürich-based design agency. This social content encourages and inspires people to discover Zürich and the surrounding area in ways that appeal to different kinds of visitors. 

We’d also like to thank our partners for making this project such a soaring success -- our client Zürich Tourism, for this incredible opportunity, and Studio Marcus Kraft!

To all of this year’s winners and nominees -- Congratulations!
 

Jun 26 2019
Jun 26

Drupal 9 is coming — its arrival is planned for June 2020. So while the world continues enjoying Drupal 8’s benefits, it’s also time to start getting ready for Drupal 9. What does it mean and how should you prepare? We are discussing this today in our blog post.

Easy upgrades to Drupal 9 as a huge bonus

All website owners and developers can enjoy an amazing bonus related to Drupal 9. Thanks to efforts from the Drupal community, upgrades from Drupal 8 to Drupal 9 are made easy! They shouldn’t take more time than trivial updates between minor versions (for example, from Drupal 8.6 to Drupal 8.7).

As Dries Buytaert wrote in his State of Drupal presentation, when sites move from Drupal 8 to Drupal 9, content is already ready and the code continues to work. Amazing!

Excerpt from Dries Buytaert's State of Drupal presentation

But, as you might have noticed, there is one remark in this illustration by Dries. Easy upgrades to Drupal 9 will be available if websites are not using deprecated code. Let’s see in more detail what this means and how to fulfill this condition.

Getting ready for Drupal 9: cleaning up deprecated code

To be ready for Drupal 9, all websites should cleaned up from deprecated Drupal APIs and functions (outdated ones that have more modern alternatives).

Since Drupal core and contributed modules are maintained by their developers, there is a big chance they will take care of the cleanup. So it is necessary to keep the core and contributed modules up-to-date as part of preparation for Drupal 9. However, a good deprecation check is also highly recommended.

When it comes to custom modules and themes developed specifically for your website, they should be properly checked for deprecations and updated.

To discover deprecated code, there are useful tools in Drupal. Among them:

What to expect from the module readiness and the amount of work needed? Dwayne McDaniel of Pantheon checked almost 7,000 of the most popular contributed Drupal 8 modules with the Drupal-check tool. He found that almost half of the modules had no Drupal 9 compatibility issues, while 35% had 5 issues or less.

At MidCamp 2019, issues for 300 modules were additionally opened, so the work is already being done on them. Most modules just need an easy fix. All this is stated in the Drupal 9 slides by famous Drupal contributor Gábor Hojtsy.

How Drupal contributed modules are ready for Drupal 9

Dries Buytaert also says that many deprecations are just a matter of “find and replace” and he tried this on his own website.

So don’t worry — the cleanup work as part of getting ready for Drupal 9 shouldn’t take much time. Our Drupal team is always ready to help you check and clean your website from deprecated code.

What about Drupal 7?

Drupal 7 website owners can upgrade to Drupal 8 now or wait for Drupal 9. However, the first option looks much more beneficial. See why.

If they upgrade from Drupal 7 to Drupal 8 now, they can start enjoying what Drupal 8 has to offer (and that’s a huge piece of pie — just check out the basic Drupal 8’s benefits for business). And then they will just switch to Drupal 9 in a snap of a finger. Only one big move will ever be needed.

“Once you are on the Drupal 8 track, you will never have to change tracks again,” Dries writes in the presentation, comparing migration to changing railway tracks.

As you can see from his great illustrations, the Drupal 8 track leads to Drupal 9 and then to Drupal 10 stations. At the same time, Drupal 7 and especially Drupal 6 tracks have no future.

Dries Buytaert illustrating the future of Drupal versions

Dries Buytaert illustrating the future of Drupal versions

In addition, the upgrade path from Drupal 7 to Drupal 8 is very well documented, tried by most developers, and has been improved a lot recently. Useful migration modules have become stable in Drupal 8 core, so it is much easier to migrate content and configuration.

You will definitely benefit from moving to Drupal 8, and Drudesk team is ready to help you. Change the track if you are still with Drupal 7 and get on the train to the future!

Drupal 9 is coming — entrust us with getting your site ready

Entrust our Drupal support team with preparing your website for the future. Both cleanups and migrations are Drudesk’s area of expertise. We strive to make websites better, cleaner, more modern — and ready for Drupal 9!

Jun 26 2019
Jun 26

How to Set, Get and Invalidate the caches per user in Drupal 7, this blog article will explain a brief of how to do such implementation on Drupal using the default drupal cache functions.

Here, we go with the steps

  • Initially, create the custom functions for Get, Set and Invalidate the caches per user.
  • Here, cache id per user is pretty important, where user id or user email id will used as part of cache id.
  • And these functions should be used as when required for caching the page.
  • Their will be cases like, Caches should be Invalidated on some actions for that particular user. These can be covered with these below functions.

Here's the functions which are used to Get, Set and Invalidate caches.

<?php

function _get_cache($cache_id) {
    $cache = cache_get($cache_id);
    if (isset($cache_id) && REQUEST_TIME < $cache->expire) {
        return $cache->data;
    }
    else {
        return NULL;
    }
}

function _set_cache($cache_id, $data) {
    cache_set($cache_id, $data, 'cache', REQUEST_TIME + (60 * 60));
}

function _invalidate_cache($cache_id) {
    $cache = cache_get($cache_id);
    if (isset($cache) && !empty($cache)) {
        cache_clear_all($cache->cid, 'cache');
    }
}

Here's the function where we Set the cache on page load, if at all already cache doesn't exist for this cache id.

function sample() {
    global $user;
    $cache_id = $user->uid . "_sample";
    $cache_data = _get_cache($cache_id);
    if ($cache_data == NULL) {
        $cache_data = array();
        // Here processed data should be cached
        $data = getData();
        $cache_data['data'] = $data;
        _set_cache($cache_id, $cache_data);
    }
    return $cache_data;
}

Here's the function used to Invalidate the caches, on some particular actions of the particular user.

$cache_id = $user->id . "_sample";
_invalidate_cache($cache_id);

Advantages of having the caches enabled for few pages, The page load time will be reduced..

Cheers :)

Jun 26 2019
Jun 26

The Drupal 8 Pager module provides simple pager navigation in a block to ease up the navigation between nodes of the same content type or between nodes with a common taxonomy tag.

This tutorial will explain the usage of this module with an example. Let’s start!

Step #1. - Download and enable the module

  • Open your terminal application and go to the root of your Drupal installation (where the composer.json file is located)
  • Type:

composer require drupal/pager

Use this command

  • Click Extend
  • Scroll down to the Pager module and check it
  • Click Install

Click Install

No further modules are required.

Step #2. - Create Content

For the purpose of this tutorial, you are going to create six pieces of content. Their content type will be Article.

Each one of these articles will describe a country in Europe. Three of these countries will have the taxonomy term Central Europe, whereas the other three will have the taxonomy term Southern Europe.

Title Body Image Tags Spain Your text Country Flag Southern Europe Italy Your text Country Flag Southern Europe France Your text Country Flag Central Europe Netherlands Your text Country Flag Central Europe Germany Your text Country Flag Central Europe Greece Your text Country Flag Southern Europe


Click Save each time you create an article

  • Click Save each time you create an article, in order to create the next one

Content created and listed

Step #3. - Place the Pager Block

  • Click Structure > Block Layout
  • Scroll down to the Content section
  • Click Place block.

Click Place block

  • Use the search box to look for the Pager block
  • Click Place block.

Click Place block one again

  • Change the “Previous” and “Next” texts
  • Leave the default Image field and image style.

Leave the default Image field and image style

  • Choose the theme template pager--block.html.twig
  • Select the Article content type
  • Check both taxonomy terms
  • Leave the default direction
  • Make sure you leave the Maintain term checkbox unchecked.

Make sure you leave the <i>Maintain term</i> checkbox unchecked

  • Leave the default End Behavior
  • Click Save Block.

Leave the default End Behavior. Click Save Block

Head over to one of your articles. You will see the pager at the bottom of the Content region. If you notice, the pager does not make any difference between the nodes with the taxonomy term Central Europe and the ones with the taxonomy term Southern Europe.

You will see the pager at the bottom of the Content region

In order to paginate over articles with a common taxonomy term, it is necessary to check the Maintain term option within the block configuration.

  • Click Structure > Block layout
  • Scroll down to the Pager block and click Configure
  • Look for the Maintain term option and check it
  • Scroll down and click Save block.

Scroll down and click Save block

Go back to your site and you will be able only to paginate across articles with one particular taxonomy term. In the case of Germany for example, you will be only able to paginate over the other two nodes with the tag Central Europe.

Go back to your site and you will be able only to paginate across articles with one particular taxonomy term

In order to change the appearance of the pager, configure the block once again and select the other theme template (pager--wings.html.twig).

Configure the block once again

Check your site again after saving the block and you will see the other pager style. It’s up to you to adjust the CSS in order to match the pager’s style to the style of your site.

Check your site again after saving the block and you will see the other pager style

I hope you liked this tutorial. Thanks for reading!.


About the author

Jorge lived in Ecuador and Germany. Now he is back to his homeland Colombia. He spends his time translating from English and German to Spanish. He enjoys playing with Drupal and other Open Source Content Management Systems and technologies.
Jun 25 2019
Jun 25

The Open Source CMS that Revolutionized the World

Acquia HQ and the Mayor of Boston

You may have already heard of Drupal, but for those who don't know, Drupal is an open source Content Management System. However, you might not know the history behind Drupal and the connection that it has with the SaaS company, Acquia. Well, in this blog post, I’m going to tell you the history behind the biggest open source Content Management System and the role it played in the founding of Acquia.

Drupal History

Dries Buytaert in his student days. Photo credit.

It all started in the year 2000 when Dries Buytaert and Hans Snijder, which at the time were students at the University of Antwerp, needed an internet connection, which was quite seldom found back in the days. This resulted in them both building a wireless bridge between their dorms. On top of that, they had a need for a place to also talk. This led Dries Buytaert to start a small news website with a chat board for him and his friends to be able to meet, publish and share the news.

The software that was built in the process remained unnamed until Dries had graduated. However, after his graduation, he put the website online, because he wanted to stay in touch with his friends. He originally wanted to name the domain to dorp.org.  The word "dorp" translates to "village" in dutch. However, Dries had misspelled the word "dorp" to "drop" and he chose to leave it like that. After a while, the website began to attract new members that would discuss topics on new technologies and ideas.

In January of 2001, Dries had decided that he wanted to release the software at the core of the website, for other people to be able to use it. So, it started as an open source project. The name of the software was derived from the English pronunciation of the Dutch word “Druppel”, which means “drop”. On top of that, the software was in need of a logo. For this task, Kristjan Jansen and Steven Wittens had stylized a water droplet with eyes, curved nose and a smile.

pA00 : 08 / 02 : 06O

Video showing one of the earliest Drupal Camps, New York City 2006. Unmute (bottom left) this video to get the full experience.

Drupal 1.0

The first release version was Drupal 1.0, which was built using Slash, a modular CMS, and Scoop. It was released on the 15th of January 2001. At first, there were 18 core modules, which were basically a set of PHP files containing a set of routines. Everything was accessed through PHP files due to the lack of a menu. On top of that, at first, the code had to be put into one of the seven hooks of the modules. The system was built from the beginning to be modular. This lets people adapt their websites to their needs. The system is depending on SQL in order to manage and change layout, themes and content.

Drupal 2.0

Just after two months on the 15th March 2001 Drupal 2.0 was released. This version added a translation feature that made it possible for users to translate their website into another language. On top of that, it also provided a framework that supported multilingual websites. It had 22 core modules and added user ratings and sections for stories.

Drupal 3.0

On 15th September 2001, Drupal 3.0 was released. The primary difference between this version and its predecessors is that it used nodes instead of pages. Meaning that every form of content was managed by a node from the node module. On top of that, this version reached 26 core modules.

Drupal 4.0

Video showing Drupal 4 with the (in)famous book module. 

It was released on the 15th of June 2002. At this point, there were already 100 websites that were operating on Drupal. This made Drupal truly an international open source project. A notable addition to this version was the taxonomy module which replaces the attributes and meta tags. On later versions, there were added a lot of new modules including the e-commerce module and the support for a profile module or theme template that facilitated an early version of the What You See Is What You Get. Right now, Drupal was starting to look like a truly enterprise CMS.

Drupal 5.0

On the 6th birthday of Drupal on 15th January 2007, Drupal 5.0 was released. What made this release stand apart from the others was the fact that it supported jQuery. jQuery is a JavaScript library that makes HTML scripting easier than the previous versions. Another feature that was added was the support for distributions of pre-created Drupal packages. These could be customized to the liking of the user. On top of that, modules were moved to their own folder which made it easier to install and uninstall them. The site load speeds were also improved by making use of a CSS preprocessor that migrated cacheable stylesheets into a single compressed folder.

Drupal 6.0

The 6.0 version was released on 13th February 2008. One major step for Drupal was that the Whitehouse has adopted Drupal as their website managing CMS. One notable improvement was the rewriting of the menu system from scratch, which makes it a lot easier to use. On top of that, users were now able to drag-and-drop a number of features such a blocks and taxonomy vocabularies and terms. Moreover, the language system was modified so it could handle right-to-left languages. Security was also improved by providing an Update Status module that automatically checks for new updates.

Drupal 7.0

Video showing Drupal 7 and its clear improvements in user experience

It was released on the 5th of January 2011. Drupal was used to build simple blogs and websites of large corporations, essentially becoming trustworthy worldwide. This version of Drupal also had a couple of improvements. First of all, nodes were no longer dependent on modules, as they could interact with any node at runtime, meaning that everything became an independent entity. On top of that, this version added a queue API and an improved jQuery usage. This made it possible for everything to be associated with web apps.

Drupal 8.0

The current version of the CMS was officially released on 15th November 2015. The previous generations did manage to accomplish a big deal, however, this version is sure to bring even bigger changes. Drupal 8 was a complete rewrite of Drupal 7, this time based on a PHP framework called Symfony. Notable new features that were added are enhanced multilingual features, Views in core, a new level of web accessibility, improved theming with Twig, modern PHP, Symfony and OOP (Object Oriented Programming) adoption amongst others. Another notable feature is the new in-line editing. However, not as powerful and intuitive as our own in-line editing tool, Glazed Builder, which is based on Drupal. Here you can try our more elaborate inline editing experience for free!

Glazed Builder: Our Drupal UX add-on solution

While Drupal made strides in improving its core components' user experience, Sooperthemes created a commercial add-on solution that takes Drupal to the next level. With our 10+ years experience in Drupal theming, we decided to concentrate our resources on developing a new Drupal experience for authors, marketers, and site builders. Here is a short demo of what our our Glazed Builder product can add to your Drupal website:

pA00 : 32 / 02 : 17O

Video showing our Drupal UX solution Glazed Builder. This blog post was also created with Glazed Builder and without our tool we couldn't have created this video-enhanced story-telling experience.

Acquia

When Drupal was gaining momentum in 2007, Dries Buytaert saw that in order to be able to deliver the best support for large organizations, a dedicated company was needed. However, he was still hesitant, since, at that time, he was dedicated to finishing his Ph.D. This all changes when Jay Batson introduces himself to Dries at the Sunnyvale DrupalCon. Jay dreaming of opening a company that was focused on providing support and supplementary services for open source software such as Drupal and Apache Solr. After Jay persuaded Dries, they dropped Apache Solr from the equation and chose to focus on Drupal. On June 25th 2007, Jay registered the company under the name Acquia.

Although Acquia did not have an official product yet, they still received their Series A funding. This meant that Acquia was to be a significant player in the Drupal communnity, having managed to raise $7 million. For the most part of the remaining year, Acquia worked on their corporate values and products. Finally, In September 2008, Acquia has opened the doors for business. From that moment on, Dries and Jay's vision to build the universal platform for the world’s greatest digital experiences had started to materialize.

Conclusion

Drupal and Acquia both have had humble beginnings. However, with the passage of time, they have become staples for the open source community. Right now, Drupal is the third most popular Content Management System by market share. Moreover, with the ongoing trend in the market for companies to adopt or incorporate open source, Drupal still has potential to grow. In our previous blog post, you can find out why open source is our future.

Jun 25 2019
Jun 25

Joris Snoek

Digital Consultant

+31 (0)20 - 261 14 99

I would like to stay up to date on all available open source / 'contrib' Drupal modules. 'There is a module for that', this applies to many use cases within Drupal; a deadly sin to build something that already exists, or is partially available. We keep track of the latest module releases every month, including what we noticed about module updates in the past month:

1. Clientside Validation

The Form API from Drupal is very comprehensive: neatly building, formatting and developing forms, in the broadest sense of the word, are interwoven into the system. There is no clientside validation as standard, simply put: that as soon as a visitor enters a 'form element' (for example his first name), that field is immediately validated. And not just after clicking on the 'Save' button.

https://www.drupal.org/project/clientside_validation

2. Forms Steps

Giving enough attention to forms on your website is essential; these are often a conversion point and you want nothing to stand in the way. A multi-step form can increase your conversion rate by 300%. With this module you can easily create such a form in Drupal.

https://www.drupal.org/project/forms_steps

3. Better Search Block

You can make the standard Drupal search box beautiful by overriding using Twig templates. But if you want a less technical approach, this module could help: it offers some configuration options such as:

  • Making some layout elements adjustable
  • Making the placeholder text adjustable
  • Mini animations as soon as a visitor clicks in the box.

https://www.drupal.org/project/better_search

4. Multiple Registration

A powerful permissions and roles system is embedded in the Drupal core, but offers only one registration page for website visitors as standard. If you want different registration pages on your website, for different roles (for example, customers and suppliers), give this module a try.

https://www.drupal.org/project/multiple_registration

5. Simple XML sitemap

An XML sitemap is essential for your website SEO. There are several Drupal modules that generate this XML sitemap for you, but this one seems to be the most popular with nearly 45,000 installs. This also supports the latest Google standards, regarding multilingual content.
Googlebots will thank you later.

https://www.drupal.org/project/simple_sitemap

6. Advanced Text Formatter

Within the Drupal core you can set according to which View mode an entered text field can be shown to the website visitor, for example 'default', 'teaser' or 'trimmed'. If you want more control over the way in which the entered text is displayed, install this module so that you can configure by field:

  • Automatically cut text on a certain number of characters.
  • Adding an ellipsis (...) as soon as a sentence is truncated.
  • Always cancel on whole word.
  • Tokens for adding automatically dynamic information.
  • Allow certain html tags.
  • Apply specific Text Format.

https://www.drupal.org/project/advanced_text_formatter

7. Menu Item Extras

Do you want to add extra fields to menu items? Install this popular module. You can see it as 'Fieldable menus', so you can store and display all kinds of extra information with a menu item.

https://www.drupal.org/project/menu_item_extras

8. Visitors

Don't want to give away all your data to Google? Or do you run Drupal as a social intranet with private data? Then you can install this module to generate statistics. It gives reports about the visitors to your website, in diagrams and other textual statistics. Some of the available reports:

  • Pages that have recently been visited
  • Pages that are often visited
  • Page visitors per month / week / day
  • Total number of visitors
  • Number of unique visitors
  • Number of registered users
  • Visitors by country, city
  • Number of visits per page per city

For the complete list, check the module page:

https://www.drupal.org/project/visitors

9. Geofield Map

Easily create beautiful maps using this Drupal module, it is built on the popular Geofield module and works in both the frontend and the backend with interactive maps makes management easy for content managers. The 2.x version even supports custom markers and images, based on dynamic data from that folder. Watch a live demo here.

https://www.drupal.org/project/geofield_map

10. Views Bulk Operations (VBO)

https://www.drupal.org/project/views_bulk_operations

This module has been around for a long time, but recently received another update. Using Views you can configure Drupal content lists in the broadest sense of the word: you can make a list of basically everything that lives in Drupal with it - from simple blog overviews to complex search pages with facets integrated in Solr.

This module expands Views with the possibility of having an action on all items in such a list: a 'bulk operation' as an extension of this limited function of the Drupal core.

An example is bulk editing of a selection of nodes. Exporting data to excel or csv is also possible via this additional module.

11. Monolog

Drupal core has a good log, in which you can find notifications, warnings and errors. But sometimes you need more reporting: this module offers integration of the Monolog library- "Logging for PHP". It integrates with Drupal Watchdog: the core log, so the module works with the Drupal core and contrib / open source modules.

https://www.drupal.org/project/monolog

12. Field Defaults

You can configure your content model in Drupal using content types and fields. After / during this configuration you build your website, after which you will fill it with content. Sometimes the content manager discovers after a while that an extra field is needed (for example an 'Intro Text'). You can easily add that field in Drupal, but with all existing content items that field is empty. This module comes in handy: as soon as you create a new field, it can automatically supplement all existing content with a chosen default value for that field.

https://www.drupal.org/project/field_defaults

13. Allow site iframing

For security reasons a website may not load within an i-frame, the Drupal core prohibits that by default. If you want to bypass this intentionally, this mini module offers the solution.

https://www.drupal.org/project/allow_iframed_site

14. Upgrade Status

A module mentioned in the Drupal Keynote by leader Dries Buytaert in the past DrupalCon. Specific for Drupal 8 installations: this module scans all code and reports whether it contains 'deprecated code'. Simply put, that is code that no longer works in Drupal 9. To make it easy to upgrade to Drupal 9 at a later stage, it is important not to have a deprecated code anymore, this module provides a good insight into that. Also: if you use the correct IDE, it will immediately indicate inline with the code.

View this directly in the Driesnote

https://www.drupal.org/project/upgrade_status

15. Views Bulk Edit

An addition to the Views Bulk Operations module: provides bulk updating of 'entity values': for example, filled-in text fields in content item, or categorization using Taxonomy

https://www.drupal.org/project/views_bulk_edit

16. Mobile Device Detection

Nowadays the responsive layout of your website is determined in the frontend: the html / css / js determines what it will look like on a certain screen format and also determines whether certain blocks are visible or not.

If you want to catch this on the basis of the website visitor's device, then take a look at this module. Depending on the device, you may or may not have certain Drupal blocks displayed to the website visitor, based on the device.

https://www.drupal.org/project/mobile_device_detection

17. Quick Link

Traced as a result of this blog: this module offers an implementation of the Quicklink library from Google Chrome Lab for Drupal. Quicklink is a lightweight JavaScript library (compressed less than 1 kb) that enables faster consecutive page loads by following in-viewport links.

How Quicklink works
Quicklink makes attempts to speed up navigation to subsequent pages. It:

  • Detects links within the viewport (using Intersection Observer)
  • Wait until the browser is inactive (with requestIdleCallback)
  • Checks whether the user has a slow connection.
  • Prefix of URLs to the links (using
    or XHR).

Under construction
The module has just been released and is currently under heavy construction, but absolutely one to watch.

https://www.drupal.org/project/quicklink

18. Freelinking

A 'looser' way for content managers to create links. By default you must enter a 'hard' link to a page, but after installing this Drupal module you can also use, for example, the page title, in which case you enter: [[nodetitle: Title of the Page]].

This module automatically turns this into a working link.

https://www.drupal.org/project/freelinking

19. Hook Event Dispatcher

There are several articles about why you have Drupal events or Drupal hooks They are both in Drupal 8, hooks are from the legacy era (Drupal 7 and earlier) and events originate from the Symfony framework which Drupal 8 is built on. The creator of this module believes that the hook system is outdated, but that is an ongoing discussion.

Anyway, this module ensures that Drupal dispatches some hooks as events, so that those hooks can be implemented as events. Because that way of implementation would be better. Among other things, it is about:

  • Entity hooks
  • Form hooks
  • Preprocess hooks

https://www.drupal.org/project/hook_event_dispatcher

20. Modules weight

Drupal executes code in modules on order of weights of modules. The module with the highest or lowest weight is executed first. As a result, it is possible that a certain code can overwrite each other because they have the same type of application. It is not possible to set which code has priority, so with the help of setting the module weight.

In the 'early Drupal 7 days' we did this by hand: directly adjust the values of the weights in the database, now there is a module for which you can simply configure this, nice:

https://www.drupal.org/project/modules_weight

Wrap up

That's it, for this month then. Hopefully you are well informed about the latest module releases and you will care a lot because 'there is a module for that'. For another xx cool Drupal modules - stay tuned next month!

Jun 25 2019
Jun 25

I recently had reason to switch over to using Docksal for a project, and on the whole I really like it as a good easy solution for getting a project specific Drupal dev environment up and running quickly. But like many dev tools the docs I found didn’t quite cover what I wanted because they made a bunch of assumptions.

Most assumed either I was starting a generic project or that I was starting a Pantheon specific project – and that I already had Docksal experience. In my case I was looking for a quick emergency replacement environment for a long-running Pantheon project.

Fairly recently Docksal added support for a project init command that helps setup for Acquia, Pantheon, and Pantheon.sh, but pull init isn’t really well documented and requires a few preconditions.

Since I had to run a dozen Google searches, and ask several friends for help, to make it work I figured I’d write it up.

Install Docksal

First follow the basic Docksal installation instructions for your host operating system. Once that completes, if you are using Linux as the host OS log out and log back in (it just added your user to a group and you need that access to start up docker).

Add Pantheon Machine Token

Next you need to have a Pantheon machine token so that terminus can run within the new container you’re about to create. If you don’t have one already follow Pantheon’s instructions to create one and save if someplace safe (like your password manager).

Once you have a machine token you need to tell Docksal about it.  There are instructions for that (but they aren’t in the instructions for setting up Docksal with pull init) basically you add the key to your docksal.env file:

SECRET_TERMINUS_TOKEN="HASH_VALUE_PROVIDED_BY_PANTHEON_HERE"

 Also if you are using Linux you should note that those instructions linked above say the file goes in $HOME/docksal/docksal.env, but you really want $HOME/.docksal/docksal.env (note the dot in front of docksal to hide the directory).

Setup SSH Key

With the machine token in place you are almost ready to run the setup command, just one more precondition.  If you haven’t been using Docker or Docksal they don’t know about your SSH key yet, and pull init assumes it’s around.  So you need to tell Docksal to load it but running:
fin ssh-key add  

If the whole setup is new, you may also need to create your key and add it to Pantheon.  Once you have done that, if you are using a default SSH key name and location it should pick it up automatically (I have not tried this yet on Windows so mileage there may vary – if you know the answer please leave me a comment). It also is a good idea to make sure the key itself is working right but getting the git clone command from your Pantheon dashboard and trying a manual clone on the command line (delete once it’s done, this is just to prove you can get through).

Run Pull Init

Now finally you are ready to run fin pull init: 

fin pull init --hostingplatform=pantheon --hostingsite=[site-machine-name] --hosting-env=[environment-name]

Docksal will now setup the site, maybe ask you a couple questions, and clone the repo. It will leave a couple things out you may need: database setup, and .htaccess.

Add .htaccess as needed

Pantheon uses nginx.  Docksal’s formula uses Apache. If you don’t keep a .htaccess file in your project (and while there is not reason not to, some Pantheon setups don’t keep anything extra stuff around) you need to put it back. If you don’t have a copy handy, copy and paste the content from the Drupal project repo:  https://git.drupalcode.org/project/drupal/blob/8.8.x/.htaccess

Finally, you need to tell Drupal where to find the Docksal copy of the database. For that you need a settings.local.php file. Your project likely has a default version of this, which may contain things you may or may not want so adjust as needed. Docksal creates a default database (named default) and provides a user named…“user”, which has a password of “user”.  The host’s name is ‘db’. So into your settings.local.php file you need to include database settings at the very least:

<?php
$databases = array(
  'default' =>
    array(
      'default' =>
      array(
        'database' => 'default',
        'username' => 'user',
        'password' => 'user',
        'host' => 'db',
        'port' => '',
        'driver' => 'mysql',
        'prefix' => '',
      ),
    ),
);

With the database now fully linked up to Drupal, you can now ask Docksal to pull down a copy of the database and a copy of the site files:

fin pull db

fin pull files

In the future you can also pull down code changes:

fin pull code

Bonus points: do this on a server.

On occasion it’s useful to have all this setup on a remote server not just a local machine. There are a few more steps to go to do that safely.

First you may want to enable Basic HTTP Auth just to keep away from the prying eyes of Googlebot and friends.  There are directions for that step (you’ll want the Apache instructions). Next you need to make sure that Docksal is actually listing to the host’s requests and that they are forwarded into the containers.  Lots of blog posts say DOCKSAL_VHOST_PROXY_IP=0.0.0.0 fin reset proxy. But it turns out that fin reset proxy has been removed, instead you want: 

DOCKSAL_VHOST_PROXY_IP=0.0.0.0 fin system reset.  

Next you need to add the vhost to the docksal.env file we were working with earlier:

 VIRTUAL_HOST="test.example.org"

Run fin up to get Docksal to pick up the changes (this section is based on these old instructions).

Now you need to add either a DNS entry someplace, or update your machine’s /etc/hosts file to look in the right place (the public IP address of the host machine).

Anything I missed?

If you think I missed anything feel free to let know. Particularly Windows users feel free to let me know changes related to doing things there. I’ll try to work those in if I don’t get to figuring that out on my own in the near future.

Jun 24 2019
Jun 24

The planned Drupal 9 release date is June 3, 2020. While the Drupal 9 branch is not yet open, we've been working on Drupal 9 ever since the release of Drupal 8.0.0 through our deprecation processes. In fact, that is our process to clean up and refactor our APIs.

For a PHP API to be removed we need to deprecate and introduce a replacement (as appropriate). For a module to be removed, we need to deprecate it and at least move it to a contributed module (or provide a replacement in core). For a JavaScript dependency to be removed (such as the already end of life jQuery UI), we need to deprecate it and provide a replacement, and so on. So what can we get rid of in Drupal 9 finally? Well, all the things marked deprecated.

Other than third party dependency updates, things not deprecated in Drupal 8 will stay in Drupal 9 and be subject to backwards compatibility support in Drupal 9 until its end of life (likely around the end of 2023).

And this is a good thing. We want stability with Drupal, we want people to invest and find their investments work with Drupal for a reasonable time. To completely answer my clickbait title though: how long do we have to "finally" get rid of something? Well as per Dries's DrupalCon Seattle keynote, we have until Drupal 8.8 to define what we are deprecating for (and thus removing in) Drupal 9. Here is the video snippet:

What does that mean in practice? 8.8.0-alpha1 is by when we need to get the API for Drupal 8.8.0 done and therefore the API of Drupal 9 done (other than third party dependency updates). And 8.8.0-alpha1 is scheduled for the week of October 14th, 2019.

In other words, you have 111 days to get your least favourite thing removed from Drupal. If not, well, we will live with backwards compatibility to what we have in October 2019 for 4 more years to come.
Jun 24 2019
Jun 24

It is crucial for website security and usability to determine who is allowed to view, edit, or delete content on your platform. Things become easier with the configuration of user access if you are using Drupal. This CMS offers out-of-the-box user roles, as well as contributed modules for such functionality.

Today, the team at WishDesk explores user access modules in Drupal 8 — the latest Drupal version.

What is user access?

User access means that the user possesses a particular role on a website that lets them access certain areas of the site, as well as see the specific elements displayed on each web page after logging into the site.

Top Drupal 8 user access modules

Here is a list of the most popular user access modules for Drupal 8. Check out this information before choosing one for your website! The choice of this module depends on the functionality you want to add.

top Drupal8 user access modules

  • Permissions by Term

Permissions by Term is the Drupal module that lets you restrict or allow access to the specific website content on the basis of taxonomy terms. These permissions can be applied to user roles, as well as individual users and work for nodes, views, menus, etc. With the help of this module, taxonomy terms can be coupled to specific accounts.
 

  • Node View Permissions

The Node View Permissions module simply adds two types of permissions to every content type: "View own content" and "View any content." Besides, it can be easily combined with other user access modules.

  • Menu Admin per Menu

If you need certain users to add, edit, or delete particular menus, without access to other menus, the Menu Admin per Menu module is for you. Note, that users without full admin permissions may not see all the menus, so you need to move the necessary items to the root of the Management menu or somewhere else where it can be seen by those users.

  • Block Content Permissions

The Block Content Permissions module allows you to set permissions to custom block types, as well as create, update, or delete specific types of block content.  

  • Protected Pages

Protected pages is the Drupal 8 user access module that allows the administrator to protect certain web pages with a password. Some interesting features include global password setting, session expire time setting, bypass permission to skip password protection, and more!

Configure user access on your website with WishDesk!

This is just some of the Drupal 8 user access modules available — the choice depends on the type of website you have and the content you provide. Our Drupal team is always here to choose the most suitable modules for your platform and configure it to meet all your needs. We can also create custom modules for you if none of the existing ones fulfill your requirements!

User access in Drupal 8 is easy, especially when you have a reliable web development agency at hand. Contact us for any kind of digital help or assistance.

Jun 24 2019
Jun 24

Store Drupal logs on Amazon S3 via hook_watchdog, so that you can get rid of heavy logs on your drupal database and can later read from the S3.

For this todo on Drupal

  • You should use the "hook_watchdog" hook, where this hook allows modules to route log events to custom destinations.
  • In our case, our custom destination will be S3.
  • Initially we need to get the access to AWS and appropriate S3 bucket.
  • Store the connection configuration details of S3 buckets in the Drupal.
  • In the hook_watchdog, read the S3 Auth configs.
  • Create a connection to AWS S3, on success it return back with the S3 object.
  • Check if any buckets exist to write the logs, of not you should create bucket on S3 for logs.
  • Next, Create a log directory and log file, populate it with the data came on hook_watchdog.
  • Next, Write to the S3 bucket with parameters which "putObject" expects.
  • Next, Remove the log directory & file which is created in the process.
  • Check the S3 bucket via S3 UI, you could see the logs

Here's the piece of code, via we log to S3.

watchdog(
    'module_2',
    t('Info: Successfully completed.'),
    array($data),
    WATCHDOG_INFO
);
watchdog(
    'module_3',
    t('Error: Issue while processing.'),
    array($exception, $data),
    WATCHDOG_ERROR
);

Here, the piece of code which helps to connect & write log's to S3.

<?php

use \Aws\S3\S3Client;

/**
 * Implement hook_watchdog
 * @param array $log_entry
 */
function audit_watchdog(array $log_entry) {
    // Set the modules which needs to be logged to S3
    $modules = array(
        'module_1',
        'module_2',
        'module_3',
    );
    if (in_array($log_entry['type'], $modules)) {
        if(isset($log_entry) && !empty($log_entry)) {
            // Get the S3 config details
            $s3_config = variable_get("s3_config");
            $s3_bucket = $s3_config->s3_bucket;
            $s3_region = $s3_config->s3_region;
            $s3_key = $s3_config->s3_key;
            $s3_secret = $s3_config->s3_secret;
            try {
                if (!empty($s3_bucket) && !empty($s3_region) && !empty($s3_key) && !empty($s3_secret)) {
                    // Create AWS connection
                    $s3 = create_aws_connection($s3_region, $s3_key, $s3_secret);
                    if (!empty($s3) && is_object($s3) && $s3 != FALSE) {
                        if ($s3->doesBucketExist($s3_bucket)) {
                            $log_path = 'public://logs/to_aws';
                            // Create log directory
                            $dir_path = create_aws_log_directory($log_path);
                            // Create log file
                            $file_path = create_aws_log_file($log_entry, $dir_path);
                            // Get the name of log file
                            $keyname = get_keyname_for_log_file($log_entry['severity'], $file_path);
                            // Store the log file to S3
                            $s3->putObject([
                                'Bucket' => $s3_bucket,
                                'Key' => $keyname,
                                'Body' => '',
                                'SourceFile' => $file_path,
                            ]);
                            // Remove the directory & file created
                            if (is_dir($dir_path)) {
                                rmdir_recursive($dir_path);
                                rmdir_recursive('public://logs');
                            }
                        }
                    }
                }
            }
            catch (Exception $e) {
                // Exception is ignored so that watchdog does not break pages during the
                // installation process or is not able to create the watchdog table during
                // installation.
            }
        }
    }
}

function create_aws_connection($s3_region, $s3_key, $s3_secret) {
    $s3 = new S3Client([
        'version' => 'latest',
        'region'  => $s3_region,
        'credentials' => [
            'key'    => $s3_key,
            'secret' => $s3_secret,
        ]
    ]);
    $buckets = $s3->listBuckets()->get('Buckets');
    if (isset($buckets) && !empty($buckets)) {
        return $s3;
    }
    else {
        return FALSE;
    }
}

function create_aws_log_directory($log_path) {
    if (!is_dir($log_path)) {
        mkdir($log_path, 0777, true);
        chmod($log_path, 0777);
    }
    return $log_path;
}

function create_aws_log_file($log_entry, $dir_path) {
    $content = json_encode($log_entry);
    $log_file_name = $log_entry['type'] . '-' . date("Y-m-d-H-i-s") . '-' . preg_replace("/^.*\./i","", microtime(true)) . '.log';
    $file_path = $dir_path . '/' . $log_file_name;
    $log_file = fopen($file_path, "w");
    $write_log_file = fwrite($log_file, $content);
    $close_log_file = fclose($log_file);
    $chmod_log_file = chmod($file_path, 0777);
    return $file_path;
}

function get_keyname_for_log_file($severity, $file_path) {
    $watchdog_array = array(
        "0" => "WATCHDOG_ERROR",
        "1" => "WATCHDOG_INFO",
    );
    return 'drupal-logs/' . $watchdog_array[$severity] . '/' . basename($file_path);
}

function rmdir_recursive($dir) {
    foreach(scandir($dir) as $file) {
        if ('.' === $file || '..' === $file) continue;
        if (is_dir("$dir/$file")) rmdir_recursive("$dir/$file");
        else unlink("$dir/$file");
    }
    rmdir($dir);
}

Advantage of having Logs on S3

  • Reduce the number of DB log entries on Drupal database.
  • Completely Keep the Audit system outside Drupal, So Prod instance will play smooth.

Cheers :)

Jun 24 2019
Jun 24

When seven out of the world’s top 10 universities choose Drupal as their preferred partner in the vital task of creating and maintaining their websites, it’s safe to assume that the platform has much to offer even the best universities.

A good website saves on costs and optimizes the user experience of its visitors. All told, it’s a vital asset that few organizations can be without.

In this article, we’ll be going through the top 10 universities that built their websites using Drupal, an open source platform known for producing remarkable digital experiences. Drupal’s scalability and capacity for large amounts of content make it the number one choice for top universities all over the world.

1. Oxford University

In a fast-paced environment where broad functionality is key, Oxford University’s website is a testament to Drupal’s ability to host multiple sites and tasks while letting each department have control of its own web presence.

From information on admissions and university research to current news & events, the Oxford University website is a one-stop platform where faculty, students, and alumni alike can stay in the loop when it comes to life both on and off-campus.

Oxford University

2. Harvard University

The words ‘Ivy League’ call to mind a certain sense of prestige and tradition. Harvard University’s website brings these features to life with a distinct look and feel that communicates the Harvard brand to visitors right from the homepage.

Drupal’s friendly user interface enables Harvard administrators to design pages, host media, and post content in a way that allows branding consistency across the entire site.

Harvard University website

3. MIT

Best known for its programs in engineering and the hard sciences, the Massachusetts Institute of Technology maintains a competitive culture, encouraging its undergraduates to pursue their own original research.

Like all sites built on Drupal, The MIT website is strikingly well-equipped for site protection and data privacy. Institutions like MIT, which work hard to preserve the safety of their student and faculty records, trust the Drupal CMS for eliminating the risk of breaches. In fact, many corporations, non-government organizations, and state agencies choose Drupal for its strong safety and security capabilities.

MIT Website

4. Stanford University

Higher education websites tend to require different access privileges for a wide range of contributors, and Stanford University’s website demonstrates Drupal’s ability to provide ease of management and sharing content across various portals and sites. The Stanford website features a significant amount of content from its many offices and departments.

Stanford University Website

5. Duke University

Duke University takes pride in being a global institute of learning that houses perspectives from all over the world. The university ensures that this core belief translates into their online presence by building their website with Drupal, a CMS known for catering to a multilingual demographic.

Since Drupal operates in more than 110 languages, the platform provides an outstanding translation module that enables higher education institutions such as Duke University to cater to the global needs of their students and faculty.

Duke University Website

6. UCLA

UCLA is known for advancing knowledge and addressing social needs by fostering an environment full of diverse perspectives. The university extends the pursuit of these goals to their website, which houses rich content that’s accessible to all.

The UCLA website demonstrates how Drupal makes reusing and circulation content quick and easy. After the creation of a particular bit of content, website users are able to circulate it effortlessly through departments, intranets, and subsites.

UCLA website

7. University of Arizona

Drupal allows for powerful collaboration that supports both educational and research departments. As the University of Arizona prides itself on being a global and student-centered university, its website enables its faculty and students to access manuals, procedural forms, and research updates with no fuss or frills.

The University of Arizona’s website remains to be one of their key tools in the pursuit of their goal of community-wide collaboration to help solve critical challenges we face today.

University of Arizona Website

8. Penn State

A major public university that serves Pennsylvania and the global community, Penn State aims to make its online presence widely accessible. Built with Drupal, the Penn State website allows for responsive mobile access. In an always-on, mobile-first environment, the Penn State website paves way for great and functional communication that translates across all kinds of mobile devices.

Penn State University

9. University of British Columbia

With the university’s purpose of pursuing excellence in research to foster global citizenship, the University of British Columbia continuously works for the advancement of a sustainable and just society across the globe.

One of their most crucial tools in this regard is a website that hosts rich content on their core institutional objectives and accomplishments. Drupal allows the UBC website to access a wide range of people across different communities by enabling seamless integration from their website to different social media platforms.

University of British Columbia

10. University of Toronto

In the same way that Drupal allows non-experts to easily create and manage amazing websites, the platform also enables the creation of websites with sophisticated and user-friendly journeys.

The University of Toronto’s website demonstrates Drupal’s ability to allow for a platform that’s deceptively easy to navigate and browse through. For institutes of higher education, this feature matters greatly as users ought to have an easy time accessing information on a university’s website.

U of T website

Drupal continually demonstrates high levels of functionality, security, scalability, and flexibility in every way, and it’s no surprise, then, that Drupal is considered the foremost platform for developing higher education websites.

Finally, it’s worth mentioning that universities looking to use Drupal to jump-start their digital presence or revamp an existing website should consult with experts for a comprehensive assessment of where to begin. The platform is intuitive, but expert guidance can go a long way when making a digital transformation.

Jun 24 2019
Jun 24

Introduction


Hi, I am Artem and I am front-end developer. In my everyday work, I face with the styling of Drupal sites.

In this article, I am going to share my experience in integrating dynamic imports, splitting code into small chunks in Drupal 8. Also, I am going to show you how to write a webpack plugin that automatically connects these chunks with Drupal. With this plugin, you will not worry about the new chunk that needs to be connected, whether it is some js module or a piece of CSS.

What you need for comfortable usage of sites

When you open a web page, you definitely pay attention to its loading speed. Of course, no one wants to look at a blank page that is going to show you a super design with interesting animations but it takes ages to load. There can be many reasons for the long loading and not all of them are directly related to the size of the code that the browser is trying to load and execute. But the size of a bundle still plays a big role, especially with the advent of http2, where the main emphasis is put on speeding up multi-threaded loading of small packages.

So how can we deliver the code to the browser as efficiently as possible so that it does not overload and does not get anything else instead of the desired content? Try to answer this question by considering the chunks and dynamic imports solution.

Chunks and dynamic imports in Drupal

What we mean by “Chunks and dynamic imports”: it is splitting one large piece into smaller ones and having them lazy loaded if needed. Let's see how it can be implemented in Drupal 8 with examples.

I decided to keep up with the trends in our beloved front end world and write a config for the webpack dividing our bundle into two, to begin with: one for the Browser-That-Must-Not-Be-Named, the other for modern browsers that support all the main features of ES6 without compiling. 

Jun 24 2019
Jun 24

We’re looking for training partners to propose quality, in-demand trainings for the DrupalCon Minneapolis lineup!

Jun 23 2019
Jun 23

The summer of 2019 gave a reason for the Delhiites to rejoice. This time as one of the most conspicuous open source technology events of India, DrupalCamp was back after a sabbatical of two years, in Delhi.

DrupalCamp Delhi was a two-day conference that happened on 15-16 June at JNU Convention Centre. The event proudly hosted 350+ people, 20+ sessions, 7+ Founders speakers, and 3 trainings and a Drupal contribution sprint. Sponsored by 7 top Drupal companies across India and partnered by 10 technology/open source communities, DCD had some power packed Drupal talks by the brightest minds in Drupal and in India.

As an insignia of community inclusiveness, it had the presence of specially-abled artists from KPCT Foundation.

null

Participants appreciated the spectacular paintings by specially abled people from Kalpana Charitable Trust (KPCT)

We started with the prenote where we introduced DrupalCamp Delhi and discussed the flow of event. More importantly, we threw light on the very beginning of Drupal, the first Drupal event in Antwerp and how DrupalCamp community has grown to 1.3 million people globally.

Following this, the Keynote was delivered by Sudhanshu Mani, the man behind the conceptualization, engineering and manufacturing of India’s first engineless train, Train18.

 

null

He enthralled the audience by sharing his journey (talking about culture, structure and processes) as the General Manager of the Integral Coach Factory (ICF) and some to-the-point Shayari.

Day 1 witnessed a total of 18 sessions ranging from business & leadership, community, frontend & web design, coding & development, CI/CD & QA automation, beyond Drupal and case studies. People loved the session by Mathieu Spillebeen on - Frontend United: The energy of the people- which also took the audience by surprise since it was a virtual session. The attendees participated throughout by asking questions through the online platform, Slido.

null

Mathieu Spillebeen in action

Another notable event in the camp was the launch of Drupal India Association (DIA), by Shyamala Rajaram, a local chapter for Drupalites to contribute in India.

null

The official launch of DIA

At Birds of a Feather (BOF), we discussed the reasons for the inability to contribute to the community and what should be the action plan. Participants didn’t shy away from stating that it was the lack of exposure, mentorship and time which was holding them to contribute effectively.

Two parallel workshops were also running throughout the day for - beginners in Drupal and content writers.

Day 2 was filled with sessions, contribution workshops on Drupal and Gatsby, BoF, and Trivia Night. The day gave way to camp’s second keynote speaker Prashant Singh, VP - Product Management PayTM, take the podium to talk about the importance of technology in building a better track for India.

DSC_0133

Prashant Singh, VP - Product Management PayTM talking about the importance of technology in building a better India

The Contribution Sprint by Axelerant let people know how and why is it important for them to contribute to Drupal as much as possible. The two-hour-long contribution sprint, which was guided by mentors, saw people from coding as well as non-coding backgrounds joining to network with peers.

The event wrapped up with Drupal Trivia, which kept the audience engaged with some mind-boggling Drupal questions. It was adorable to see two cute kids join as co-hosts, to Tanisha and Akanksha, and were adamant to share no clue when asked for one! The winners of the evening were announced and team Srijan won by answering maximum questions right.

null

Team Srijan with hosts and the prize

#DCD19 remains special to my heart, for being able to carry out the whole thing successfully, whilst bringing in new set of volunteers to contribute, and for receiving a special note of appreciation from Shyamala Rajaram, Director and Co-founder Unimity Solutions.

null

 

Community events fuelled by passion, such as DCD, are always special. Here’s why:

null

 

For professionals, organisations and students, this is the best way to learn and reinforce your commitment to Drupal. These events create leaders, showcase the importance of non-code contributions and help us in propagating Drupal around the globe. DrupalCamp Delhi would be bigger and better in 2020. Would you be with us?

Time for a groupfie!

null
Jun 23 2019
Jun 23

Starting a new Drupal 8 project? And the first thing you might do is to install a module, but which one first. There are a few obvious ones to install and sometimes these have no relation with the functionality of your project but they always help you in the background.

But why do we install them? It's simple, they make our life easy while we are implementing the universe of features into our Drupal website. But then you always miss some of those life-saving modules and only install them when you feel the pain.

Now here is my list of Drupal 8 modules which will make your life smooth and you should install them as soon as you see that welcome message on the home screen.

  1. Admin Toolbar
  2. Environment Indicator
  3. Config Split
  4. Module Filter
  5. Site Settings and Labels

1. Admin Toolbar

Project page: https://www.drupal.org/project/admin_toolbar

Availability: Drupal 8

Downloads: 133157+

Okay, this was obvious! It was always annoying to go through all those pages to reach the manage field of a content type. In Drupal 7, Administration Menu module came to the rescue but in Drupal 8 it's Admin Toolbar which does the job perfectly. Admin Toolbar module integrates with the core's toolbar module and provides a drop-down menu for easy access to the menu items in the Administration menu. Just install and forget about it.

2. Environment Indicator

Project page: https://www.drupal.org/project/environment_indicator

Video: https://www.youtube.com/watch?v=8WbP9ZYxAx0

Availability: Drupal 8 | Drupal 7

Downloads: 18314+

Remember the time when you accidentally change settings or updated content on the wrong environment, thinking you are in the local environment. For these situations, the Environment Indicator module comes to the rescue. This module simply adds colors to the Drupal admin toolbar to indicate which environment you are working on.

You can simply configure different colors for different environments to differentiate like Development (Green), Staging (Orange) and Production (Red). Just try it and you will see how often you leave the wrong environment tab open in your browser.

3. Configuration Split

Project page: https://www.drupal.org/project/config_split

Tutorial: https://www.daggerhart.com/drupal-8-configuration-management-with-config-split/

Availability: Drupal 8

Downloads: 18816+

Drupal 8 introduced configuration management in the core to allow export of database configurations in YML files. But what if we don't want to keep everything same on all environment, maybe you want some development modules on configurations different for the local environment.

For these situations, Configuration Split does the job for us. This module allows you to create groups of configurations that you want to separate from the rest of the configuration. 

4. Module Filter

Project Page: https://www.drupal.org/project/module_filter

Availability: Drupal 8 & Drupa 7

Downloads: 327,907+

One of the first things you do on a first install is to go to the modules listing page and enable or disable modules. But with time this list of modules becomes so big that you start searching for it in browser search. So the best solution is to use the Module Filter module to search for the required module with a search box on the module listing page.

Another feature of the Module Filter module is that it provides a horizontal view for the module list page where modules are categories with their package. This makes it easy to just simply click on the package tab to see what module are available in it. This was the must-have module in Drupal 7 and this functionality was incorporated in Drupal 8 but adding this module also allows to list you modules with category tabs and gives you permissions filter on the permissions page.

5. Site Settings and Labels

Project Page: https://www.drupal.org/project/site_settings

Availability: Drupal 8

Downloads: 641

With Drupal 8 all settings start to save into configuration and we export configuration. But if you want to have a configuration which can be changed whenever needed without the fear of overriding it on next config import.

"Site Settings and Labels" module is something you can use in your Drupal 8 project if you are in the same situation. This module allows you to set settings as content with the features and feel of Drupal 8 configuration system . So remember this module as this could be your secret weapon on your next Drupal 8 project.

In the comment, let me know which one is your favorite or if I missed your go-to module for a fresh Drupal 8 installation.

Pages

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web