Rochen FTP

FTP with TLS/SSL 21


"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? geolocation.install:53

"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? geolocation.install:53 [warning]
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? geolocation.install:100 [warning]
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? geolocation.install:110 [warning]





Copy the contents of a folder to another folder in a different directory

cp -a /source/. /dest/

The -a option is an improved recursive option, that preserve all file attributes, and also preserve symlinks.

The . at end of the source path is a specific cp syntax that allow to copy all files and folders, included hidden ones.


Broker Ratings & Price Targets

Strong Buy: This recommendation constitutes one of the broker’s best picks, with the stock expected to significantly outperform the market – typically by at least 20%.
Buy: Another fairly strong conviction that the shares are inexpensive relative to its expected future performance. Appreciation of more than 10% is typically expected.
Speculative Buy: This recommendation is characterised by high levels of risk but also the possibility of high levels of return providing certain business goals come to fruition.

Update Drupal commerce 2 website

Backup to Acquia dev desktop local site

Take a copy of htaccess to preserve customisation

-- On local site --

navigate to directory above public_html

run composer outdated or composer outdated 'drupal/*'

composer update --with-dependencies drupal/commerce drupal/commerce_price drupal/commerce_product drupal/commerce_order drupal/commerce_payment drupal/commerce_payment_example drupal/commerce_checkout drupal/commerce_tax drupal/commerce_cart drupal/commerce_log drupal/commerce_store drupal/commerce_promotion drupal/commerce_number_pattern

Drupal 8 Twig cheatsheet

## Drupal 8 Twig cheatsheet

### Getting Drupal 8 field values in Twig

Image path: `{{ file_url(content.field_name['#items'].entity.uri.value) }}`

Image title text: `{{ node.field_name.title }}`

Entity Reference path: `{{ content.field_tags[0]['#url'] }}`


### Check if field is filled


Layout Builder module

Entity Browser
Entity Browser block
Block blacklist
Manage class with taxonomy
Views layout


Dev Desktop db workround

Go to user

Open .aquia/DevDesktop/DrupalSettings/ to swap in database name

Open phpmyadmin to assign database permission to drupaluser


Allow login by username or email on checkout login form

To answer my own question, this is possible using the email registration module.

install dev version
apply patch from here
go to /admin/config/people/accounts and check the checkbox: Allow log in with email address or username.
go to /admin/commerce/config/checkout-flows and replace the default login with the login provided by this module
Optionally, the patch from this issue will allow for the username to be entered on registration.

mamaye linktxt FileLink.php in Theme / bootstrap / src / Plugin / preprocess


namespace Drupal\bootstrap\Plugin\Preprocess;

use Drupal\bootstrap\Bootstrap;
use Drupal\bootstrap\Utility\Element;
use Drupal\bootstrap\Utility\Variables;
use Drupal\Core\Link;
use Drupal\Core\Url;
use Drupal\file\Entity\File;

* Pre-processes variables for the "file_link" theme hook.
* @ingroup plugins_preprocess
* @BootstrapPreprocess("file_link",
* replace = "template_preprocess_file_link"
* )
class FileLink extends PreprocessBase {


Cron run failed

Open up your PHPMyAdmin
Find semaphore table
Delete cron row

Turn on cron logging
See which cron stuck


Composer nodev

If you have separate dev/staging and production servers, ensure you copy/commit both your composer.json and composer.lock files to production and always run composer install --no-dev on production, rather than update. (The --no-dev switch will stop any packages listed in 'require-dev' from being installed, typically modules for debugging and libraries for unit/behavioral testing.)

Install local composer and drush update

2. increase ram if needed
3. Locally, create a directory and download composer
4. Run locally php composer.phar require drush/drush:8.x
5. do the same on the remote server, in directory above public_html
upload the composer.json and composer.lock files from the local directory in the remote directory
5. Run remotely php composer.phar install
6. Run remotely ../vendor/drush/drush/drush status, cr, ups, up drupal
7. Run updates.php

Mavic air connection issue

Phone - Developer mode - click About Phone Build 7 times
Enable USB debugging mode
Set USB options to MTP
Disable lock screen


zip gz tar on mac terminal

ZIP – Cross Platform
First up is ZIP one of the most commonly used compression techniques used across all platforms

To compress

zip -r folder_to_compress
To extract

If you want to make a zip without those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files, use the “-X” option in the command so:


Adding Twig Template Suggestions for Form Elements

* @param $suggestions
* @param array $variables
function mytheme_theme_suggestions_input_alter(&$suggestions, array $variables) {
$element = $variables['element'];

if (isset($element['#attributes']['data-twig-suggestion'])) {
$suggestions[] = 'input__' . $element['#type'] . '__' . $element['#attributes']['data-twig-suggestion'];

How to include javascript on single pages in Drupal 8 in a way that is amenable to scale.


Following Steps will make working with External JavaScript libraries in Drupal 8 absolutely clear (including how to conditionally load it in specific pages):

Step 1: Place the JavaScript file in your theme or module inside a folder called js. After this step your folder structure must look like :

Step 2: If your theme already has a my-theme.libraries.yml file open it, if not create it.

In Drupal 8 Libraries are simply collections of CSS or JS files bundled together under a uniquely identified library name.

Twig expression operator

Expressions can be used in {% blocks %} and ${ expressions }.


Drupal 7 php 7.2 updates


Admin menu
Webform Patch
Features / Patch in the case of Distro like Commerce Kickstart
Field Group
Field Collection


Getting Drupal 8 field values in Twig

Master list (in progress) of how to get parts of fields for use in Twig templates. I’m always having to look these up, so I thought I’d hash them out and write them down.
UPDATED: March 28, 2018 to add more fields, fix errors, and re-organize the content.
UPDATED: Jan 16, 2020 to add Link field type.
NOTE: These techniques are only tested in node.html.twig templates.
Taxonomy/Entity Reference


Subscribe to Front page feed