Skip to content

Instantly share code, notes, and snippets.

View rfay's full-sized avatar

Randy Fay rfay

View GitHub Profile
<fieldset class="group-somefields collapsible collapsed"><legend class="collapse-processed"><a href="#">somefields</a></legend><div class="fieldset-wrapper"><div id="edit-field-text2-0-value-wrapper" class="form-item">
<label for="edit-field-text2-0-value">text2: </label>
<input type="text" class="form-text text" value="" size="60" id="edit-field-text2-0-value" name="field_text2[0][value]">
</div><div id="edit-field-text1-0-value-wrapper" class="form-item">
<label for="edit-field-text1-0-value">text1: </label>
<input type="text" class="form-text text" value="" size="60" id="edit-field-text1-0-value" name="field_text1[0][value]">
</div></div>
</fieldset>
function asin_field_views_data($field) {
$data = field_views_field_default_views_data($field);
// Skip items that are already in the views data.
$field_skips = array_keys($data);
array_unshift($field_skips, 'table', 'entity_id', 'revision_id');
foreach ($data as $table_name => $table_data) {
foreach ($table_data as $field_name => $field_data) {
if (!in_array($field_name, $field_skips)) {
7.x-1.0-beta6
=============
[#987986] by dereine: Improve views title handling.
[#1071902] by rfay: Catch up with Views 3 API changes and fix broken handlers
7.x-1.0-beta5
===========
[#1014036] by Pancho: First take on token support: Remove non-working code
[#1060704] by Pancho: Refactor admin test form: error handling, UX and codestyle
@rfay
rfay / gist:957513
Created May 5, 2011 17:51
drush/repack
rfay@dc:/var/www/api.drupalcommerce.org$ git repack -a
Counting objects: 119389, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (24616/24616), done.
Writing objects: 100% (119389/119389), done.
Total 119389 (delta 88401), reused 119374 (delta 88399)
rfay@dc:/var/www/api.drupalcommerce.org$ git status
error: object directory /home/rfay/.drush/gitcache/objects does not exist; check .git/objects/info/alternates.
fatal: bad object HEAD
fatal: git status --porcelain failed
@rfay
rfay / README.txt
Created May 22, 2011 03:09
Rebasing a topic branch
This is just a quick setup to rebase a topic branch.
@rfay
rfay / README.txt
Created May 22, 2011 03:11
Simple rebase of topic branch
This is a simple demonstration of rebasing a topic branch.
api = 2
core = 6.x
projects[drupal][patch][simpletest_core] = http://drupalcode.org/project/simpletest.git/blob_plain/refs/heads/6.x-2.x:/D6-core-simpletest.patch
projects[] = coder
projects[] = coder_tough_love
projects[simpletest][download][type] = git
projects[simpletest][download][revision] = c4d3a3ec
projects[project_issue_file_review][version] = 2.4
projects[project_issue_file_review][patch][] = http://drupal.org/files/issues/pifr_2.2_pgsupport.patch
/**
* Implements hook_feeds_processor_targets_alter().
*
* On behalf of commerce_product_reference.module.
*/
function commerce_product_reference_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
module_load_include('inc', 'commerce_feeds', 'mappers/commerce_product_reference');
_commerce_product_reference_feeds_processor_targets_alter($targets, $entity_type, $bundle_name);
}
@rfay
rfay / gist:1038981
Created June 21, 2011 21:44
rules data
data
O:17:"RulesReactionRule":13:{s:9:"\0*\0parent";N;s:2:"id";s:2:"12";s:12:"\0*\0elementId";i:1;s:6:"weight";s:1:"0";s:8:"settings";a:0:{}s:4:"name";s:38:"rules_increase_stock_when_an_item_is_r";s:6:"module";s:5:"rules";s:6:"status";s:1:"1";s:5:"label";s:52:"Increase stock when an item is removed from the cart";s:11:"\0*\0children";a:1:{i:0;O:11:"RulesAction":6:{s:9:"\0*\0parent";r:1;s:2:"id";N;s:12:"\0*\0elementId";i:3;s:6:"weight";i:0;s:8:"settings";a:1:{s:25:"commerce_line_item:select";s:18:"commerce_line_item";}s:14:"\0*\0elementName";s:36:"commerce_stock_increase_by_line_item";}}s:7:"\0*\0info";a:0:{}s:13:"\0*\0conditions";O:8:"RulesAnd":8:{s:9:"\0*\0parent";r:1;s:2:"id";N;s:12:"\0*\0elementId";i:2;s:6:"weight";i:0;s:8:"settings";a:0:{}s:11:"\0*\0children";a:0:{}s:7:"\0*\0info";a:0:{}s:9:"\0*\0negate";b:0;}s:9:"\0*\0events";a:1:{i:0;s:28:"commerce_cart_product_remove";}}
Error message
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /home/rfay/workspace/commerce/includes/install.inc). Backtrace:
drupal_install_profile_distribution_name() system.admin.inc:794
system_modules(Array, Array)
call_user_func_array('system_modules', Array) form.inc:770
drupal_retrieve_form('system_modules', Array) form.inc:314
drupal_build_form('system_modules', Array) form.inc:187
drupal_get_form('system_modules')
call_user_func_array('drupal_get_form', Array) menu.inc:503