#72 closed defect (released)
Omegascript $set{stem_all,true} affects $field processing
Reported by: | Mike Hsu | Owned by: | Olly Betts |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Omega | Version: | 0.9.4 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | Mac OS X |
Description
When an Omegascript template contains the command $set{stem_all,true}, later references to $field{XXX} return nothing.
This appears to be caused by new "fieldnames" processing introduced in 0.9.3 The code in print_caption() in query.cc obtains an iterator to a "fieldnames" option via
opt = option.lower_bound("fieldnames");
But because there is currently no default "fieldnames" option, if there is no "fieldnames" option set in Omegascript, lower_bound will return an iterator pointing to the "stem_all" option. This is then incorrectly processed as the "fieldnames" option, and if it has a non-null value, the "field" map is never loaded.
The short-term workaround is to include a $set{fieldnames,} command in the template, if it isn't already being used for something.
Attachments (1)
Change History (5)
by , 19 years ago
Attachment: | omega-fieldnames.patch added |
---|
comment:1 by , 19 years ago
Status: | new → assigned |
---|
Yes, your analysis is spot on!
Could you try the attached patch?
comment:3 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thanks for testing.
Fixed in SVN trunk.
comment:4 by , 19 years ago
Operating System: | → Mac OS X |
---|---|
Resolution: | fixed → released |
Fixed in 0.9.5
Proposed fix