[TYPO3] ERROR: "no news_id given" when using realurl 1.1.3, tt_news 2.4.0 and templavoila 1.1.0. Setup enclosed.

Victor Elsendoorn j.v.elsendoorn at gmail.com
Thu Dec 21 16:33:04 CET 2006


Dear community,

The following has kept me busy for a few days now, and it seems like I will
not solve the problem without your help. The combination of realurl and
tt_news constantly gives me the error: no news_id given when clicking on an
item presented in the latest news list on the homepage.

My setup is as follows:

Typo3 - version 4.0.2

Extensions:
Templavoila 1.1.1
tt_news 2.4.0
realurl 1.1.3

Languages:
Default = EN
Secondary = Dutch

Page tree:
 <http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>
Home<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>
<http://www.w3craft.nl/typo3/alt_db_navframe.php?PM=0_0_4_browsePages#0_4><http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>
News<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>
<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>News
Item<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>
<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>News
Folder<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>
<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>Storage
Folder<http://www.w3craft.nl/typo3/alt_db_navframe.php??currentSubScript=..%2Ftypo3conf%2Fext%2Ftemplavoila%2Fmod1%2Findex.php#>
Within the Storage Folder I created the news categories and the News Folder
is used to hold the news.
Furthermore on the home-page I added the news-plugin showing the Latest News
Items. Where the full items should be presented on the "News Item" page (a
child page of the news page used for presenting all news available).

The SETUP of my page template:

# Set DocType to Strict:
config.doctype = xhtml_strict
config.xmlprologue = none

# Localization:
config {
    linkVars = L
    sys_language_mode = content_fallback
    sys_language_overlay = hideNonTranslated
    # default language : UK
    language = en
    sys_language_uid = 0
}

#additional language : NL
[globalVar = GP:L = 1]
    config.sys_language_uid = 1
    config.language = nl
    config.locale_all = nl_NL
    config.htmlTag_langKey = nl-NL
[GLOBAL]

# Set RealURL
config.simulateStaticDocuments = 0
config.baseURL = http://www.mydomain.nl/
config.tx_realurl_enable = 1

# tt_news
plugin.tt_news {
    useHRDates = 1
    dontUseBackPid = 1
}

# Set Page Title
lib.subTitle = COA
lib.subTitle {
    10 = TEXT
    10.data = page:subtitle
    10.wrap = <span class="valign">|</span>
}

# Set Main Menu
lib.mainMenu = COA
lib.mainMenu.10 = TEXT
lib.mainMenu.10.value = <ul id="global_nav" class="clearing">

lib.mainMenu.20 = HTML
lib.mainMenu.20.value = <li><a href="/" title="home"
class="home">Home</a></li>

lib.mainMenu.30 = HMENU

lib.mainMenu.30.1 = TMENU
lib.mainMenu.30.1 {
    noBlur = 1
    NO {
        ATagParams.dataWrap = class="{field:title}" title="{field:subtitle}"
        allWrap = <li>|</li>
        stdWrap.htmlSpecialChars = 1
    }

    ACT = 1
    ACT {
        ATagParams.dataWrap = class="{field:title}" title="{field:subtitle}"
        stdWrap.htmlSpecialChars = 1
        allWrap = <li class="active">|</li>
    }
}

lib.mainMenu.40 = TEXT
lib.mainMenu.40.value = </ul>


# Set Footer Text
lib.footerText = COA
lib.footerText {
    10 = TEXT
    10.data = date:Y
    10.wrap = <p>&copy;|&nbsp;- All rights reserved.</p>
}

# Default PAGE object:
page = PAGE
page.config.index_enable = 1
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page
page.headerData.10 = TEXT
page.headerData.10.value = <link rel="alternate" type="application/rss+xml"
title="RSS-Feed" href="http://www.mydomain.nl/index.php?id=3&type=100">


The CONSTANTS of my page template:

plugin.tt_news.displayXML.rss2_tmplFile = EXT:tt_news/res/rss_2.tmpl
plugin.tt_news.displayXML.xmlFormat = rss2
plugin.tt_news.displayXML.xmlTitle = mydomain.nl: Latest News
plugin.tt_news.displayXML.xmlLink = http://www.mydomain.nl
plugin.tt_news.displayXML.xmlDesc = Latest news
plugin.tt_news.displayXML.xmlLang = en
plugin.tt_news.displayXML.xmlIcon = EXT:tt_news/ext_icon.gif


Localconf.php:

$TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
    'init' => array(
        'enableCHashCache' => 1,
        'appendMissingSlash' => 'ifNotFile',
        'enableUrlDecodeCache' => 1,
        'enableUrlEncodeCache' => 1,
    ),
    'redirects' => array(),
    'preVars' => array(
        array(
            'GETvar' => 'no_cache',
            'valueMap' => array(
                'nc' => 1,
            ),
            'noMatch' => 'bypass',
        ),
        array(
            'GETvar' => 'L',
            'valueMap' => array(
                'en' => '0',
                'nl' => '1',
            ),
            'valueDefault' => 'en',
            'noMatch' => 'bypass',
        ),
    ),
    'pagePath' => array(
        'type' => 'user',
        'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => 3,
        'rootpage_id' => 1,
    ),
    'fixedPostVars' => array(),
    'postVarSets' => array(
        '_DEFAULT' => array(
            // news archive parameters
            'archive' => array(
                array(
                    'GETvar' => 'tx_ttnews[year]' ,
                ),
                array(
                    'GETvar' => 'tx_ttnews[month]' ,
                    'valueMap' => array(
                        'january' => '01',
                        'february' => '02',
                        'march' => '03',
                        'april' => '04',
                        'may' => '05',
                        'june' => '06',
                        'july' => '07',
                        'august' => '08',
                        'september' => '09',
                        'october' => '10',
                        'november' => '11',
                        'december' => '12',
                    ),
                ),
            ),
            // news pagebrowser
            'browse' => array(
                array(
                    'GETvar' => 'tx_ttnews[pointer]',
                ),
            ),
            // news categories
            'select_category' => array (
                array(
                    'GETvar' => 'tx_ttnews[cat]',
                ),
            ),
            // news articles and searchwords
            'article' => array(
                array(
                    'GETvar' => 'tx_ttnews[tt_news]',
                    'lookUpTable' => array(
                        'table' => 'tt_news',
                        'id_field' => 'uid',
                        'alias_field' => 'title',
                        'addWhereClause' => ' AND NOT deleted',
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array(
                            'strtolower' => 1,
                            'spaceCharacter' => '-',
                        ),
                    ),
                ),
                array(
                    'GETvar' => 'tx_ttnews[swords]',
                ),
                array(
                    'GETvar' => 'tx_ttnews[backPid]',
                ),
            ),
        ),
    ),
    // configure filenames for different pagetypes
    'fileName' => array(
        'index' => array(
            'rss.xml' => array(
                'keyValues' => array(
                    'type' => 100,
                ),
            ),
            'rss091.xml' => array(
                'keyValues' => array(
                    'type' => 101,
                ),
            ),
            'rdf.xml' => array(
                'keyValues' => array(
                    'type' => 102,
                ),
            ),
            'atom.xml' => array(
                'keyValues' => array(
                    'type' => 103,
                ),
            ),
        ),
    ),
);
//End Manually added

By using this configuration the following url is generated when clicking on
the news-item to view:
http://www.mydomain.nl/news/news-item/article/title-of-newsitem/
and on this page the error code is presented: no news_id given.

Please help me out!

Thanx in advance.
Victor Elsendoorn


More information about the TYPO3-english mailing list