We just ran into the Drupal 8 CMS Error message: Drupal 8 Bug: The module standard does not exist. in Drupal\Core\Extension\ExtensionList->get()
Creating a webform modal is quite simple and straight forward in Drupal 8. We only need the Webform module and some classes for the modal opening button: Download and install https://www.drupal.org/project/webform Create a webform
Today I'd like to discuss a little Drupal 8 snippet to dynamically load an entity from the controller by the current path. This acts a bit like a Drupal 8 replacement for Drupal 7's menu_get_object(). Use case / example:
Several times in the last months we had the requirement to prepopulate a Drupal 8 webform with a parent entity ID from the URL. For example we had forms to register for events which we embedded on the node page as paragraphs or blocks and wanted to set an entity reference field to the node ID programmatically.
Setting a dynamic views exposed filter can be done via hook_form_FORM_ID_alter() regularly if it's just a prepopulation of the views exposed filter form. But if you wish to immediately run the filters using better_exposed_filters auto-submit when the view is loaded you have to use hook hook_views_pre_build(). Otherwise setting the #default_value is just too late. Use the following code:
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 parent product and set the correct product ID (here "10"):
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 (#51) address viewsreference ...
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):