Comments

MegaChriz created an issue. See original summary.

megachriz’s picture

Status: Active » Needs work
StatusFileSize
new2.79 KB

Work in progress patch. About the implementation I don't like that the different statuses of items (created, updated, etc.) are hard-coded. An extension module cannot add another type of status this way (for example: unpublished, blocked, etc.).

megachriz’s picture

Issue tags: +Needs tests
StatusFileSize
new9.33 KB
new10.32 KB

This is a more advanced implementation, allowing contrib modules to define new states in a *.feeds_states.yml file.

Needs tests, but first see what would break.

megachriz’s picture

StatusFileSize
new9.37 KB
new283 bytes

Allowing to set custom properties on \Drupal\feeds\State.

megachriz’s picture

This doesn't pass tests yet, but it should fix the infite loop that occurred when deleting imported items.

bogdog400’s picture

My stock version of 8 shows the progress bar bouncing left and right as if it can't make up its mind how much data is imported. One second it is 90% and the next second it is 14%. It bounced back and forth until it's done.

megachriz’s picture

Status: Needs work » Needs review
StatusFileSize
new1.42 KB
new2.68 KB

Since the advanced, flexible solution isn't able to pass tests, I supply a slightly modified version of the patch in #2 here, so this feature can be included for the next release (if it still passes tests). This version doesn't change \Drupal\Feeds\State, so all logic for this feature now happens solely in FeedViewBuilder.

This feature has proven me useful a lot: on a large import running during cron I can see early on what's happening and act on errors earlier.

  • MegaChriz committed fff5121 on 8.x-3.x
    Issue #2996579 by MegaChriz: Show import progress on feed page (simple...
megachriz’s picture

Status: Needs review » Needs work

Committed #7 with a coding standard fixed.

Leaving issue open for more advanced solution and tests.