Skip to content

Instantly share code, notes, and snippets.

@wizonesolutions
wizonesolutions / gist:2657961
Created May 11, 2012 06:44 — forked from rocketeerbkw/gist:1591483
Test Drupal FAPI does not receive date when name attribute is removed
<?php
function stripe_test_menu() {
$items = array();
$items['stripe-test'] = array(
'title' => t('Stripe Test'),
'page callback' => 'drupal_get_form',
'page arguments' => array('stripe_test_form'),
'access callback' => TRUE,
@wizonesolutions
wizonesolutions / README.md
Last active December 10, 2015 04:28 — forked from anonymous/mymodule.install.php
Bridging code from Field Collection patched with earlier patches that provided revision support (ones that used item_id). Pick and choose the update logic that you need in your use case.

Bridging code from Field Collection patched with earlier patches that provided revision support (ones that used item_id). Pick and choose the update logic that you need in your use case.

Change the update numbers as is appropriate in your custom module. This should go in your .install file.

Update 7006 adds the archived field.

Update 7007 only applies if you used a version of the patch that made the primary key on the fields item_id instead of value like it used to be. It migrates data from field_data_(field name)item_id and field_revision(field name)_item_id ('item_id') to corresponding _value ('value') columns. You have to update your code to access Field Collections using 'value' instead of 'item_id' again. If you previously fixed it in reverse, you're basically undoing that.

Update 7008 drops the item_id column from the field tables, and it adds the item_id index to field_collection_item_revision that wasn't in all of the patches.