Can't retrieve data

This is my first attempt to display data. I've created landing.php in the About folder. When I try to run it, I get a 500 server error. I'm basically just adding an example on the API documentation. You can see the result at

The code (I omitted the HTML above the /div). The html by itself works fine--if I delete the php code, it brings up the screen.



$o_search=new ObjectSearch();


// dump preferred labels in all languages

while($qr_results->nextHit()) {

print_r($qr_results->get('', array('returnAllLocales' => true, 'returnAsArray' => true)))";




  • Hi, try with this code into your controller file:



    public function __call($ps_function, $pa_args) {

    ... code ...

    $objects = [];

    $objectSearch = new ObjectSearch();

    $queryResult = $objectSearch->search("*"); // NOTE: "*" search word example: "lorem"

    while($queryResult->nextHit()) {

    $object = new stdClass();

    $object->id = $queryResult->get('object_id');

    $object->idno = $queryResult->get('idno');

    $object->title = $queryResult->get('');

    $object->img_url = $queryResult->getMediaURL('', 'medium');

    $objects[] = $object;


    echo "<pre>";


    echo "</pre>";


    ... code ...


    ... code ...

    I hope this will help you.

  • Thanks-I got this to work, but it's been so long since I posted it, I forget how I did it. I think it was because I couldn't use the name 'landing.'

Sign In or Register to comment.