• Trouble of searching with arabic name using sdkphp

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #40565  by rashedmohajer
 
Hello
I have a problem in the search ...
This error appeared
Code: Select all
Notice: Trying to get property of non-object in C:\wamp\www\report\sdk4php-2.0.5\sdk4php\src\openkm\impl\SearchImpl.php on line 128

Warning: Invalid argument supplied for foreach() in C:\wamp\www\report\sdk4php-2.0.5\sdk4php\src\openkm\impl\SearchImpl.php on line 128
getAllSearchs
my code
Code: Select all
//find
$queryParams = new QueryParams();
$queryParams->setDomain(QueryParams::DOCUMENT + QueryParams::FOLDER);
//$queryParams->setName('test');
$queryParams->setFolder("/okm:root/الترقيات/");
$queryParams->setFolderRecursive(true);

$properties = array();
$properties[self::PROPERTY_SUST_SUBJECT] = 'ترقيات الاساتذه';
$properties[self::PROPERTY_SUST_DATE] = '20150901000000,20150915000000';
$queryParams->setProperties($properties);

$keywords = array();
$keywords[] = 'اجتماع';
$queryParams->setKeywords($keywords);

$queryResults = $this->ws->find($queryParams);
foreach ($queryResults as $queryResult) {
    $this->printQueryResult($queryResult, 'find');
}
hint: openkm version 6.3.0 communty
i have arabic keywords,metadata,document's name
i attach sdkphp her
Attachments
(154.18 KiB) Downloaded 275 times
 #40571  by jllort
 
You should use this version:
http://wiki.openkm.com/index.php/SDK_for_PHP_1.0.1

I suspect you're using sdk for php version for professional not for community and have several differences ( basically are not compatible ). Please try downloading the version from the link, and let us to know how goes.
 #40572  by rashedmohajer
 
hi
by useing Sdk4php-1.0.1
Firstly /*$queryParams->setFolder("/okm:root/الترقيات/") and $queryParams->setFolderRecursive(true); */ not work
Secondly this sdk not support search by metadata
/*$properties = array();
$properties['okp:sust.subject'] = 'ترقيات الاساتذه';
$properties['okp:sust.subject_date'] = '20150901000000,20150915000000';
$queryParams->setProperties($properties);*/
Finally I want use arabic name for document

hint ...
I think my attachment sdk in this post is the best one for arabic and i test to set metadata and work will but search not work
this sdk from this fourm
by sochoa
post title (Re: get folders and their children names in Arabic use php sdk not work)
 #40579  by jllort
 
The API of professional version is not the same API from community version, if you're using sdk 2.0 ( only professional version ) will not going right on almost cases, you should use 1.0. Actually we're finishing a new release of sdk for php professional, after be finished will be released a new version of sdk for php community. If sdk for php community version it does not support properties now, should wait until next version ( but use the sdk for professional with not solve the problem, because the API is not the same ).
 #40584  by rashedmohajer
 
my dear
i know the difference between tow API but this sdk solve the problem of Arabic name of document and set ,get metadata .

anyway
How long i have to wait for anew sdk version for community.

because
i need it to discussing my graduation project On the tenth of October ,
 #40609  by jllort
 
I think we will need about 1 month to release a new version of the sdk for php, actually we're still finishing with 2.3.0 and creating a new documentation for it. Meanwhile could you check with demo.openkm.com to see if there goes right or not ( or in a trial ). If you check on professional version we can advance on the problem ( be sure you're using wrong sdk version or if there's other kind of problem try to solve there ).

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.