Skip to content

Instantly share code, notes, and snippets.

View pianomansam's full-sized avatar

Samuel Oltz pianomansam

View GitHub Profile
@pianomansam
pianomansam / SA-CORE-2026-014-9.5.patch
Created October 14, 2026 17:10
SA-CORE-2026-014 Patch for Drupal 9.5.11
diff --git a/modules/field_ui/src/Element/FieldUiTable.php b/modules/field_ui/src/Element/FieldUiTable.php
--- a/modules/field_ui/src/Element/FieldUiTable.php
+++ b/modules/field_ui/src/Element/FieldUiTable.php
@@ -69,7 +69,10 @@ class FieldUiTable extends Table {
unset($list[$name]);
// Determine the region for the row.
- $region_name = call_user_func_array($row['#region_callback'], [&$row]);
+ $region_name = $row['region']['#value'] ?? '';
+ if (!isset($regions[$region_name])) {
@pianomansam
pianomansam / ViewWorkout.php
Created November 18, 2021 14:54
Drupal 9 BareHtmlPageRenderer example
<?php
namespace Drupal\f15_workout\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\node\NodeInterface;
use Drupal\Core\Render\BareHtmlPageRenderer;
/**
@pianomansam
pianomansam / Hidden.tsx
Last active January 17, 2023 16:04
Chakra UI Hidden Component
import { ReactNode, useState, useEffect } from 'react';
import { chakra, useTheme } from '@chakra-ui/system';
import { VisuallyHidden } from '@chakra-ui/react';
import { useMediaQuery } from '@chakra-ui/react';
type HiddenProps = {
above?: string;
below?: string;
visually?: boolean;
remove?: boolean;
@pianomansam
pianomansam / gist:3d2edd7b7aba48f766e6a425ad2cf73d
Created May 29, 2019 18:06
# 3057975 - Broken NULL and NOT NULL operator on exposed image fid field
$view = new view();
$view->name = 'articles';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'articles';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
options:
suppress: true
input:
files:
- '/var/log/*.log'
- '/var/log/**/*.log'
inputFilter:
- module: grep
config:
matchSource: !!js/regexp /access.log/