Skip to content

Development

Dennis Müller edited this page Dec 3, 2020 · 9 revisions

This is information for people who want to help improving uma_publist.

Open Tasks

  • Fix code for TYPO3 v8. Currently, TYPO3 v7 is supported, but the newer versions fail with runtime errors.
  • Support other EPrints repository. Currently only MADOC from Mannheim University Library is supported.
  • Support more than one EPrints repository. This would be useful for institutions with several EPrints installations (for example MADOC and MADATA at Mannheim).
  • Add tests and Travis CI

Debugging

Installation

Instead of using a ZIP file, it is also possible to install the code from GitHub. Go to your TYPO3 installation directory and use these commands:

cd typo3conf/ext
# Of course you can also clone your own fork instead of UB-Mannheim.
git clone https://github.com/UB-Mannheim/uma_publist.git

Then enable the uma_publist extension in the TYPO3 extension manager.

Disabling the TYPO3 Cache

Disabling the TYPO3 cache helps during code development and debugging because otherwise the cache has to be flushed often after code changes. This TypoScript code disables the cache when it is added to your root template:

config {
    no_cache = 1
    # ...
}

Debug Code

Useful code snippets:

# Dump a variable.
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($myvar);

# Add a debug message.
$this->debugger->add('My debug message');

Oops, an error occurred! Code: ...

If you get this error message when trying to load a web page, you can add this line to your TYPO3 template to see the complete error stack:

config.contentObjectExceptionHandler = 0

Database schema error / Unknown column

This error indicates some problem with the database schema. If you add/remove a field in the database schema in your code then you need to adjust the new database schema in your deployment environment. The easiest is to deactivate the plugin and then activate it again. Thereby, a the database model will be compared with the specification of the extension and adjusted accordingly. Alternatively, you can use the install tool.