Search view and display from which to migrate settings: selecting "None" causes error

Created on 7 August 2025, about 13 hours ago

Problem/Motivation

When migrating a Solr search server to SearchStax, if I select "- None -" under "Search view and display from which to migrate settings", the migration fails. The problem appears to be due to code checking explicitly for NULL instead of an empty value. The error message indicates that the migrateFromView() method was called (I don't think it should have been), and that NULL was passed as the display_id parameter (string is required).

Steps to reproduce

1. Install and enable the searchstax module and solr_to_searchstax_ss_migration.
2. Ensure you have a searchstax search app to migrate to.
3. Go to /admin/config/search/solr-to-searchstax-ss-migration. Under "Migrate search servers", click the "Migrate" link for your desired server.
4. Authenticate with SearchStax if necessary.
5. On the next page, under "Search view and display from which to migrate settings", select "- None -".
6. Click "Migrate Server Now".
7. It fails.

Proposed resolution

In solr_to_searchstax_ss_migration/src/Form/MigrateServerForm.php, line 757, instead of checking for an explicit NULL, use the empty function. This is because the "- None -" choice results in an empty string, and the explode() call on line 758 sets display_id to NULL.

MR forthcoming.

πŸ› Bug report
Status

Active

Version

1.7

Component

Solr Migration sub-module

Created by

πŸ‡ΊπŸ‡ΈUnited States paulmckibben Atlanta, GA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024