Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Just a notice: When using the Fences module and overriding the default classes with Fences’ single field-NAME class the BEM style replacements in omega_preprocess_field() are not working.
Adding this in hook_preprocess_field() is fixing it:
$variables['classes_array'] = str_replace('field-', 'field--', $variables['classes_array']);
Comment | File | Size | Author |
---|---|---|---|
#2 | omega_wants_bem_classes_also_when_using_fences_module-2027709.patch | 700 bytes | criz |
Comments
Comment #1
fubhy CreditAttribution: fubhy commentedCan you provide a patch for that?
Comment #2
crizhere is a patch
Comment #3
msmithcti CreditAttribution: msmithcti commentedWe were previously using that exact line in field.preprocess.inc, however we replaced it (commit: 5127876) with specific replacements for each, and then were even more specific using preg_replace() (commit: 030d691).
I need to have a think about the best way to target this class, without being to generic (as we were before).
Comment #4
fubhy CreditAttribution: fubhy commentedJust committed http://drupalcode.org/project/omega.git/commit/d99d559 which should fix this. I simply improved the regex and turned it into a single one.
Comment #6
ianthomas_ukThis should really be highlighted in the release notes (https://drupal.org/node/2068077 or https://drupal.org/node/2087583 - they seem to list the same issues), as anyone who has written css against older versions will need to update their selectors.
I suggest adding "This release fixes Fences block-element-modifier classes, so field-foo-bar becomes field--foo-bar." above the change list.
I'm not really sure what the appropriate status for this would be, setting as RTBC to hopefully get attention from the maintainers (as it needs to be changed by one of them).
Comment #7
GiorgosKJust installed fences with latest omega 4 release and it seems FENCES is doing nothinganybody else sees this ?
EDIT: disregard, I though fences would modify forms as well ...
Comment #8
steinmb CreditAttribution: steinmb as a volunteer commentedI'm not a maintainer but I consider this fixed. Cannot see anything more to do.