Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When trying to index a node with a multi-valued reference field, if one of the fields in the referenced entity is numeric or boolean, the module adds multiple singular index fields, causing a 400 error.
Comment | File | Size | Author |
---|---|---|---|
#9 | index-multi-value-entity-reference-error-2786477-9.patch | 1.68 KB | janusman |
| |||
#2 | index-multi-value-entity-reference-error-2786477-2.patch | 1.74 KB | jmoreira |
Comments
Comment #2
jmoreira CreditAttribution: jmoreira at Acquia commentedProposed fix:
Identify if the field is supposed to be indexed as multiple or singular and use the appropriate function.
I also replaced the deprecated function setMultiValue to addField.
Comment #3
jmoreira CreditAttribution: jmoreira at Acquia commentedComment #4
lpeabody CreditAttribution: lpeabody at Genuine commentedComment #5
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedThanks jmoreira, This works.
Comment #6
redkelpie CreditAttribution: redkelpie commented#2 Worked for the issue I was having with apachesolr_paragraphs indexing
Comment #7
deepakrmklm CreditAttribution: deepakrmklm at Zyxware Technologies commentedIs their anything that is blocking to get this fix with latest release?
Comment #8
michielnugter CreditAttribution: michielnugter commented+1 on the RTBC. The patch looks good and it works.
Comment #9
janusman CreditAttribution: janusman at Acquia commentedCleaner patch, will commit next.
Comment #11
janusman CreditAttribution: janusman at Acquia commentedFixed
Comment #13
lvlte CreditAttribution: lvlte as a volunteer commentedThe patch in #9 introduced this issue.
I think it is not correct because it is based on the assumption that only apachesolr default indexing callback is used.
I can submit a proper fix if you want. PLease reopen and test before commit.
Comment #14
lvlte CreditAttribution: lvlte as a volunteer commentedComment #16
janusman CreditAttribution: janusman at Acquia commentedReverted this change because of discussion here and in #2954804