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.
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.
Post Reply
rashedmohajer
Junior Boarder
Junior Boarder
Posts: 22
Joined: Sat Jul 25, 2015 8:03 am
Location: sudan

Trouble of searching with arabic name using sdkphp

Post by rashedmohajer » Sat Sep 19, 2015 8:54 am

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
sdk4php-2.0.5.rar
(154.18 KiB) Downloaded 45 times

jllort
Moderator
Moderator
Posts: 9643
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Trouble of searching with arabic name using sdkphp

Post by jllort » Sat Sep 19, 2015 5:34 pm

which sdk version are you using ?

rashedmohajer
Junior Boarder
Junior Boarder
Posts: 22
Joined: Sat Jul 25, 2015 8:03 am
Location: sudan

Re: Trouble of searching with arabic name using sdkphp

Post by rashedmohajer » Sun Sep 20, 2015 5:30 am

hi
i used The attached sdk from this fourm , i don know its vrsion

jllort
Moderator
Moderator
Posts: 9643
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Trouble of searching with arabic name using sdkphp

Post by jllort » Sun Sep 20, 2015 5:15 pm

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.

rashedmohajer
Junior Boarder
Junior Boarder
Posts: 22
Joined: Sat Jul 25, 2015 8:03 am
Location: sudan

Re: Trouble of searching with arabic name using sdkphp

Post by rashedmohajer » Sun Sep 20, 2015 5:46 pm

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)

jllort
Moderator
Moderator
Posts: 9643
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Trouble of searching with arabic name using sdkphp

Post by jllort » Mon Sep 21, 2015 8:35 pm

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 ).

rashedmohajer
Junior Boarder
Junior Boarder
Posts: 22
Joined: Sat Jul 25, 2015 8:03 am
Location: sudan

Re: Trouble of searching with arabic name using sdkphp

Post by rashedmohajer » Tue Sep 22, 2015 7:45 am

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 ,

jllort
Moderator
Moderator
Posts: 9643
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Trouble of searching with arabic name using sdkphp

Post by jllort » Thu Sep 24, 2015 9:29 am

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 ).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest