Came a cross a minor features export issue that comes up when items in the profile are multiline.
It seems that normally when features_var_export() is being called and comes across a multiple-line string, it should convert newline symbols from '\n' to '***BREAK***', so keep indenting from being messed up:

For whatever reason, it seems this isn't happening with wysiwyg profiles, particularly with the 'css_classes' item:

Not sure exactly what's happening yet, but this surfaced when we started getting code review failures, as it was outputting like so;

  'css_classes' => 'Checkbox=checkbox
    Hide for mobile=hide-for-mobile
    Image Float Left = img-left
    Image Float Right = img-right',

Manually converting the output to use `***BREAK***` notation fixes the coder review issue, and `drush features-diff` is none the wiser:

'css_classes' => 'Checkbox=checkbox***BREAK***Hide for mobile=hide-for-mobile***BREAK***Image Float Left = img-left***BREAK***Image Float Right = img-right',

Anyhow, I can't see the issue yet, but I might try to look into it later.


TwoD’s picture

Status: Active » Postponed (maintainer needs more info)

Could this be a line-ending issue? features_var_export() only converts \n to ***BREAK*** and ignores \r. Could it be that the field value didn't include any \n characters and the line breaks were actually \r characters?

kenorb’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)