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.
Hi
I try to export menu_links to existing feature
drush @t4 fe features_default_menu 'menu_links:main-menu:node/6'
And get error
Ambiguous component "main-menu", matches main-menu:http://t4.bashlov.ru/eyeglasses/gender/men-77, main-menu:node/31, main-menu:node/4, main-menu:node/22, [error]
main-menu:node/13, main-menu:node/24, main-menu:node/15, main-menu:node/29, main-menu:node/27, main-menu:node/7, main-menu:node/3, main-menu:node/9,
main-menu:node/10, main-menu:node/30, main-menu:node/23, main-menu:node/21, main-menu:node/20, main-menu:node/6, main-menu:node/2, main-menu:node/18,
main-menu:node/26, main-menu:node/16
No components to add.
I try to debug
--- features.drush.inc_orig 2012-03-19 14:08:06.000000000 +0400
+++ features.drush.inc 2012-03-19 14:08:33.000000000 +0400
@@ -322,6 +322,7 @@
// pattern, check if one of the matches is equal to the pattern, and
// use that, or error out.
if (sizeof($matches) > 1 and $preg_component_pattern[0] != '^') {
+print $component_pattern;
if (in_array($component_pattern, $matches)) {
$matches = array($component_pattern);
}
$component_pattern contain escaped hyphen (it's pattern of course!!)
main\-menu
and
if (in_array($component_pattern, $matches)) {
condition is always false
Comment | File | Size | Author |
---|---|---|---|
#1 | features-escaping-1489480-1.patch | 1.55 KB | Xen |
Comments
Comment #1
Xen CreditAttribution: Xen commentedGood catch.
Actually, the issue is the colon in the name. This patch should fix it.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedWorks as advertised. Thanks.
Comment #3
mpotter CreditAttribution: mpotter commentedCommitted and pushed ac04043.