Problem/Motivation

Exporting breakpoint groups with features leads to some inconsistent output.
There are notices about missing variables and the relation between breakpoint groups and breakpoints isn't exported at all.
Further the export in the UI heavily differs from that in features.

Proposed resolution

Add breakpoints_breakpoint_group_export() as export callback to the schema definition of breakpoint groups.
Refactor breakpoints_breakpoint_group_export() to only export the machine names and not the whole class of the related breakpoints. Further adjust the output to respect the coding standard as well as respect the indent of the export context .
Modify breakpoints_admin_breakpoint_group_export_form() to display dedicated textareas for the breakpoint group export and the related breakpoints.

Remaining tasks

All those changes are done in the attached patch.
Review needed, I'm not sure if I covered all export scenarios.

User interface changes

The form for the breakpoint group export (admin/config/media/breakpoints/groups/%group/export) contains two textareas now. One for the breakpoint group and one for the related breakpoints.

API changes

none

CommentFileSizeAuthor
breakpoints-fix-export.patch3.92 KBdas-peter
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lukas von Blarer’s picture

Works for me.

attiks’s picture

Status: Needs review » Fixed

Thanks, fixed in latest dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Bart Vanhoutte’s picture

Status: Closed (fixed) » Needs work

Has this patch been committed? Still have the error with both latest dev and recommended versions:

Notice: Trying to get property of non-object in breakpoints_breakpoint_group_export() (line 642)

Jelle_S’s picture

Status: Needs work » Postponed (maintainer needs more info)

When do you get the error? I tried both exporting through the UI as with Features module and both worked fine.

Meanwhile I added hook_features_export for breakpoint_group so that when a breakpoint group is exported with features, its breakpoints are automatically detected as a dependency and exported as well.

attiks’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
znerol’s picture