TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

Die TYPO3 Mailingliste - nicht fragen: lesen!

[TYPO3] userFunc not called correctly

This is a discussion on [TYPO3] userFunc not called correctly within the typo3-english@lists.netfielders.de forums, part of the TYPO3-Mailinglists: ENGLISH category; Hello, I'm trying to call a userFunc to filter the entries of my sitemap. I've used the same ...


Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-english@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 24.06.2008, 11:40
Michael Niemann
Gast
 
Beiträge: n/a
Standard [TYPO3] userFunc not called correctly

Hello,

I'm trying to call a userFunc to filter the entries of my sitemap. I've used the same function on another menu and it worked. Somehow I can't get the call to the userFunc to work with the sitemap code:

page.includeLibs.auchegal = fileadmin/scripts/userfunctions.php
lib.sitemap = COA
lib.sitemap {
10 = HMENU
10.cache_period = 0
10.special = directory
10.special.value.field = pages**
10.1 = TMENU
10.1 {
*** itemArrayProcFunc = user_functions->user_menu

I added an echo to the first line of the userFunc to check wether it's called at all but it isn't.
I used the same code as in the other menu to call it:

page.includeLibs.rechtegal = fileadmin/scripts/userfunctions.php

menu2 = HMENU
menu2.entryLevel= 1
menu2.cache_period = 0
menu2.1 = GMENU
menu2.1{
itemArrayProcFunc = user_functions->user_menu

The sitemap code is inside an extension template and the menu code inside a base template but that shouldn't make any difference.

Regards Michael




_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #2  
Alt 24.06.2008, 11:46
Xavier Perseguers
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

Hello,

> The sitemap code is inside an extension template and the menu code inside a base template but that shouldn't make any difference.


Just a guess:

1) are you sure you included your extension's setup?
2) the order of include does not override the menu TS definition?

--
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 24.06.2008, 12:10
Michael Niemann
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

The menu's code is inside a base template which itself is included in the root template. So I guess the code to include the userFunc in the sitemap's ext-template ist redundant as it is always included by the root template already.

However this second inclusion shouldn't hurt and removing it doesn't help either.

It looks like the way I call the userFunc in the ext-template is not correct although it looks a lot like the other one..

--- On Tue, 6/24/08, Xavier Perseguers <typo3 (AT) perseguers (DOT) ch> wrote:
Just a guess:

1) are you sure you included your extension's setup?
2) the order of include does not override the menu TS definition?





_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #4  
Alt 24.06.2008, 12:37
Michael Niemann
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

there's a quick scetch of the two ways I'm including the userFunc:

http://img117.imageshack.us/my.php?image=sitemaprl6.jpg

it is already included through the root template.
the sitemap page also contains the filtered menu where the userFunc works.

for testing I put the sitemap code inside another base template which is included in the ext-template without success.





--- On Tue, 6/24/08, Xavier Perseguers <typo3 (AT) perseguers (DOT) ch> wrote:
From: Xavier Perseguers <typo3 (AT) perseguers (DOT) ch>
Subject: Re: [TYPO3] userFunc not called correctly
To: typo3-english (AT) lists (DOT) netfielders.de
Date: Tuesday, June 24, 2008, 9:46 AM

Hello,

> The sitemap code is inside an extension template and the menu code inside

a base template but that shouldn't make any difference.

Just a guess:

1) are you sure you included your extension's setup?
2) the order of include does not override the menu TS definition?

--
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english



_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #5  
Alt 25.06.2008, 11:09
Michael Niemann
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

Hello,

after another night of testing I figured out that there is a problem with the actual function call. When I add a constructor containing an echo output to the class this output is generated. So the constructor is called but the function isn't.

Again here is the code. Maybe someone cann tell me what's wrong with it:

page.includeLibs.some_other_random_id_string1 = fileadmin/scripts/user_test.php
......
itemArrayProcFunc = user_test->user_myfunc

And here is the php code from user_test.php:

class user_test{
* function user_test() {echo "test";}
* function user_myFunc($menuArr, $conf){
*** echo "gotcha";
*** }
}

When commenting out the constructor the function isn't called either.

Beats me.

--- On Tue, 6/24/08, Xavier Perseguers <typo3 (AT) perseguers (DOT) ch> wrote:
From: Xavier Perseguers <typo3 (AT) perseguers (DOT) ch>
Subject: Re: [TYPO3] userFunc not called correctly
To: typo3-english (AT) lists (DOT) netfielders.de
Date: Tuesday, June 24, 2008, 9:46 AM

Hello,

> The sitemap code is inside an extension template and the menu code inside

a base template but that shouldn't make any difference.

Just a guess:

1) are you sure you included your extension's setup?
2) the order of include does not override the menu TS definition?

--
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english



_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #6  
Alt 25.06.2008, 11:23
Antonio Alvarez
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

On mié, 2008-06-25 at 02:09 -0700, Michael Niemann wrote:

> Hello,
>
> after another night of testing I figured out that there is a problem with the actual function call. When I add a constructor containing an echo output to the class this output is generated. So the constructor is called but the function isn't.
>
> Again here is the code. Maybe someone cann tell me what's wrong with it:
>
> page.includeLibs.some_other_random_id_string1 = fileadmin/scripts/user_test.php
> .....
> itemArrayProcFunc = user_test->user_myfunc
>
> And here is the php code from user_test.php:
>
> class user_test{
> function user_test() {echo "test";}
> function user_myFunc($menuArr, $conf){
> echo "gotcha";
> }
> }
>
> When commenting out the constructor the function isn't called either.



Try the next code:

includeLibs.user_test = fileadmin/scripts/user_test.php

page.20 = TEXT
page.20.postUserFunc = user_test->user_myfunc

# itemArrayProcFunc = user_test->user_myfunc


¿Can you read "gotcha"?

Regards.

--
Antonio Ãlvarez Feijoo
Computer Science Engineer
mailto:aalvarez (AT) igalia (DOT) com
Igalia - http://www.igalia.com

_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #7  
Alt 25.06.2008, 11:52
Michael Niemann
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

yes. it's displayed. very strange.

--- On Wed, 6/25/08, Antonio Alvarez <aalvarez (AT) igalia (DOT) com> wrote:

Try the next code:

includeLibs.user_test = fileadmin/scripts/user_test.php

page.20 = TEXT
page.20.postUserFunc = user_test->user_myfunc

# itemArrayProcFunc = user_test->user_myfunc


¿Can you read "gotcha"?




_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #8  
Alt 30.06.2008, 17:14
Antonio Alvarez
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

On mié, 2008-06-25 at 02:52 -0700, Michael Niemann wrote:

> yes. it's displayed. very strange.
>



I don't know why but if the name of the function included with
includeLibs doesn't begin with "user_" it doesn't work!

includeLibs.user_...


Regards.

--
Antonio Ãlvarez Feijoo
Computer Science Engineer
mailto:aalvarez (AT) igalia (DOT) com
Igalia - http://www.igalia.com

_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #9  
Alt 30.06.2008, 17:22
Michael Niemann
Gast
 
Beiträge: n/a
Standard Re: [TYPO3] userFunc not called correctly

I've also tried it both with class and function prefixed with user_.
My workaround was to create an extension which creates the whole sitemap.
Sometimes it seems you're better off to not to try to understand why something isn't working in TYPO but to write own functionality.

--- On Mon, 6/30/08, Antonio Alvarez <aalvarez (AT) igalia (DOT) com> wrote:
From: Antonio Alvarez <aalvarez (AT) igalia (DOT) com>
Subject: Re: [TYPO3] userFunc not called correctly
To: "TYPO3 English" <typo3-english (AT) lists (DOT) netfielders.de>
Date: Monday, June 30, 2008, 3:14 PM

On mié, 2008-06-25 at 02:52 -0700, Michael Niemann wrote:

> yes. it's displayed. very strange.
>



I don't know why but if the name of the function included with
includeLibs doesn't begin with "user_" it doesn't work!

includeLibs.user_...


Regards.

--
Antonio Álvarez Feijoo
Computer Science Engineer
mailto:aalvarez (AT) igalia (DOT) com
Igalia - http://www.igalia.com

_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english



_______________________________________________
TYPO3-english mailing list
TYPO3-english (AT) lists (DOT) netfielders.de
http://lists.netfielders.de/cgi-bin/.../typo3-english
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
[TYPO3] How to modify tt_content correctly? Andreas Balzer typo3-english@lists.netfielders.de 0 23.12.2007 23:47
[TYPO3] JSeventFunctions() called before plugin code is executed Karsten Dambekalns typo3-english@lists.netfielders.de 0 21.07.2007 13:09
[TYPO3] Hook is not called in just ONE installation, why? Matthias Stuebner typo3-english@lists.netfielders.de 2 06.05.2007 22:57
[TYPO3] utf-8 to show up correctly not only in FE/BE but in mysqlclients, too? Giannis Economou typo3-english@lists.netfielders.de 6 12.03.2007 14:56
Re: [TYPO3] sp_directory and utf-8 doesn't work correctly Julo Ferianc typo3-english@lists.netfielders.de 0 10.12.2006 01:22


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:18 Uhr.


Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39