Undefined index: row_num in SpreadsheetIterator->getKeys()

Created on 10 May 2021, over 3 years ago
Updated 1 November 2024, about 2 months ago

Notice: Undefined index: row_num in Drupal\migrate_spreadsheet\SpreadsheetIterator->getKeys() (line 215 of modules/contrib/migrate_spreadsheet/src/SpreadsheetIterator.php).

Just thought I'd report an E_NOTICE issue...

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom nicholasthompson

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine vlad.dancer Kyiv

    @claudiu.cristea I'm facing this issue too. Unfortunatelly I don't know how to reproduce it.

    Here are some input:

    We needed "id-less" data import. Well, actually migrate can't do that. But we decided to use
    "row_index_column" field, provided by this module, and xls file_name as ids.

    And migration config:

    source:
      plugin: custom_source_extends_url_source
      data_fetcher_plugin: file
      data_parser_plugin: custom_data_parser_extends_migrate_spreadsheet
      track_changes: true
      worksheet: 'Sheet1'
      origin: A2
      header_row: 1
      item_selector: null
      // Filled up on runtime
      urls: []
      columns: []
      fields: []
    
      # Actual ids for migrate source plugin will be next:
      # - file_name
      # - spreadsheet_row_index
      ids:
        spreadsheet_row_index:
          type: string
      row_index_column: 'spreadsheet_row_index'
    

    The data imports fine, but batch reports result as error.
    And after applying the patch now batch operation works without the error.

Production build 0.71.5 2024