Google Custom Search
ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4
Back to this add-on's main page
View Other Add-ons From Derek Hogue
The Access Not Configured Error
Support (Resolved)
trimtab
|
Posted: 10 November 2013 05:51 AM |
|
|
|
Hello,
I’ve been getting the Access Not Configured error. There was another post on this topic. The person with the problem was told to make sure their API was correctly set up. The person was then asked by the support developer if they had done this.
Since there was no reply to the support developer’s question, I’m wondering if there could be anything else that would cause this error message to crop up. I’ve checked to make sure my API and CSE ID are correctly set up and they seem to be as far as I am able to tell (this is all rather unfamiliar as I’m more of a front end guy). I’m really puzzled by this. Perhaps there’s a mistake in my code?
Here are the relevant snippets for the search form:
... {exp:google_custom_search:form results_page="search/results"} <fieldset> <label for="keywords" class="hidden">Search</label> <input type="text" name="keywords" value="" class="searchBox" /> <input type="submit" name="submit" value="Search" class="searchButton" /> </fieldset> {/exp:google_custom_search:form} ...
And the results page:
... {exp:google_custom_search:results cse="010158288068675332052:d38c-i3gjb4" api_key="AIzaSyAScg0xw2A2w0dD64TglFddpMyuIt4lpXo" keywords="{segment_3}" replace_title=" | Finelife World"} <div class="mainArticle" id="mainArticle" role="main"> <article> <div class="titleGroup mainHead"> <h1>Search Inquiry for: {keywords}</h1> {if search_results}<h3>— A total of {total_search_results} results</h3>{/if} {if no_search_results}<h3>— Sorry, your search returned no results</h3>{/if} </div> {if search_results} <p>Your search for <strong>{keywords}</strong> received {total_search_results} results.</p> {results} {if result_count == "1"}<ol class="featuredReport">{/if} <li> {if image}<a href="{url}"><img src="{image}" alt="{title}">{/if} <a href="{url}" class="result_{format}">{title}</a> - {excerpt} <small>({url})</small> </li> {if result_count == total_page_results}</ol>{/if} {/results} {/if} {/exp:google_custom_search:results} </article> </div> ...
My setup is as follows:
EE v2.5.2 - Build Date: 20120606
OpenSSL support : enabled
cURL support : enabled
Any help would be greatly appreciated.
|
|
|
Derek Hogue
|
Posted: 11 November 2013 11:29 AM |
# 1
|
|
Developer
|
Have a look in the Google APIs console, under APIs & Auth → Registered Apps. Is the Allowed Referrers is set to “Any referrer is allowed”?
|
|
|
trimtab
|
Posted: 11 November 2013 11:53 PM |
# 2
|
|
|
Yes, under API’s & Auth/Registered Apps/Browser Key (I’m assuming this is where I need to be looking), the Allowed Referrers is set to “Any referrer is allowed.” And if it helps, the Custom Search API status is turned on.
|
|
|
trimtab
|
Posted: 12 November 2013 08:24 AM |
# 3
|
|
|
Okay, I found out what the issue was. I was using the wrong API key #. I didn’t know that there was more than one. Like I said this is all new territory for me.
I’m no longer getting the error message, I’m getting my designed template. As of this writing, however, whenever I enter a search keyword it turns up no results. This happens even if I enter the title of an article. I’m still tickering with this in the hopes of finding the solution and I don’t know if I should start a new thread but I figured I’d mention it.
|
|
|
Derek Hogue
|
Posted: 12 November 2013 09:34 AM |
# 4
|
|
Developer
|
Glad you sorted that particular error. Re: no results - is your CSE set to return results from your site? If you do a test search of your CSE via the CSE dashboard, do you get results?
|
|
|
trimtab
|
Posted: 12 November 2013 10:00 AM |
# 5
|
|
|
I’ll take a look at that. I’m hoping that’s what it is. I’ll let you know. Thanks.
|
|
|
trimtab
|
Posted: 12 November 2013 04:18 PM |
# 6
|
|
|
I’m assuming you meant if I enter a keyword in the sample search box to the right in the CSE dashboard. I entered one (again, an article title) and while ads showed up no results did.
|
|
|
Derek Hogue
|
Posted: 12 November 2013 04:28 PM |
# 7
|
|
Developer
|
So this points to Google not being able to crawl your site. is it password-protected? Do results from your site show up when you use a regular search via google.com? Have you added your site to the list of sites to search in the CSE dashboard?
|
|
|
trimtab
|
Posted: 12 November 2013 07:42 PM |
# 8
|
|
|
Ahh, the passwords—maybe that’s what it is. Because my site is added to the list. My templates are password protected right now because they’re still under development. I suppose when I’m working on the search functionality I need to remove the passwords. I’ll do that and let you know what happens.
|
|
|
Derek Hogue
|
Posted: 13 November 2013 08:47 AM |
# 9
|
|
Developer
|
Yup, that’ll do it. Google needs to be able to crawl your site in order for the API (and hence the module) to be able to return any results.
|
|
|
trimtab
|
Posted: 14 November 2013 03:51 AM |
# 10
|
|
|
Well, I removed all the password protections and still any search inquiries turn up No Results. Does it take a while to kick in or something?
|
|
|
Derek Hogue
|
Posted: 14 November 2013 09:10 AM |
# 11
|
|
Developer
|
Yes, Google needs time to index your site - and they also need to know it exists. If you haven’t linked to it anywhere publicly, Google has no way to know it’s there to index. You can speed things along by submitting it via Webmaster Tools.
|
|
|
trimtab
|
Posted: 15 November 2013 01:35 AM |
# 12
|
|
|
Okay, I’ll do that and get back to you. Thanks Derek.
|
|
|
trimtab
|
Posted: 17 November 2013 01:42 AM |
# 13
|
|
|
Is there anything specific I should be doing in the Webmaster Tools? So far I requested that Google fetch my site URL and all it’s linked pages. I submitted my site to be indexed. I also used two methods of site ownership verification. Is there anything else I may have missed?
|
|
|
Derek Hogue
|
Posted: 19 November 2013 09:20 AM |
# 14
|
|
Developer
|
That should do it - I’d imagine it will be indexed by now.
|
|
|
trimtab
|
Posted: 20 November 2013 06:03 PM |
# 15
|
|
|
Yes, it’s working now. In fact, it’s working a bit too well!
My site is an online magazine and, naturally, it has articles that are included in the sidebar (“most read stories”, “also in this article section”, etc). If I search for an article that happens to be listed in one of these sidebar lists, it looks like Google is listing every template that happens to include the sidebar. Which is pretty much all of them! So a inquiry for a term that’s included in just one article on the site might return 33 (mostly irrelevant) results. And the most useful ones don’t even appear up top.
It looks like Google may still be doing some crawling because the number of results seems to be changing daily. Unfortunately the numbers are increasing. My question is will Google refine the search results over time to the include most relevant or will I be stuck with these potluck results?
|
|
|