Score:0

Custom Migration Plugin MySQL Error

ck flag

I've run into the following error when running the command drush migrate-import custom_spotlight where custom_spotlight is the name of the plugin. I've been following along with this guide: https://www.metaltoad.com/blog/drupal-8-migrations-part-4-migrating-nodes-drupal-7 but I'm not exactly sure what went wrong here. It seems when the placeholder :nid is substituted with a value, there are quotes inserted as well which displays in the error log as the HTML entity code. Any tips on how to resolve this issue? enter image description here

Drupal version: 9

mysql Ver 14.14 Distrib 5.7.35, for Linux (x86_64) using EditLine wrapper

Jaypan avatar
de flag
One of two things is happening - the SQL query is being built incorrectly, or the value being submitted is quoted. I'd say the latter is more likely, but it could be either. You'll have to work backwards to find out where the NID is being submitted, then debug to see if/where quotes are being added in between. And also track back to find where that query is being built, and see if you can see why it's going wrong.
Score:0
ck flag

It looks like the issue stemmed from incorrect SQL syntax. The last column after the SELECT should not contain a comma.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.