- ππΊHungary huzooka Hungary ππΊπͺπΊ
Root of this bug is the same as the root of π MigMagLookup can unintentally strip out messages from non-SQL sources Active
When using migmag_lookup to migrate from a url based source plugin using a json based data parser, the following errors were raised
[warning] Undefined variable $rows_to_stub MigMagMigrateStub.php:175
[warning] foreach() argument must be of type array|object, null given MigMagMigrateStub.php:175
These are caused because at the point
// Stubbing needs prepareRow.
if ($source_plugin->prepareRow($row)) {
an exception is thrown in the call to prepareRow() saying the row is frozen and cannot be changed. So no stubs are created.
I don't know why we need to call prepareRow() here as prepareRow() seems to be called by next() when iterating through the loop we are in
foreach ($source_plugin as $row)
TBD - I need to work out the smallest use case with which I can replicate this.
Removing the inner prepareRow() stops the error and the migrate then works as expected.
No changes.
Needs work
1.8
Code
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Root of this bug is the same as the root of π MigMagLookup can unintentally strip out messages from non-SQL sources Active