Problem/Motivation
$this->configuration['fields']
in FieldsProcessorPluginBase
is an unassociative array of field names.
FieldsProcessorPluginBase::testField()
checks isset($this->configuration['fields'][$field_name]
. Because the field names are the values and not the keys, and the values are always integers, this will never return TRUE
. Because of this processor plugins will never actually be run.
Proposed resolution
Make testField()
check in_array($field_name, $this->configuration['fields']
instead.
Remaining tasks
User interface changes
API changes
Estimated Value and Story Points
This issue was identified as a Beta Blocker for Drupal 8. We sat down and figured out the value proposition and amount of work (story points) for this issue.
Value and Story points are in the scale of fibonacci. Our minimum is 1, our maximum is 21. The higher, the more value or work a certain issue has.
Value : 1
Story Points: 3
Comment | File | Size | Author |
---|---|---|---|
#10 | 2490804-10--fields_processor_testField_test.patch | 731 bytes | drunken monkey |
| |||
#10 | 2490804-10--fields_processor_testField_test--tests_only.patch | 1.26 KB | drunken monkey |
#1 | 2490804-1-field-processor-plugin-base--test-field.patch | 572 bytes | tstoeckler |
Comments
Comment #1
tstoecklerHere we go. This fixes the problem on my setup.
The
IgnoreCase
preprocessor failed to work before and now it works like a charm.Comment #3
rosinegrean CreditAttribution: rosinegrean commentedI've tested your patch and indeed it's working.
I also ran all the search related tests and none failed, not sure why for you 7 failed.
I'll re-test the patch and see what happens.
Comment #5
Alumei CreditAttribution: Alumei commentedWorks for me as well.
Comment #6
rosinegrean CreditAttribution: rosinegrean commentedI think this is ok like it is now.
Comment #8
drunken monkeyLooks good, thanks!
Committed.
It's not good that we're currently not catching this with the testing framework, though. Would be great if someone could create some tests for that. (Best integrate it into the
IntegrationTest
, but even a small sanity check for thetestField()
method directly in a PhpUnit test would be great.)Comment #9
Nick_vhComment #10
drunken monkeySince we're not doing any indexing or searching with closer checks yet in
IntegrationTest
, adding it there would be pretty complicated. Fixing the existingFieldsProcessorPluginBaseTest
, on the other hand, is trivial.Comment #11
drunken monkeyComment #12
drunken monkeyComment #14
borisson_The test-only patch here doesn't contain only tests. The other one does. That doesn't seem right?
Comment #15
drunken monkeyThat's because the fix was already committed. The "tests only" patch reverts that fix, the other one doesn't.
Comment #16
borisson_Oh, that makes sense.
Comment #17
drunken monkeyGood to hear, thanks for your review!
Committed.