Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Jan 2017 at 11:57 UTC
Updated:
16 Feb 2017 at 09:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
drunken monkeyThanks a lot for reporting this! You're completely right, we totally forgot to actually sort the processors when showing them in the form.
Please test/review the attached patch which should fix this!
I also included a test, but those don't seem to work anymore for me locally. Let's see what the d.o test bot has to say about it.
Comment #3
drunken monkeyOK, seems the error I get ("A non-numeric value encountered") was added in PHP 7.1, which I apparently now have. Could therefore easily be a "bug"/incompatibility in Core's testing framework.
Comment #4
borisson_Testing your suspicion by adding a test w/ php 7.1 to #2
Comment #7
drunken monkeyHm, suspicion not confirmed, damn. Then apparently some hiccup in my local test environment – but most likely still related to PHP 7.1, I'd say. Anyways, since tests have been less and less reliable for me locally since switching to BTB in any case, I guess I'll just have to rely on the d.o test bot more again.
This should fix the obvious errors in the test results above.
Comment #10
drunken monkeyComment #13
drunken monkeyComment #15
drunken monkeyAttached the wrong tests-only patch version.
Comment #17
drunken monkeyLooking good. Anyone want to test/review?
Comment #18
borisson_Looks good, we use a similar method in the facet test suite, a similar implementation might make the test easier to read? http://cgit.drupalcode.org/facets/tree/tests/src/Functional/TestHelperTr...
Not blocking the commit on that though.
Comment #19
drunken monkeyI had something like that, too, but, as the comment explains, we can't be sure of the actual order since some processors have the same weight assigned and their order is therefore unpredictable. That's why I went with just assuring that the weight is never falling.
I guess the alternative would be to explicitly set a (different) weight for all the processors – but I wanted to avoid doing that, since it's just a giant
$editarray. And, this way we would also spot any problems that only arise when two weights are the same.Anyways, thanks a lot for reviewing!
Committed.