Closed (fixed)
Project:
Drupal 8 Contrib Porting Tracker
Version:
8.x-0.x-dev
Component:
Module
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2014 at 15:15 UTC
Updated:
20 Feb 2017 at 15:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
flaviovs commentedPlease, see #2540256: Make git repositories standard compliant and in sync. It is OK to track development both in D.o and GH, but the way you are doing (i.e. throughout the use of orphaned branches) is usually not recommended, and it may make difficult to bring D.o in sync in the future.
Comment #2
alexmoreno commentedComment #3
alexmoreno commentedAgree, thank you flaviovs
Comment #4
alexmoreno commentedComment #5
malcomio commentedComment #6
malcomio commentedComment #7
mandclu commentedHas there been any consideration to making the D8 port a service class for the Search API instead of a standalone module?
Comment #8
alexmoreno commentedsounds reasonably good candidate to be a service, although not sure any of the contributors have time atm :-(
Comment #9
arunkumarkProject looks more complicate am not expertise in drupal so un assigned from this.
Comment #10
arunkumarkComment #11
mustanggb commentedComment #12
andypostHere's a WIP of porting https://github.com/skilld-labs/google_cse
Comment #13
immanuel.paul commentedHere is a simpler module that can be of some use
https://github.com/immanuelpaul/gcs
Comment #14
naveenvalechaThere;s a similar module in the PAs issue queue https://www.drupal.org/node/2724069 can we merge some of its work into the 8.x branch and reuse the code here ?
Comment #15
vprocessor commentedComment #16
andypostThere's proper merge of ported module https://github.com/skilld-labs/google_cse
Now we need to transfer to maintainers all commits
Comment #17
andypostFiled #2754725: Release 8.x-1.x-alpha
Commits authorship should be preserved
Comment #18
vprocessor commentedComment #19
andypostOne more porting attempt #2843268: [Meta] Port Google Custom Search Engine to Drupal 8
I think maintainer should decide about roadmap
Comment #20
navneet0693 commentedI should have payed more attention before I started porting the module. I have almost completed the port and this is a complete d8 port. It will be great if someone can review it. Or, if we can utilize and merge the codes to create a final release.
Comment #21
reid.braswell commentedAny updates on this from the maintainers or the port providers?
Comment #22
navneet0693 commented@reid.braswell, I am still waiting for the maintainers response, here's my version of port: https://github.com/navneet0693/google_cse/tree/8.x-1.x
Comment #23
alexmoreno commentedThank you navneet for that,
could you guys have a look too at the PR please? @malcomio @andy.post ?
https://github.com/alex-moreno/google-cse/pull/2/files
We'll put this code here once it's reviewed, don't worry about that repo, is just handy to put a few comments.
Thanks
Comment #24
rick hood commented@navneet0693 have you gotten your port to work? (https://github.com/navneet0693/google_cse/tree/8.x-1.x)
I installed it but cannot seem to get it to work and seeing errors such as this:
Notice: Undefined index: sitesearch in Drupal\google_cse\GoogleCSEServices->sitesearchOptions() (line 400 of modules/contrib/google_cse/src/GoogleCSEServices.php).I have a Google Custom Search Engine ID, but possibly I have something wrong in settings: admin/config/search/pages/manage/google_cse_search
Anyhow, thanks for any feedback.
Rick
Comment #25
navneet0693 commented@alexmoreno I have updated the code according to andypost's review !
Comment #26
navneet0693 commented@Rick Hood I am trying the module on a fresh installation, if I can reproduce the error, meanwhile I would request you to please tell me the steps you followed.
Comment #27
navneet0693 commentedComment #28
rick hood commented@navneet0693 Thanks
Steps to reproduce:
1. Enabled the module.
2. Created a search page at admin/config/search/pages with path search/google and I made that the default page.
3. Screenshot of the config screen is attached except with XXXXX:yyyyy for the Google Custom Search Engine ID, in case that is supposed to be private. Note I got it from my client and I am not sure if it is paid version or not. I probably have something wrong in the config there?
4. I placed the Google SCE Search block on a page. The search form shows up there, but returns no results on a search and I have errors on top that include:
Notice: Undefined index: sitesearch in Drupal\google_cse\GoogleCSEServices->sitesearchOptions() (line 400 of modules/contrib/google_cse/src/GoogleCSEServices.php).Notice: Undefined index: keys in template_preprocess_google_cse_results() (line 43 of modules/contrib/google_cse/google_cse.theme.inc).User error: Invalid placeholder (!google) in string: !google, or enable JavaScript to view them here. in Drupal\Component\Render\FormattableMarkup::placeholderFormat() (line 235 of core/lib/Drupal/Component/Render/FormattableMarkup.php).5. Note this is true for my local and my dev, and if it's important, neither of those has a URL with the final domain in it (e.g. myclientdomain.com).
6. Same applies if I go here: /search/google?query=my search text here
Thanks,
Rick
Comment #29
rick hood commentedAnd attached is what the search results look like.
Comment #30
rick hood commentedComment #31
rick hood commentedOne more thing, if I go here: https://cse.google.com/cse/publicurl?cx=XXXXX:yyyyy < with the correct key I get results
Comment #32
navneet0693 commented@Rick Hood, thank you helping me with these, I am working on them.
Comment #33
navneet0693 commented@Rick Hood, I was able to reproduce the issue, that seems to be appearing when you add a google cse block. I am working on it, you can also search using default search form.
Comment #34
rick hood commented@navneet0683 Thank you for working on it, appreciate it!
Comment #35
navneet0693 commented@maintainers, I am not sure, but block functioning seems to be broken in Drupal 7 too. We might need to modify js.
Comment #36
kreynen commented@navneet0693 Check your email. @maintainers now includes you
If you can get your work merged into the 8.x-2.x branch of https://www.drupal.org/project/google_cse, we should start opening specific issues there instead of trying to work through multiple issues here.
I really hope is the next update here is to move the status from Needs Review -> Fixed.
Comment #37
navneet0693 commented@Rick Hood Please copy the updated code from:
Known issue is: Google CSE block is unable to search.
Work around: You can use default search form.
Comment #38
navneet0693 commentedThe code is now available at 8.x-2.x branch of Google CSE module, here: http://cgit.drupalcode.org/google_cse/tree/?h=8.x-2.x
Thank you everyone who made this possible. Please file bugs in issue queue of module here: https://www.drupal.org/project/issues/google_cse.
Comment #39
rick hood commentedComment #40
rick hood commented@navneet0693
Thanks for your work on this.
This morning I grabbed this:
git clone --branch 8.x-2.x https://git.drupal.org/project/google_cse.gitI uninstalled the version I had installed, then re-installed this new version, just in case it had any database changes. I setup a Google CSE Search page at /admin/config/search/pages and made it the default. The other two search pages listed there are Content and Users, which comes with D8 core.
In comment #37 you say:
Known issue is: Google CSE block is unable to search.
Work around: You can use default search form
So, I enabled the regular search form, not the CSE search form.
I now get search results when using that form. That form is “A” in the attached screenshot (Search---CSE.jpg), and in the screenshot you can see the results. You can ignore the search box “B” that is shown, which is part of my template and is where I need to move A to.
But two issues:
1. I get these 2 errors:
Warning: strpos() expects parameter 1 to be string, object given in Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() (line 347 of core/lib/Drupal/Component/Utility/UrlHelper.php).Warning: htmlspecialchars() expects parameter 1 to be string, object given in Drupal\Component\Utility\Html::escape() (line 421 of core/lib/Drupal/Component/Utility/Html.php).2. The search box that appears with the results (“C”) does not work. When I submit something with that form, the URL is this: search/google?query=art (not ?keys=art). Worst case I probably do not need that search box so could hide it, but just letting you know.
Anyhow, this is my input for now.
Thanks,
Rick
BTW I should have mentioned before but I am on Drupal 8.2.4
More, for clarity in case not clear: when I use search box "A" I get results, when I use "C" I do not.
Comment #41
navneet0693 commented@Rick Hood You are so right! I encountered them, I will working on them around to get those resolved at earliest possible. I have opened an issue in PA https://www.drupal.org/node/2849868 to get it through PAR process so once this is fixed and we are quite sure about not breaking anything, we will be to create a release of module :)