Since the last version, we can index a geofield (lat/lon pair) and it's great :).
Unfortunately, when I expose the location filter (thanks to the Search_api_location), even if it's seems to work in the admin/view panel, I cannot save the view (I got the shema error below).
As Search API Solr is indexing the lat/lon data, where the schema must be present? In this module or in the 'Search_api_location' module ?
If someone can guide me on how to do this schema, I'm ready to help. I looked on the internet but I'm not sure what I have to do.
InvalidArgumentException: The configuration property display.default.display_options.filters.latlon.value.distance doesn't exist. in Drupal\Core\Config\Schema\ArrayElement->get() (line 74 of core\lib\Drupal\Core\Config\Schema\ArrayElement.php).
Drupal\Core\Config\StorableConfigBase->castValue('display.default.display_options.filters.latlon.value.distance', Array) (Line: 211)
Drupal\Core\Config\StorableConfigBase->castValue('display.default.display_options.filters.latlon.value', Array) (Line: 211)
Drupal\Core\Config\StorableConfigBase->castValue('display.default.display_options.filters.latlon', Array) (Line: 211)
Drupal\Core\Config\StorableConfigBase->castValue('display.default.display_options.filters', Array) (Line: 211)
Drupal\Core\Config\StorableConfigBase->castValue('display.default.display_options', Array) (Line: 211)
Drupal\Core\Config\StorableConfigBase->castValue('display.default', Array) (Line: 211)
Drupal\Core\Config\StorableConfigBase->castValue('display', Array) (Line: 212)
Drupal\Core\Config\Config->save() (Line: 280)
Drupal\Core\Config\Entity\ConfigEntityStorage->doSave('search', Object) (Line: 392)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 259)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 637)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 986)
Drupal\views_ui\ViewUI->save() (Line: 321)
Drupal\views_ui\ViewEditForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('view_edit_form', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'edit', Array) (Line: 226)
Drupal\views_ui\Controller\ViewsUIController->edit(Object, NULL)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2880081-4--config_schema.patch | 764 bytes | drunken monkey |
Comments
Comment #2
gvigroux commentedComment #3
mkalkbrennerThis error could not be caused by Search API Solr Search. I'm not sure if Search API Location is responsible here. But if not, they should decide where to move this issue.
Comment #4
drunken monkeyYes, that's a Location issue. Apparently, the Location Views module doesn't specify a configuration schema for their filter plugin. Something like in the attached patch would be needed – however, that doesn't yet take the location input plugin-specific settings into account. Probably, the
plugin-[PLUGIN]options should instead be keys in aplugin_settingsarray, which could then specify different schemas based on the key (which the modules providing location input plugins would have to provide).I've no real clue what to do about the
filter_valueschema: as far as I can see, this will also vary by location input plugin, so no idea how to specify a schema for that. Maybe we just need to useignore. (Or find out where thefilter_valueschema is actually used/defined and override that manually.)Comment #5
gvigroux commentedAs expected, the above patch is not working and the issue is still the same :)
is there a way to
ignorethis schema error?Comment #6
gvigroux commentedIs there any tutorial on the Internet to learn how to build these schema?
Comment #7
borisson_You can find documentation at https://www.drupal.org/docs/8/api/configuration-api/configuration-schema... and that also links to a cheat sheet: https://www.drupal.org/files/ConfigSchemaCheatSheet1.5.pdf
Comment #8
gvigroux commentedThanks for pointing that but unfortunately it doesn't help me.
I understand that depending on the location plugin (geofield, others...) the schema will not be the same.
Today only Geofield is supported and I still don't manage to build the corresponding schema file.
It's frustrating to see that the preview is working and I cannot save the view to use it in my site :)
If I can get some help to solve that, I plan to port the module to D8: the rest of the migration is more straight forward.
Comment #9
gvigroux commentedUPDATE: I have fixed the schema issue :)
The current module has a lot of bugs so I will share it later, when it will be useable.
Comment #10
gvigroux commentedIf you need this module working, you can check:
https://github.com/gvigroux/search_api_location
It's working for me :)
Comment #11
drunken monkeyIf this fixes existing problems, it would be great if you could post a patch based on that to #2521942: Drupal 8 Port. Then more people could review and it might actually be committed.
Comment #12
gvigroux commentedShould I create a patch for : git clone --branch 8.x-1.x https://git.drupal.org/project/search_api_location.git
Or you want me to apply another patch before?
Comment #13
dbjpanda commentedThis project is now on github. It is under progress. https://github.com/dbjpanda/search_api_location_gsoc . We have decided to merge with Drupal code base in the next month. So no need to be worry. Marking this as postponed.
Comment #14
dbjpanda commentedClosing this issue as we are going to merge with the github code here https://www.drupal.org/node/2891943 . This issue is no more there.