Search bar issue (little wheel that turns)

Hi,
I use Ghost Version: [5.79.1] installed with Docker
Theme: Neon
but I have this with all the themes: Casper, Source,…

My search bar is not working. I have a little wheel that turns when I try to search. On smartphone, it’s the same.

The only logs I have about this are those from the browser (F12).

Uncaught (in promise) TypeError: i is undefined
    init search-index.js:66
    setupSearchIndex App.js:62
    componentDidUpdate App.js:54
    React 2
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    unstable_runWithPriority scheduler.production.min.js:18
    React 6
    clickHandler App.js:90
    setupCustomTriggerButton App.js:110
    setupCustomTriggerButton App.js:108
    initSetup App.js:78
    componentDidMount App.js:27
    React 2
    unstable_runWithPriority scheduler.production.min.js:18
    React 9
    init index.js:36
    <anonymous> index.js:47
    <anonymous> sodo-search.min.js:1
    <anonymous> sodo-search.min.js:1

Thanks in advance.

Hey there :wave:

This will be difficult to debug with the info provided. Are you able to share your URL?

Of course!

In the docker logs, everything is normal.

[2024-02-14 14:08:16] INFO "GET /members/api/announcement/" 200 2ms
[2024-02-14 14:08:16] INFO "GET /assets/js/sourcemaps/tiny-slider.js.map" 301 3ms
[2024-02-14 14:08:16] INFO "GET /page/2/" 200 66ms
[2024-02-14 14:08:20] INFO "GET /assets/js/sourcemaps/tiny-slider.js.map" 301 1ms
[2024-02-14 14:09:16] INFO "GET /rss/" 200 142ms
[2024-02-14 14:14:31] INFO "GET /rss/" 200 116ms
[2024-02-14 14:15:09] INFO "HEAD /" 200 93ms
[2024-02-14 14:15:10] INFO "GET /" 200 127ms
[2024-02-14 14:15:10] INFO "GET /content/images/2024/02/fotor-ai-202402131236.jpg" 200 3ms
[2024-02-14 14:15:10] INFO "GET /content/images/size/w256h256/2023/11/flavico.png" 200 4ms

I deployed Ghost on a fresh VPS, from scratch, and have the same problem. On Brave, FF,…

Looking at the dev tools network calls (F12 - highly recommended), I see the attempt to get data for the search getting redirected to https://belginux.com/cosmos-ui/login?notlogged=1&redirect=/ghost/api/content/posts/

That’s quite possibly the source of your problem…

1 Like

Thank you for you message.
In the first post it’s the answer of the dev tools (F12) when I click on the Search bar.

Any hint to solve the issue?

SOLVED: it’s was an issue with a route…

Thank you very much for the help!

1 Like