# 4ALLPORTAL Configuration

# Configuring the Connector

To configure the Typo3 Connector use the admin snap-in DAM/Typo3Connector in the administration area. All changes made here will alter (but not overwrite) the values from the default connector configuration. Changes made here will be stored in an extra snap-in configuration XML file <connector_name>.xml in folder global/config/.

Use the snap-in to specify the following values:

Field Description
Connector name name of the connector XML (default: typo3-connector)
Typo3 base URL your Typo3 REST URL (example: http://example.typo3.net/rest/virtual_object-gallery/
Typo3 username your Typo3 REST username
Typo3 password your Typo3 REST user password, equal to the API key
Activate Connector enable / disable the connector (default: true)
Typo3 folder Typo3 target folder, child of the Typo3 root folder, where your 4ALLPORTAL files will be saved. Will be generated in Typo3 under fileadmin directory. (Fallback: will be saved to root folder directly)
Default download profile derivate type (default: original, details see below)
Download profiles for selected filetypes Targeting different derivates depending on the filetype (details see below)
Trigger fields fields which will trigger the connector, when they've changed (default: name, parent_path, typo3_triggered, typo3_share, ois_prev_type, for more options see here)
Trigger conditions Define trigger conditions, for details see here
Field mapping Map 4ALLPORTAL Media Asset Metadata with Typo3 Media Asset Metadata (details see below)
Separator for list-based metadata The character between values of a mapped field of type CEList (details see below)

# Default Download Profile

The default download profile for this connector is "original". All files will remain unchanged when sharing them with Typo3.
If you have other requirements (e.g. if you always want your TIFFs to be converted into JEPGs before sharing them with Typo3), configure an existing custom download profile here or create a new download profile for your Typo3 Connector.

# Separator for List-based Metadata

You can configure an individual character as a separator which separates list-based metadata values. For example, the semicolon separates values of a CEVarcharLIST field as follows: "value1;value2;value3".
We suggest UTF-8 conform characters like -, :, ;, ,, _, .

For further information on the file metadata fields for Typo3, visit the Typo3 documentation (opens new window).

# Download Profiles for Selected Filetypes

By specifying Filetype on the left and Derivate on the right, the default derivate of the chosen file (set in Default download profile) will be overwritten to whatever derivate type you choose here. For example:

# Individual Trigger Configuration

If you want to configure individual triggers, you can add the following values to Trigger fields configuration:

Value Description
file_hash syncs the file with Typo3 with every change of its content, e.g. after restoring a file version with the versioning function or after editing the file with an editor
parent_path syncs the file with Typo3 with every change of its parent path, e.g. when you move the file to another folder or rename the current folder path
name syncs the file name with Typo3 with every change of the file name in the 4ALLPORTAL
typo3_shared * syncs the file with Typo3 with every change of the "Share with Typo3" switch (enable / disable)
typo3_triggered * syncs all files of the root folder recursively with Typo3 with every "Share folder content with Typo3" action in the folder's properties
ois_prev_type * Required trigger field for derivate synchronization. Do not delete!

* Trigger set by default

# Trigger Conditions

By using trigger conditions you can for example specify the path of a certain folder, so only its files will be synced, and exclude other folders.

# Condition to Specify Folders

Add `file`.`parent_path` = 'folderExample' to field Trigger conditions.

This condition will only synchronize the files from 'folderExample'.

# Condition to Consider Digital Rights

Basically the Typo3 Connector ignores the usage rights of files when sharing with Typo3. If you want to consider a file's rights, create a trigger condition to check the digital rights status when the trigger is executed.

  1. Add a condition that must be met in order to share a file with Typo3 to field Trigger conditions.

  2. For example, if you want to allow users to share "unlocked" files, enter this:

    `file`.`release_status` = 'unlocked'
    

    • release_status: Use the metadata field name for digital rights, e.g. "release_status.xml".
    • unlocked: Value option key for digital rights status, e.g. "<key>unlocked</key>".
  3. Save your changes in the toolbox and clear the configuration cache once.

Change of status trigger: If you want to sync files depending on a change of the digital rights status, you can enter the field e.g. "release_status" to the trigger field configuration. See chapter Individual trigger configuration above.

This version still not supports visual event feedback for digital rights.

Please note: The value of the trigger "typo3_triggered" has to be "true". So files can only be shared if their digital rights status is "unlocked". Otherwise, you cannot share files or existing files will be deleted from the Typo3 media file list.

# Field Mapping

You can change your Typo3 media metadata depending on 4ALLPORTAL media metadata by mapping the appropriate fields. For example:

In this example the value title from Typo3 media is going to change depending on the media value friendlyname in the 4ALLPORTAL.

Please note: Clear the configuration cache of the 4ALLPORTAL to submit the configuration.

# Reference: Default Connector Configuration File

The default configuration XML file typo3-connector.xml is stored under modules/file/connectors/.

If you want to create a custom connector, please also store your configuration file <connector_name>.xml under modules/file/connectors/.

<?xml version="1.0" encoding="UTF-8"?>
<connector>
  <connector_name>typo3-connector</connector_name>
  <type>bean</type> <!-- Identifies, which piece of code int the Connector Manager should be
		executed e.g.: The gallery will require different code -->

  <paps>
    <pap class="com.cm4ap.ce.typo.Typo3Connector" key="image">
      <parameters/>
    </pap>
  </paps>

  <conditions/>

  <trigger_fields>
    <trigger_field>ois_prev_type</trigger_field>
    <trigger_field>typo3_path</trigger_field>
  </trigger_fields>

  <derivates> <!-- Derivate keys -->
    <derivate>original</derivate>
  </derivates>

</connector>

Please note: If you made any configurations here, you need to restart the system.

# Supported Character Set

Please note: The 4ALLPORTAL supports the UTF-8 character set for usage of any kind of values.

The connector hands over names of files, folders and metadata based on UTF-8 to the Typo3 system. Your Typo3 may convert or change values, e.g. by deleting special characters or spaces in file names or metadata, if based on another character set.

# Supported Field Types

Basically, all 4ALLPORTAL field types are supported. The most commonly required field types are:

  • CEText / CETextList
  • CEVarchar / CEVarcharList
  • CEInteger
  • CEId / CEIdList
  • CETimestamp
  • CEDate
  • CELong
  • CEBoolean

# Troubleshooting

The REST API extension for Typo3 sometimes takes too long to handle a request. This can cause problems in both Typo3 and 4ALLPORTAL.

# Problem: Updating Media Files

Typo3 times out a request and does not send a response back to the 4ALLPORTAL. The response would contain the media id to be saved in the 4ALLPORTAL. The media id is required for updating or deleting media files.

If the media creation response has not been sent back from Typo3, and you would try to update a media file in the 4ALLPORTAL, the file would not update, and an error would show that the media file could not be found in Typo3.

# Solution

  1. Make sure your media files already uploaded and imported completely into the DAM before sharing or updating them to your Typo3 server.

  2. Editing the following parameters in the .htaccess file (found under /var/www/you-typo3-installation-folder) on your Typo3 server may be helpful:

  • php_value upload_max_filesize: 100M
  • php_value post_max_size: 105M
  • php_value max_execution_time: 600
  • php_value max_input_time: 60

Based on this configuration we successfully uploaded 50 files of different file types as well file sizes between 1,5 MB and 95 MB in one upload request.

The configuration should be effective after saving the edited .htaccess file, otherwise please restart your Typo3 system.

Please note: Make sure php_value post_max_size is always bigger than php_value upload_max_filesize.

Request missing documentation