Skip to content

Instantly share code, notes, and snippets.

View dsnopek's full-sized avatar

David Snopek dsnopek

View GitHub Profile
@@ -518,9 +668,9 @@ function anninc_atrium_spaces_get_nid_from_storeid($storeid) {
$result = $query->execute();
// Grab store ID and return.
- if (is_array($result) && count($result) && !empty($result['node'])) {
- $store = array_shift($result['node']);
- return $store->nid;
+ if (is_array($result) && !empty($result['node'])) {
+ $nids = array_keys($result['node']);
+ return $nids[0];
// Get information about this Space or Groups roles.
$og_roles = array_flip(og_roles('node', $space->type, $space->nid));
$og_admin_rid = $og_roles[OG_ADMINISTRATOR_ROLE];
// NOTE: This presumes the user is already a member
og_role_grant('node', $space->nid, $account->uid, $og_admin_rid);
diff --git a/panopoly_core.make b/panopoly_core.make
index 6345b25..3b25108 100644
--- a/panopoly_core.make
+++ b/panopoly_core.make
@@ -42,7 +42,7 @@ projects[views_bulk_operations][subdir] = contrib
projects[pathauto][version] = 1.2
projects[pathauto][subdir] = contrib
-projects[pathauto][patch][936222] = http://drupal.org/files/pathauto-persist-936222-130-pathauto-state.patch
+projects[pathauto][patch][936222] = http://drupal.org/files/issues/pathauto-persist-936222-195-pathauto-state.patch
img.resize-proportionally {
display: block;
max-width: 80%;
width: 80%;
height: auto;
}
#!/bin/bash
# Make it so that we can use the ssh-agent forwarding (ie. use my host machine's
# keys while developing on this VM).
chmod -R 777 `dirname $SSH_AUTH_SOCK`
exec sudo -i -u aegir
<?php
$type = 'product_kit';
$field = 'field_availability';
$value = 'in stock';
$result = db_query("SELECT nid, vid FROM {node} WHERE type = :type", array(':type' => $type))->fetchAllAssoc('nid');
foreach ($result as $nid => $values) {
$fields = array(
'entity_type' => 'node',
'bundle' => $type,
WD features: Revert completed for anninc_atrium_profile / profile2_type. [notice]
Fatal error: Maximum execution time of 240 seconds exceeded in /var/www/vhosts/anninc-atrium/htdocs/includes/menu.inc on line 2779
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Maximum execution time of 240 seconds exceeded in /var/www/vhosts/anninc-atrium/htdocs/includes/menu.inc, line
2779
ERROR: Could not install Ann Inc. Atrium
@dsnopek
dsnopek / panelizer-modify.php
Created May 6, 2014 21:54
Shows how to modify the Panels display on a node.
$nid = 123;
$node = node_load($nid);
$display =& $node->panelizer['page_manager']->display;
foreach ($display->content as $pid => $pane) {
if ($pane->uuid == 'd195a038-1e7d-45e7-9232-22e4c6f4da3e') {
$display->content[$pid]->configuration['path'] = 'blerg';
}
}
Stderr from the command:
WARN: Tue May 06 20:59:47 +0000 2014: Ignoring configured merge_behavior
WARN: Tue May 06 20:59:47 +0000 2014: Must have 'deep_merge' gem installed.
WARN: Tue May 06 20:59:50 +0000 2014: Ignoring configured merge_behavior
WARN: Tue May 06 20:59:50 +0000 2014: Must have 'deep_merge' gem installed.
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install java-1.7.0-openjdk' returned 1:
Error Downloading Packages:
libXfont-1.4.5-3.el6_5.x86_64: failure: Packages/libXfont-1.4.5-3.el6_5.x86_64.rpm from updates: [Errno 256] No more mirrors to try.
diff --git a/panopoly_search.install b/panopoly_search.install
index cc425ef..450ab98 100644
--- a/panopoly_search.install
+++ b/panopoly_search.install
@@ -27,9 +27,9 @@ function panopoly_search_uninstall() {
*/
function panopoly_search_update_dependencies() {
$deps = array();
- // We need search_api_solr_update_7102() to run before panpoly_core_update_7002().
- $deps['panopoly_core'][7002] = array(