(Problem exists on drupal 9.2.7, and 9.3)
Hello,
I'm hoping I'm posting this in the correct place, as I believe this is the source of my issue. The problem is when I use this as my data source, if the field doesn't require any tampering to be imported, it works just dandy. However, if I try to use any of the feeds tamper plugins with it I get an AJAX Error as below
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=70&op=do_nojs&op=do
StatusText: OK
ResponseText: Error: Call to a member function getColumnNames() on null in Drupal\custom_sql_migrate_source_plugin\Plugin\migrate\source\CustomSQLQuery->fields() (line 104 of /home/admin/web/drupaltest.pefp.net/public_html/modules/contrib/custom_sql_migrate_source_plugin/src/Plugin/migrate/source/CustomSQLQuery.php).
As well the log brings up the following:
OPERATIONS
php 11/24/2021 - 08:33 Error: Call to a member function getColumnNames() onβ¦
Error: Call to a member function getColumnNames() on null in Drupal\custom_sql_migrate_source_plugin\Plugin\migrate\source\CustomSQLQuery->fields() (line 104 of /home/admin/web/drupaltest.pefp.net/public_html/modules/contrib/custom_sql_migrate_source_plugin/src/Plugin/migrate/source/CustomSQLQuery.php)
php 11/24/2021 - 08:33 Notice: Undefined property: Drupal\β¦
Notice: Undefined property: Drupal\custom_sql_migrate_source_plugin\Plugin\migrate\source\CustomSQLQuery::$file in Drupal\custom_sql_migrate_source_plugin\Plugin\migrate\source\CustomSQLQuery->fields() (line 104 of /home/admin/web/drupaltest.pefp.net/public_html/modules/contrib/custom_sql_migrate_source_plugin/src/Plugin/migrate/source/CustomSQLQuery.php)
php 11/24/2021 - 08:33 Notice: Undefined property: Drupal\β¦
Notice: Undefined property: Drupal\custom_sql_migrate_source_plugin\Plugin\migrate\source\CustomSQLQuery::$file in Drupal\custom_sql_migrate_source_plugin\Plugin\migrate\source\CustomSQLQuery->fields() (line 101 of /home/admin/web/drupaltest.pefp.net/public_html/modules/contrib/custom_sql_migrate_source_plugin/src/Plugin/migrate/source/CustomSQLQuery.php)
Below is the YML file. I've included all the fields, but I only am including the "open" field in this example. The same error was pulled up when I was trying to import the createdate field.
Now, it should be noted that this import worked just dandy when I mapped to an XML file.
uuid: 2f4a9107-7293-4e95-bbec-22c925640882
langcode: en
status: true
dependencies: { }
id: import_wo_from_sql
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags: { }
migration_group: feeds_migration
label: 'Import WO From SQL'
source:
plugin: custom_sql_query
key: sap_migrate
keys:
- workorder
sql_query: 'SELECT top 5 migratefromsqlserver.workorder, migratefromsqlserver.ordername, migratefromsqlserver.createdate, migratefromsqlserver.itemcode, migratefromsqlserver.[open] FROM dbo.pef_work_orders migratefromsqlserver'
fields:
-
name: workorder
label: workorder
selector: workorder
-
name: ordername
label: ordername
selector: ordername
-
name: itemcode
label: itemcode
selector: itemcode
-
name: createdate
label: createdate
selector: createdate
-
name: open
label: open
selector: open
ids:
workorder:
type: string
process:
field_work_order_number: workorder
title: ordername
field_itemcode: itemcode
field_work_order_open:
plugin: 'tamper:convert_boolean'
true_value: 'true'
false_value: 'false'
match_case: false
no_match_value: false
other_text: ''
source: open
destination:
plugin: 'entity:node'
default_bundle: work_order_number
migration_dependencies: { }
Active
1.2
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.