Weblog aka "Blog"

Snippet: Drupal 8 Commerce: Product variation assign in DB

20.03.2018 - 11:20

Short snippet to restore product variation assignments (references) in Drupal 8 Commerce after an SQL error has occured on product save, which left product variations orphaned.

Fix all product variation relationships having no...

Drupal 8 Field Type Schema column add / change / delete HOOK_update

14.02.2018 - 19:04

As heavily discucced in this years old issue: [#937442] there isn't a good solution or helper in Drupal core currently to change the schema of a custom field.

Modules like

  • field_collection
  • dynamic_entity_reference (#...

Drupal 7 Snippet: Photoswipe: Only output first image of image field, but show the rest in swipe gallery

15.12.2017 - 15:20

Simple snippet to only output the first image of an imagefield in a view and show the rest of the gallery in the photoswipe overlay.

Hint: Don't forget to add the photoswipe-gallery class on the field wrapper in views settings:...

Drupal 8: Looping through EntityReferenceItem(s) / EntityReferenceRevisionsItem(s) to get Target Entities is wrong

17.11.2017 - 11:11

I just had the case to iterate over EntityReferenceRevisionsItem's which are similar to EntityReferenceItem to get the target entities,

My code snippet was (WRONG EXAMPLE):

...

Drupal 8 solving composer problems like "Can only install one of ..."

05.10.2017 - 11:10

I've been running into problems with composer several times now in combination with Drupal 8 projects. This blog post shares my problem solving solutions.

"Can only install one of ..." when updating...

FIX: VMWare Workstation: Touch Scroll with Synaptics Touchpad not working in Ubuntu virtual machine on Windows 10 host

07.06.2017 - 11:08

Recently I ran into the issue that touch scrolling on my virtual development machine did not work at all.

Typically I'm using a mouse with scroll wheel but on vacation I'm using the touchpad.

My hard / software environment:

...

Google Search Console mobile 404 errors for non-existing pages

23.01.2017 - 13:22

In the last days we had the situation that a website reported 404 mobile URLS that were neither ever existing nor used anywhere. These URLs seemed to be wrongly generated ghost URLs by Google.

Drupal 7: Ensure HOOK_node_view is not called by search indexing

22.11.2016 - 15:34

When using HOOK_node_view() you should take care because when the search (Search API especially) is indexing, this hook is also being called. You can not rely on a user displaying the node display currently. Here's a way to ensure this...

...
Syndicate content