New Search function doesn't work outside of LAN

I’m using the ghost:latest image in Docker which I’ve been using now for nearly a year, everything all fine and dandy. I was really happy when the new search function came out. I added it to the Nav bar, and made it accessible via the button, everything seemed to be working perfectly.

Then I realised that although the search bar comes up (from Nav button, extra search button, cmd/ctrl+k), when it’s accessed outside my LAN no actual results are populated. Instead the ‘loading’ style circle just keeps going round.

I’ve checked the container logs and cannot see anything relevant to the search when accessing it on LAN or over the web. I do run a local DNS resolution via PiHole, but I wouldn’t have expected that to cause any issues. It’s not a Cloudflare or CORS thing either.

When I open console, I do see that there’s two errors I don’t get when accessing via LAN, they’re as follows:

[Portal] Failed to initialize: TypeError: Cannot read properties of undefined (reading 'includes')
    at C (helpers.js:254:27)
    at ghost-logo-small.svg:487:16
    at u (runtime.js:63:40)
    at Generator._invoke (runtime.js:294:22)
    at Generator.throw (runtime.js:119:21)
    at d (asyncToGenerator.js:3:20)
    at l (asyncToGenerator.js:29:9)
(anonymous) @ normalize.ts:183
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
    at e.<anonymous> (search-index.js:66:28)
    at s (regeneratorRuntime.js:86:17)
    at Generator._invoke (regeneratorRuntime.js:66:24)
    at Generator.next (regeneratorRuntime.js:117:21)
    at v (asyncToGenerator.js:3:20)
    at i (asyncToGenerator.js:25:9)

I’m not really sure what those errors actually mean, or how to go about trying to troubleshoot them, so any help would be greatly appreciated!

Are you able to share your site URL? It seems like it might not be configured properly in Ghost, but it’s hard to say :slight_smile:

Yes of course, thank you for the reply.

https://academy.pointtosource.com

Thank you for taking the time to check.

The Content API is blocked by Authelia, so search isn’t able to fetch the data it needs :slight_smile:

1 Like

Hi Vikas,

Thank you so much for that! Took me a minute to figure out what rule I needed to add but I think I managed it and it now seems to work :slight_smile:

1 Like