Replacing root_sys with api_get_path(SYS_PATH), setting sys path in global inc instead of api_get_path() changing some other paths due the new "data" folder see #6104
Fixing query using "iid" instead of id due the global/local categories see BT#5638