Bug #6632

feedback delete: not working

Added by Anonymous about 7 years ago. Updated about 7 years ago.

Bug resolved
Start date:
Due date:
% Done:


Estimated time:


cannot delete own feedback

MDB2 :: isError() returns true after query:

"DELETE FROM `admin_feedback_publication` WHERE `alias_afp`.`id` = 15" 

MDB2 Error: no such field
_doQuery: [Error message: Could not execute statement] [Last executed query: DELETE FROM `admin_feedback_publication` WHERE `alias_afp`.`id` = 15] [Native code: 1054] [Native message: Unknown column '' in 'where clause']




Updated by Anonymous about 7 years ago


file chamilo-dev/core/admin/php/lib/data_manager/mdb2.class.php, line 147
public function delete_feedback_publication($feedback_publication)

change to:

        $condition = new EqualityCondition(FeedbackPublication :: PROPERTY_ID, $feedback_publication->get_id());

this looks like a revert of a previous bugfix. However this method now seems to be working.
This was the previous version:

$condition = new EqualityCondition(
            new PropertyConditionVariable(FeedbackPublication :: class_name(), FeedbackPublication :: PROPERTY_ID),
            new StaticConditionVariable($feedback_publication->get_id())


Updated by Anonymous about 7 years ago

This was the original bug:

I ran the suggested test (with the simple condition) with the bugfix mentioned above and it works.

I reran it with the previous code (with the complex condition) as well and it didn't work - I don't know how/why it was considered fixed.


Updated by Anonymous about 7 years ago

  • Target version set to LCMS 4 Beta

Updated by Sven Vanpoucke about 7 years ago

PropertyConditionVariables should in no case be removed. This was probably an issue due to a recent change in the MDB2DataManager where the alias was removed from the delete function. The alias should be restored to solve this problem.


Updated by Anonymous about 7 years ago

  • Status changed from New to Bug resolved

Your recent commit fixed the problem, and some others too. Thanks.

I reverted to property condition variables, as requested.


Updated by Sven Vanpoucke about 7 years ago

No problem

In case you still have issues with the delete function of the MDB2DataManager try to check if PropertyConditionVariables are used in the conditions. If not, then add them. This will automatically generate the correct alias for your conditions.

Also available in: Atom PDF