This post is about Drupal 7 – Learn how to add CSS classes to blocks in Drupal 8.
alert()statements throughout your code. We now have inspectors, debuggers, and other tools that make things much easier. And you've probably encountered
console.logand the power of JS consoles. This can provide some good insight into what's going on with your code, but there is a catch.
Creating comments programmatically in Drupal 8 is incredibly easy once you know just which fields are required and why. In Drupal 8, comments are now full-featured, fieldable entities — just like nodes or taxonomy terms. In addition to unifying the way we create content, comments, and other entities, this has made Drupal’s commenting system much more robust and flexible.
When building an event management application recently, we ran into a number of time zone related issues. For example: two logged in users could see different times for the same event. Here's how we fixed it (and all the other annoying bugs we found along the way).