Może to pomoże.
Mam absolutnie zwykły widok w RB. Zwykły RBS
$rb = & $this->init_module('Utils/RecordBrowser','products_register','products_register');
$rb->enable_quick_new_records();
$this->display_module($rb);
return true;
Jeśli w tym RBS zdefiniowałeś pole jak poniżej
,array('name'=> _M('Atrybut'), 'type'=>'select', 'visible'=>true, 'filter'=>true, 'param'=>'products_register_parameters::nazwa|opis;Wlasne_ProductsRegisterCommon::crits_atrybut;Wlasne_ProductsRegisterCommon::crits_atrybut_adv')
a potem zastosowałeś
public static function crits_atrybut_adv(){
return array('order'=>'asc');
//return array();
to RB się wywala przy wyświetleniu.
Jeśli w tej funkcji zostawiłeś return array() to RB działa.
Jak RB się wywala to znowu mamy komunikat QueryBuildera
Type: E_WARNING (2)
Message: Invalid argument supplied for foreach()
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/QueryBuilder.php
Line=87
error backtrace:
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/QueryBuilder.php
line 87
function called: handle_epesi_error(2, "Invalid argument supplied for foreach()", "/home/narzedzia/test3/modules/Utils/RecordBrowser/QueryBuilder.php", 87, Array ("asc"))
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/QueryBuilder.php
line 40
function called: build_order_part("asc")
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/RecordBrowserCommon_0.php
line 1239
function called: build_query(Object (Utils_RecordBrowser_Crits), "asc", "r.active=1 AND ")
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/RecordBrowserCommon_0.php
line 1296
function called: build_query("products_register_parameters", Array ("atrybut", 1), false, "asc")
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/RecordBrowserCommon_0.php
line 3021
function called: get_records("products_register_parameters", Array ("atrybut", 1), Array (), "asc")
[PHP core called function]
function called: QFfield_select(Object (Libs_QuickForm), "atrybut", "Atrybut", "add", "", Array (#18), Object (Utils_RecordBrowser), Array ("CRM_ContactsCommon::display_contact"))
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/RecordBrowserCommon_0.php
line 64
function called: call_user_func(Array ("Utils_RecordBrowserCommon", "QFfield_select"), "Object (Libs_QuickForm)", "atrybut", "Atrybut", "add", "", Array (#18), Object (Utils_RecordBrowser), Array ("CRM_ContactsCommon::display_contact"))
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/RecordBrowser_0.php
line 1685
function called: call_QFfield_callback("Utils_RecordBrowserCommon::QFfield_select", Object (Libs_QuickForm), "atrybut", "Atrybut", "add", "", Array (#18), Object (Utils_RecordBrowser), Array ("CRM_ContactsCommon::display_contact"))
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/RecordBrowser_0.php
line 1117
function called: prepare_view_entry_details(Array (1), "add", null, Object (Libs_QuickForm), Array (#11))
File: /home/narzedzia/test3/modules/Utils/RecordBrowser/RecordBrowser_0.php
line 326
function called: show_data(Object (Utils_RecordBrowser_Crits), Array (), Array ())
[PHP core called function]
function called: body()