[TYPO3-german] tt_address hook - fatal error using member function	on non-object
    Johannes C. Schulz - EnzephaloN IT-Solutions 
    info at enzephalon.de
       
    Tue Aug 16 14:49:55 CEST 2011
    
    
  
Hello
 
I wrote an extension to add some fields to tt_address, but there are two
errors:
 
class.address_hook.php:
<?php
if (!defined ('TYPO3_MODE'))   die ('Access denied.');
class address_hook extends tx_ttaddress_pi1{
  public function extraItemMarkerProcessor(&$markerArray, &$address,
&$lConf, &$lcObj) {             
    $lcObj = t3lib_div::makeInstance('tslib_cObj');
    $lcObj->data = $address;
    $markerArray['###LAT###'] =
$lcObj->stdWrap($address['tt_address_hook_lat'],
$lConf['tt_address_hook_lat.']);
    $markerArray['###LON###'] =
$lcObj->stdWrap($address['tt_address_hook_lng'],
$lConf['tt_address_hook_lng.']);
  }
}
?>
 
ext_localconf.php:
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_address']['extraItemMarkerHook'][
] = 'EXT:tt_address_hook/class.address_hook.php:address_hook';
?>
 
TS-Setup:
# tt_address
plugin.tx_ttaddress_pi1{
  includeLibs.ttaddresshook =
typo3conf/ext/tt_address_hook/class.address_hook.php
  templatePath = fileadmin/Weimar/ext/tt_address/
  templateFileName = default.html
  pidList = 242
  recursive = 1
}
 
First problem: I set pidLIst in TS, but the plugin is not visible. If I edit
the startingpoint in plugin-flexform-settings the plugin is visible, How can
I set the pidList globaly?
 
Second problem: If the plugin works, I get an fatal error "using
member-function on non-object". I can't find the failure!
 
Hope you can help.
 
Best regards
Johannes
 
    
    
More information about the TYPO3-german
mailing list