[TYPO3-english] RealURL uniqueness problem

Peter Ruijter peter.ruijter at gmail.com
Wed Feb 2 14:36:44 CET 2011


Hi list,

For a website that uses RealURL I have the following problem.

Inside the RealURL config the following options "useUniqueCache" and
"autoupdate" are set. I think this is also the place where the problem
begins. With this configuration settings, RealURL will check if a unique URL
already exists for a specific valueID and in my situation RealURL has the
opinion that there no matching records existing, as a result a new records
is added into the tx_realurl_uniqalias table. In reality, there are 500,000
lines that meet the appropriate criterion.

You'll find the piece of my RealURL configuration below.

'aflevering' => array(
    array(
        'GETvar' => 'tx_mymedia[episode]',
        'lookUpTable' => array(
            'table' => 'tx_mymedia_episodes',
            'id_field' => 'uid',
            'alias_field' => 'title',
            'addWhereClause' => ' AND NOT deleted AND NOT hidden',
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => array(
                'strtolower' => 1,
                'spaceCharacter' => '-',
            ),
            'autoUpdate' => 1,
        ),
    ),
),

Inside the class class.tx_realurl.php the following comment for the
"lookUp_uniqAliasToId" function is added:

In the lookup table 'tx_realurl_uniqalias' the field "value_alias" should be
unique (per combination of field_alias+field_id+tablename)! However the
"value_id" field doesn't have to; that is a feature which allows more
aliases to point to the same id. The alias selected for converting id to
alias will be the first inserted at the moment. This might be more
intelligent in the future, having an order column which can be controlled
from the backend for instance!

Does anyone know the rationale of this? In my opinion this is a very strange
explanation because this feature will now only generate a bunch of
unnecessary data and does nothing with it.

Can anyone wake me up and help? Otherwise can anyone help me to solve this
problem and give a solution to generate one unique URL for each
"aflevering"?

Best regards,

Peter Ruijter


More information about the TYPO3-english mailing list