-
Working on a GovCMS 7 Site
I have not yet worked on any GovCMS site 7 or 8. I haven’t worked on Drupal 7 site in a while as well. Last week, at work, I was working on a support ticket for site which was built using GovCMS 7. Setup Account Setup I had to set up a couple of accounts first which is always fun. It is nice to see GovCMS Projects site is set up using GitLab di...
-
Drupal Contribution Report, Week 09, 2021
This week I was quite busy with the work so didn’t get a chance to contribute a lot. Bug Smash Initiative Griffyn and Lee pinged me on Monday to run bug smash fortnightly meeting. I haven’t run one in a while. I like running the meetings, so I said yes even though I knew my Tuesday was going to be busy, and it was. I was performing a technical...
-
Drupal Contribution Report, Week 08, 2021
Let’s try something new… When I set the site up, I though what would be a good idea for daily updates? I came to conclusion, how about weekly Drupal contribution updates. It will be challenging, every Saturday you have to think back what you have contributed, but let’s go with it. 🙂 Bug Smash Initiative This week was interesting, at the start...
-
Using the Drupal Diff Component in Custom Forms
Drupal 8 comes with a Diff component in core. It's mainly used for showing changes to configuration or content revisions. However, it can be used in other ways too. Here are some quick steps to show how to use the Diff component in your custom forms or controllers.
-
JSON:API in Drupal 8.8 is up to 3x faster than Drupal 8.7
Drupal 8.8.0 will be released in December 2019 and the upcoming changes in JSON:API module codebase introduce huge performance benefits.
-
Introducing Drupal Testing Traits: Drupal extension for testing existing sites
Drupal allows writing tests for installation profiles. A profile can have sample content which is created during installation, like umami in Drupal core. Drupal allows writing tests for modules as well. A module can also have sample content which is created during installation or config import.
Drupal Testing Traits allows writing tests for an already installed site. A site with content types and content. You can write tests for the all the pages in your site in different viewports and test user interactions aka JavaScript tests. -
How to keep your Drupal 8 contributed modules ready for Drupal 9
In this blog post, we'll have a look at how contributed Drupal modules can remove the core deprecation warnings and be compatible with both Drupal 8 and Drupal 9.
-
Testing Drupal with WebDriver browser mode vs Headless browser mode
There is not a lot of documentation available about what's the difference between running a browser in WebDriver mode vs Headless so I did some digging...
-
How to create and expose computed properties to the REST API in Drupal 8
In Drupal 8.5.0, the "processed" property of text fields is available in REST which means that REST apps can render the HTML output of a textarea without worrying about the filter formats.
In this post, I will show you how you can add your own processed fields to be output via the REST API. -
Migrating Drupal 7 File Entities to Drupal 8 Media Entities
The Drupal 8.3.x branch is getting ready to introduce a new experimental media module. This will bring enhanced media handling in Drupal 8. The closest solution in Drupal 7 to handle media is the file entity module. Now is the time to discuss migrations from file entity in Drupal 7 to media entities in Drupal 8. For core, there is already an issue for this, but for contrib... there is no migration. So, I wrote one.
-
Native PHPStorm Drupal Test Runner
PHPStorm has a lot of built in test runners, but it doesn't support Drupal's Simpletest test runner. In this blog post we'll see how we can execute Drupal tests inside PHPStorm using Drupal test runner.
-
Handling Errors in Complex Drupal Form Validation
Recently, I have been working on a site with a big multi-step form that is using a lot of custom form elements, custom auto-completes, custom form api states and ajax based sub-forms. It is all built using Drupal form api. The best thing about this form is that all the fields and sub-forms map to a data model.
-
How to index panelizer node pages using Drupal Apache Solr module
Apache Solr Search is a great module for integrating your Drupal site with the powerful Apache Solr search tool. Out of the box it can index nodes and their fields, but Panelizer pages won't be indexed. In this post I show how you can get around this by indexing the rendered HTML of a panelizer node page.
-
Report from Drupal Camp Islamabad
After Drupal Camp Lahore and Drupal Camp Islamabad earlier this year, I was once again inivited to Drupal Camp Islamabad to present a session on Drupal 8 as a framework.
-
Vagrant, PHING, core development and automation
At PreviousNext we rely heavily on vagrant for development environments and phing for performing automated tasks to speed up site building and project development. These tools are hugely beneficial in the long run. In this blog we'll have a look at how we as drupal core developers can automate the tedious tasks like site install/ re-install, testing, coding standards validation and enable modules.