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

Number of posts found: 0 #11

Closed
naumanahmed19 opened this issue Apr 15, 2015 · 20 comments
Closed

Number of posts found: 0 #11

naumanahmed19 opened this issue Apr 15, 2015 · 20 comments

Comments

@naumanahmed19
Copy link

Hi,

Thanks for this plugin. I have added to my theme but getting some issue. Every time I search it return Number of posts found: 0

here is a link to my blog
http://ghost.xvelopers.com/voltov/

@naumanahmed19
Copy link
Author

Got it fixed .

@orkhanalizade
Copy link

I have the same bug. How to fix it? @naumanahmed19

@ghost
Copy link

ghost commented Feb 10, 2016

@naumanahmed19 I've been having the same issue. It would be great if you could explain how you fixed it, or at least point others towards a solution. Thank you in advance.

@steven-tib
Copy link

Hi, I'm having the same issue, has anyone found a solution that you could share ?
Thanks a lot

@Windyo
Copy link
Collaborator

Windyo commented May 19, 2016

Hi there @steven-tib !

Could you give me a link to your blog?
That would allow me to dig a bit deeper and see what could have happened.
Thanks

@zebheone
Copy link

zebheone commented May 23, 2016

I have same issue! http://twelvepurplepills.com/ thank you (you can see the issue on my dev env blog http://oliver-flipper.codio.io:3000/ if it's running)

@steven-tib
Copy link

@Windyo sorry I don't have deployed anything yet, just working locally. I will send you a link later cause I can't deploy right now for other reasons.
Maybe studying the case of @zebheone will help me as well.
Thank you

@Windyo
Copy link
Collaborator

Windyo commented May 24, 2016

@steven-tib okay, let me know how it goes.

@zebheone : twelvepurplepills seems to work for me, but you're on the old version of Ghosthunter. I tried running a simple API call :

            $.get(ghost.url.api('posts', {limit: "all", include: "tags"})).done(function(data){
                searchData = data.posts;
            console.log(searchData);
          })

and I got an exception "ghost is not defined", which means that you probably haven't activated the ghost public API through the admin panel > Labs.
Oliver-flipper is not running at the moment, so I can't test it.

@Tamxaun
Copy link

Tamxaun commented May 25, 2016

@Windyo I had tried your test code and found an interesting thing, that on the error.hbs template the public api doesn't work )

@zebheone
Copy link

@Windyo ty for helping, the production blog is, as you mention, working. Now I got the dev env online I hope you can check it, I will try to keep it online for 8 hour. Public api on the dev env is active and I got the last ghostHunter code form git.

@Windyo
Copy link
Collaborator

Windyo commented May 25, 2016

Hi @zebheone,

Following the link you posted for the dev env still returns an http 404.
Let me know where I can access it so I can troubleshoot this.

@Tamxaun I tested it and you're right ! You should probably open an issue with the Ghost team for that.

@zebheone
Copy link

@Windyo Hi! it's up and running! still gives you 404? http://oliver-flipper.codio.io:3000/

@Windyo
Copy link
Collaborator

Windyo commented May 25, 2016

Works on mobile but not on my laptop fr some reason. I'll check on another connectio' in about 30 minutes or so.

@zebheone
Copy link

zebheone commented May 25, 2016

@Windyo thank you again! I think it's your connection, I can't connect to my blog dev env on my job network because of port blocking (but I don't get 404, website does not load). I can connect on mobile and home network. I'm sorry about this

@Windyo
Copy link
Collaborator

Windyo commented May 25, 2016

@zebheone, I'm getting an error related to Jquery for some reason.
Could you try another CDN , or Zepto ?

EDIT : Nevermind, zepto alone doesn't work. Try with this CDN :
https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js

EDIT : Okay, I forced another version of js on my end. Anywho, I'm getting an HTTP403 error on the API endpoint.
The URL that's getting called is http://oliver-flipper.codio.io/ghost/api/v0.1/posts/?limit=all&include=tags&client_id=ghost-frontend&client_secret=175a16666fde, which returns a 403.
Manually editing the request to http://oliver-flipper.codio.io:3000/ghost/api/v0.1/posts/?limit=all&include=tags&client_id=ghost-frontend&client_secret=175a16666fde gets the required result. I'll check around and see what's the protocol here.

@zebheone Can you confirm your ghost version for me ? Thanks

@zebheone it seems this could be a problem with your ghost config.js. Did you specify the port there ?

@zebheone
Copy link

zebheone commented May 25, 2016

@Windyo Hi in my default.hbs I got

<script type="text/javascript">  
  if (typeof jQuery == 'undefined') {
    document.write('<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"></'+'script>');
  }
    </script>

I downloaded zepto and changed the code to

<script type="text/javascript" src= "{{asset "js/zepto.min.js"}}"></script>

but nothing is working

@Windyo
Copy link
Collaborator

Windyo commented May 25, 2016

@zebheone Yeah I tested with Zepto, that didn't change much, hence why I struck that part out.

In any case can you check if you specified to correct URL in your config.js file ? It probably doesn't specify the port.

@zebheone
Copy link

@Windyo wow now works! so stupid me! so I guess it will work in production! thanks for your time and help

@Windyo
Copy link
Collaborator

Windyo commented May 25, 2016

@zebheone glad to help. Closing this issue again.
@steven-tib let me know how it all works out.

@Windyo Windyo closed this as completed May 25, 2016
@duncancrozier
Copy link

Hi, I'm having a similar issue to this - the search function worked previously when it was on v0.4.0 when I first added it but now it doesn't return any results. I'm getting ghostHunter: init - so it seems to be partially working, also there are no JS errors in the console.
Any help would be appreciated please!

This was referenced May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants