Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
hey
i'm using Flag 2.0-beta3 on drupal 6.
Reportedly the API has changed:
Update
The flag notforsale is currently using the Flag API version 1, which is not compatible with the current version of Flag. You can upgrade this flag by pasting the below code into uc_notforsale_flag_default_flags() function in the uc_notforsale.module file.
Flag exports:
$flags = array();
// Exported flag: "Not for sale".
$flags[] = array (
'content_type' => 'node',
'name' => 'notforsale',
'title' => 'Not for sale',
'global' => true,
'types' =>
array (
0 => 'product',
),
'flag_short' => 'Remove from sale',
'flag_long' => '',
'flag_message' => 'This product is no longer available in the store.',
'unflag_short' => 'Make available for sale',
'unflag_long' => '',
'unflag_message' => 'This product is now available in the store.',
'unflag_denied_text' => '',
'link_type' => 'toggle',
'roles' =>
array (
'flag' =>
array (
0 => '2',
),
'unflag' =>
array (
0 => '2',
),
),
'show_on_page' => false,
'show_on_teaser' => false,
'show_on_form' => true,
'access_author' => '',
'i18n' => 0,
'status' => false,
'locked' =>
array (
'name' => 'name',
'global' => 'global',
'status' => 'status',
),
'module' => 'uc_notforsale',
'api_version' => 2,
);
return $flags;
so the code needs to be updated.
Comment | File | Size | Author |
---|---|---|---|
#7 | uc_notforsale.patch | 1.82 KB | lpalgarvio |
#7 | uc_notforsale.module.txt | 4.82 KB | lpalgarvio |
#4 | uc_notforsale.patch | 2.16 KB | lpalgarvio |
#4 | uc_notforsale.txt | 4.73 KB | lpalgarvio |
#4 | uc_notforsale-6.x-1.4-LPCA.tar_.gz | 8.14 KB | lpalgarvio |
Comments
Comment #1
lpalgarvio CreditAttribution: lpalgarvio commentedupdated for v1.4:
confirmed to be working after patching.
replaced .module file included.
Comment #2
lpalgarvio CreditAttribution: lpalgarvio commentedComment #3
joachim CreditAttribution: joachim commentedThanks for letting me know.
I'll start a 2.0 branch soon to follow changes in Flag 2.0.
Comment #4
lpalgarvio CreditAttribution: lpalgarvio commentedmade a patch for v1.4
submiting it plus the resulting modified .module file and a tar.gz packing everything
Comment #5
joachim CreditAttribution: joachim commentedThanks for looking further into this.
The indentation is wrong on the new code in the patch...
Comment #6
lpalgarvio CreditAttribution: lpalgarvio commentedi copy-pasted what Flag v2 module suggested (which did work).
i don't know the coding standards, but i'll look into them sometime later.
Comment #7
lpalgarvio CreditAttribution: lpalgarvio commentedhad forgotten about this.
fixed.
Comment #8
Todd Zebert CreditAttribution: Todd Zebert commentedsubscribe
Comment #9
mariagwyn CreditAttribution: mariagwyn commenteduploaded modified code, seems to fix problem. A release?
Comment #10
joachim CreditAttribution: joachim commentedYes, good point :)
Though I note that Flag 6.x-2.x is still in beta! Don't blame me if it all blows up...
Issue #908358 by LPCA: Changed Flag API has changed.
Comment #11
joachim CreditAttribution: joachim commented