Enable Testing module in Drupal 8 site.
Fix "non-existent config entity name returned by FieldStorageConfigInterface::getBundles()"
Normally it will show that a field belongs to a non existing bundle for a node, comment etcetra in log post migration.
Solving a field that does not belong to non existent bundle in a node, example, field_agenda present in a non existent bundle makemeeting of node type
The images uploaded by users may not be of ideal size and may require compression to manage server space. There are some tools available for compressing JPG and PNG files.
Please note that the owner changes to the current username for the file after compression. Please remember to change ownership if required of the file or per folder post compression.
Optimize a jpg image with the same name
Optimize all jpg images in a folder
Check if an entity has been flagged:
/**@var \Drupal\flag\FlagService $flag_service */
$flag_service = \Drupal::service('flag');
$flag = $flag_service->getFlagById($flag_id);
Get all flagging users for an entity and flag:
$flagging = $flag_service->getFlaggingUsers($entity, $flag); // $flag is optional
Flag an entity:
Automated creation, renewing of certificates is provided by software called certbot.
To view a list of the certificates Certbot knows about, run the certificates subcommand:
$> certbot certificates
$> certbot delete --cert-name example.com
Install Certificates Using Apache
Associating your local repo to a repo in third party Git repository, say Bitbucket.
Step 1: Switch to your repository's directory
Step 2: Connect your existing repository to Bitbucket
If you are using Ubuntu and want to set a different version for php, considering multiple version of php is installed in your system
sudo update-alternatives --set php /usr/bin/php7.0
Set php7.0 as the default version.
Check if field exists in a node
Get value of a field: