Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't work with Media CDN enabled [Feature] #9

Open
fabioelia opened this issue Apr 15, 2021 · 4 comments
Open

Plugin doesn't work with Media CDN enabled [Feature] #9

fabioelia opened this issue Apr 15, 2021 · 4 comments

Comments

@fabioelia
Copy link

Keep seeing 404's on the site search as its looking for the file locally instead of on the CDN.

@fabioelia fabioelia changed the title Plugin doesn't work with Media CDN enabled Plugin doesn't work with Media CDN enabled [Feature] Apr 15, 2021
@Erudition
Copy link

Media CDN only applies to media. Unless you modified the plugin, it only indexes posts, not attachments.

@Erudition
Copy link

Erudition commented Oct 21, 2023

Oops, I understand now - you mean the search index itself is being saved to the CDN (since it's put in the uploads folder) but the frontend is looking for it in the wordpress directory, getting you an error like:

19:09:34.640 XHRGET
https://3215b04c-84e4-4a42-8132-902bb6d4b51e.static.getshifter.net/wp-content/uploads/wp-sls/search-feed.xml
[HTTP/2 404 Not Found 385ms]

and then the JS fails with

19:09:35.058 XML Parsing Error: syntax error
Location: https://3215b04c-84e4-4a42-8132-902bb6d4b51e.static.getshifter.net/
Line Number 1, Column 1: 3215b04c-84e4-4a42-8132-902bb6d4b51e.static.getshifter.net:1:1

Even though the index does exist, somewhere like
https://cdn.getshifter.co/b306415ec164a8b9919d0832d8ceaf1a8502d826/uploads/wp-sls/search-feed.xml

@Erudition
Copy link

Problem is this line on the frontend...

const searchFeed = location.origin + '/wp-content/uploads/wp-sls/search-feed.xml';

@Erudition
Copy link

Erudition commented Oct 21, 2023

This was referenced Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants