From: Demian K. <dem...@vi...> - 2017-07-25 18:00:33
|
It would be helpful to know what the internal server error actually is – maybe it’s just a minor parse error caused by a typo somewhere. Are you seeing any helpful messages in your Apache error log? That’s usually the place to look for the cause of 500 errors. - Demian From: Leila Gonzales [mailto:lm...@ag...] Sent: Tuesday, July 25, 2017 1:49 PM To: vufind-tech Subject: [VuFind-Tech] Using custom RecordDataFormatter templates Hi all, We just recently upgraded to VuFind 4.0 and are trying to migrate our old theme templates into the new format using the RecordDataFormatter per the tips on the Wiki page (https://vufind.org/wiki/development:architecture:record_data_formatter<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvufind.org%2Fwiki%2Fdevelopment%3Aarchitecture%3Arecord_data_formatter&data=02%7C01%7Cdemian.katz%40villanova.edu%7Cbc6e3fcaaa1b4012e8f608d4d3859419%7C765a8de5cf9444f09cafae5bf8cfa366%7C0%7C0%7C636366018053476606&sdata=oBZWBWj7nvb%2FUVHm9oqVO%2FQuhhJjipz853FyFZhuacY%3D&reserved=0>), and are running into an issue where the $formatter = $this->recordDataFormatter(); line in core.phtml is returning an internal server error code. Right now I’ve just copied over the following files and have not yet started implementing any custom data-NAME.phtml templates. Here’s what I’ve done so far: 1. Copy RecordDataFormatterFactory.php into my custom module’s View/Helper/Root directory. Set namespace to customModule\View\Helper\Root; Add class extends \VuFind\View\Helper\Root\RecordDataFormatterFactory Remove all methods except for public function getDefaultCoreSpecs () Change $spec = new RecordDataFormatter\SpecBuilder(); to $spec = new \VuFind\View\Helper\Root\RecordDataFormatter\SpecBuilder(); 2. Register the RecordDataFormatterFactory in my custom theme’s theme.config.php file (and this file also extends bootstrap3 and root) 'helpers' => array( 'factories' => array( 'recorddataformatter' => 'customModule\View\Helper\Root\RecordDataFormatterFactory', 3. Copy over the core.phtml from bootstrap3/templates/RecordDriver/SolrDefault/ to my custom theme directory. Is there something else I should be doing to set up the configuration properly? Thanks for your help, Leila |