Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sinfomac

    (@sinfomac)

    Finally found the error, a misplaced pair of quotes.

    $tmps .= ‘”doi” : ‘ . json_encode($urldoi) . “,\n”;

    Thread Starter sinfomac

    (@sinfomac)

    Hello again,

    not sure if I’m having a bad approach to this, added

      if (isset($doc->identifiers)) {
          if (isset($doc->identifiers->doi)) {
             $urldoi =  'https://dx.doi.org/' . $doc->identifiers->doi;
    	 $tmps .= '"doi" : " ' . json_encode($urldoi) . '",\n'; 
          }
       }

    at formatDocumentJSON() just after the “url” part and

    <span data-ex-content=".doi"></span>

    to bibexhibit.tpl.php to check it, but i get a link to an error message in jsonlint.com with this message in Results:

    Error: Parse error on line 1:
    < !DOCTYPE html PUBL
    ^
    Expecting ‘STRING’, ‘NUMBER’, ‘NULL’, ‘TRUE’, ‘FALSE’, ‘{‘, ‘[‘, got ‘undefined’

    Any suggestion on how to solve this?

Viewing 2 replies - 1 through 2 (of 2 total)