Problem/Motivation

TypeError : in_array(): Argument #2 ($haystack) must be of type array, null given to in_array() (line 1179 of ...../modules/contrib/scheduler/scheduler.module).

Steps to reproduce

1. Create custom migration according to Migration API

2. Run migration

CommentFileSizeAuthor
#2 3317185-scheduler-migrate-prepare-row.patch644 bytesevgen

Issue fork scheduler-3317185

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

evgen created an issue. See original summary.

evgen’s picture

StatusFileSize
new644 bytes

Skip running hook_migrate_prepare_row if custom migration is running. The migration_tags can be null.

avpaderno’s picture

Title: Argument #2 ($haystack) must be of type array, null given dans in_array() (ligne 1179 de /modules/contrib/scheduler/scheduler.module) » Argument #2 ($haystack) must be of type array, null given to in_array()
Version: 2.0.0-rc6 » 2.x-dev
Issue summary: View changes
Status: Active » Needs review
jonathan1055’s picture

Thanks for reporting this. Are either of you working on the issue branch which has been created? I see that the branch has been created but the issue is still 'unassigned' and there is no MR. If you are not working on the issue branch I will do it, and commit as soon as I have checked it. Let me know.

@evgen, could you give me a sample of your custom migration, so that I can replicate and test the patch. Thanks.

evgen’s picture

@jonathan1055 I have complicated migration from the xml file with several custom processors to node. But I think you can take some very simple migration from examples and test it. Should be the same result. Let me know if it isn't.

  • jonathan1055 committed 0cbec49 on 2.x
    Issue #3317185 by jonathan1055, evgen: Skip migration row if...
jonathan1055’s picture

Priority: Critical » Major
Status: Needs review » Fixed

Thanks evgen. I don't have the time right now to investigate and replicate the null return, but I will take your word for it that this is what can happen and that your solution solves it. I want to get 2.0.0-rc7 released to fix this and a couple of other important bugs. I will set up a custom migration later, just to satisfy my curiosity and to replicate your problem, but that can wait.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.