Skip to content

Instantly share code, notes, and snippets.

View rigoucr's full-sized avatar

Rodrigo Espinoza B. rigoucr

View GitHub Profile
@rigoucr
rigoucr / db_log.patch
Created August 5, 2019 20:32
Custom patch for monolog module at Gooverseas
Index: modules/contrib/monolog/src/Logger/Handler/DrupalHandler.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/contrib/monolog/src/Logger/Handler/DrupalHandler.php (date 1558648851000)
+++ modules/contrib/monolog/src/Logger/Handler/DrupalHandler.php (date 1558648897000)
@@ -42,18 +42,23 @@
* {@inheritdoc}
*/
@rigoucr
rigoucr / metatag-header.patch
Last active August 5, 2019 20:24
Custom patch for the metatag module of gooverseas | Remove canonical tag from response headers (SEO rec) |https://www.drupal.org/project/metatag/issues/2908119
Index: modules/contrib/metatag/metatag.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/contrib/metatag/metatag.module (date 1531265292000)
+++ modules/contrib/metatag/metatag.module (date 1531265471000)
@@ -14,7 +14,6 @@
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
@rigoucr
rigoucr / entity_ref_tab_formatte-1_2-legacy-patch.patch
Created July 23, 2019 19:57
Gooverseas: entity_ref_tab_formatte-1_2-legacy-patch
diff --git a/src/Plugin/Field/FieldFormatter/EntityReferenceTabFormatter.php b/src/Plugin/Field/FieldFormatter/EntityReferenceTabFormatter.php
index e574175..484f590 100644
--- a/src/Plugin/Field/FieldFormatter/EntityReferenceTabFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/EntityReferenceTabFormatter.php
@@ -4,10 +4,14 @@ namespace Drupal\entity_ref_tab_formatter\Plugin\Field\FieldFormatter;
use Drupal\Component\Utility\Html;
use Drupal\Field\FieldConfigInterface;
+use Drupal\Core\Entity\EntityDisplayRepositoryInterface;
use Drupal\Core\Field\FieldItemInterface;
@rigoucr
rigoucr / group_gnode_permissions_node_access_grant.patch
Created April 26, 2017 19:12
Temporal patch for the group module (beta5)
diff --git a/modules/gnode/gnode.module b/modules/gnode/gnode.module
index d184243..daaf206 100644
--- a/modules/gnode/gnode.module
+++ b/modules/gnode/gnode.module
@@ -151,7 +151,7 @@ function gnode_node_grants(AccountInterface $account, $op) {
if ($group->hasPermission("view $plugin_id entity", $account)) {
$grants_m["gnode:$node_type_id"][] = $gid;
}
- elseif ($group->hasPermission("view unpublished $plugin_id entity", $account)) {
+ if ($group->hasPermission("view unpublished $plugin_id entity", $account)) {
@rigoucr
rigoucr / interdiff-groups-2736233-72-85.patch
Created April 7, 2017 22:05
Interdiff for infoagro subgroups
diff -u b/modules/ggroup/src/GroupMembershipSubscriber.php b/modules/ggroup/src/GroupMembershipSubscriber.php
--- b/modules/ggroup/src/GroupMembershipSubscriber.php
+++ b/modules/ggroup/src/GroupMembershipSubscriber.php
@@ -143,14 +143,14 @@
$user = $event->getUser();
$memberships = $event->getMemberships();
$supergroup_ids = [];
-
+ $user_groups_ids = [];
foreach ($memberships as $membership) {
@rigoucr
rigoucr / group-add_subgroups_module-2736233-85-custom.patch
Created April 6, 2017 16:53
Custom patch for Groups 8.1.0-beta4
diff --git a/group.services.yml b/group.services.yml
index a26a87f..d82c9da 100644
--- a/group.services.yml
+++ b/group.services.yml
@@ -70,7 +70,7 @@ services:
- { name: 'context_provider' }
group.membership_loader:
class: 'Drupal\group\GroupMembershipLoader'
- arguments: ['@entity_type.manager', '@current_user']
+ arguments: ['@entity_type.manager', '@current_user', '@event_dispatcher']
<html>
<head>
<title>HOLA MUNDO!</title>
</head>
<body>
<h1>HOLA MUNDO!</h1>
</body>
</html>
@rigoucr
rigoucr / config.yml
Created February 1, 2017 02:31
Config File for UCR training
install_atom: false
install_keepassx: true
install_chrome: true
install_slack: true
install_dropbox: true
install_spotify: true
install_node: false
install_ruby: false
# PHP configuration.
@rigoucr
rigoucr / config.yml
Last active December 12, 2016 17:37
Yml config file for the monitorsngr Vagrant machine
---
# `vagrant_box` can also be set to geerlingguy/centos6, geerlingguy/centos7,
# geerlingguy/ubuntu1404, geerlingguy/ubuntu1204, parallels/ubuntu-14.04, etc.
vagrant_box: geerlingguy/ubuntu1404
vagrant_user: vagrant
vagrant_synced_folder_default_type: nfs
# If you need to run multiple instances of Drupal VM, set a unique hostname,
# machine name, and IP address for each instance.
vagrant_hostname: monitorsngr.dev
/**
* Set value for field_seccion_general to the nodes that not have this field set.
*/
function incae_custom_functions_update_7003(&$sandbox) {
if (!isset($sandbox['progress'])) {
$entities = incae_custom_functions_get_unset_field_seccion_genenal_entities('node');
$sandbox['max'] = count($entities) - 1;
$sandbox['limit'] = 100;
$sandbox['entities'] = array_values(node_load_multiple($entities));