Hello!
I have observed persistent bug with multiple categories for k2 when updating k2 category description..
When i update category description and save - one random k2 item dissappears from frontend..
When i edit the k2 category with id (for example "10") and there is any k2 item with ID=10 - the extension deletes the record for k2 item with ID '10', Basically the extension deletes its own table record incorrectly..
The error is in:
Can someone elaborate in fixing the issue? I have contacted the developer web357 for almost a year about it and never got any answer,
I have observed persistent bug with multiple categories for k2 when updating k2 category description..
When i update category description and save - one random k2 item dissappears from frontend..
When i edit the k2 category with id (for example "10") and there is any k2 item with ID=10 - the extension deletes the record for k2 item with ID '10', Basically the extension deletes its own table record incorrectly..
The error is in:
The function does not check whether k2 category or k2 item is saved and removes both ID records in table _k2_multiple_categoriesfunction onAfterK2Save($item, $isNew)
{
// Database Connection
$db = JFactory::getDbo();
/**
* Delete everything first
*/
$query = $db->getQuery(true);
$conditions = array($db->quoteName('item_id') . ' = '.$item->id);
$query->delete($db->quoteName('#__k2_multiple_categories'));
$query->where($conditions);
Can someone elaborate in fixing the issue? I have contacted the developer web357 for almost a year about it and never got any answer,
Edited 3 years 10 months ago by rzrwolf
