i get lots of
Undefined index: EM in /var/www/glw/drupal/sites/all/modules/apachesolr/apachesolr.index.inc on line 236.
warnings when indexing some crappy old html.
seems that the regex to get the tags is case insensitive, but the code assumes that the tags are always lower-cased, causing the warnings.
attached patch fixes that.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 763072-6.x-1.x-11.patch | 1.85 KB | pwolanin |
| #5 | drupal_strtolower.patch | 1.03 KB | robertdouglass |
| #4 | drupal_strtolower.patch | 1013 bytes | robertdouglass |
| solr.lower_.tags_.patch | 907 bytes | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commentedComment #2
Anonymous (not verified) commentedalso, just noting something else i don't have time to create a patch for yet. in apachesolr_add_tags_to_document() and related functions, code does this sort of thing:
this causes all sorts of errors in my logs, for example:
Undefined index: ts_vid_2_names in /var/www/glw/drupal/sites/all/modules/apachesolr/SolrPhpClient/Apache/Solr/Document.php on line 322.
the code seems to assume that was set elsewhere, so we need to append? and there's more like it. i've suppressed the errors with this in Apache_Solr_Document:
but this seems to be a bug in the drupal module code...
Comment #3
pwolanin commentedpatch looks reasonable
Comment #4
robertdouglass commentedEven old crappy HTML can be UTF8, right? Using drupal_strtolower() and applying. Thanks!
Comment #5
robertdouglass commentedThe lower is in the wrong place. This is the one I'm committing to 6.2.
Comment #6
robertdouglass commented#763072 by robertDouglass, justinrandell | pwolanin: Fixed warnings when indexing old, crappy html.
Comment #7
pwolanin commentedneeds to be ported to which branch?
Comment #8
robertdouglass commentedSorry - to 6.1.
Comment #9
pwolanin commentedNo, we never have multi-byte tags. I think the original patch was correct.
The array keys here are what we are matching.
Comment #10
pwolanin commented.
Comment #11
pwolanin commentedHere's the patch I'm committing to 6.x-1.x
Comment #12
pwolanin commentedfixed in 6.x-2.x. Needs to be ported to D5.
Comment #13
jpmckinney commentedFixed in 5-2.
http://drupal.org/cvs?commit=361222
Note that the unrelated issue in #2 has since been resolved.