So I've been getting around to updating my features to use weight 2.x recently and I ran into a problem. Whenever I build a feature and export the appropriate weight settings as Strongarm variables (weight_enable_content_type, weight_ranged_content_type, and weight_enabled_content_type) I get no problems, the variables export just fine and the array appears to be intact.

However, when I turn that feature on on a new site, weight appears to be disabled on the content type I exported it for. So I double checked my features page, and the feature is not over ridden. I also checked my Views where I am using a table style with weight to create a changer, and it does not function correctly.

So on a whim, I changed the weight settings for that node type back to what I had them when I created and exported the feature. I rechecked the feature status and it still wasn't overridden, and now the view worked just fine.

Am I doing something wrong, or is this genuinely broken?

Comments

davisben’s picture

Category: bug » support
Status: Active » Fixed

You shouldn't need to export the variables with Strongarm as the settings are stored in the database. Either way, make sure you select the weight settings that correspond to your content type.

drakythe’s picture

Status: Fixed » Active

I'm not talking about the actual weight variable exporting, since that is unique per node/site. But the weight range, weight default, and whether it is enabled for content types does not appear to be exporting with features correctly. I saw there is also a 'Weight' settings in the export, and I tried to set those too, but still no luck, the content type does not seem to have weight enabled when I import the feature.

davisben’s picture

Everything is working fine for me. Could you post your feature here?

drakythe’s picture

Sorry, got busy over the weekend, I'll try to get my feature posted asap.

hutushen222’s picture

I just make a test. I enabled weight module and add settings to Article content type, then I use features export it with the weight settings. After I enabled the feature in another pure target site, the Article weight settings were still "Disabled".

In the target site's database table "weight_settings", there is no any records. But there is a record for article in the source site.

cybertoast’s picture

+1 I can confirm the same. I export the weights using features-update-all, and have a .weight.inc file which seems to have all the node-types enabled for weight. The strongarm.inc file contains the ranges and weight fields, such as:

$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'weight_enabled_commissioners';
$strongarm->value = '1';
$export['weight_enabled_commissioners'] = $strongarm;

But on the revert side (features-revert-all) these settings are not picked up. I wonder if it's some sort of formatting issue.

davisben’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Status: Active » Fixed

I just reworked the Features integration so this issue should be fixed now.

Status: Fixed » Closed (fixed)

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

Shiraz Dindar’s picture

Category: support » bug
Status: Closed (fixed) » Active

Still experiencing this with the latest dev. I can see the feature component. I've added it. I can see it on the target server (in the features GUI). It's there. But the weight still shows as disabled in that content type's settings. I've tried this with both the strongarm vars featurized and not. The component is not overridden.

Is this still happening for others? Or, conversely, is this working for others?

Thanks,
Shiraz

drakythe’s picture

Shiraz,

I just got a chance to test it this morning, and without strongarm, just using the features "Weight" section, I was able to export a simple content type and its weight settings. On import, all my settings were there. Are you sure you used the latest dev version?

davisben’s picture

Status: Active » Postponed (maintainer needs more info)

Everything is working for me also. If you post your feature, I'll take a look at it.

Boobaa’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Here is how i ran into this issue and how I got around it:
- Started with weight-7.x-2.1,
- checked all the settings and saved them,
- added the weight setting and the variables with weight_ prefix to a feature,
- enabled the feature on the staging site, and no weight-related settings were there.
- I have applied http://drupalcode.org/project/weight.git/commit/0824017 but it wasn't enough: the underlying database schema has changed since 2.1 as well.
- I had to turn to weight-7.x-2.x as of today (weight-7.x-2.1+10-dev, as drush calls it) on both the dev and the staging site (staging has been refreshed from prod),
- checked all the settings again and re-saved them,
- reexported the feature with the new features integration (a file had to be removed, etc.),
- enabled the feature on the staging site, and voilá, my settings were finally there.

Dear module maintainer, could you please a bit more responsible, tag a new stable version and create a release node from it? :)

davisben’s picture

Status: Reviewed & tested by the community » Fixed

Creating a new stable release while some users are still reporting bugs would be irresponsible. Now that we have consensus that everything is working, I'll make a new release at some point today.

Shiraz Dindar’s picture

sorry i've been unable to look further into this since posting my issue (time constraints).. i think the issue may have been something else locally. i'll report back if i get a chance to find out more, but based on what i'm reading i think it was probably something else. thanks for your consideration!!

Status: Fixed » Closed (fixed)

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