Problem/Motivation

Following #3309552: Allow Migrate Sandbox to populate form from a migration I'm getting greedy and I want to be able to fetch the next row easily.

Proposed resolution

Add a "Fetch next row" button that is visible when it makes sense.

User interface changes

There will be a new "Fetch next row" button.

The current implementation I have locally looks like this:

The button is only visible after the "Populate" button has been used and disappears if either the migrate id or the source ids are modified. There is good error messaging if there is no next row available.

API changes

N/A

Data model changes

N/A

Comments

danflanagan8 created an issue. See original summary.

danflanagan8’s picture

Status: Active » Needs review
StatusFileSize
new10.29 KB

I have this feature working! Here's a patch just to make sure the tests run up here.

I wish the implementation were more efficient, but I ran into trouble trying to serialize, store, and unserialize the source plugin instance. I kept getting this exception:

"The object is in an invalid state as the parent constructor was not called"

Where "The object" appears to be the source plugin's iterator. Google only shows TEN(!) results for that error, so I'm not sure what to do to get past it or if there even is a way past it. I got the same error with embedded source, json source, and sql source. So at least for IteratorIterator and ArrayIterator, serializing the source does something funky to the iterator.

So unfortunately this implementation is slow. It has to reinstantiate the source plugin and iterate throw all rows again in order to get the next one. But it works.

  • danflanagan8 committed 955edd1 on 1.1.x
    Issue #3309873 by danflanagan8: Migrate Sandbox should offer to "Fetch...
danflanagan8’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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