Summary | Content_Tagger->getObjects: sql inner joins error |
Queue | Content |
Queue Version | 1.0.1 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | roman (at) stachura (dot) ch |
Created | 08/18/2011 (5044 days ago) |
Due | |
Updated | 08/30/2011 (5032 days ago) |
Assigned | 08/19/2011 (5043 days ago) |
Resolved | 08/30/2011 (5032 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
State ⇒ Resolved
was supposed to fix, but it didn't fix any of them ;)
There were broken method names, incorrect table aliases, incorrect
joins, and issues with passing object identifiers. All issues should
be fixed now for 1.0.2
Fix inner join with the object table, fixes failing test.
See
Bug: 10439we need to join on t2, not t1 here.
2 files changed, 10 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/b4bfd19ca7cccbe8a8c3dda46dcb9038f16a3267
this method was completely broken when passing objectId.
Bug: 104391 files changed, 7 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/a3d19396f3a9207f9d4907a528fdc99e04e731a3
State ⇒ Assigned
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Content_Tagger->getObjects: sql inner joins error
Queue ⇒ Content
Milestone ⇒
Patch ⇒ Yes
New Attachment: 0001-getObjects-function-correct-sql-inner-join.patch
State ⇒ Unconfirmed
public function getObjects has a some error in the sql. --> inner join.
The _ensureObject($args['objectId']) is not working this way.
this patch should fix it.
getObjects($args){
if (isset($args['objectId'])) {
//$args['objectId'] =
current($this->_objectManager->ensureObject($args['objectId']));
(int)$objectId = $this->_ensureObject($args['objectId']);
$sql = $this->_db->addLimitOffset('
SELECT tagged2.object_id AS object_id, object_name
FROM (' . $inner . ') AS t1
INNER JOIN ' . $this->_tagged . ' AS tagged2
ON t1.tag_id = tagged2.tag_id
INNER JOIN ' . $this->_t('objects') . ' AS objects
ON objects.object_id = tagged2.object_id
WHERE tagged2.object_id != ' . $objectId . '
GROUP BY t2.object_id',
array('limit' => $radius)
);
}
}