Right now, the weight of the various processors correctly get set in the index configuration when the index is saved, but

  • it's not taken into account when actually processing the items
  • it's not taken into account when the form is displayed again, falling back to the default weight, making it easy to lose the processor weight by only resaving the form (easy to reproduce by toggling the "show row weight" options, changing the weight of a few items manually, and clicking save)

Attaching a patch to fix those.

Probably highlights the fact that #2656038: Make storage of weights a concern of the processor itself would definitely help from a DX point of view :-)

Comments

DeFr created an issue. See original summary.

DeFr’s picture

Status: Active » Needs review
StatusFileSize
new1.99 KB

Status: Needs review » Needs work

The last submitted patch, 2: Bug-2724833-2-Processor-weights-incorrectly-us.patch, failed testing.

The last submitted patch, 2: Bug-2724833-2-Processor-weights-incorrectly-us.patch, failed testing.

DeFr’s picture

Status: Needs work » Needs review
StatusFileSize
new833 bytes
new1.63 KB

Should be better.

Status: Needs review » Needs work

The last submitted patch, 5: Bug-2724833-3-Processor-weights-incorrectly-us.patch, failed testing.

DeFr’s picture

Status: Needs work » Needs review

Seems like the branch is randomly failing on PHP7 & PostgreSQL based on https://www.drupal.org/pift-ci-job/281193 and the patch. Asked for a re-test and it passed, so setting back to needs review.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community
NerOcrO’s picture

Works fine for me!

drunken monkey’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new864 bytes
new1.67 KB

Great job, thanks for reporting this and already providing a patch!
The patch looks pretty good, too – however, we never use the processor_settings property directly except when saving the index or freshly loading the processors.
Revised patch attached, if that's still OK with you I'll commit it.

DeFr’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine to me.

NerOcrO’s picture

+1

  • drunken monkey committed f8f3ce3 on 8.x-1.x authored by DeFr
    Issue #2724833 by DeFr, drunken monkey: Fixed saving of processor weight...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

OK, great, thanks for the feedback!
Committed.
Thanks again, everyone here!

Status: Fixed » Closed (fixed)

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

rgpublic’s picture

Hm. I've just installed 8.x-1.0-alpha16+28-dev by typing "drush up drupal-8.x-1.x-dev". Should this bug be fixed with this or not? Because it seems the bug isnt fixed for me and the patch #10 doesnt seem to apply anymore. My It's unfortunately *very* confusing to use the SearchAPI processors without any fix, though, because there is no way to find out the true order of all the processor items. I can swap for example two items in the list and click on save. The page is reloaded and the items are ordered like they were before the change. But: The order seems to be saved and honored. For example, when I try to swap the items again I get the message: No changes. I'm fighting for quite a while with this bug, so any ideas are highly welcome...