Ticket #11375 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

Custom OLPC search in local content bundle landing page is broken

Reported by: greenfeld Owned by: manuq
Priority: normal Milestone: 13.1.0
Component: library Version: Development build as of this date
Keywords: Cc: humitos, martin.langhoff, dsd
Action Needed: no action Verified: no
Deployments affected: Blocked By:
Blocking:

Description

The OLPC-specific search on the locally-stored home page that Browse defaults to on XOs (but not upstream) cannot be used without Google claiming it is a source of "automated queries".

This may require an update similar to the one done to the OLPC Wiki's site-specific Google search, as a few months back that had a similar issue.

Seen in 11.3.0 os883.

Attachments

index-olpc2.html (9.0 kB) - added by manuq 23 months ago.
library index.html with the form changed, shows the same result as wiki.laptop.org, but this file is compiled so I have to change the template.
0001-Update-form-for-google-custom-search-in-the-homepage.patch (2.1 kB) - added by manuq 23 months ago.
Patch for olpc-library

Change History

Changed 2 years ago by greenfeld

  • summary changed from Custom OLPC in local content bundle landing page is broken to Custom OLPC search in local content bundle landing page is broken

Changed 23 months ago by martin.langhoff

  • cc humitos added
  • owner changed from erikos to manuq
  • milestone changed from 11.3.1 to 12.1.0

11.3.1 has sailed, but we may be on time to fix this for 12.1.0 (it repros on 12.1.0). Manuq, humitos?

My notes: the browser homepage is using the same "custom google search" that wiki.laptop.org used to use. We had this same problem with wiki.l.o, and we changed the search to fix it.

So now a search for "foo" from wiki.l.o works well, and the URL looks like:

http://www.google.com/cse?cx=011382939614944835298:qbypfcvcgvi&q=foo&oq=foo&aq=f&aqi=&aql=&gs_l=partner.3...0.0.1.14.0.0.0.0.0.0.0.0..0.0.gsnos%2Cn%3D13..0.0.&gs_204=2

A search from Browse homepage fails, the URL looks like: http://www.google.com/custom?hl=en&domains=laptop.org&sitesearch=laptop.org&q=foo&btn1=+%C2%A0%C2%A0Search+%C2%A0OLPC%C2%A0%C2%A0+

Options in my mind

  • Update the search form to the new Google URL with new hidden form values. Will this stay stable for a long time?
  • Update the search form to point to a dev.laptop.org/googlequery?q=<querystr> URL, add an apache mod_rewrite rule that adds the current params and redirects to the google servers with the additional params. If/when the google params change, we can change it at the server.

If you guys prefer the 2nd option, I'll be happy to do the mod_rewrite wranging on the server.

Changed 23 months ago by greenfeld

  • status changed from new to closed
  • resolution set to fixed

This was fixed as #11773.

Changed 23 months ago by dsd

  • cc martin.langhoff, dsd added

Martin's comment says this can be reproduced on 12.1.0. Should this (or the other ticket) be reopened?

Changed 23 months ago by manuq

I can see it's not broken for me, I can enter 'foo' in the olpc search box of Browse homepage and the result is the same as performing the search in wiki.laptop.org. However I see a different styled page, with the google mark instead of olpc mark.

So I started copying the html code from wiki.sugarlabs.org, which has the google "new method" for custom search, and started tweaking the stylesheet so it fits in the index.html library. But now I found that there is a <form> method still valid:

https://developers.google.com/custom-search/docs/js/cselement-reference?hl=es#form

Putting the same search engine ID as in wiki.laptop.org in the form gives the same result page, styled with the olpc logo at the top left. I'll continue this way and provide a patch for olpc-library.

Changed 23 months ago by manuq

library index.html with the form changed, shows the same result as wiki.laptop.org, but this file is compiled so I have to change the template.

Changed 23 months ago by manuq

Patch for olpc-library

Changed 23 months ago by manuq

  • status changed from closed to reopened
  • resolution deleted

Changed 23 months ago by dsd

  • next_action changed from diagnose to review
  • milestone changed from 12.1.0 to 12.2.0

Changed 20 months ago by dsd

  • next_action changed from review to add to build
  • component changed from browse-activity to library

Fixed in olpc-library-2.0.7-1.fc18

Changed 20 months ago by dsd

  • next_action changed from add to build to test in build

Test in 13.1.0 build 1.

Changed 20 months ago by greenfeld

  • status changed from reopened to closed
  • next_action changed from test in build to no action
  • resolution set to fixed

The OLPC custom search works in Browse in 13.1.0 os1.

Note: See TracTickets for help on using tickets.