When exporting a stylizer style with Features, the style code is created with an "empty" filename, probably attributed to the fact that the "version" and "api" strings are empty.

Steps to repeat:

1) Create a style in the stylizer admin interface.
2) Create a new feature, and select the stylizer style you just created.
3) Download + untar.

What you get:

1) the feature_name.info file produces

features[ctools][] = "stylizer::"

2) the hook_ctools_plugin_api in feature_name.features.inc contains:

  if ($module == "stylizer" && $api == "") {
    return array("version" => );
  }

3) while the contents of the file containing hook_default_stylizer look good, the file is "nameless":

feature_name..inc
CommentFileSizeAuthor
#4 stylizer-n1155310.patch520 bytesjwilson3
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Subcribe.

merlinofchaos’s picture

Technically this is a bug of features because there is no requirement that exportables actually utilize the api features.

But that's only a technicality, because stylizer should be using this, which would 'fix' features. But there are some exportables that specifically do not want 'api' features and features will still choke on them, so features possibly needs a bug report as well.

DamienMcKenna’s picture

Title: Stylizer export lacks "api" and "version" » Problem exporting data without a ctools "api" string
Project: Chaos Tool Suite (ctools) » Features
Version: 7.x-1.0-alpha4 » 7.x-1.x-dev
Component: Exportables » Code

Making it so.

jwilson3’s picture

FileSize
520 bytes

So there should probably be something in features that doesn't allow export unless $schema[$element]['export']['api'] exists.

I'd like to still provide a patch that fixes the original issue identified in the stylizer module, that would provide real integration with not just ctools export but also features. It makes sense that anything exportable should be linked to an API version, various instructions I've found all include these additional lines, and many other modules submit to this methodology.

Torenware’s picture

Related issue: see #1199590: Stylizer fails to do export via Features.

This one falls in between the cracks of CTools and Features, and I don't think that it will get resolved quickly w/o some amount of coordination between the teams. Somebody in this group really ought to contact Earl Miles and hammer out how best to resolve this, since either the Features group isn't using his API right, or it isn't clear via the CTools documentation how a plug-in client should behave in this case. Letting the issue ping-pong between the two issues queues isn't helpful.

DamienMcKenna’s picture

merlinofchaos fixed the Stylizer problem: #1199590: Stylizer fails to do export via Features

jwilson3’s picture

Project: Features » Chaos Tool Suite (ctools)
Status: Active » Fixed

From merlinofchaos in comment #8 on #1199590: Stylizer fails to do export via Features:

I've gone ahead and added an "api" section for stylizer

I believe this issue can be closed now, since my patch in #4 also does just that.

jwilson3’s picture

Project: Chaos Tool Suite (ctools) » Features
Status: Fixed » Active

Actually, I suppose based on Earl's comments in #2, this should perhaps be left open in the Features module issue queue, to see what they have to say. Though, now that stylizer has added the "api" section, I wonder if this is still relevant.

schultetwin’s picture

I have the same issue while exporting mailhandler version 6.x-2.x, (so this issue also occurs in Features 6.x).

davidwatson’s picture

mpotter’s picture

Status: Active » Closed (fixed)