View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 391 | RackTables | default | public | 2011-02-14 11:09 | 2011-02-14 16:59 |
| Reporter | Assigned To | andriyanov | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.19.0 | ||||
| Target Version | 0.19.1 | Fixed in Version | 0.19.1 | ||
| Summary | 391: Exact Searches now returning no results and not auto directing to object | ||||
| Description | When searching for an object by exact name no results are returned | ||||
| Tags | No tags attached. | ||||
| I cannot reproduce this problem. Could you describe it in more details? | |
|
Hi I'm new to mantis so may have missed an import point. This is with a test install of 0.19 beta with a copy of our live 18.6 DB as the base install. Basically on 18.6 and below if we searched for a device by name "eg router1" and that device existed it would take you straigh to the object page. Now it seems to show no results. I think the redirect is probably broke or something. |
|
| I have tried this kind of search on my database and it works like before. Are there any relevant messages in server error log? | |
|
Ok done a little digging and seems to be an issues with php "key" function or the summary data not sure which at min. /inc/interface.php ~Line 3752 $realm = key($summary); $record = current($summary); print_r($summary); print "Realm=$realm"; print_r(array_keys($summary)); Output below: Array ( [object] => Array ( [236] => Array ( [id] => 236 [by_attr] => Array ( [0] => name ) ) ) ) Realm= Array ( [0] => object ) Will continue to investigate. Setup is Centos 5.5 php 5.1.6 |
|
| Tried a vanila install of 0.19.0 and have the same issue. Created a test object and search for test and get back a blank search page. Redirect to object fails. | |
|
Could you please try the following patch? If it is helpful, I'll merge it into trunk. Unfortunately I can not reproduce this issue on my PHP installation, so your help will be appreciated. Simply save it into a file, change dir to your racktables root (where Changelog file persist) and execute the command patch < /path/to/patch.file Index: wwwroot/inc/interface.php =================================================================== --- wwwroot/inc/interface.php (revision 4222) +++ wwwroot/inc/interface.php (working copy) @@ -3780,10 +3780,8 @@ echo "<center><h2>Nothing found for '${terms}'</h2></center>"; elseif ($nhits == 1) { - $realm = key ($summary); - $record = current ($summary); - if (is_array ($record)) - $record = current ($record); + foreach ($summary as $realm => $container) + $record = array_shift ($container); switch ($realm) { case 'ipv4addressbydq': |
|
| Yeah that has worked a treat. Must be a version specific issue somewhere. | |
|
This issue will be fixed in the final release of 0.19.0. The change is in SVN now. |
|
| The fix will be available through 0.19.1 release. Thanks to all. | |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-02-14 11:09 |
|
New Issue | |
| 2011-02-14 12:26 | infrastation | Status | new => assigned |
| 2011-02-14 12:26 | infrastation | Assigned To | => infrastation |
| 2011-02-14 12:27 | infrastation | Note Added: 0000238 | |
| 2011-02-14 12:27 | infrastation | Status | assigned => feedback |
| 2011-02-14 12:35 |
|
Note Added: 0000239 | |
| 2011-02-14 13:19 | infrastation | Note Added: 0000240 | |
| 2011-02-14 13:19 | infrastation | Product Version | => 0.19.0 |
| 2011-02-14 14:11 |
|
Note Added: 0000241 | |
| 2011-02-14 14:59 | andriyanov | Status | feedback => assigned |
| 2011-02-14 14:59 | andriyanov | Assigned To | infrastation => andriyanov |
| 2011-02-14 15:18 |
|
Note Added: 0000243 | |
| 2011-02-14 15:59 | andriyanov | Note Added: 0000244 | |
| 2011-02-14 16:06 |
|
Note Added: 0000245 | |
| 2011-02-14 16:52 | andriyanov | Note Added: 0000246 | |
| 2011-02-14 16:52 | andriyanov | Status | assigned => closed |
| 2011-02-14 16:52 | andriyanov | Resolution | open => fixed |
| 2011-02-14 16:52 | andriyanov | Fixed in Version | => 0.19.0 |
| 2011-02-14 16:59 | infrastation | Note Added: 0000247 | |
| 2011-02-14 16:59 | infrastation | Fixed in Version | 0.19.0 => 0.19.1 |
| 2011-02-14 16:59 | infrastation | Target Version | => 0.19.1 |