Closed (fixed)
Project:
Apache Solr Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
8 Jul 2011 at 06:58 UTC
Updated:
24 Dec 2011 at 11:30 UTC
Jump to comment: Most recent file
When a file is not found on the server (error 404), you will get a notice in the status report (D7.4 + PHP 5.3.3)
Line 722 of apachesolr_search.module:
<?php
function apachesolr_search_form_search_form_alter(&$form, $form_state) {
if ($form['module']['#value'] == 'apachesolr_search') {
// ....
}
}
?>
Needs to be:
<?php
function apachesolr_search_form_search_form_alter(&$form, $form_state) {
if (!empty($form['module']['#value']) && $form['module']['#value'] == 'apachesolr_search') {
// ....
}
}
?>
(check for empty)
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 1212610-18.patch | 734 bytes | nick_vh |
| #9 | 1212610-notices.patch | 3.97 KB | nick_vh |
| #4 | 1212610-undefinedindex.patch | 1.68 KB | nick_vh |
Comments
Comment #1
egarias commentedNot corrected in Beta9.
Now the line is 841,
We also have this one:
apachesolr_search_search_type en apachesolr_search_menu_alter() line 148 apachesolr_search.module
Comment #2
egarias commentedI think it must be active,
The apachesolr_search_search_type en apachesolr_search_menu_alter() line 148 apachesolr_search.module, i think has impact on search page configuration "Core search= when trying to add some custom filter wich then is never saved.
We also have:
Notice: Undefined index: apachesolr_search_per_page en apachesolr_search_user_defined_search_page() (línea 48 de /home/empresar/public_html/sites/all/modules/apachesolr/apachesolr_search.pages.inc).
AND
Warning: Division by zero en pager_default_initialize() (línea 281 de /home/empresar/public_html/includes/pager.inc).
Comment #3
elianmI'm getting this one too:
Another one while executing cron is:
Comment #4
nick_vhDoes this fix it?
Comment #5
nick_vhComment #6
egarias commentedpatch applied, no success,
the messages are:
on page: http://empresarios.peoplenews.me/?f[0]=im_5_field_provincia%3A33
I think this has a big penalty on CPU as today my server is overloaded
Thanks
Comment #7
nick_vhCould you please provide us with a patch? I'm not getting those notices so you did something it seems to invoke them. Or write down steps to reproduce them?
Comment #8
egarias commentedThe site: http://boletin.artic-group.net has 4 pages:
Core search (bundle:boletin OR licitaciones)
Boletin (bundle:boletin)
Licitaciones (bundle:licitaciones)
taxonomy (bundle:boletin OR licitaciones)
The pages never keep the custom search checkbox marked.
but some seem to work and others no (licitaciones and taxonomy show good results and the pager, but boletin and core search don't)
This behaviour is happening on 3 different sites including the boletin.artic-group.net.
Tell me what to do if I can help.
Comment #9
nick_vhHmm, I think I know what happened. We reverted some functionality with regards to drupal core and search pages in the end and probably it wasn't validated completely.
Another try, I guess this one should work.
Also I can see a weird issue in your description. It seems that you have a search page as your frontpage. I'm not sure how it currently handles that so I wouldn't recommend that practice yet.
Comment #10
nick_vhComment #11
egarias commentedperfect!!! many thanks this is fast and efficient!
Regarding your recomendation about front page, I see no visible errors, so maybe I can keep my front page as a search one, considering my content it is very convenient if no collateral effects.
Thanks
Comment #12
nick_vhDid some code cleanup in the patch and committed. Thanks for the co-operation!
Comment #14
marcvangendIf it helps anyone: I also ran into "Notice: Undefined index: apachesolr_search_per_page" today, using the beta11 release. The notice disappeared after re-saving the search page settings at /admin/config/search/apachesolr/search-pages/[search-page]/edit (where [search-page] is the machine name of your search page).
Comment #15
nick_vhCould you also tell us the exact error, eg.: where it came from? Line and file?
Comment #16
marcvangendNick, the error was:
Comment #17
raulmuroc commentedAs said before ,everywhere is found the following:
Needs to be:
They're different lines with this problem. This is not fixed cuz I downloaded the latest version of Apache solr Integration and problem persists.
Comment #18
nick_vhCan you please be a bit more descriptive when you mention there are different lines with this problem?
attached is the patch but you could have easily done the same.
Comment #19
nick_vhCommitted this small patch. Please open a new issue next time
Comment #20
nick_vh