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.
Features is getting more and more actual.
I'm trying to make use of Features in my development→production workflow.
Automatic NodeTitles is one of modules that won't preserve its settings in a feature.
Please don't fall behind.
Comment | File | Size | Author |
---|---|---|---|
#50 | auto_nodetitle-881170-50.patch | 556 bytes | tsi |
Comments
Comment #1
ahtih CreditAttribution: ahtih commentedAs a workaround, Strongarm module can be used to make Automatic Nodetitles settings to be Features; this is because Automatic Nodetitles settings are Drupal variables (all beginning with "ant_"), and Strongarm makes these usable in Features.
Comment #2
lolmaus CreditAttribution: lolmaus commentedCan Strongarm be used by end user? Or it is an API provider that requires module's modification?
Comment #3
ahtih CreditAttribution: ahtih commentedYes it can be used by an end user, without modification of code in Automatic Nodetitles or Strongarm.
Comment #4
maddentim CreditAttribution: maddentim commentedFeatures support would be valuable to my work. Thanks,
Comment #5
hefox CreditAttribution: hefox commentedThere's a patch (that need update?) in #728004: Allow abitrary modules to alter the pipeline where auto node title can tell features to automatically export variables when the node type is.
Comment #6
phayes CreditAttribution: phayes commentedUploading here to speed the process. Note that this patch needs some tweaks
Comment #7
phayes CreditAttribution: phayes commentedComment #8
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing.
Comment #9
vegeneric CreditAttribution: vegeneric commentedsubscribing
Comment #10
TravisCarden CreditAttribution: TravisCarden commentedsubscribe
Comment #11
ruplI tested the patch in #6 and was able to encapsulate my Automatic Nodetitle settings into a Feature. I fixed a typo and rerolled using git.My apologies, I got my dev environments confused while testing this. As mentioned in #1, this patch is unnecessary if you use Strongarm to capture your Auto Nodetitle settings.
Comment #12
tim.plunkettRerolling for D7.
The hook has changed some since the last couple patches, in both name and parameters.
Comment #13
tim.plunkettHere's the D6 version. Same thing, but "Implementation of" instead of "Implements" to match.
Comment #14
Jody LynnBoth Tim's D6 and D7 patches are clean and tested.
Comment #15
TravisCarden CreditAttribution: TravisCarden commented...because every time this thread pops back up I forget what module it's for! :)
Comment #16
emman31 CreditAttribution: emman31 commentedSubscribing !
Need this !
Comment #17
zilverdistel CreditAttribution: zilverdistel commentedsubscribing
Works with strongarm, but would be nice if either the variables were named "auto_nodetitle_***" or if the settings were automatically saved with the content type to the feature.
Comment #18
tim.plunkettAfter running into #1078478: Multiple features and strongarm conflicts and #904558: Multiple features and strongarm conflicts, this needs to follow their lead.
This is for D6, I'll see if I can do a D7 version later.
Comment #19
mstrelan CreditAttribution: mstrelan commentedsubscribe
Comment #20
fagopatch in #18 looks good to me, any testers?
Comment #21
Shadlington CreditAttribution: Shadlington commentedSubbing
Comment #22
Manuel Garcia CreditAttribution: Manuel Garcia commentedI've just done some testing, and the variables seem to be exported fine (using php code on two content types in the same feature, both got into the feature strongarm file).
I haven't tested pushing the feature around nor installing it on a new installation, but I suppose it should work fine since then strongarm/features would take care of that.
Looks good to me!
[edit]
I also just checked and the vars got into the features[variable][] array in the .info file as well.
[/edit]
Comment #23
brettbirschbach CreditAttribution: brettbirschbach commentedI tried the patch in #18, but for whatever reason it is not working for me. When I put some logging into the features module, I can see the variables get added to $pipe, but the export does not contain the data. Any ideas on where to look?
Comment #24
barraponto CreditAttribution: barraponto commented@HitmanInWis did you enable Strongarm?
Comment #25
brettbirschbach CreditAttribution: brettbirschbach commentedAh - nope - I didnt realize it was a requirement/dependency. I'll try that.
Comment #26
WorldFallz CreditAttribution: WorldFallz commentedJust another data point, patch in #18 works great (it does require strongarm to be enabled) and the node titles are created properly on the feature enabled site.
Any chance this can be committed to the dev?
Comment #27
hefox CreditAttribution: hefox commentedPatch #18 is dependent on another issue, which needs work
Comment #28
fagoSo should we postpone committing #18 until strongarm is fixed?
Comment #29
crea CreditAttribution: crea commentedSubscribing
Comment #30
deviantintegral CreditAttribution: deviantintegral commented#18 is working fine for me as well.
I'm not sure what the dependency on #1078478: Multiple features and strongarm conflicts is? If this is still the case, it would be great if someone could summarize it and mark this issue as postponed.
Comment #31
hefox CreditAttribution: hefox commentedHow this ticket is done, whether the first simple patch, or the more complex patch is, depends on which patch gets in, so postponed sounds appropriate
Comment #32
tim.plunkettPostponed on #904558: Multiple features and strongarm conflicts
Comment #33
the_g_bomb CreditAttribution: the_g_bomb commentedUn-posponing due to a fix on the above issue.
Comment #34
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedSo how's this going?
Is the D7 patch in #12 (and its D6 variant in #18) ok? They were tested and ready, then the Strongarm issues in #20-32 were overcome... Are we ready to put a patch in dev yet?
Optimistically changing status back to what it was before it was postponed...
Comment #35
subhojit777Patch submitted in #18 is working fine in my site. But there's a problem, it cannot auto detect "Automatic Nodetitle" module and you have to explicitly add this in dependencies. I suggest the auto detection of Automatic Nodetitle module must also be implemented in the patch.
Comment #36
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedAgreed, updating.
Comment #37
Angry Dan CreditAttribution: Angry Dan commentedSorry if I'm late to the conversation here, and you've already discussed this, but you should really implement this using hook_features_pipe_COMPONENT_alter() to create auto_nodetitle_features_pipe_node_alter() which adds dependency info to the node directly.
The strongarm module already has an implementation of this function for adding comment and menu settings to the node when you export it.
Comment #38
Angry Dan CreditAttribution: Angry Dan commentedJust looked at the patch... seems I'm very late to the conversation!
Comment #39
chrowe CreditAttribution: chrowe commentedIs this issue still alive. Can we commit the patch and add auto detection later?
Comment #40
Angry Dan CreditAttribution: Angry Dan commentedJust created a patch - tested on D7 - with dependency support.
I think this is how you do it?
But correct me if I'm wrong, it seemed to work!
Comment #41
hefox CreditAttribution: hefox commentedThis stuff should not be needed anymore
Comment #42
claudiu.cristeaI tested #40 and works. I cannot understand the comment from #41. Hey @hefox, can you explain?
Comment #43
claudiu.cristeaComment #44
hefox CreditAttribution: hefox commentedFeatures does that part automatically; not needed to be reimplemented here
Why is a dependency being added without even checking if ant is configured for this node type?
Comment #45
claudiu.cristea@hefox, You may be right. I cannot provide a rework of the patch because I don't know how Features works. I just need this functionality and I'm able to test provided patches. Why don't you provide a better patch so that I can test it? :)
Comment #46
hefox CreditAttribution: hefox commentedPatches in #13 likely are all that's needed. strongarm/features did have some bugs that have been resolved that caused the addition of the dependency logic
Comment #47
claudiu.cristeaTested #13. The patch applies cleanly and works as expected.
RTBC for #13.
Comment #48
discipolo CreditAttribution: discipolo commentedconfirm:
patch 12 works on d7.
Comment #49
drupalninja99 CreditAttribution: drupalninja99 commentedI had to reroll the patch for d7 and fix the function comment to match d7 standards.
Comment #50
tsi CreditAttribution: tsi commented#49 works fine for me, only that the paths were relative to drupal root, this version is relative to the module root.
Comment #51
jp.stacey CreditAttribution: jp.stacey commented#50 works great for me: re-creating an existing feature adds new strongarm variables to it; enabling that feature on a clean site populates the relevant auto_nodetitle fields. Thanks to everyone involved so far!
Comment #52
mrded CreditAttribution: mrded commentedI can confirm that #50 works great. Thank you!
Comment #53
mrded CreditAttribution: mrded commentedComment #54
bmunslow CreditAttribution: bmunslow commented#50 does a great job, thanks!
Comment #55
MustangGB CreditAttribution: MustangGB commentedConfirming #50 is working fine over here.
Comment #56
uniquename CreditAttribution: uniquename commented#50 works fine
Comment #57
lionslair CreditAttribution: lionslair commented#50 works
Comment #58
kaidjohnson CreditAttribution: kaidjohnson commented#50 works great. Note: requires strongarm module (as all variable exports for features are enabled via strongarm).
+1 Please commit.
Comment #59
Manuel Garcia CreditAttribution: Manuel Garcia at Appnovation commented@All, this project is no longer supported by the maintainers... so don't expect this patch to be committed unfortunately, unless someone takes over the module.
That said, there's an (arguably better) alternative, so you may want to look into migrating to it: https://www.drupal.org/project/auto_entitylabel
Comment #60
WorldFallz CreditAttribution: WorldFallz commentedjust an fyi-- I switched to auto_entitylabel some time ago and it works great. And the fact it applies beyond nodes is awesome.
Comment #62
gaurav.kapoor CreditAttribution: gaurav.kapoor commentedComment #63
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs for DrupalFit commented