Docker is an open source platform for system administrators and developers to build, ship and to run distributed applications, whether its on the cloud, data center VMs, or on the laptops. Docker helps to automate the deployment of Linux applications inside software containers.
Technical Blog
Everyone knows Drush is a very important tool in Drupal development, to execute things faster and to manage Drupal websites remotely. Drupal specifically built its shell function to update its configurations, managing modules, running drupal updates, etc.
When I planned to use media upload in CKeditor for uploading files to the site, I faced one problem, i.e. I could use only predefined image style as a preset to style my image. I wanted to use a custom preset to media upload. To achieve that we have to do some customization.
Add the following custom code in our custom module.
While setting up local environments for Drupal 8, everyone may find difficulty in login to the site, if the password is unknown
In Drupal core there is a script file that return the hashed password, which is core/scripts/password-hash.sh.
Run the following command to get the hashed string for '123' in the terminal.
./core/scripts/password-hash.sh 123
Update the returned string in the password field in the user's table for required users via command line or any MySQL (or any database systems like PostgreSQL, MariaDB, MongoDB) GUI tools.
Drupal scores better than most platforms for Online Marketing success. For a large part of the online marketing community, this might sound cynical owing to popular Drupal myths. However, Drupal is one of the most powerful content management platforms enjoying a high ranking.
Drupal SEO-friendly features help websites achieve better ratings on the search engine for the same kind of content. On the periphery, Drupal does this through several inbuilt features:
While working on a Drupal 8 project we suddenly encountered this error after pushing the site to the development server. This had not occurred in our local machines which caught us off guard. A little debugging on the error log revealed the cause of this Drupal message.
If you encounter this error unexpectedly, the first thing you should do is to check the error log of the server which is what we did. However, if you do not have access to the error log it and if the issue is only occurring in a particular server after deployment then it is most likely to be a DB issue.
You can create your custom color box styles instead of using a plugin provided styles. For creating custom color box style go to /sites/all/modules/contrib/color box/styles copy any one of the folders. (You can find plain, default, and Stockholm syndrome styles there).Place the copied folder into your theme folder. Rename the folder with your custom name. Also, rename the CSS and js files.
Drupal 8 was released on Nov 19th, 2015. Though Drupal 6 end of life was declared on February 24th, 2016, there are still over 84,845 Drupal 6 websites on the web.
What does end of Life Mean for Drupal 6?
As per Drupal 6 end of life, the security team will no longer provide support or security advisories for Drupal 6 and the core of Drupal 6 will no longer receive community support.
In one of my project I want to create user roles programmatically and the role should be enable and disable while module install and uninstall process. So first of all I need to create a YAML file based on the user role name with necessary definitions. The name of the YAML file should be the format user.role.sample.yml. Here sample is my user role id. To make the role enable and disable while module installation and uninstall we have to add dependency with enforced property.
You might be getting the most from your Drupal 6 website, but with versions 7 and 8 already on full gear, you might hurt your web presence sooner than later.
Drupal 7 And 8 Offerings You Cannot Disregard
It’s time to make a planned move to a more recent Drupal version now. Some of the features that make Drupal 8 move worthwhile include:
Better Content Management Experience
The content management experience is even more flexible and efficient with in place editing and advanced image handling.
To load a node details using its id in Drupal 8 use the following syntax:
$node_details = Node::load($nid);
$node_details->field_FIELD_NAME->value;
I want to programmatically create taxonomy vocabulary and it should be enabled and disabled while the module installs and uninstalls the process. So first of all I have created a YAML file based on the vocabulary name with necessary definitions.
In this article lets see how to import and export translation strings to Drupal site. Drupal uses the .po (portable object) and .pot (portable object template) extensions for the translation files. Difference between .po and .pot files:
To process very large data is very much time-consuming, it may lead to PHP timeout error. To process very large data, Drupal offers a batch API. The Batch API allows you to run one or more operations on a large set of data without timeout and feedback on the progress of the operation.
Advantage of Batch API:
Avoid PHP timeout.
Display the progress of the process.
Avoid out of memory situations.
Let's look a simple example in Drupal 6 that use batch API:
We were asked to provide an estimate for a Joomla client who wanted to know the feasibility of converting their Joomla site to Drupal. Before we provide an estimate it is our practice to review the existing setup of the client. The version of the CMS is what we check first when we do the review. Read on to know how to know the version of Joomla sit without admin access.
Advanced REST Client API is used to test interaction between various levels of software components. Testing is done using the API endpoints validation is performed based on the return value. Response can be Success true or Success false which can be tested by common testing techniques.
Drupal 8's routing system works with the Symfony HTTP Kernel. To do basic route operations, you don't need to learn very much about the Symfony HTTP Kernel.
Routing system in Drupal 8 is introduced by replacing the routing parts of hook_menu() in Drupal 7, and its parts, used for creating tabs, menu entries, contextual links, access arguments and actions are taken over by other sub-systems of YAML files (.yml) that provide metadata about each item and its corresponding PHP classes that serves the underlying logic.
This article covers, how to send email programmatically in your Drupal 8 site. There are two main steps to send an email using Drupal 8. First we need to implement hook_mail() to define email templates and the second step is to use the mail manager to send emails using these templates. Let's see an example for sending an email from the custom module, also the following name spaces.
DrupalCon Dublin is right around the corner, and the preparations are going full steam ahead. DrupalCon is like a Carnival that has come to town for the Drupal developers especially those in Europe. The excitement is rocketing sky high with a thousand and one things to get done before the 26th of September. The conference is to be held at The Convention Centre Dublin, Ireland from 26th September to the 30th September.
In one of my Drupal 8 work I needed to configure SMTP using swiftmailer Module. The module extends the basic mail sending functionality which is provided by Drupal by delegating all mail handling to Swift Mailer library. This library provides features, such as :