[TYPO3-dev] tinymce_rte with linkhandler

Tapio Markula tapio.markula at xetpoint.fi
Wed Nov 12 09:05:03 CET 2008


  > http://forge.typo3.org/wiki/extension-tinymce_rte/Linkhandler_support

it has

RTE.default {
     linkhandler {
         tt_news {
             # id of the Single News Page
             parameter = 27
             # id of the Storage folder containing the news (just used 
to mark already selected news)
             storage = 25
             additionalParams = &tx_ttnews[tt_news]={field:uid}
             additionalParams.insertData = 1
             select = uid,title as 
header,hidden,starttime,endtime,fe_group,bodytext
             sorting = crdate
         }
     }
}

> after setting these values, you can now select storage folders

can I set multiple values to 'storage'
just one might be problematic, because there might be many storage 
forlder. If many, please add correct descripition


does
select = *
work?

The link itself doesn't need storage information, just singe view page.

If this linhandler support is build in it is much better than using 
additional linkhandler plugin. But where to get this?

Plugin linkhandler use also this:

             useCacheHash=1

Links work however without it.


I got
Warning: array_merge() [function.array-merge]: Argument #2 is not an 
array in 
/home/tapio/public_html/typo3conf/ext/tinymce_rte/mod1/browse_links.php 
on line 1581

Warning: Invalid argument supplied for foreach() in 
/home/tapio/public_html/typo3conf/ext/tinymce_rte/mod1/browse_links.php 
on line 1583

with this config:
RTE.default {
     linkhandler {
         tt_address {
             # id of the Single Page
             parameter = 950
             # id of the Storage folder containing the news (just used 
to mark already selected news)
             storage = 
additionalParams=&tx_wtdirectory_pi1[show]={field:uid}
             additionalParams.insertData = 1
             select = uid,name as header,hidden,description
             sorting = last_name
         }
     }
}

seems that config has not been found - weird.
Invalid config should take account



error messages relates with

function expandPage() in mod1/browse_links.php

$queries = array_merge($queries, $this->thisConfig['linkhandler.']);

foreach ($queries as $table => $query) {

foreach should never use, if there is not check that there is a valid array

Solution

test if $this->thisConfig['linkhandler.'] is an array

if(is_array($this->thisConfig['linkhandler.'])
$queries = array_merge($queries, $this->thisConfig['linkhandler.']);




More information about the TYPO3-dev mailing list