You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.
When trying to import entries from a database table where the ids are not numbers (do not match the regular expression /(d+)/). The issue exists here and here where the inappropriate regex is used.
The error is
~ craj$ contentful-importer --configuration=settings.ymlimport-entriesI,[2016-07-11T10:00:52.587691#13345] INFO -- : Remove directory threads/0 from data/threads path.I,[2016-07-11T10:00:52.589402#13345] INFO -- : Processing collection: country
/Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:77:in`new_entry_name': undefined method `[]' for nil:NilClass (NoMethodError) from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:81:in `copy_entry'from/Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:50:in`block in process_collection_files' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:49:in `glob' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:49:in `process_collection_files'from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:33:in`block in split_entries' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:29:in `glob' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:29:in `split_entries'from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/data_organizer.rb:19:in`execute' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/parallel_importer.rb:31:in `import_data' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/import_entries.rb:14:in `import'from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/lib/contentful/importer/import_entries.rb:19:in`run' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/claide-0.8.2/lib/claide/command.rb:312:in `run' from /Users/craj/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.2/bin/contentful-importer:12:in `<top (required)>'from /Users/craj/.rbenv/versions/2.3.1/bin/contentful-importer:23:in`load' from /Users/craj/.rbenv/versions/2.3.1/bin/contentful-importer:23:in `<main>'
I managed to fix this by changing the mentioned lines to
When trying to import entries from a database table where the ids are not numbers (do not match the regular expression
/(d+)/
). The issue exists here and here where the inappropriate regex is used.The error is
I managed to fix this by changing the mentioned lines to
"#{content_type_id}_#{File.basename(entry_path, '.*').split("_").last}.json"
and
I'm not sure if that's the best way though.
The text was updated successfully, but these errors were encountered: