Recent changes from field_group 1.4 to 1.5 have resulted in failing builds on TravisCI for PHP7.
< 'group_bean_highlight|bean|highlight|default' => array(
< 'api_version' => 1,
< 'bundle' => 'highlight',
< 'data' => array(
< 'children' => array(
< 0 => 'field_bean_highlight_description',
< 1 => 'field_bean_highlight_image',
< ),
< 'format_settings' => array(
...
< ),
< 'group_bean_slide_caption|field_collection_item|field_bean_slide_collection|default' => array(
---
> '' => array(
PHP7 changed their Uniform Variable Syntax (according to this section of a PHP7 reference document). After updating the offending section inside _field_group_get_default_formatter_settings()
inside field_group.module
, my exports inside my features packages were working again.
From the document: Code that relied upon the old evaluation order must be rewritten to explicitly use that evaluation order with curly braces (see middle column of the above). This will make the code both forwards compatible with PHP 7.x and backwards compatible with PHP 5.x
Comment | File | Size | Author |
---|---|---|---|
#5 | php7_uniform_variable-2649648-5.patch | 1.14 KB | sylus |
Comments
Comment #2
sylus CreditAttribution: sylus commentedComment #3
sylus CreditAttribution: sylus commentedComment #4
sylus CreditAttribution: sylus commentedComment #5
sylus CreditAttribution: sylus commentedAttaching patch.
Comment #6
Tess BakkerNice patch, works!
Comment #7
Tess BakkerComment #8
seanBThis was bugging me as well. I have to switch to PHP5 to get my features exported or else I will lose my fieldgroups.
Patch works! +1
Comment #9
MrHaroldA CreditAttribution: MrHaroldA as a volunteer and at ezCompany commentedCommited to DvG too! Tnx!
http://cgit.drupalcode.org/dvg/commit/?id=5621f6347f577ea05531074ceea78a...
Comment #10
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commented#5 works fine for me too, thx
Comment #11
heddnI had the exact same patch in #2661484: field_group_field_group_to_hook_code PHP 7 support. So +1 on RTBC.
Comment #12
nils.destoop CreditAttribution: nils.destoop as a volunteer and at Wunder commentedThx for the patch. Committed it to dev.
Comment #15
klausiComment #16
marcoka CreditAttribution: marcoka commentederror fixed. thank you.
Comment #17
giupenni CreditAttribution: giupenni commentedFixed, thank you
When new stable release?
Comment #18
aminorking CreditAttribution: aminorking commentedAny news on getting a stable release for this?
Comment #19
dman CreditAttribution: dman as a volunteer and at Sparks Interactive commentedA tagged release would be nice.
Thanks.
Comment #20
interestingaftermath CreditAttribution: interestingaftermath as a volunteer commentedConfirmed this worked for me to fix the Features Overridden issue. Tagged release! :)
Comment #21
yasir.arefin CreditAttribution: yasir.arefin commentedFixed, Thanks.
Comment #22
oriol_e9gSame problem with Features Overridden and the patch fixes the noticies.
Comment #23
Pete B CreditAttribution: Pete B commentedIs there anthing blocking a stable release containing this and https://www.drupal.org/node/2318197 both of which are RTBC? I am willing to help get a stable release out.
Comment #24
owenbush CreditAttribution: owenbush commentedTested this patch today on 7.x-1.5
It worked as expected and I had no further issues.
Comment #25
pingevt CreditAttribution: pingevt at Bluecadet commentedThis worked for me!
Comment #26
edwin.van.buuringenPatch works for php 7.1.1, thnx!
Comment #27
rivimeyBump... stable release please as per #23?
Just hit this problem myself.
Comment #28
alexrayu CreditAttribution: alexrayu commentedThis is a critical thing, features lose fieldgroups without it. Please include in a stable release!
I only have two pending issues - Global Warming and this.
Comment #29
wylbur CreditAttribution: wylbur at Electric Citizen commentedThere's an open issue calling for a stable release.
https://www.drupal.org/node/2869084
Comment #30
donquixote CreditAttribution: donquixote as a volunteer commentedIt seems this does fix the problem.
But I would recommend using local variables for clarity instead, e.g. for
$identifier = $export['identifier'];
.