Knowledgebase: v 4.x.x
Incorrect order when importing values into 'tree' type fields
Posted by Lena Kosyakova on 21 May 2010 10:05 AM
Please open the file /system/lib/classifieds/ListingField/ListingFieldTreeManager.php and find the line:
$max_order = DB::query("SELECT MAX(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);

You need to add the following code before it:
DB::resetCacheForquery("SELECT MAX(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);


Also add the line:
DB::resetCacheForquery("SELECT MIN(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);

before the code:
$min_order = DB::query("SELECT MIN(`order`) FROM listing_field_tree WHERE field_sid = ?n AND parent_sid = ?n", $field_sid, $parent_sid);
(136 votes)
This article was helpful
This article was not helpful

Comments (0)
Post a new comment 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako Fusion