Closed (duplicate)
Project:
Apache Solr Search
Version:
7.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2011 at 11:48 UTC
Updated:
23 Jul 2012 at 16:10 UTC
In menu.inc:
for ($i = 0; $i < $router_item['number_parts']; $i++) {
if ($link_map[$i] == '%') {
$link_map[$i] = $path_map[$i];
}
when you have no search term, this tries to iterate 3x, but %map only has 2 values:
Array
(
[0] => search
[1] => site
)
because $router_item['number_parts'] = 3, not 2...
Comments
Comment #1
nick_vhPlease give us more context specific information. What is the configuration of your search page, special cases, ....
Comment #2
stephenrobinson commentedI went to /admin/config/search/apachesolr/search-pages/add and added User ID's, perhaps the path needs to be 3 tokens? In my case I will generate an invisible node-user-profile content type (with a goto user account on view content type), node out of user+profile info for the search index, like what I did with D6, as this lists all contents and users at the same time, which is what my customers like, so am not going to be using this feature anyway...
Comment #3
nick_vhCan't reproduce. Apologies
Comment #4
nnevillin my case removing "%" placeholder in all solr pages was helpful
Comment #5
netsensei commentedHello,
We're still encountering this bug. We're using Drupal 7.12 + solr 1.0-rc2 of the module. We've created a basic search page with a single facet and it returns this error:
I believe it has something do with the patch in http://nickveenhof.be/blog/lets-talk-apache-solr-clean-urls and #1108314: Undefined offset: 2 in _menu_translate
When I put lines 164 - 174 in apachesolr_search.module in comment, the issue disappears after a cache clear.
Comment #6
nick_vhwhat if you remove the 'load arguments' => array('%map', '%index'), from the array? They've become useless now
Comment #7
swentel commentedI can confirm. It doesn't make sense to have two menu router items, especially one with a wildcard. It's always the second one that's going to be found anyway.
Come to our office if you want to find out :p
Comment #8
nick_vhnot always, what if you have a path without a search key?
Comment #9
nick_vhShould be resolved in latest dev
#1652746: Notice: Undefined offset: 3 in _menu_translate()
Comment #9.0
nick_vhtypo