4

I have some configuration that will not import. If I run drush config-import --preview I see the changes to be imported; I hit 'y' to import. When I run the same command, the changes are still there?

My guess is that when I run this command the config files should say to the database: 'hey, be like me'. Then when I run it again, Drupal should ask 'are the config files and database the same?' - they should be if they were synced - and Drupal should say 'cool, nothing to do, they match'. Right?

Am I missing something - if not, what can I do? Thanks.

$ drush config-import --preview
 Collection  Config                                            Operation                
             core.entity_view_display.node.page.search_result  update 
             core.entity_view_display.node.page.search_index   update 
             core.entity_view_display.node.book.teaser         update
Import the listed configuration changes? (y/n): y
The configuration was imported successfully.                                                                                                                                                     [success]
$ drush config-import --preview
 Collection  Config                                            Operation                
             core.entity_view_display.node.page.search_result  update 
             core.entity_view_display.node.page.search_index   update 
             core.entity_view_display.node.book.teaser         update
Import the listed configuration changes? (y/n): 
  • I've also experienced this. – Kevin Feb 11 '17 at 18:47
  • I'm moving the config from my dev site to stage site. All I can think to do is delete the stage database and replace it with the dev database. Then the flies will be out of sync - so I'd have to copy those over too. – 24ma13wg Feb 11 '17 at 22:42
  • cache is rebuilt ?? run --preview diff to see the actual changes - maybe they're different .. – rémy Feb 21 '17 at 8:41
0

From what I can see this is a problem with how drush generates the temp files to compare against. It looks like drush is generating files with any comments removed as well as not adding qoutes around yaml strings that needs to be escaped.

+  # Set the node type to location
   type:
     plugin: default_value
     default_value: location
+  # set the location type to park
   field_location_type:
     plugin: default_value
     default_value:
       tid: 1
+  # Create the mappings from soap to drupal fields.
   title: abbreviatedName
   field_location_active_facilityid: ID
-  field_location_address/address_line1: address1
-  field_location_address/locality: city
-  field_location_address/administrative_area: state
-  field_location_address/postal_code: zipCode
-  field_location_address/country_code: country
-  field_location_parking_direction/format:
+  "field_location_address/address_line1": address1
+#  "field_location_address/address_line2": address2
+  "field_location_address/locality": city
+  "field_location_address/administrative_area": state
+  "field_location_address/postal_code": zipCode
+  "field_location_address/country_code": country
+#  "field_location_address/langcode":
+#    plugin: default_value
+#    default_value: en
+  "field_location_parking_direction/format":
     plugin: default_value
     default_value: basic_html
-  field_location_parking_direction/value: parkingCapacity
+  "field_location_parking_direction/value": parkingCapacity

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.