The requested page didn’t have a proper connection to the tree root

Just a fast snip i was hunting today:

It might be helpful to you, if

  • you use RealUrl
  • get the errors after following links to pages what definetely are correct and visible
  • the errors shows “mp vars”

Get yourself the ‘realurlmanagement’  extension and list the pages in backend hat are the target of the links with it (use ‘pages’ option in module´s view)

The extension may show you several different paths to your page. Just flush them all and you´re good to go.

I was searching for user errors on a larger system for an hour, and did check the realurl caches at last.

And if you´re here but the above solution is not working for you, check the first obvious thing in your shortcut / linking page:

Did you specify the target page? :-)

Backend View

get user ip from behind reverse proxy setup

small problem, wide reach. if your TYPO3 is set up behind a reverse proxy (like pound) and you need the ip connection information of the visitors, T3´s userfunction method comes in handy.

fileadmin/scripts/fwdip.php


<?php
class user_fwdip {
 var $cObj;
 function main($content,$conf){
  $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
  return $ip;
 }
}
?>

This is the file you´d like to ask for the ip from within TYPO3.

To be able to use this file in a userfunc style you´ll need to include the file in TypoScript, i put it into an own TS template on one special page.


page.includeLibs.fwdip = fileadmin/scripts/fwdip.php

You now could put the stuff on the same TS template but i recommend this neat extension to generate the output to one special page in a content element. The extension wraps the TS in a COA.


20 = USER
20 {
 userFunc =user_fwdip->main
}

Now the page you put the element on should show your real ip address, instead of the proxy ip.

Simple, but fully worth a snippet.

nice TYPO3 extensions

just wanted to post five neat extensions you can get freely from the TER i find worth to be mentioned since they really give me no headache but useful features:

  • stg_clearcache
    allows you to clear cache of user-owned branches in one big installation, so it’s not only clear cache of this one special page and also not clear all page cache. useful if you run a large system or microsites.
  • kb_filequota
    allows you to have a quota on filemounts, either by giving a size limit on the filemout itself or for each user. useful if you’d like to save space and suppress waste in the filemounts.
  • rscliem
    allows you to automatize the extension updates on your system. i use it as nightly extension-cache update and it notifies me by mail, if extension should be updated for the very TYPO3. useful if you’d like to take steps in automatic administration.
  • realurlmanagement
    allows you to view and manipulate a lot of stuff relating to RealUrl extension. simple alias and page-path editing. useful if the system works with RealUrl.
  • nc_staticfilecache
    allows you to cache the pages from your system to server disk and serve them from there (waaay faster!) and so have the site up and running even if the your TYPO3 is ill. useful, if you have mostly static pages and mod_rewrite going.

even if some of them might be well known, i wanted to put a link to give the extension authors a big up! yeah great stuff, keep on going!

if you think this short list was helpful, just leave a comment. i would appreciate, if you send me your missing extension entry for here ;-)

typo3 4.3 up and running

most of my projects are updated and as expected the update to TYPO3 4.3 hadn’t been a problem. everything went well and the new backend look is charming.

all went well

the sites get even faster,i did not instatiate the new caching factory, though. the new recycler is great and a must for every mid sizes website. the new recycler works way better when deleting tons of entries from a table.

the update of the extension templavoila to version 1.4.1 was also no problem, though on the biggest site i administrate (with more than 60 backend editors) i’m preparing for some bug reports. newest tv style finishes the new interface design at all – a feature that impresses them all is the drag and drop feeling.

tt_news 3.0.0 – don’t update live

but beware of upgrading tt_news too fast from version 2.5.2 (which is the highest in the 2.x branch) to 3.0.0 if you not have checked how the templates change! the whole morning was consumed by the fixing of tt_news styling. tt_news come with new caching mechanism that promises to speed up some data work that needs to be done every time news are rendered. tt_news 3.0.0 comes with that cool new update script that checks for possible problems – where it removes relations to templates as far as i remember.

falling back to the standard template coming with v3 the title wrapping changed from h3 to h2 and stuff like this – thus breaking the layout of the website on every page. if you’re using tt_news as main function for a big web site that should not be done “live”. ;)

also there had been problems in the realurl configuration after the update. solution was to grab a selection of the content of res/realUrl_example_setup.txt in the tt_news ext folder and drop it in typo3conf/realurl.php and so the errors were gone.

i don’t know why this was necessary, but tt_news showed a nasty red bordered error if now singlePid was set (which can be done in the constant editor) even if the site worked before with tt_news 2.5.2 due to single-page target was set per plugin settings.

another thing you might want to avoid is the output of some php stuff before the website’s head section.

all in all i’m happy away how simple it’s getting to create web content management. many of the tricks you need to learn are now turned into guides (i.e. compare database is the final step of the update in form of a button in the update wizard process – before that you just “needed to know” that).

great job TYPO3 core team!

TYPO3 Unknown column error

Little problem after update to TYPo3 4.3 alpha3 i.e. with domain entries. After changing the domain record for a site (in a multi domain tree setup) the following error is displayed:

SQL error: ‘Unknown column ‘redirectHttpStatusCode’ in ‘field list” (sys_domain:3)

Simple solution: go to tools>install enter the password and start the database analyser and let the compare module do it´s job. after that, most problems like the above should be gone. consecutive action might be the db check>Check and update global reference index.

For most, it is obvious that the compare module is the successional move to finish the incremental update. But if you forget, you might find that blog post. things done ^^

update current list of available plugins from TER

one step closer to TYPO3 backend convenience

scheduled update of the extension list from the TYPO3 extension repository (TER). the extension needed has the cryptic key rscliem and will provide command line interface function for extension manager operations. just import and install it.

If you have no BE-user named _cli_lowlevel go and create it. That one’s needed to run PHP CLI commands.

test the cliKey ‘emtools’

/var/www/my-t3site/typo3/cli_dispatch.phpsh emtools --update-extensionlist

It will return a fancy array containing a message like
[0] => <p>The extension list has not changed remotely, it has thus not been fetched.</p>

(at least if you run the command successfully a second time)

To have the Extension List updated twice a day, a small entry in the current cron tab comes in handy:

# m h  dom mon dow   command
00   */12    *     *     *  /var/www/my-t3site/typo3/cli_dispatch.phpsh emtools --update-extensionlist
MAILTO="adminmail@mydomain.com"

The following options can be used:

  • –update-mirrors
    Updates mirror list from typo3.org
  • –update-extensionlist
    Retrieves current extensionlist from selected mirror and load into database
  • –check-extensions
    Checks currently installed extension for newer versions
  • –import-updates
    Imports updates for all extension, found with –check-extensions.

(taken from the README file found in typo3conf/ext/rscliem/)

You see, you can possibly automate the extension update process. I currently can’t use this feature because some extensions would break the TYPO3 instance in question if updated to newest version.

But the handy part is to have the list of extensions to update emailed to me.A connection of the updated extension list and the extension chack makes most sense.

./cli_dispatch.phpsh emtools --update-extensionlist && ./cli_dispatch.phpsh emtools --check-extensions

typoscript condition with constants

small snippet great effect to your typoscript. i use this to spare lines of executed typoscript if the editor won’t use it anyways. in my opinion it’s not only a great tool for extension development, but also it can restructure parts of your ts setup of the site.

constants:

SHOWBADGE = 1

setup:


# only work out stuff for SHOWBADGE is true

[globalVar = LIT:1 = {$SHOWBADGE}]

page.10.marks.A < lib.showBadge
# etc...
[global]

i don’t know what the LIT:1 means, but it works. i mean, is there a LIT:2 and so on? if you’ve got crucial information on this matter, comment or mail me. thanks.

additional philosophy: what are constant conditions anyway?

list all TypoScript lines

some days ago i needed to have a complete listing of the TypoScript Constants and Setup that affect a specified page. sure, the good template-analyzer highlights the lines of a single ts template found in the rootline. but how do you display the complete TypoScript that applies to this page?

TYPO3 Template Analyzer

maybe the dirty copy/paste trick works out for smaller sites, but if the hierarchy is getting more complex you definitely don´t want to go this extra miles. so, i started my own extension to present this function. after a short while digging into the template analyzer code from kasper i was surprised as he already built in this feature of a complete listing.

complete ts listing using onboard functions

your http request to view a single template with the template analyzer looks like

http://t3/typo3/sysext/tstemplate/ts/
/index.php?id=42&template=sys_23

…or at least a bit like that. Now, if you fire up a request like this

http://t3/typo3/sysext/tstemplate/ts/
/index.php?id=42&template=all

…you´ll get what you want. It can be easy like this.

To spare you the typing by hand, you could touch the systext itself.  Add the following lines in typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php i.e. around line 122 (after the section “Template Hierarchy” is set up).

 	$completeLink= '&lt;p&gt;&lt;a href=&amp;amp;quot;index.php?id='.$GLOBALS['SOBE']-&gt;id.'&amp;amp;amp;template=all&amp;amp;quot;&gt;view the complete TS Listing&lt;/a&gt;&lt;/p&gt;';
$theOutput.=$this-&gt;pObj-&gt;doc-&gt;spacer(5);
$theOutput.=$this-&gt;pObj-&gt;doc-&gt;section(&amp;amp;quot;Complete TS:&amp;amp;quot;,$completeLink,0,1); 

Then visit the Template Analyzer again and click the button. Get yourself some cool or hot drink as the ts parser now works out all the TypoScript lines you asked for what could take a while.

That snippet especially comes in handy when administrating foreign pages that have not been setup by you and the object browser keeps spitting error at line xxxx in your backend.

As for me, this makes my weekend. I still wonder why this feature is not visible for the user (security/performance issues? or just forgot?) or maybe i even was too stupid to find the button. But i like this feature and the experience that the system can do even more as the gui presents me ^^

please drop a comment if you know about these concerns. See you on monday.