πŸ‡¨πŸ‡¦Canada @ibullock

London, ON
Account created on 27 April 2011, over 13 years ago
#

Recent comments

πŸ‡¨πŸ‡¦Canada ibullock London, ON

I've tried #22 and it seems to work well for my use case at least (Adding to CSP domains list)

πŸ‡¨πŸ‡¦Canada ibullock London, ON

We've started running into similar problems with other forms and this seems to be related to Site Studio or the theme in place so I'm closing this.

πŸ‡¨πŸ‡¦Canada ibullock London, ON

I got here looking for this exact feature. Would be particularly useful for Site Factory installs where the term IDs may not be consistent for each new site.

πŸ‡¨πŸ‡¦Canada ibullock London, ON

+1 for RTBC, been using in the wild for a few months now without issue.

πŸ‡¨πŸ‡¦Canada ibullock London, ON

Re-rolling patch for 2.1

πŸ‡¨πŸ‡¦Canada ibullock London, ON

ibullock β†’ made their first commit to this issue’s fork.

πŸ‡¨πŸ‡¦Canada ibullock London, ON

ibullock β†’ made their first commit to this issue’s fork.

πŸ‡¨πŸ‡¦Canada ibullock London, ON

+1 RTBC - Would be nice to get a release

πŸ‡¨πŸ‡¦Canada ibullock London, ON

Hi Jenny - Here's a look at what we ended up implementing. It actually changed a little since I created this issue so that we could include nested bricks in the cache invalidation. You'll need to change the field machine name at the very least, but hopefully it helps!

/**
 * Implements hook_entity_presave().
 */
function mymodule_components_entity_presave(Drupal\Core\Entity\EntityInterface $entity) {
  if ($entity->getEntityType()->id() == 'node' && $entity->field_components !== NULL) {
    $bricks = $entity->field_components->referencedEntities();
    foreach ($bricks as $brick) {
      Cache::invalidateTags(array('brick:' . $brick->id()));
    }
  }
}
Production build 0.71.5 2024