Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, when I use this module in Firefox, I go to a page like /search/node/Query?page=1
But Drupal's search pages start with 0. The problem is, if you have 5 results and set page=1, then you will see a "no results" page, because there are no results > 10 (page 2).
I get the impression that the browser sets the default page = 1. How can we fix this?
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI am not sure you are referring to the result provided from the module, or from the search module.
You are referring to
, which is the relative path used by search.module.Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedHi Kiam,
after you add the opensearch provider to firefox, you can search the drupal site using the browser's top right box (in my case).
This box submits to /search/node/Query?page=1 (which is Page 2 in Drupal)
So I think the browser adds this "1". I removed the page={startPage}, so it submits to /search/node/Query, without a "page=1". Seems unecessary.
So change:
to:
It think that is the way to do it. I don't see why the browser-search should set the page=x.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedThat is necessary for the other pages. A search could return more than one page of results; without that parameter, you would always see the first page.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI got it; if
startPage
is used, the search engine will always ask for page #1, which is the second results page for Drupal.I removed the parameter
startPage
, even if I could have usedpage={startPage?}
, which would have made that parameter optional. I noticed that Firefox doesn't pass such parameter for any of the search engines it currently defines (including Wikipedia, that is added to Firefox through an Opensearch description file returned from wikipedia.org).I changed the code, and committed it. Thanks for your report, and help.