The name of the price field property changed between Kickstart RC1 and RC2, from amount_float to amount_decimal.
A Kickstart-provided update function will try to update the search index when update.php is run.
However, if the search index is overridden (because manual changes were made by the user through the UI), then the changes must be applied manually, in which case update.php will point the user to this issue.
Here's how to finish the update process manually
Step 1:
You will need to go to "admin/config/search/search_api" and then either:
a) Revert your search index (which will remove all custom changes done to it)
b) Manually apply the changes by going to "admin/config/search/search_api/index/product_display/fields" and then enabling all "Price » Amount (decimal)" fields. Then repeating the same process on the facets page ("admin/config/search/search_api/index/product_display/facets").
Step 2:
Go to "admin/config/search/search_api/index/product_display/status" and first click "Clear index" and then (after the page reloads) "Re-index content".
This will rebuild the search index will the new price values.
Step 3:
If you've added the Amount (decimal) facet, go to the blocks page ("admin/structure/block") and enable the matching block.
Comment | File | Size | Author |
---|---|---|---|
#1 | schermata1.png | 3.94 KB | alfredof |
#1 | schermata2.png | 5.13 KB | alfredof |
Comments
Comment #1
alfredof CreditAttribution: alfredof commentedi have followed the steps
but
In the block SORT BY of "All Products" page,
i have twice the button price
and
it is not possible disable it
if i click on one button i have the message:
Trying to sort on unknown field field_product_commerce_price_amount_float_asc.
and if i go directly to mysite.com/admin/config/search/search_api/index/product_display/sorts
and
i cannot see "Product Price" (float) enabled
Comment #2
brephraim CreditAttribution: brephraim commentedConfirmed #1.
Comment #3
jsacksick CreditAttribution: jsacksick commentedI just tried to reproduce the bug, I installed the rc1, then replaced the files with the rc2 files.
I ran the update.php, followed the steps and only had 1 price sort.
Can you confirm the content of
commerce_kickstart_search_default_search_api_sort
?Comment #4
brephraim CreditAttribution: brephraim commentedHow do I do that?
Comment #5
alfredof CreditAttribution: alfredof commentedbefore to update from rc1 to rc2
if you try to change for example
this
yoursite/admin/config/search/search_api/index/product_display/workflow
because you dont want "unpublished nodes"
and update to rc2
you have the issue
Comment #6
jsacksick CreditAttribution: jsacksick commentedI'm sorry I tried again, And I already tried with adding fields or data alteration in order for my index to be "overriden" so the update can't apply, I followed the steps once with reverting the index and an other time with adding the field manually to the index and then clear + reindex, and I only have one price sort.
Comment #7
davian CreditAttribution: davian commentedHad the same problem (duplicate price sort).
This is how I fixed it:
1. Go into the database and look for the table 'search_api_sort'.
2. Delete the rows you don't need. (In my case: product_display__field_product:commerce_price:amount_float)
Comment #8
jsacksick CreditAttribution: jsacksick commentedA fix has been commited to dev, See http://drupalcode.org/project/commerce_kickstart.git/commit/2159f6e
Comment #9
Demoshane CreditAttribution: Demoshane commentedCould this relate to this? Trying to sort with price leads to error:
Trying to sort on unknown field field_product_commerce_price_amount_float_asc.
Comment #10
jsacksick CreditAttribution: jsacksick commentedYes it's perfectly related to this, If you read the comments above you can fix this issue. Did you run the updates ?
Comment #11
joshmillerjsacksick - If you can confirm the issue is fixed with the code in #8 above, then please update the status :D Otherwise, I'll be happy to document this process in the Search API section of the Kickstart 2 documentation.
Josh
Comment #12
jsacksick CreditAttribution: jsacksick commentedComment #13
brephraim CreditAttribution: brephraim commentedOn an update from RC2->RC3, I got an error message after running updates.php telling me that the new fields could not be added to the index. The new catalog view is therefore broken, and I get two errors telling me "Trying to sort on unknown field title."
I have tried reverting the index and then reindexing, but this did not fix my problem.
Comment #14
jsacksick CreditAttribution: jsacksick commentedThis issue is no longer accurate on how to manually update search index between kickstart RCS, the index is normaly automatically generated by
commerce_search_api (http://www.drupal.org/project/commerce_search_api)
.Reverting the index should be enough, your error is happening only with the sorts or the view is not working at all ? Did you revert the index, clear it and index the items again ?
Comment #15
brephraim CreditAttribution: brephraim commentedThe view is not working at all, in addition to the errors relating to sorts displaying. I did revert the index, clear and reindex.
Comment #16
brephraim CreditAttribution: brephraim commentedRC4 fixed whatever error was causing this.
Comment #17
bojanz CreditAttribution: bojanz commentedAwesome.
Comment #18
brephraim CreditAttribution: brephraim commentedSpoke too soon, unfortunately.
As it turns out, upon retracing my steps, it was actually reverting the index that broke the view. Immediately after the upgrade things worked (albeit imperfectly, the view wasn't able to deal with my catalog hierarchy; I had needed to customize the previous collection taxonomy view to make it work), and then when I reverted the index and re-indexed, things broke as described above.
The error I got on running update.php was:
[Warning] WD search_api: Undefined data alteration commerce_search_api_product_display_filter specified in index Product display
Comment #19
brephraim CreditAttribution: brephraim commentedI think I tracked down the source of the error: aggregated fields. When I disabled it, the view started working and the error messages disappeared.
Comment #20
joshmillerDocumentation Tasks Cleanup. This is on my list and will be documented soon.
Comment #21
lsolesen CreditAttribution: lsolesen commentedClosing this - as we are now past RC's. Please reopen if this is still a task @joshmiller.
Comment #23
busel7 CreditAttribution: busel7 commentedThanks, its work!