Page MenuHomeDevCentral

Book template can't be generated if there is no publisher on Worldcat
Closed, ResolvedPublic

Description

When fetching the template for a book, OCLC machine-readable data doesn't contain expected publisher information.

Fatal error: Call to a member function get() on null in /var/wwwroot/nasqueron.org/tools/wikimedia/write/sourcetemplatesgenerator/book.php on line 20

$book->get('schema:publisher')->get('schema:name');

How to reproduce?

Event Timeline

dereckson claimed this task.
dereckson raised the priority of this task from to High.
dereckson updated the task description. (Show Details)
dereckson added a subscriber: dereckson.

Change has been deployed live on http://tools.nasqueron.org/wikimedia/write/sourcetemplatesgenerator/.

$ cd /home/wwwroot/nasqueron.org/tools
$ make clean all
rm -rf vendor composer.lock wikimedia/write/sourcetemplatesgenerator
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing easyrdf/easyrdf (0.9.1)
    Loading from cache

  - Installing dereckson/source-templates-generator (dev-master 4705814)
    Cloning 4705814cad0539a06a81e1fd90a101c302ad4bea

easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
Writing lock file
Generating autoload files
mv vendor/dereckson/source-templates-generator wikimedia/write/sourcetemplatesgenerator