Anonymous | Login | Signup for a new account | 2021-01-28 10:49 GMT | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001968 | SiT! | portal | public | 2015-06-15 06:29 | 2015-11-01 12:45 | ||||
Reporter | rockell | ||||||||
Assigned To | paulh | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | Linux | OS | Linux | OS Version | 2.6+later | ||||
Product Version | 3.67 LTS | ||||||||
Target Version | Fixed in Version | Current GIT | |||||||
Summary | 0001968: Incorrect software name appears above Title in portal knowledgebase | ||||||||
Description | The name for the first record in the software table appears for all articles. | ||||||||
Steps To Reproduce | Add a knowledge base item with a different skill from the first record in the software table. When you view it in the portal it will have the name of the first record. | ||||||||
Additional Information | The query in kb.php is incorrect. I changed mine to this and it now works as expected. i am not sure what the code inside the if statement does so i left it as-is. The first commented query was already commented, the second commented query was in the delivered code but was incorrect. The query below my initials works for me and i have tried it using all the options available on the page. $filter = array('start' => $start, 'view' => $view); // $sql = "SELECT k.*, s.name FROM `{$dbKBArticles}` AS k, // $dbKBSoftware, // `{$dbSoftware}` as s // WHERE ((k.docid = kbs.docid AND kbs.softwareid = s.id) OR 1=1) AND k.distribution = 'public' "; // $sql = " // SELECT k.*, s.name FROM `{$dbKBArticles}` AS k, // LEFT OUTER JOIN `$dbKBSoftware`, `{$dbSoftware}` // ON k.docid = kbs.docid AND kbs.softwareid = s.id "; //$sql = "SELECT k.*, s.name FROM `{$dbKBArticles}` AS k, `{$dbSoftware}` as s "; //$sql .= "LEFT OUTER JOIN `{$dbKBSoftware}` as kbs "; //$sql .= "ON kbs.softwareid=s.id "; //$sql .= "WHERE (k.docid = kbs.docid OR 1=1) AND k.distribution='public' "; //CR - 2015-06-15 Corrected query so it brings up the right name $sql = "SELECT k.*, s.name FROM `{$dbKBArticles}` AS k inner join `{$dbKBSoftware}` as ks inner join `{$dbSoftware}` as s "; $sql .= "ON ks.docid=k.docid and s.id=ks.softwareid "; $sql .= "WHERE k.distribution='public' "; if ($CONFIG['portal_kb_enabled'] != 'Public') { if ($view != 'all') { $softwares = contract_software(); $sql .= "AND (1=1 "; if (is_array($softwares)) { foreach ($softwares AS $software) { $sql .= "OR kbs.softwareid={$software} "; } } $sql .= ")"; echo "<p class='info'>{$strShowingOnlyRelevantArticles} - "; echo "<a href='{$_SERVER['PHP_SELF']}?view=all'>{$strShowAll}</a>"; } else { echo "<p class='info'>{$strShowingAllArticles} - "; echo "<a href='{$_SERVER['PHP_SELF']}'>{$strShowOnlyRelevant}</a>"; } } $sql .= "GROUP BY k.docid "; | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
|
paulh (administrator) 2015-11-01 12:33 |
Thanks for this, reproduced in current git |
paulh (administrator) 2015-11-01 12:45 |
4570303eb2853c70dde208b777aa3f097c5b6e9d fixes |
![]() |
|||
Date Modified | Username | Field | Change |
2015-06-15 06:29 | rockell | New Issue | |
2015-11-01 12:33 | paulh | Note Added: 0004983 | |
2015-11-01 12:33 | paulh | Assigned To | => paulh |
2015-11-01 12:33 | paulh | Status | new => confirmed |
2015-11-01 12:45 | paulh | Note Added: 0004984 | |
2015-11-01 12:45 | paulh | Status | confirmed => resolved |
2015-11-01 12:45 | paulh | Resolution | open => fixed |
2015-11-01 12:45 | paulh | Fixed in Version | => Current GIT |
Copyright © 2000 - 2021 MantisBT Team |