Planet Drupal

Reusable content in Paragraphs

Submitted by Unifex on

While it's not possible to reuse paragraphs you can create a paragraph type that mimics this behaviour.

Prep reusable content.

  1. Create your various Custom Block Types at Administration > Structure > Block layout > Custom block library. This should already have a Basic block.
  2. Create your reusable content using these block types at Administration > Structure > Block layout. Click Add custom block, select the Block type you want, fill in the content for it.

Add a Block Paragraph Type.

Why is my entity untranslatable?

Submitted by Unifex on

Drupal has pretty good multilingual support out of the box. It's also fairly easy to create new entities and just add translation support through the annotation. These things are well documented elsewhere and a quick search will reveal how to do that. That is not what this post is about. This post is about the UX around selecting which fields are translatable.

Where is drush?

Submitted by Unifex on

Part of me is suspecting that I may be one of the lucky 10,000 today but I figure it's worth putting this out there because if I wasn't aware of this then there may be others too. It turns out that the version of Drush that you just installed may not be the version of Drush that executes your command.

NoOp migration destination plugin

Submitted by Unifex on
The NoOp destination plugin was needed because the NullDestination plugin appears to not work on purpose.

ValueFromCsv migration process plugin

Submitted by Unifex on
I had a Drupal 8 migration where there was some data that was available, but not available from the source DB. However, I was able to get this data in a separate CSV file and a value in the source db was available in this CSV file also. So I had a way around the issue.

SkipOn404 migration process plugin

Submitted by Unifex on
This process plugin was created due to a dodgy source repository.  Not all the files were available and the default file_copy plugin would crash and burn if the source was not there.  This plugin can be used in the process section of a Drupal 8 migration like this;