[PR #20422] [MERGED] fix: WebSearch settings form validation errors #41248

Closed
opened 2026-04-25 13:31:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20422
Author: @jannikstdl
Created: 1/6/2026
Status: Merged
Merged: 1/6/2026
Merged by: @tjbck

Base: devHead: fix-websearch-settings


📝 Commits (1)

  • a184013 fix: explicit casting client errors with some datatypes in websearch settings

📊 Changes

1 file changed (+41 additions, -8 deletions)

View changed files

📝 src/lib/components/admin/Settings/WebSearch.svelte (+41 -8)

📄 Description

Summary

Fixes two validation errors in the WebSearch settings form that prevented users from saving configuration.

Issues Fixed

  1. .split() is not a function error: Domain filter list and YouTube language fields were attempting to call .split() on arrays instead of strings
  2. Type validation error: Timeout fields (FIRECRAWL_TIMEOUT, PLAYWRIGHT_TIMEOUT) were being sent as numbers from type="number" inputs, but backend expects strings

Changes

  • Added type checking before calling .split() on array/string fields in submitHandler
  • Convert numeric timeout values to strings before sending to backend
  • Convert timeout strings back to numbers when loading from backend for proper display in number inputs
  • Handle both array and string formats for domain filter and language fields

Recreate

Issue 1: .split() error

  1. Go to Admin Settings → Web Search
  2. Leave "Domain Filter List" empty
  3. Click Save
  4. Error: Uncaught TypeError: $.get(...).WEB_SEARCH_DOMAIN_FILTER_LIST.split is not a function

Issue 2: Timeout validation error

  1. Go to Admin Settings → Web Search
  2. Select "firecrawl" as Web Search Engine
  3. Enter 300 in "Firecrawl Timeout (s)" field
  4. Click Save
  5. Error: Input should be a valid string, input: 300

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/20422 **Author:** [@jannikstdl](https://github.com/jannikstdl) **Created:** 1/6/2026 **Status:** ✅ Merged **Merged:** 1/6/2026 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix-websearch-settings` --- ### 📝 Commits (1) - [`a184013`](https://github.com/open-webui/open-webui/commit/a1840133ef756e8d71386f04ca55e1cdf2da158e) fix: explicit casting client errors with some datatypes in websearch settings ### 📊 Changes **1 file changed** (+41 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/admin/Settings/WebSearch.svelte` (+41 -8) </details> ### 📄 Description ## Summary Fixes two validation errors in the WebSearch settings form that prevented users from saving configuration. ## Issues Fixed 1. **`.split()` is not a function error**: Domain filter list and YouTube language fields were attempting to call `.split()` on arrays instead of strings 2. **Type validation error**: Timeout fields (`FIRECRAWL_TIMEOUT`, `PLAYWRIGHT_TIMEOUT`) were being sent as numbers from `type="number"` inputs, but backend expects strings ## Changes - Added type checking before calling `.split()` on array/string fields in `submitHandler` - Convert numeric timeout values to strings before sending to backend - Convert timeout strings back to numbers when loading from backend for proper display in number inputs - Handle both array and string formats for domain filter and language fields ## Recreate **Issue 1: `.split()` error** 1. Go to Admin Settings → Web Search 2. Leave "Domain Filter List" empty 3. Click Save 4. Error: `Uncaught TypeError: $.get(...).WEB_SEARCH_DOMAIN_FILTER_LIST.split is not a function` **Issue 2: Timeout validation error** 1. Go to Admin Settings → Web Search 2. Select "firecrawl" as Web Search Engine 3. Enter `300` in "Firecrawl Timeout (s)" field 4. Click Save 5. Error: `Input should be a valid string, input: 300` ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 13:31:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#41248