From masi-no at spam-typo3.org Mon Sep 1 12:19:38 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Mon, 01 Sep 2008 12:19:38 +0200 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation Message-ID: Hi! The current implementation has a bug. removeTags doen't work properly. Unfortunately the code is hard to maintain. So I suggest to move on to a new code (maybe even in a new class) that is based on the PHP DOM extension. Masi From typo3-german-02 at oliverklee.de Mon Sep 1 12:46:50 2008 From: typo3-german-02 at oliverklee.de (Oliver Klee) Date: Mon, 01 Sep 2008 12:46:50 +0200 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Hi, Martin Kutschker schrieb: > So I suggest to move on to a > new code (maybe even in a new class) that is based on the PHP DOM extension. +1 on that. Oliver From dmitry at typo3.org Mon Sep 1 15:14:18 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 01 Sep 2008 16:14:18 +0300 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Hi! Martin Kutschker wrote: > The current implementation has a bug. removeTags doen't work properly. > Unfortunately the code is hard to maintain. So I suggest to move on to a > new code (maybe even in a new class) that is based on the PHP DOM extension. Good. May be finally we will be able to select conditional comments inside ... -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/ From typo3 at perseguers.ch Mon Sep 1 15:20:26 2008 From: typo3 at perseguers.ch (Xavier Perseguers) Date: Mon, 01 Sep 2008 15:20:26 +0200 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Hi! >> The current implementation has a bug. removeTags doen't work properly. >> Unfortunately the code is hard to maintain. So I suggest to move on to a >> new code (maybe even in a new class) that is based on the PHP DOM >> extension. > > Good. May be finally we will be able to select conditional comments > inside ... Yes, it would be really great. -- Xavier Perseguers http://xavier.perseguers.ch/en/tutorials/typo3.html From masi-no at spam-typo3.org Mon Sep 1 17:01:02 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Mon, 01 Sep 2008 17:01:02 +0200 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] schrieb: > Hi! > > Martin Kutschker wrote: >> The current implementation has a bug. removeTags doen't work properly. >> Unfortunately the code is hard to maintain. So I suggest to move on to a >> new code (maybe even in a new class) that is based on the PHP DOM >> extension. > > Good. May be finally we will be able to select conditional comments > inside ... What is the connection? I'm talking about the HTMLparser that is available as content object property (FE) and RTE transformation (BE). Masi From info at sk-typo3.de Mon Sep 1 17:25:11 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 01 Sep 2008 17:25:11 +0200 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > Hi! > > The current implementation has a bug. removeTags doen't work properly. > Unfortunately the code is hard to maintain. So I suggest to move on to a > new code (maybe even in a new class) that is based on the PHP DOM extension. > > Masi full +1. HTMLparser code indeed is kind of "outdate" and use hardcoded lists of tags and hard to follow regexes. And if even you as one of the "regex-masters" say that it's difficult to maintain, what's about the others? :-) vg Steffen From dmitry at typo3.org Mon Sep 1 17:25:16 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 01 Sep 2008 18:25:16 +0300 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Hi! Martin Kutschker wrote: > What is the connection? I'm talking about the HTMLparser that is > available as content object property (FE) and RTE transformation (BE). Because it is also used in TV to get header parts :) Current version does not allow to get conditional comments as a single element. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/ From masi-no at spam-typo3.org Fri Sep 5 12:43:50 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Fri, 05 Sep 2008 12:43:50 +0200 Subject: [TYPO3-project-4-3] Generate CE anchors only when necessary Message-ID: Hi! CSC currently generates an anchor tag for all content elements it renders. In an SEO article in the last t3n magazine it has been suggested that you modify the TS to remove the anchors completely. But this means you cannot link to them. A solution to display them only when they are directly linked to would make a lookup in the soft references table. If any relevant links (which?) are found then generate the anchor. What is not covered by that scheme are menus with subsections. But maybe these menus can be found via the soft reference to the page the element is on. Any comments or further ideas? Masi From benni at typo3.org Fri Sep 5 16:08:48 2008 From: benni at typo3.org (Benjamin Mack) Date: Fri, 05 Sep 2008 09:08:48 -0500 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Hey Masi, any further plans on who is gonna implementing this? I'd love to see a new "class.t3lib_parse.php" :) that takes over htmlparser, I have had quite some trouble with my RTE transformations... -- All the best, benni. -SDG- From benni at typo3.org Fri Sep 5 16:27:28 2008 From: benni at typo3.org (Benjamin Mack) Date: Fri, 05 Sep 2008 09:27:28 -0500 Subject: [TYPO3-project-4-3] Generate CE anchors only when necessary In-Reply-To: References: Message-ID: Hey Masi, sounds like a very good idea! It would be great if we could implement this feature through TypoScript (maybe even through), (IIRC the anchor generation is in the tt_content.stdWrap.dataWrap part), as we could add this basically in the CSC setup with a comaptVersion TS condition. However, it somehow has the feeling to me that it will be an additional overhead on the "first hit" when the page hasn't been cached yet. we gotta see how much overhead it really will be though :) This reminds me that we had an issue with linking to the anchors in workspaces, and that these references were broken when publishing, something like that, right? I also thought there was a solution to that in the BT... gotta look for that again. Would be nice to have the "CE linking" worked out way better in 4.3 than in 4.2! Thanks for thoughts, I like them! -- All the best, benni. -SDG- From dmitry at typo3.org Fri Sep 5 17:24:48 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Fri, 05 Sep 2008 18:24:48 +0300 Subject: [TYPO3-project-4-3] Generate CE anchors only when necessary In-Reply-To: References: Message-ID: Hi! Martin Kutschker wrote: > CSC currently generates an anchor tag for all content elements it > renders. In an SEO article in the last t3n magazine it has been > suggested that you modify the TS to remove the anchors completely. It is bad because: > But this means you cannot link to them. I do not see why anchors badly affect SEO. Nothing in my practice suggest this idea. Can you give a bit more information? I monitor SEO for years but never saw anything suggesting that anchors are bad. > A solution to display them only when they are directly linked to would > make a lookup in the soft references table. If any relevant links > (which?) are found then generate the anchor. > > What is not covered by that scheme are menus with subsections. But maybe > these menus can be found via the soft reference to the page the element > is on. > > Any comments or further ideas? No, this is bad. It is not only TYPO3, who can link to anchors but also external sites. Look, for example, to w3.org. You can link directly to the section on each page, they specially provide anchors for this. I often make content elements separately specially for this purpose (people can link directly to interesting portion of the page). I am against removing markers. It does not add the value but removes it. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/ From info at sk-typo3.de Fri Sep 5 20:13:03 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Fri, 05 Sep 2008 20:13:03 +0200 Subject: [TYPO3-project-4-3] Generate CE anchors only when necessary In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > Hi! > > CSC currently generates an anchor tag for all content elements it > renders. In an SEO article in the last t3n magazine it has been > suggested that you modify the TS to remove the anchors completely. > > But this means you cannot link to them. > > A solution to display them only when they are directly linked to would > make a lookup in the soft references table. If any relevant links > (which?) are found then generate the anchor. > > What is not covered by that scheme are menus with subsections. But maybe > these menus can be found via the soft reference to the page the element > is on. > > Any comments or further ideas? > > Masi Hi Masi, i agree to Dmitry as i see no disadvantage by having the anchors in source, even if not linked too. I'm also not a HTML purist that like to have the source well formatted for esthetic reasons. vg Steffen From masi-no at spam-typo3.org Sun Sep 7 22:18:53 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Sun, 07 Sep 2008 22:18:53 +0200 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Benjamin Mack schrieb: > Hey Masi, > > any further plans on who is gonna implementing this? I'd love to see a > new "class.t3lib_parse.php" :) that takes over htmlparser, I have had > quite some trouble with my RTE transformations... No. I was only toying around with the idea. I probably won't have timeto do it myself, but maybe offer tutelage for this little project. Maybe this peace of code can be written with FLOW3 in mind, but in this can I am not qualified to give much advice except for general PHP coding questions. Masi From masi-no at spam-typo3.org Sun Sep 7 22:23:20 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Sun, 07 Sep 2008 22:23:20 +0200 Subject: [TYPO3-project-4-3] Generate CE anchors only when necessary In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] schrieb: > Hi! > > Martin Kutschker wrote: >> CSC currently generates an anchor tag for all content elements it >> renders. In an SEO article in the last t3n magazine it has been >> suggested that you modify the TS to remove the anchors completely. > > It is bad because: > >> But this means you cannot link to them. > > I do not see why anchors badly affect SEO. Nothing in my practice > suggest this idea. Can you give a bit more information? I monitor SEO > for years but never saw anything suggesting that anchors are bad. I don't know. To be SEO is both a black art and charlatanery ;-) >> Any comments or further ideas? > > No, this is bad. It is not only TYPO3, who can link to anchors but also > external sites. Look, for example, to w3.org. You can link directly to > the section on each page, they specially provide anchors for this. I > often make content elements separately specially for this purpose > (people can link directly to interesting portion of the page). > > I am against removing markers. It does not add the value but removes it. It could be optional defaulting to the current behaviour. Those who don't like them could then still have them for those required. But it's not very high on my priority list. Masi From masi-no at spam-typo3.org Sun Sep 7 22:24:30 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Sun, 07 Sep 2008 22:24:30 +0200 Subject: [TYPO3-project-4-3] Generate CE anchors only when necessary In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > > I'm also not a HTML purist that like to have the source well formatted > for esthetic reasons. I've met people who wince for every unnecessary tag the see. Masi From info at sk-typo3.de Mon Sep 8 10:48:29 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 08 Sep 2008 10:48:29 +0200 Subject: [TYPO3-project-4-3] Generate CE anchors only when necessary In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > Steffen Kamper schrieb: >> I'm also not a HTML purist that like to have the source well formatted >> for esthetic reasons. > > I've met people who wince for every unnecessary tag the see. > > Masi Yes, i know. You find them in each HTML-Forum. The next request will be to beautify the menus with line breaks a.s.o. I think we have more important tasks to do, so i'm +-0 to this issue. vg Steffen From oliver at typo3.org Tue Sep 9 17:01:19 2008 From: oliver at typo3.org (Oliver Hader) Date: Tue, 09 Sep 2008 17:01:19 +0200 Subject: [TYPO3-project-4-3] Replace HTMLparser code with a PHP DOM extension based implementation In-Reply-To: References: Message-ID: Hi Masi, Martin Kutschker schrieb: > The current implementation has a bug. removeTags doen't work properly. > Unfortunately the code is hard to maintain. So I suggest to move on to a > new code (maybe even in a new class) that is based on the PHP DOM extension. Oh yeah! +1 Everytime I try to figure out what happens exactly in t3lib_parsehtml I suffer from headaches... olly -- Oliver Hader TYPO3 4.3 Release Manager From info at sk-typo3.de Wed Sep 10 15:54:12 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 10 Sep 2008 15:54:12 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 Message-ID: Hi, as requested here is the brainstorming thread for indexed_search. I started modification with * remove hardcoded html for compiled result and use subpart in template [1] * build pagebrowser with stdWraps from TS [2] as requested from Patrick: * render searchBox only usind resultPid from TS (like macina searchbox does) * use typolinks for using linkVars or addQueryString any additional ideas are welcome :-) vg Steffen Examples [1]

###RESULTCOUNT### ###ADDSTRING###

###ADDPART### ###PREVIOUS### ###PAGES### ###NEXT###

Search Results

###BROWSE_BOX_TOP### ###RESULTS### ###BROWSE_BOX_BOTTOM###

###NO_RESULT_MESSAGE###

[2] pageBrowser { doNotLinkCurrent = 1 general_stdWrap { wrap =
    |
} previous_stdWrap { wrap =
  • |
  • } next_stdWrap { wrap =
  • |
  • } pages_stdWrap { wrap =
  • |
  • } current_stdWrap { wrap =
  • |
  • } pageLinks_stdWrap { preCObject = TEXT preCObject.dataWrap = {LLL:EXT:indexed_search/pi/locallang.xml:pi_list_browseresults_page} preCObject.noTrimWrap = | || } } From info at sk-typo3.de Wed Sep 10 16:11:16 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 10 Sep 2008 16:11:16 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi, i know Ingo and Stucki did an performance improvement, would like to have this integrated too vg Steffen From masi-no at spam-typo3.org Wed Sep 10 16:19:52 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 10 Sep 2008 16:19:52 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > Hi, > > i know Ingo and Stucki did an performance improvement, would like to > have this integrated too Did you test their prerequesit? This would be the page tree / rootline cache. Without that you won't get full speed. Masi From typo3 at t3node.com Wed Sep 10 16:20:54 2008 From: typo3 at t3node.com (=?ISO-8859-15?Q?Steffen_M=FCller?=) Date: Wed, 10 Sep 2008 16:20:54 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi. Steffen Kamper wrote: > Hi, > > as requested here is the brainstorming thread for indexed_search. > I thought about two new features: * search/find-as-you-type as already realized in mh_ajaxsearch or pmkisac. * soundex comparison and suggestion (like the "Did you mean ..." in google). The quality of soundex heavily depends on the locale, so we would need a bunch of libs to support other languages than EN. Each lib generates the soundex keys for a single language. That would also mean additional table relation between words and soundex keys (1-n). Recently, there has been a french soundex implementation in the EM. -- cheers, Steffen From info at sk-typo3.de Wed Sep 10 16:27:11 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 10 Sep 2008 16:27:11 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > Steffen Kamper schrieb: >> Hi, >> >> i know Ingo and Stucki did an performance improvement, would like to >> have this integrated too > > Did you test their prerequesit? This would be the page tree / rootline > cache. Without that you won't get full speed. > > Masi Hi Masi, i didn't as i don't know if it's available anywhere, but i would like to do vg Steffen From info at sk-typo3.de Wed Sep 10 17:24:15 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 10 Sep 2008 17:24:15 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: hi, additionally i did this in TS: code = form,rules,results as default. This means that it's possible to render form only by code = form or change the order of the output like code = results,form,rules vg Steffen From gaumondpatrick-s-p-a-m at hotmail-sp-a-m.com Wed Sep 10 17:31:50 2008 From: gaumondpatrick-s-p-a-m at hotmail-sp-a-m.com (Patrick Gaumond) Date: Wed, 10 Sep 2008 11:31:50 -0400 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen M?ller wrote: > * soundex comparison and suggestion (like the "Did you mean ..." in > google). The quality of soundex heavily depends on the locale, so we > would need a bunch of libs to support other languages than EN. Each lib > generates the soundex keys for a single language. That would also mean > additional table relation between words and soundex keys (1-n). > Recently, there has been a french soundex implementation in the EM. Yes, soundex is usually a good thing. And while at it, it looks like TYPO3 5.0 CR (Content Repository)will use the Lucene PHP implementation: > I just committed > http://forge.typo3.org/repositories/revision/package-typo3cr/1143 > which introduces Zend_Search_Lucene as indexing/searching engine > in TYPO3CR Source: http://support.typo3.org/projects/typo3-5-0general/m/typo3-50-general-lucene-used-for-search-in-cr-as-of-today-359330/p/9/ And someone also did some more Lucene work in the 4.0 area: http://typo3.org/documentation/document-library/extension-manuals/powersearchindexlucene/1.0.3/view/1/2/ I didn't test any of this. I'm just giving hints and links. Patrick From masi-no at spam-typo3.org Wed Sep 10 19:49:05 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 10 Sep 2008 19:49:05 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > Martin Kutschker schrieb: >> Steffen Kamper schrieb: >>> Hi, >>> >>> i know Ingo and Stucki did an performance improvement, would like to >>> have this integrated too >> >> Did you test their prerequesit? This would be the page tree / rootline >> cache. Without that you won't get full speed. >> >> Masi > > Hi Masi, > > i didn't as i don't know if it's available anywhere, but i would like to do Search the Core list. It's pending for at least a month if not two now. Ingo posted it. There was only a discussion if to add this into the Core, as a sysext or on TER. I think noone tested it. Masi From info at sk-typo3.de Thu Sep 11 09:50:59 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 11 Sep 2008 09:50:59 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > Steffen Kamper schrieb: >> Martin Kutschker schrieb: >>> Steffen Kamper schrieb: >>>> Hi, >>>> >>>> i know Ingo and Stucki did an performance improvement, would like to >>>> have this integrated too >>> Did you test their prerequesit? This would be the page tree / rootline >>> cache. Without that you won't get full speed. >>> >>> Masi >> Hi Masi, >> >> i didn't as i don't know if it's available anywhere, but i would like to do > > Search the Core list. It's pending for at least a month if not two now. > Ingo posted it. There was only a discussion if to add this into the > Core, as a sysext or on TER. I think noone tested it. > > Masi Hi Masi, i searched the core list and only found the patch from Ingo for the cached rootline, where he said that this is important for the new indexed search. vg Steffen From masi-no at spam-typo3.org Thu Sep 11 10:23:06 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Thu, 11 Sep 2008 10:23:06 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > Martin Kutschker schrieb: >> Steffen Kamper schrieb: >>> Martin Kutschker schrieb: >>>> Steffen Kamper schrieb: >>>>> Hi, >>>>> >>>>> i know Ingo and Stucki did an performance improvement, would like to >>>>> have this integrated too >>>> Did you test their prerequesit? This would be the page tree / rootline >>>> cache. Without that you won't get full speed. >>>> >>>> Masi >>> Hi Masi, >>> >>> i didn't as i don't know if it's available anywhere, but i would like >>> to do >> >> Search the Core list. It's pending for at least a month if not two now. >> Ingo posted it. There was only a discussion if to add this into the >> Core, as a sysext or on TER. I think noone tested it. >> >> Masi > > Hi Masi, > > i searched the core list and only found the patch from Ingo for the > cached rootline, where he said that this is important for the new > indexed search. This is the one I'm talking about. They will send the rest of the improvement only afrter this one has been added to the COre. Masi From info at sk-typo3.de Thu Sep 11 10:29:01 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 11 Sep 2008 10:29:01 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > > This is the one I'm talking about. They will send the rest of the > improvement only afrter this one has been added to the COre. > > Masi interesting. I made a complete review and time measure, and the patch was committed at 7.8. vg Steffen From masi-no at spam-typo3.org Thu Sep 11 11:08:36 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Thu, 11 Sep 2008 11:08:36 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > Martin Kutschker schrieb: >> >> This is the one I'm talking about. They will send the rest of the >> improvement only afrter this one has been added to the COre. >> >> Masi > > > interesting. I made a complete review and time measure, and the patch > was committed at 7.8. Really? i though it was pending. But hey, they are so many bugs around... Masi From info at sk-typo3.de Fri Sep 12 00:13:56 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Fri, 12 Sep 2008 00:13:56 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen M?ller schrieb: > Hi. > > Steffen Kamper wrote: >> Hi, >> >> as requested here is the brainstorming thread for indexed_search. >> > > I thought about two new features: > > * search/find-as-you-type as already realized in mh_ajaxsearch or pmkisac. > * soundex comparison and suggestion (like the "Did you mean ..." in > google). The quality of soundex heavily depends on the locale, so we > would need a bunch of libs to support other languages than EN. Each lib > generates the soundex keys for a single language. That would also mean > additional table relation between words and soundex keys (1-n). > Recently, there has been a french soundex implementation in the EM. > Hi Steffen, as i like such features i think it's a bit overhead for IS. Soundex only works with english, there is no "easy" integration of such feature for all languages (i didn't looked at the french one) Also the ajax completition sounds great, but as complex the search algorythm is, i fear that it's not done with good performance. Remember that normal IS is a performance killer for many sites with vig big result tables, don't speaking about external file search. vg Steffen From masi-no at spam-typo3.org Fri Sep 12 11:20:46 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Fri, 12 Sep 2008 11:20:46 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > > Also the ajax completition sounds great, but as complex the search > algorythm is, i fear that it's not done with good performance. You're right. Auto completition is not an option. What could be done though is to have an auto complettiiton based on terms the users searched for. Masi From info at sk-typo3.de Fri Sep 12 12:33:28 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Fri, 12 Sep 2008 12:33:28 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > Steffen Kamper schrieb: >> Also the ajax completition sounds great, but as complex the search >> algorythm is, i fear that it's not done with good performance. > > You're right. Auto completition is not an option. What could be done > though is to have an auto complettiiton based on terms the users > searched for. > > Masi good idea. That would mean that every search saves the search word user types. It has to be deleted after search if result is 0. Good that it's not for single user as these saved search expressions are saved for all users. vg Steffen From typo3 at t3node.com Fri Sep 12 13:55:31 2008 From: typo3 at t3node.com (=?ISO-8859-15?Q?Steffen_M=FCller?=) Date: Fri, 12 Sep 2008 13:55:31 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi. On 12.09.2008 00:13 Steffen Kamper wrote: > > Soundex only works with english, there is no "easy" integration of such > feature for all languages (i didn't looked at the french one) > My idea was to have some kind of service API for language specific soundex algorithms. The lexer could check if the actual language is supported, then call a wrapper function and calculate the according soundex keys. However this is solved technically, the algorithms can be natively shipped by IS or by 3rd party extensions. This would make it possible to support multiple languages concurrently and even to choose alternative algorithms for one language (e.g. soundex or metaphone). For english, there's two native php functions: http://us2.php.net/soundex http://us2.php.net/manual/de/function.metaphone.php For german, there's the "Cologne Phonetic". You can find the code in the comments of the above soundex function. The mentioned french extension bases on the phonex algorithm: http://typo3.org/extensions/repository/view/search_suggestions/1.0.0/info/phonex.class.php/ The implementation bases on some code by Fr?d?ric Brouard: http://sqlpro.developpez.com/cours/soundex/ I found a double_metaphone algorithm for spanish: http://www.geocities.com/isloera/spanish_methaphone.txt That's at least four implementations though I did not test them. I bet there are some more around. The index_words table already has a metaphone column. But I have no clue if it is used at all. Also performance is an issue here. -- cheers, Steffen http://www.t3node.com/ From typo3 at t3node.com Fri Sep 12 14:19:45 2008 From: typo3 at t3node.com (=?ISO-8859-15?Q?Steffen_M=FCller?=) Date: Fri, 12 Sep 2008 14:19:45 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi. On 12.09.2008 00:13 Steffen Kamper wrote: > > Also the ajax completition sounds great, but as complex the search > algorythm is, i fear that it's not done with good performance. > > Remember that normal IS is a performance killer for many sites with vig > big result tables, don't speaking about external file search. > The autocompleter queries can be separated from any complex search query itself. No impact on the performance of the result query, no searchword<->resultpage query needed. (like it is handled in the firefox search box: show suggestions as user types, but query results are gathered in a second step) IMHO a DB key for basewords in index_words and queries limited to LIKE $searchCharacter% should work to fetch all possible search words. But I admit, I didn't test the performance of this query with huge tables. These are just brainstorming ideas. Keep in mind that even some retarded autocomplete suggestions can have a positive impact on the effectivity of users research. From a users point of view, this can mean a performance gain in spite of little autocomplete delays. -- cheers, Steffen http://www.t3node.com/ From masi-no at spam-typo3.org Fri Sep 12 14:22:27 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Fri, 12 Sep 2008 14:22:27 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > Martin Kutschker schrieb: >> Steffen Kamper schrieb: >>> Also the ajax completition sounds great, but as complex the search >>> algorythm is, i fear that it's not done with good performance. >> >> You're right. Auto completition is not an option. What could be done >> though is to have an auto complettiiton based on terms the users >> searched for. >> >> Masi > > good idea. That would mean that every search saves the search word user > types. Already there. Have a look at Web>Info Indexed Search Statistics (something like that). > It has to be deleted after search if result is 0. No, this helps the admin to see what the users are looking for. But words with 0 results shouldn't be suggested in the AJAX search box. But as you could type in more than one word this needs to be properly thought of. Masi From ingo at typo3.org Fri Sep 12 19:01:08 2008 From: ingo at typo3.org (Ingo Renner) Date: Fri, 12 Sep 2008 12:01:08 -0500 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi Masi, hi Steffen, >> Did you test their prerequesit? This would be the page tree / rootline >> cache. Without that you won't get full speed. > i didn't as i don't know if it's available anywhere, but i would like to do it's in trunk already =) Now the only thing missing is Stucki's MySQL Fulltext Index stuff Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From typo3 at t3node.com Sat Sep 13 15:11:32 2008 From: typo3 at t3node.com (=?ISO-8859-15?Q?Steffen_M=FCller?=) Date: Sat, 13 Sep 2008 15:11:32 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi. On 12.09.2008 19:01 Ingo Renner wrote: > >>> Did you test their prerequesit? This would be the page tree / rootline >>> cache. Without that you won't get full speed. > > > it's in trunk already =) > Couldn't find it. which revision? Thanks! -- cheers, Steffen http://www.t3node.com/ From info at sk-typo3.de Sat Sep 13 17:04:58 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Sat, 13 Sep 2008 17:04:58 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Steffen M?ller schrieb: > Hi. > > On 12.09.2008 19:01 Ingo Renner wrote: >>>> Did you test their prerequesit? This would be the page tree / rootline >>>> cache. Without that you won't get full speed. >> >> it's in trunk already =) >> > > Couldn't find it. which revision? > Thanks! > Hi Steffen, here it is: http://forge.typo3.org/repositories/revision/typo3v4-core/3947 vg Steffen From typo3 at t3node.com Sat Sep 13 20:21:11 2008 From: typo3 at t3node.com (=?ISO-8859-15?Q?Steffen_M=FCller?=) Date: Sat, 13 Sep 2008 20:21:11 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: On 13.09.2008 17:04 Steffen Kamper wrote: >> >> Couldn't find it. which revision? > > here it is: > http://forge.typo3.org/repositories/revision/typo3v4-core/3947 > thanks! -- cheers, Steffen http://www.t3node.com/ From ng at ralfhettinger.de Sun Sep 14 16:27:27 2008 From: ng at ralfhettinger.de (Ralf Hettinger) Date: Sun, 14 Sep 2008 16:27:27 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi, Steffen Kamper schrieb: > Hi, > > as requested here is the brainstorming thread for indexed_search. > > I started modification with > > * remove hardcoded html for compiled result and use subpart in template [1] > * build pagebrowser with stdWraps from TS [2] > > as requested from Patrick: > > * render searchBox only usind resultPid from TS (like macina searchbox > does) > > * use typolinks for using linkVars or addQueryString > > > any additional ideas are welcome :-) > * enable result navigation (pagebrowser) that doesn't rely on JavaScript only (e.g. by using [3]) Cheers Ralf [3] http://bugs.typo3.org/view.php?id=1347 From info at sk-typo3.de Sun Sep 14 17:11:51 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Sun, 14 Sep 2008 17:11:51 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi Ralf, Ralf Hettinger schrieb: > > * enable result navigation (pagebrowser) that doesn't rely on JavaScript > only (e.g. by using [3]) > > Cheers > Ralf > > > [3] http://bugs.typo3.org/view.php?id=1347 good one! I will take it into account. vg Steffen From info at sk-typo3.de Sun Sep 14 19:21:22 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Sun, 14 Sep 2008 19:21:22 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions Message-ID: Hi, i try to sum up the discussion started in core list inside RFC for HTTP_STATUS-constants. As the discussion is misplaced in corelist, Francois asked for moving this. IDEA Ingo came up with the idea to split t3lib_div into single classes. To be compatible the idea was to use t3lib_div as a container having the functions inside but calling the new classes. For using these classes an autoloader should be used as PHP5 comes along with such possibility. Main point of the discussion was the naming issue. * How should the new classes be named? Many proposals used underscores, Dmitry veto'd because of naming convention. * where should the classes be located, in t3lib-folder or in subfolders? AUTOLOAD For use an autoload the naming issue should be solved first. Ingo and Masi started with an SPL-idea http://bugs.typo3.org/view.php?id=9116 I tried with such a funtion: http://pastebin.com/m1c6ebeb2 I hope i didn't forgot an important thing, if so please add it. vg Steffen From dmitry at typo3.org Sun Sep 14 21:26:17 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Sun, 14 Sep 2008 22:26:17 +0300 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi! Ralf Hettinger wrote: > * enable result navigation (pagebrowser) that doesn't rely on JavaScript > only (e.g. by using [3]) I made a dedicated page browser extension as a part of my work in Netcreators. It is specially developed for use from other extensions. Comments extension will soon migrate to use this new page browser. The extension is not public yet. You can see something close in functionality here: http://scan.vara.nl/pg.9-8.archief.htm It is *not* my extension there but I got inspiration from this web site. There are first [on/off], previous [on/off], dots-previous [on/off], page list [configurable number of before/after], dots-next [on/off], next [on/off], last links [on/off]. I think more and more to propose the page browser as a new sysext when the extension becomes public. This way we will have common feature reach pagebrowser that can be used by the indexed search too. Here is a code from one real extension that creates the page browser: protected function getListGetPageBrowser($numOfPages) { // Get default configuration $conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_pagebrowse_pi1.']; // Modify this configuration $conf += array( 'pageParamName' => $this->prefixId . '|page', 'numPages' => intval($numOfPages/$this->conf['pageSize']) + (($numOfPages % $this->conf['pageSize']) == 0 ? 0 : 1), ); // Get page browser $cObj = t3lib_div::makeInstance('tslib_cObj'); /* @var $cObj tslib_cObj */ $cObj->start(array(), ''); return $cObj->cObjGetSingle('USER', $conf); } As you see from the example, it is really simple. The page browser even uses $this->extPrefix to create a configurable piVar for the current extension. Seven lines of code (without comments) and you have s fully styleable and templateable page browser! The page browser is also clever enough to make cHashes. It will skip page parameter for the first page and avoid extra page cache entry, which is extra optimization. The only missing thing to the moment is the manual and public status of the extension. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/ From dmitry at typo3.org Sun Sep 14 21:29:58 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Sun, 14 Sep 2008 22:29:58 +0300 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Hi! Steffen Kamper wrote: > Main point of the discussion was the naming issue. > * How should the new classes be named? Many proposals used underscores, > Dmitry veto'd because of naming convention. It is not veto. It is a note that we decided not to use underscores in class or function names. If we say we allow this, it means we change CGL. We just need to make a decision and vote about it. > * where should the classes be located, in t3lib-folder or in subfolders? I like structure. I prefer subfolders. But do not want 100 subfolders with 1-2 files in each :( > AUTOLOAD > > For use an autoload the naming issue should be solved first. Not necessarily. A registry could do. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/ From fsuter at cobweb.ch Sun Sep 14 21:48:25 2008 From: fsuter at cobweb.ch (Francois Suter) Date: Sun, 14 Sep 2008 21:48:25 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi, > I made a dedicated page browser extension as a part of my work in > Netcreators. It is specially developed for use from other extensions. > Comments extension will soon migrate to use this new page browser. The > extension is not public yet. When can we expect it to be public? I'm looking at the development of such a page browser now and I would gladly not reinvent the wheel. Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch From dmitry at typo3.org Sun Sep 14 21:57:13 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Sun, 14 Sep 2008 22:57:13 +0300 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi! Francois Suter wrote: > When can we expect it to be public? I'm looking at the development of > such a page browser now and I would gladly not reinvent the wheel. I hope it will be very soon. I'll ask internally. If I can write the manual quickly, it should be a matter of days. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/debugging_symlinked_typo3_files_with_komodo_ide_on_mac/ From info at sk-typo3.de Sun Sep 14 22:42:30 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Sun, 14 Sep 2008 22:42:30 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Hi Dmitry, Dmitry Dulepov [typo3] schrieb: > Hi! > > Steffen Kamper wrote: >> Main point of the discussion was the naming issue. >> * How should the new classes be named? Many proposals used >> underscores, Dmitry veto'd because of naming convention. > > It is not veto. It is a note that we decided not to use underscores in > class or function names. If we say we allow this, it means we change > CGL. We just need to make a decision and vote about it. > >> * where should the classes be located, in t3lib-folder or in subfolders? > > I like structure. I prefer subfolders. But do not want 100 subfolders > with 1-2 files in each :( > i understand this. Do you have a proposal which subfolder/grouping would make sense in your eyes? >> AUTOLOAD >> >> For use an autoload the naming issue should be solved first. > > Not necessarily. A registry could do. > Indeed a good idea. Do you have any idea or do you know such registry from other projects? vg Steffen From info at sk-typo3.de Sun Sep 14 22:52:26 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Sun, 14 Sep 2008 22:52:26 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] schrieb: >> AUTOLOAD >> >> For use an autoload the naming issue should be solved first. > > Not necessarily. A registry could do. > may be we can learn something from Drupal http://api.drupal.org/api/group/registry/7 vg Steffen From ingo at typo3.org Sun Sep 14 22:55:14 2008 From: ingo at typo3.org (Ingo Renner) Date: Sun, 14 Sep 2008 15:55:14 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] wrote: >> AUTOLOAD >> >> For use an autoload the naming issue should be solved first. > > Not necessarily. A registry could do. With our current structure and their exceptions we'll need a mix of a an autoloader and a registry anyways ;) Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From benni at typo3.org Sun Sep 14 23:09:30 2008 From: benni at typo3.org (Benjamin Mack) Date: Sun, 14 Sep 2008 16:09:30 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Hey Steffen, Steffen Kamper wrote: > i understand this. Do you have a proposal which subfolder/grouping would > make sense in your eyes? I like the Zend Framework structure, unfortunately not as easy for existing projects as ours. -- All the best, benni. -SDG- From ingo at typo3.org Sun Sep 14 23:15:20 2008 From: ingo at typo3.org (Ingo Renner) Date: Sun, 14 Sep 2008 16:15:20 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Steffen Kamper wrote: > may be we can learn something from Drupal > > http://api.drupal.org/api/group/registry/7 the description definitly sounds interesting and goes even further than what we thought about yet... thanks for digging this up! Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From info at sk-typo3.de Mon Sep 15 10:12:31 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 15 Sep 2008 10:12:31 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi, if someone is interested, here is the work i did with IS so far vg Steffen -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: is_work.diff Url: http://lists.netfielders.de/pipermail/typo3-project-4-3/attachments/20080915/92c16944/attachment.txt From news at ringerge.org Mon Sep 15 11:22:49 2008 From: news at ringerge.org (Georg Ringer) Date: Mon, 15 Sep 2008 11:22:49 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] wrote: > As you see from the example, it is really simple. The page browser even > uses $this->extPrefix to create a configurable piVar for the current > extension. Seven lines of code (without comments) and you have s fully > styleable and templateable page browser! great! I would use it immediatly in my extensions ;) Georg From info at sk-typo3.de Mon Sep 15 11:27:18 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 15 Sep 2008 11:27:18 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi, Dmitry Dulepov [typo3] schrieb: > Hi! > > Ralf Hettinger wrote: >> * enable result navigation (pagebrowser) that doesn't rely on >> JavaScript only (e.g. by using [3]) > this is independent from used pagebrowser as these links are compiled in an extra function of IS, the pagebrowser used is the one from pibase. > I made a dedicated page browser extension as a part of my work in > Netcreators. It is specially developed for use from other extensions. > Comments extension will soon migrate to use this new page browser. The > extension is not public yet. > > You can see something close in functionality here: > http://scan.vara.nl/pg.9-8.archief.htm It is *not* my extension there > but I got inspiration from this web site. There are first [on/off], > previous [on/off], dots-previous [on/off], page list [configurable > number of before/after], dots-next [on/off], next [on/off], last links > [on/off]. > > I think more and more to propose the page browser as a new sysext when > the extension becomes public. This way we will have common feature reach > pagebrowser that can be used by the indexed search too. > > Here is a code from one real extension that creates the page browser: > > protected function getListGetPageBrowser($numOfPages) { > // Get default configuration > $conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_pagebrowse_pi1.']; > // Modify this configuration > $conf += array( > 'pageParamName' => $this->prefixId . '|page', > 'numPages' => intval($numOfPages/$this->conf['pageSize']) + > (($numOfPages % $this->conf['pageSize']) == 0 ? 0 : 1), > ); > // Get page browser > $cObj = t3lib_div::makeInstance('tslib_cObj'); > /* @var $cObj tslib_cObj */ > $cObj->start(array(), ''); > return $cObj->cObjGetSingle('USER', $conf); > } > > As you see from the example, it is really simple. The page browser even > uses $this->extPrefix to create a configurable piVar for the current > extension. Seven lines of code (without comments) and you have s fully > styleable and templateable page browser! > > The page browser is also clever enough to make cHashes. It will skip > page parameter for the first page and avoid extra page cache entry, > which is extra optimization. The only missing thing to the moment is the > manual and public status of the extension. > great! As the pibase pagebrowser is conceptional for usage from extensions, is there a possibility to enhance that one or exchange with yours? vg Steffen From dmitry at typo3.org Mon Sep 15 12:25:23 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 15 Sep 2008 13:25:23 +0300 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Hi! Steffen Kamper wrote: > i understand this. Do you have a proposal which subfolder/grouping would > make sense in your eyes? I think we should have function groups first. > Indeed a good idea. Do you have any idea or do you know such registry > from other projects? Not for PHP. Again, we can make requirements for such registry after we have function/class groups. We need a live use examples to see how better organize such registry. Basically it is a map of class<=>filename relations. Pure PHP, no database involved. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/debugging_symlinked_typo3_files_with_komodo_ide_on_mac/ From dmitry at typo3.org Mon Sep 15 12:31:43 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 15 Sep 2008 13:31:43 +0300 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi! Steffen Kamper wrote: > this is independent from used pagebrowser as these links are compiled in > an extra function of IS, the pagebrowser used is the one from pibase. Yes. Table-based and not really customizable. > As the pibase pagebrowser is conceptional for usage from extensions, is > there a possibility to enhance that one or exchange with yours? I do not think so. tslib_pibase cannot have templates, etc. It even cannot have localized strings unless we include them to cms ext. Having a standalone extension is better. It can be sent to TER with TYPO3 version requirement < 4.3 and people can start using it right now. If it comes as sysext, people do not have to do anything when system is upgraded. Admin sismply uses sysext instead of the same ext from TER. tslib_pibase code can be changed to check if page browser is installed and use it. If not installed, skip to old method. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/debugging_symlinked_typo3_files_with_komodo_ide_on_mac/ From info at sk-typo3.de Mon Sep 15 12:56:15 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 15 Sep 2008 12:56:15 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: hi Dmitry, Dmitry Dulepov [typo3] schrieb: > I do not think so. tslib_pibase cannot have templates, etc. It even > cannot have localized strings unless we include them to cms ext. > > Having a standalone extension is better. It can be sent to TER with > TYPO3 version requirement < 4.3 and people can start using it right now. > If it comes as sysext, people do not have to do anything when system is > upgraded. Admin sismply uses sysext instead of the same ext from TER. > > tslib_pibase code can be changed to check if page browser is installed > and use it. If not installed, skip to old method. > please do so! This would be a great benefit to have a "real" pagebrowser configurable, devs will be happy if there is a built-in-solution. Also i recognized that many devs don't use the pibase one because they don't know how to configure and work with it. vg Steffen From ng at ralfhettinger.de Mon Sep 15 15:02:38 2008 From: ng at ralfhettinger.de (Ralf Hettinger) Date: Mon, 15 Sep 2008 15:02:38 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi. Dmitry Dulepov [typo3] schrieb: > You can see something close in functionality here: > http://scan.vara.nl/pg.9-8.archief.htm It is *not* my extension there > but I got inspiration from this web site. There are first [on/off], > previous [on/off], dots-previous [on/off], page list [configurable > number of before/after], dots-next [on/off], next [on/off], last links > [on/off]. This indeed sounds very very neat and it would be great to have it available. But I think we have some special situation for indexed_search, which has been discussed a bit in BT [1]: indexed_search can have many parameters, which would have probably to be transfered as GET-params using a generalized pagebrowser or tx_pagebrowse_pi1. The patch in [1] therefore suggests the possibility to create a pagebrowser with submit buttons and hidden input fields to submit those parameters by POST. Could tx_pagebrowse_pi1 be used to do that (render pagebrowser "links" as submit buttons and putting in hidden input fields)? If not, I would be happy to have at least an optional (meaning: configurable to use) solution _within_ indexed_search that uses submit buttons as pagebrowser. Cheers Ralf [1] http://bugs.typo3.org/view.php?id=1347 From ng at ralfhettinger.de Mon Sep 15 15:21:13 2008 From: ng at ralfhettinger.de (Ralf Hettinger) Date: Mon, 15 Sep 2008 15:21:13 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Adding an examplary reference that uses submit buttons for page browsing indexed_search results - which might be of help to see how it's meant by looking at the HTML source (unfortunately, it's in german only currently): http://www.ea-aw.de/de/website/website-durchsuchen.html (you may want to search for "akademie"). Cheers Ralf Ralf Hettinger schrieb: > Hi. > > Dmitry Dulepov [typo3] schrieb: >> You can see something close in functionality here: >> http://scan.vara.nl/pg.9-8.archief.htm It is *not* my extension there >> but I got inspiration from this web site. There are first [on/off], >> previous [on/off], dots-previous [on/off], page list [configurable >> number of before/after], dots-next [on/off], next [on/off], last links >> [on/off]. > > This indeed sounds very very neat and it would be great to have it > available. > > > But I think we have some special situation for indexed_search, which has > been discussed a bit in BT [1]: > > indexed_search can have many parameters, which would have probably to be > transfered as GET-params using a generalized pagebrowser or > tx_pagebrowse_pi1. The patch in [1] therefore suggests the possibility > to create a pagebrowser with submit buttons and hidden input fields to > submit those parameters by POST. > > Could tx_pagebrowse_pi1 be used to do that (render pagebrowser "links" > as submit buttons and putting in hidden input fields)? > > If not, I would be happy to have at least an optional (meaning: > configurable to use) solution _within_ indexed_search that uses submit > buttons as pagebrowser. > > > Cheers > Ralf > > > [1] http://bugs.typo3.org/view.php?id=1347 From info at sk-typo3.de Mon Sep 15 15:41:53 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 15 Sep 2008 15:41:53 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Ralf Hettinger schrieb: > Adding an examplary reference that uses submit buttons for page browsing > indexed_search results - which might be of help to see how it's meant by > looking at the HTML source (unfortunately, it's in german only currently): > > http://www.ea-aw.de/de/website/website-durchsuchen.html (you may want to > search for "akademie"). > > Cheers > Ralf > > Hi ralf, i read the bt entry and the reason was too long urls? I'm a bit confused as the JS-links use same url in onclick="..." Looking to your example i don't see a reason for a long url, so can you enlighten me why this is needed? thx in advance, vg Steffen From ingo at typo3.org Mon Sep 15 16:29:06 2008 From: ingo at typo3.org (Ingo Renner) Date: Mon, 15 Sep 2008 09:29:06 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] wrote: > Basically it is a map of class<=>filename relations. Pure PHP, no > database involved. let's check Drupal's implementation Steffen dug up. Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From ingo at typo3.org Mon Sep 15 16:32:04 2008 From: ingo at typo3.org (Ingo Renner) Date: Mon, 15 Sep 2008 09:32:04 -0500 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] wrote: Hey Dmitry, > Having a standalone extension is better. It can be sent to TER with > TYPO3 version requirement < 4.3 and people can start using it right now. > If it comes as sysext, people do not have to do anything when system is > upgraded. Admin sismply uses sysext instead of the same ext from TER. > > tslib_pibase code can be changed to check if page browser is installed > and use it. If not installed, skip to old method. wouldn't that be a perfect fit for extbase then?! Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From ng at ralfhettinger.de Mon Sep 15 16:37:43 2008 From: ng at ralfhettinger.de (Ralf Hettinger) Date: Mon, 15 Sep 2008 16:37:43 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi Steffen, Steffen Kamper schrieb: > i read the bt entry and the reason was too long urls? I'm a bit confused > as the JS-links use same url in onclick="..." I would think, that it should be no problem to have very long URLs and many GET params. _should_ Formally, there exists a W3C recommendation suggesting a maximum length of 255 bytes for an URL [1]. This length is not unlikely to be exceeded, if using indexed_search and pagebrowsing with GET, since all indexed_search params would have to be transmitted as GET vars. Furthermore, I remember that older IEs may have problems when using a back button to a very long URL. I could imagine further problems like content inspections in firewalls blocking pages or indeed 414 server errors (though that admittedly sounds not very likely). Finally, it might be a cosmetic question of having URLs that fit into a browser's address line. > Looking to your example i don't see a reason for a long url, so can you > enlighten me why this is needed? The URLs in pagebrowser (if not submitted by POST, as they are in [2]) would be easily at around 350 chars (without tricky realurl configuration - yes, I think you could tune that, but why having the need to tune if some other solution exists?). Which I personally think is a long URL. Cheers Ralf [1] http://www.ietf.org/rfc/rfc2616.txt => section 3.2.1 General Syntax [2] http://www.ea-aw.de/de/website/website-durchsuchen.html From ingo at typo3.org Mon Sep 15 16:36:29 2008 From: ingo at typo3.org (Ingo Renner) Date: Mon, 15 Sep 2008 09:36:29 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] wrote: > Basically it is a map of class<=>filename relations. Pure PHP, no > database involved. BTW: could you please add your ideas how this thing should work to http://bugs.typo3.org/view.php?id=9116 Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From info at sk-typo3.de Mon Sep 15 17:11:13 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 15 Sep 2008 17:11:13 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi Ralf, thx for the explanation, i got it now. btw - do you know the problem with different result counts? I have here an example 1st page: results: 60 2nd page: results: 42 3rd page: results: 30 I don't see anything that could cause this error, but it looks very strange to me (and the users) vg Steffen From ng at ralfhettinger.de Mon Sep 15 17:26:42 2008 From: ng at ralfhettinger.de (Ralf Hettinger) Date: Mon, 15 Sep 2008 17:26:42 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi Steffen Steffen Kamper schrieb: > btw - do you know the problem with different result counts? > I have here an example > > 1st page: results: 60 > 2nd page: results: 42 > 3rd page: results: 30 > > I don't see anything that could cause this error, but it looks very > strange to me (and the users) This is addressed in [1]. And is all that I really know about - astonishingly, in the installations I have insight to or set up, I did not encounter the problem. As a wild guess, I could imagine that there exist problems with kind of "garbage" (meaning double entries for the same page in IS tables). I normally set up kind of a garbage collection (truncating indexed_search tables and refilling them regularly)... which is far from being elegant, but seemed to be necessary. Shame on me, don't let anybody know... whoops ;) Maybe this idea helps, maybe it's completely misleading. Haven't dig into that. Cheers Ralf [1] http://bugs.typo3.org/view.php?id=5714 From ingo at typo3.org Mon Sep 15 18:48:11 2008 From: ingo at typo3.org (Ingo Renner) Date: Mon, 15 Sep 2008 11:48:11 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Steffen Kamper wrote: > may be we can learn something from Drupal > > http://api.drupal.org/api/group/registry/7 I just had a look at it, and hey, this is cool stuff and provides quite a few new ideas for our autoloader! Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From info at sk-typo3.de Mon Sep 15 19:13:53 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 15 Sep 2008 19:13:53 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Ingo Renner schrieb: > Steffen Kamper wrote: > >> may be we can learn something from Drupal >> >> http://api.drupal.org/api/group/registry/7 > > I just had a look at it, and hey, this is cool stuff and provides quite > a few new ideas for our autoloader! > > Ingo > Hi Ingo, that was my impression too while reading that code ;-) vg Steffen From dmitry at typo3.org Mon Sep 15 21:30:35 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 15 Sep 2008 22:30:35 +0300 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi! Ralf Hettinger wrote: > Could tx_pagebrowse_pi1 be used to do that (render pagebrowser "links" > as submit buttons and putting in hidden input fields)? Absolutely. Page browser uses HTML template. We could simply have its markers in indexed search template file and pass path to this file to the page browser. This also means one single template for indexed search if it uses page browser. All integrated but still separate enough to divide them again if necessary. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/debugging_symlinked_typo3_files_with_komodo_ide_on_mac/ From dmitry at typo3.org Mon Sep 15 21:32:47 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 15 Sep 2008 22:32:47 +0300 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi! Ingo Renner wrote: >> tslib_pibase code can be changed to check if page browser is installed >> and use it. If not installed, skip to old method. > > wouldn't that be a perfect fit for extbase then?! Yes, why not? :) One of my goals is to provide solution for both older versions of TYPO3 (through extension in TER) and newer version (as sysext). I see the advantage of the page browser is that it can be executed as USER or USER_INT (as necessary) and configured very flexibly using TS setup. This is unusual approach but I think it has future. -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/debugging_symlinked_typo3_files_with_komodo_ide_on_mac/ From ingo at typo3.org Mon Sep 15 21:42:58 2008 From: ingo at typo3.org (Ingo Renner) Date: Mon, 15 Sep 2008 14:42:58 -0500 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework Message-ID: Hi all, now that t3lib_cache is in trunk I had the idea to change the existing page cache to use the new framework. biggest con though: * it would break backwards compatibility pros: * way more flexible * easier to use * (maybe / depending on the chosen cache backend) faster * we would have tags on the cache entries especially the thing with the tags got me some nice ideas: After moving to the new system it would dramatically easier for people to "tag" pages in their extensions. with whatever tags they want and clear those cache entries whenever their extension needs to. This would make the system way more flexible and more dynamic Example: a page showing a list of tt_news records in a list view. tt_news could go and add tags in a way like this: // tt_news_X are the records shown on that page $TSFE->page->addTags('tt_news_list, tt_news_1, tt_news_2, tt_news_3'); Then there could be another plugin X on the same page that also tags the page: $TSFE->page->addTags('tx_X_someTag, tx_X_someOtherTag'); And of course the core would tag the page with stuff we already have like the cHash: $TSFE->page->addTags('core_cHash_######'); Looking up and clearing pages by tag is then quite easy using t3lib_cache... Any comments? Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From info at sk-typo3.de Mon Sep 15 22:08:01 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 15 Sep 2008 22:08:01 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] schrieb: > Hi! > > Ralf Hettinger wrote: >> Could tx_pagebrowse_pi1 be used to do that (render pagebrowser "links" >> as submit buttons and putting in hidden input fields)? > > Absolutely. Page browser uses HTML template. We could simply have its > markers in indexed search template file and pass path to this file to > the page browser. This also means one single template for indexed search > if it uses page browser. All integrated but still separate enough to > divide them again if necessary. > Hi Dmitry, i would like to preview your pagebrowser as i work on IS, so i can try to integrate it, is that possible? vg Steffen From ng at ralfhettinger.de Mon Sep 15 22:26:25 2008 From: ng at ralfhettinger.de (Ralf Hettinger) Date: Mon, 15 Sep 2008 22:26:25 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi Dmitry. Dmitry Dulepov [typo3] schrieb: >> Could tx_pagebrowse_pi1 be used to do that (render pagebrowser "links" >> as submit buttons and putting in hidden input fields)? > > Absolutely. Perfect! > Page browser uses HTML template. We could simply have its > markers in indexed search template file and pass path to this file to > the page browser. This also means one single template for indexed search > if it uses page browser. All integrated but still separate enough to > divide them again if necessary. Really looking forward to that piece of pagebrowser :) Cheers Ralf From dmitry at typo3.org Tue Sep 16 05:47:19 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Tue, 16 Sep 2008 06:47:19 +0300 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Hi! Ingo Renner wrote: > now that t3lib_cache is in trunk I had the idea to change the existing > page cache to use the new framework. > > biggest con though: > * it would break backwards compatibility If you mean it will break extensions that clear cache_* tables, I say "Do it!" :) TCEmain should still clear cache properly after this change. > especially the thing with the tags got me some nice ideas: > > After moving to the new system it would dramatically easier for people > to "tag" pages in their extensions. with whatever tags they want and > clear those cache entries whenever their extension needs to. This would > make the system way more flexible and more dynamic I think we should do it before the next week. Preferably before Thursday as we may need it next week @ Hackontest. Do you have time to do it quick? > Example: > a page showing a list of tt_news records in a list view. tt_news could > go and add tags in a way like this: > > // tt_news_X are the records shown on that page > $TSFE->page->addTags('tt_news_list, tt_news_1, tt_news_2, tt_news_3'); addTags or addCacheTags? > And of course the core would tag the page with stuff we already have > like the cHash: > > $TSFE->page->addTags('core_cHash_######'); Looks like we will need certain rules for tag names. > Looking up and clearing pages by tag is then quite easy using > t3lib_cache... > > Any comments? Sounds wonderful! :) I am very enthusiastic and willing to test it when patch is ready :) -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/debugging_symlinked_typo3_files_with_komodo_ide_on_mac/ From franz at fholzinger.com Tue Sep 16 07:52:01 2008 From: franz at fholzinger.com (Franz Holzinger) Date: Tue, 16 Sep 2008 07:52:01 +0200 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Hello Ingo Renner a ?crit : > > Example: > a page showing a list of tt_news records in a list view. tt_news could > go and add tags in a way like this: > > // tt_news_X are the records shown on that page > $TSFE->page->addTags('tt_news_list, tt_news_1, tt_news_2, tt_news_3'); > > Then there could be another plugin X on the same page that also tags the > page: > > $TSFE->page->addTags('tx_X_someTag, tx_X_someOtherTag'); > page in tslib_fe is an array. IMHO you cannot add a method to an array. var $page=''; // The pagerecord (array) What does this mean to add tags of an extension to a list view? - Franz From oliver at typo3.org Tue Sep 16 12:50:20 2008 From: oliver at typo3.org (Oliver Hader) Date: Tue, 16 Sep 2008 12:50:20 +0200 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Hi Ingo, Ingo Renner schrieb: > biggest con though: > * it would break backwards compatibility What does that mean exactly? What won't work anymore? Maybe we could have a best-practise suggestion for extension developers to keep the behaviour in their extensions still working... > pros: > * way more flexible > * easier to use > * (maybe / depending on the chosen cache backend) faster > * we would have tags on the cache entries I'd like to see the more general and extensible approach you suggested. olly -- Oliver Hader TYPO3 4.3 Release Manager From fsuter at cobweb.ch Tue Sep 16 13:00:13 2008 From: fsuter at cobweb.ch (Francois Suter) Date: Tue, 16 Sep 2008 13:00:13 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance Message-ID: Hi all, I have been working recently on extensions that can display any record from the TYPO3 database. As such I have had a lot to do with the overlay process with 2 main worries: performance and a useful API. The performance is the most important topic. Right now the typical way to get a list of records is to use t3lib_db::exec_SELECTquery() and then call t3lib_page::getRecordOverlay() for each record. The latter queries the database each time, to retrieve the correct overlay. This would seem to be a performance killer on a high-traffic site, especially with USER_INT plug-ins (think search engines, for example). I tried to develop an alternate process, by querying all the relevant overlays in one go, and matching them on the PHP-side (precise matching is necessary because of versioning), thereby reducing the number of calls to the database. I have bundled the code in an extension called "overlays" which I will attach to this mail (if allowed by the list server) or that can be gotten from forge [1]. I made some performance test on a page containing a USER_INT plugin which calls 4 different tables, with a varying number of records each (actually 1, 1, 6 and 25, respectively). I'm not a specialist of benchmarking and I just used Apache bench with the following parameters: ab -n 250 -c 50 [URL of test page] and this clearly hasn't pushed the limits of my local server very far. On several runs I see nearly no performance difference, but maybe I should be pushing my server further and making more runs and averaging the figures. I still wanted to describe all of this to you before going much further, as a kind of sanity check. Do you think that what I'm doing makes sense or am I barking up the wrong tree? I know that I have added some refinements to the whole overlay process (for example, by making sure that the query contains all the necessary fields for performing the overlay), so it may be that this additional processing offsets part of the reduced database calls gains. Basically the "overlays" extension contains a class called tx_overlays which contains methods to be called statically. In terms of API, there's a method called tx_overlay::getAllRecordsForTable() which takes the same arguments as t3lib_db::exec_SELECTquery() and takes care of returning properly overlaid records. It calls on methods like tx_overlays::getLanguageCondition() and tx_overlays::getEnableFieldsCondition() that take care of setting the right SQL clauses for the developer. So it's quite easy to test, because all you have to is include the class.tx_overlays.php class file and call tx_overlay::getAllRecordsForTable() with the same arguments as t3lib_db::exec_SELECTquery() and you will get your fully overlaid recordset. I would be very glad to have your feedback about this. Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch [1] https://svn.typo3.org/TYPO3v4/Extensions/overlays/trunk -------------- next part -------------- A non-text attachment was scrubbed... Name: T3X_overlays-0_0_0-z-200809161259.t3x Type: application/octet-stream Size: 6492 bytes Desc: not available Url : http://lists.netfielders.de/pipermail/typo3-project-4-3/attachments/20080916/6fd0eb50/attachment.obj From ingo at typo3.org Tue Sep 16 16:41:50 2008 From: ingo at typo3.org (Ingo Renner) Date: Tue, 16 Sep 2008 09:41:50 -0500 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] wrote: > Hi! > > Ingo Renner wrote: >> now that t3lib_cache is in trunk I had the idea to change the existing >> page cache to use the new framework. >> >> biggest con though: >> * it would break backwards compatibility > > If you mean it will break extensions that clear cache_* tables, I say > "Do it!" :) TCEmain should still clear cache properly after this change. Well, actually that came to my mind, too. The caching system doesn't have a real API and is not used very often anyways, and direct operations on the cache tables are bad, too. So it's not that a big issue as I first thought... > I think we should do it before the next week. Preferably before Thursday > as we may need it next week @ Hackontest. Do you have time to do it quick? will try =) >> // tt_news_X are the records shown on that page >> $TSFE->page->addTags('tt_news_list, tt_news_1, tt_news_2, tt_news_3'); > > addTags or addCacheTags? whatever, this was just a quick brain dump > >> And of course the core would tag the page with stuff we already have >> like the cHash: >> >> $TSFE->page->addTags('core_cHash_######'); > > Looks like we will need certain rules for tag names. I'd say that extensions should just prepand their tags with tx_EXTKEY_ Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From ingo at typo3.org Tue Sep 16 16:43:01 2008 From: ingo at typo3.org (Ingo Renner) Date: Tue, 16 Sep 2008 09:43:01 -0500 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Franz Holzinger wrote: >> $TSFE->page->addTags('tx_X_someTag, tx_X_someOtherTag'); >> > page in tslib_fe is an array. IMHO you cannot add a method to an array. it was just a quick brain dump with some pseudo code Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From ingo at typo3.org Tue Sep 16 16:44:23 2008 From: ingo at typo3.org (Ingo Renner) Date: Tue, 16 Sep 2008 09:44:23 -0500 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Oliver Hader wrote: Hey Olly > Ingo Renner schrieb: >> biggest con though: >> * it would break backwards compatibility > > What does that mean exactly? What won't work anymore? > Maybe we could have a best-practise suggestion for extension developers > to keep the behaviour in their extensions still working... see my response to Dmitry, it's actually not as bad as I first thought. >> pros: >> * way more flexible >> * easier to use >> * (maybe / depending on the chosen cache backend) faster >> * we would have tags on the cache entries > > I'd like to see the more general and extensible approach you suggested. what, where? Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From oliver at typo3.org Tue Sep 16 18:22:45 2008 From: oliver at typo3.org (Oliver Hader) Date: Tue, 16 Sep 2008 18:22:45 +0200 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Ingo Renner schrieb: > Oliver Hader wrote: >>> pros: >>> * way more flexible >>> * easier to use >>> * (maybe / depending on the chosen cache backend) faster >>> * we would have tags on the cache entries >> >> I'd like to see the more general and extensible approach you suggested. > > what, where? Theeeere! :) My last comment was like a "+1 go ahead, Ingo!" olly -- Oliver Hader TYPO3 4.3 Release Manager From ingo at typo3.org Wed Sep 17 00:26:09 2008 From: ingo at typo3.org (Ingo Renner) Date: Tue, 16 Sep 2008 17:26:09 -0500 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Oliver Hader wrote: >> what, where? > > Theeeere! :) > My last comment was like a "+1 go ahead, Ingo!" ahaa ;) -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From masi-no at spam-typo3.org Wed Sep 17 10:10:20 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 17 Sep 2008 10:10:20 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Francois Suter schrieb: > Hi all, > > I have been working recently on extensions that can display any record > from the TYPO3 database. As such I have had a lot to do with the overlay > process with 2 main worries: performance and a useful API. > > The performance is the most important topic. Right now the typical way > to get a list of records is to use t3lib_db::exec_SELECTquery() and then > call t3lib_page::getRecordOverlay() for each record. The latter queries > the database each time, to retrieve the correct overlay. This would seem > to be a performance killer on a high-traffic site, especially with > USER_INT plug-ins (think search engines, for example). > > I tried to develop an alternate process, by querying all the relevant > overlays in one go, and matching them on the PHP-side (precise matching > is necessary because of versioning), thereby reducing the number of > calls to the database. For the live version I think you can do the overlays in go on the DB side with SQL functions. All merge rules can IMHO opinion be expressed as IF (Mysq specific) or CASE (ANSI SQL) expression.s Performance for previews doesn't matter so much, I think that it's more important to have a switch that distincs between live and other WS to make the best performance posssible for the former. If you can improve the latter, fine. Masi From fsuter at cobweb.ch Wed Sep 17 11:03:37 2008 From: fsuter at cobweb.ch (Francois Suter) Date: Wed, 17 Sep 2008 11:03:37 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Hi, > For the live version I think you can do the overlays in go on the DB > side with SQL functions. All merge rules can IMHO opinion be expressed > as IF (Mysq specific) or CASE (ANSI SQL) expression.s > > Performance for previews doesn't matter so much, I think that it's more > important to have a switch that distincs between live and other WS to > make the best performance posssible for the former. If you can improve > the latter, fine. I'll keep that in mind when handling workspaces. Currently I'm just trying to improve on language overlay. In this case I'm not sure IF and CASE statements can be enough, since there are quite some TCA parameters than enter the picture when handling translations. Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch From masi-no at spam-typo3.org Wed Sep 17 11:51:12 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 17 Sep 2008 11:51:12 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Francois Suter schrieb: > Hi, > >> For the live version I think you can do the overlays in go on the DB >> side with SQL functions. All merge rules can IMHO opinion be expressed >> as IF (Mysq specific) or CASE (ANSI SQL) expression.s >> >> Performance for previews doesn't matter so much, I think that it's more >> important to have a switch that distincs between live and other WS to >> make the best performance posssible for the former. If you can improve >> the latter, fine. > > I'll keep that in mind when handling workspaces. Currently I'm just > trying to improve on language overlay. But this is exactly about language overlay. My point was that you're fussing with overlays on workspaces where performance is not an issue. The only optimizing in my opinion should be done for the live WS. And there you can (my thesis) fetch all records in one go. In this case I'm not sure IF and > CASE statements can be enough, since there are quite some TCA parameters > than enter the picture when handling translations. I thougt about that quite some time ago. I didn't really do it, but AFAIR I didn't find an obstacle at first glance. Masi From masi-no at spam-typo3.org Wed Sep 17 11:52:46 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 17 Sep 2008 11:52:46 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Benjamin Mack schrieb: > Hey Steffen, > > Steffen Kamper wrote: >> i understand this. Do you have a proposal which subfolder/grouping >> would make sense in your eyes? > I like the Zend Framework structure, unfortunately not as easy for > existing projects as ours. Heretic! Our only guidance in respect to software engineering should be now TYPO3 5.0 ;-) Masi From fsuter at cobweb.ch Wed Sep 17 12:06:32 2008 From: fsuter at cobweb.ch (Francois Suter) Date: Wed, 17 Sep 2008 12:06:32 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Hi, > But this is exactly about language overlay. My point was that you're > fussing with overlays on workspaces where performance is not an issue. > The only optimizing in my opinion should be done for the live WS. And > there you can (my thesis) fetch all records in one go. Huh? I'm not handling workspaces... Actually I copied the original code from t3lib_page::getRecordOverlay(), but I didn't keep the part where it does version overlay: $this->versionOL($table,$olrow); > In this case I'm not sure IF and >> CASE statements can be enough, since there are quite some TCA parameters >> than enter the picture when handling translations. I'm not really familiar with these constructs, but I'll take a look. It may be interesting to see which is best performance-wise (doing things MySQL-side or PHP-side). > I thougt about that quite some time ago. I didn't really do it, but > AFAIR I didn't find an obstacle at first glance. Even with parameters such as mergeIfNotBlank? Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch From masi-no at spam-typo3.org Wed Sep 17 12:34:14 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 17 Sep 2008 12:34:14 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Francois Suter schrieb: > Hi, > >> But this is exactly about language overlay. My point was that you're >> fussing with overlays on workspaces where performance is not an issue. >> The only optimizing in my opinion should be done for the live WS. And >> there you can (my thesis) fetch all records in one go. > > Huh? I'm not handling workspaces... Actually I copied the original code > from t3lib_page::getRecordOverlay(), but I didn't keep the part where it > does version overlay: I didn't look at your code, but you said something about "exact matches because of version" so I thought you did some extra processing for WS. >> I thougt about that quite some time ago. I didn't really do it, but >> AFAIR I didn't find an obstacle at first glance. > > Even with parameters such as mergeIfNotBlank? Something like that: to = origibal language tt = translation IF(to.col='',tt.col,to.col) AS col But that is Mysql specific. Should be done with CASE in real life for DBAL compliancy. Masi From fsuter at cobweb.ch Wed Sep 17 13:51:38 2008 From: fsuter at cobweb.ch (Francois Suter) Date: Wed, 17 Sep 2008 13:51:38 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Hi, > I didn't look at your code, but you said something about "exact matches > because of version" so I thought you did some extra processing for WS. Ah true, yes, forgot about that. It's just a pid check on the language overlay record to make sure that it's gotten from the right page. In t3lib_page::getRecordOverlay, the overlay is gotten with the following query: $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', $table, 'pid='.intval($row['pid']). ' AND '.$TCA[$table]['ctrl']['languageField'].'='.intval($sys_language_content). ' AND '.$TCA[$table]['ctrl']['transOrigPointerField'].'='.intval($row['uid']). $this->enableFields($table), '', '', '1' ); Notice the condition on the pid, where the pid of the overlay must match the pid of the original. I asked about that in the dev-list and Dmitry answered that this check was necessary because of workspaces. I worked on from that. Thinking back on it, I'm not sure I understand 100% why this is necessary, because it seems to me that checking the transOrigPointerField should be enough... Maybe this test could be dropped and simply replaced by a check on the workspace (overlay should be in workspace 0 as long as we don't care about preview (support for which could be added later and as you said needs not be optimised as much)). Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch From masi-no at spam-typo3.org Wed Sep 17 14:07:51 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 17 Sep 2008 14:07:51 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Francois Suter schrieb: > Hi, > >> I didn't look at your code, but you said something about "exact matches >> because of version" so I thought you did some extra processing for WS. > > Ah true, yes, forgot about that. > > It's just a pid check on the language overlay record to make sure that > it's gotten from the right page. In t3lib_page::getRecordOverlay, the > overlay is gotten with the following query: > > $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( > '*', > $table, > 'pid='.intval($row['pid']). > ' AND > '.$TCA[$table]['ctrl']['languageField'].'='.intval($sys_language_content). > ' AND > '.$TCA[$table]['ctrl']['transOrigPointerField'].'='.intval($row['uid']). > $this->enableFields($table), > '', > '', > '1' > ); > > Notice the condition on the pid, where the pid of the overlay must match > the pid of the original. I asked about that in the dev-list and Dmitry > answered that this check was necessary because of workspaces. I worked > on from that. Thinking back on it, I'm not sure I understand 100% why > this is necessary, because it seems to me that checking the > transOrigPointerField should be enough... Records on WS have always a pid set to -1. > Maybe this test could be > dropped and simply replaced by a check on the workspace (overlay should > be in workspace 0 as long as we don't care about preview (support for > which could be added later and as you said needs not be optimised as > much)) I don't think that the query would be any faster as you must check the pid anyway. Masi From benni at typo3.org Wed Sep 17 16:12:50 2008 From: benni at typo3.org (Benjamin Mack) Date: Wed, 17 Sep 2008 09:12:50 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: :-D Martin Kutschker wrote: > Benjamin Mack schrieb: >> Hey Steffen, >> >> Steffen Kamper wrote: >>> i understand this. Do you have a proposal which subfolder/grouping >>> would make sense in your eyes? >> I like the Zend Framework structure, unfortunately not as easy for >> existing projects as ours. > > Heretic! > > Our only guidance in respect to software engineering should be now TYPO3 > 5.0 ;-) > > Masi -- All the best, benni. -SDG- From info at sk-typo3.de Wed Sep 17 21:15:34 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 17 Sep 2008 21:15:34 +0200 Subject: [TYPO3-project-4-3] Extended Problem Report Message-ID: Hi, may be you read discussion in dev list. What i try to do: Extended Problem Report on user level. What is needed? * http://bugs.typo3.org/view.php?id=9368 (apply this patch) * enter this in userTS: setup.xReporting.enable = 1 * install attached extension * (deinstall cc_dubug if installed) Now go to user settings and enable debug, you will see debug()-output in new window like cc_debug. If you uncheck, you don't see any debug-output :-) Remark: this is a pre-pre-pre-version which works with debug and shall show you the idea behind vg Steffen -------------- next part -------------- A non-text attachment was scrubbed... Name: T3X_extended_problem_reporting.t3x Type: application/octet-stream Size: 13560 bytes Desc: not available Url : http://lists.netfielders.de/pipermail/typo3-project-4-3/attachments/20080917/438ffa03/attachment-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: xReporting.png Type: image/png Size: 8263 bytes Desc: not available Url : http://lists.netfielders.de/pipermail/typo3-project-4-3/attachments/20080917/438ffa03/attachment-0001.png From masi-no at spam-typo3.org Wed Sep 17 22:57:38 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 17 Sep 2008 22:57:38 +0200 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Ingo Renner schrieb: > Hi all, > > now that t3lib_cache is in trunk I had the idea to change the existing > page cache to use the new framework. > > biggest con though: > * it would break backwards compatibility > > pros: > * way more flexible > * easier to use > * (maybe / depending on the chosen cache backend) faster > * we would have tags on the cache entries > > especially the thing with the tags got me some nice ideas: > > After moving to the new system it would dramatically easier for people > to "tag" pages in their extensions. with whatever tags they want and > clear those cache entries whenever their extension needs to. This would > make the system way more flexible and more dynamic > > Example: > a page showing a list of tt_news records in a list view. tt_news could > go and add tags in a way like this: > > // tt_news_X are the records shown on that page > $TSFE->page->addTags('tt_news_list, tt_news_1, tt_news_2, tt_news_3'); > > Then there could be another plugin X on the same page that also tags the > page: > > $TSFE->page->addTags('tx_X_someTag, tx_X_someOtherTag'); > > And of course the core would tag the page with stuff we already have > like the cHash: > > $TSFE->page->addTags('core_cHash_######'); > > Looking up and clearing pages by tag is then quite easy using > t3lib_cache... > > > Any comments? Interesting. May an extension/plugin also modify the cache expiry time? Let's say the page starts with the default of 24 but the news plugin for a some site thinks 2 hours is enough then it could change the value on-the-fly (only reduce, never extend). Masi From masi-no at spam-typo3.org Wed Sep 17 23:08:57 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Wed, 17 Sep 2008 23:08:57 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Ingo Renner schrieb: > Steffen Kamper wrote: > >> may be we can learn something from Drupal >> >> http://api.drupal.org/api/group/registry/7 > > I just had a look at it, and hey, this is cool stuff and provides quite > a few new ideas for our autoloader! But it relies on the database for implementation. Do we really need such a heavyweight code? DB down => auto loader breaks? Doesn't sound too compelling to me. I thought that we only would need a kind of registry to define a context (eg t3lib, typo3/classes or tslib). Within each context a naming scheme would do the basic loading but each context could provide helper code where for some reason the naming scheme doesn't work. Maybe Drupal spreads its classes and function all over the file system, but TYPO3 has it already clustered in a few directories, so I don't see the need for PHP file parsing (see _registry_rebuild). Masi From info at sk-typo3.de Wed Sep 17 23:28:27 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 17 Sep 2008 23:28:27 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Martin Kutschker schrieb: > Ingo Renner schrieb: >> Steffen Kamper wrote: >> >>> may be we can learn something from Drupal >>> >>> http://api.drupal.org/api/group/registry/7 >> I just had a look at it, and hey, this is cool stuff and provides quite >> a few new ideas for our autoloader! > > But it relies on the database for implementation. Do we really need such > a heavyweight code? DB down => auto loader breaks? Doesn't sound too > compelling to me. > > I thought that we only would need a kind of registry to define a context > (eg t3lib, typo3/classes or tslib). Within each context a naming scheme > would do the basic loading but each context could provide helper code > where for some reason the naming scheme doesn't work. > > Maybe Drupal spreads its classes and function all over the file system, > but TYPO3 has it already clustered in a few directories, so I don't see > the need for PHP file parsing (see _registry_rebuild). > > Masi Hi Masi, i think we could start with array-based registry. Drupal uses the registry not only for core classes but also for themes + styles. For the start i could imagine a simple array filled registry by t3lib_div for the splitted files. vg Steffen From info at sk-typo3.de Wed Sep 17 23:56:31 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Wed, 17 Sep 2008 23:56:31 +0200 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Hi, this allows also other kind of reporting, see screenshot vg Steffen -------------- next part -------------- A non-text attachment was scrubbed... Name: xReporting2.png Type: image/png Size: 15615 bytes Desc: not available Url : http://lists.netfielders.de/pipermail/typo3-project-4-3/attachments/20080917/61287023/attachment-0001.png From ingo at typo3.org Thu Sep 18 04:25:10 2008 From: ingo at typo3.org (Ingo Renner) Date: Wed, 17 Sep 2008 21:25:10 -0500 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Steffen Kamper wrote: Hi Masi, >> But it relies on the database for implementation. Do we really need such >> a heavyweight code? DB down => auto loader breaks? Doesn't sound too >> compelling to me. Well what's the difference to now? DB down => TYPO3 down, right? Also of course we don't need everything they do. Drupal relies on functions a lot, we don't, so we already only need to care for classes. Of course it could be an option to have all class->file relations stored in a huge array and then have that stored serialized. This however would slow down the system because of the huge array. I rather find it better to look only the requested classes/files. I don't know whether you noticed this fine bit, but they store which classes/files were needed for a certain URL path/menu entry. We could do this too when binding it to the cHash or the pageId, right? This would totally justify the use of a DB, wouldn't it? You could look up all the files needed for a page with a single query. does that sound good? Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From ingo at typo3.org Thu Sep 18 04:29:14 2008 From: ingo at typo3.org (Ingo Renner) Date: Wed, 17 Sep 2008 21:29:14 -0500 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Martin Kutschker wrote: > May an extension/plugin also modify the cache expiry time? Let's say the > page starts with the default of 24 but the news plugin for a some site > thinks 2 hours is enough then it could change the value on-the-fly (only > reduce, never extend). not after the entry is saved in the cache (not yet at least), however Martin Holtz' patch in the core list would enable this at least for the point were the stuff is written to the cache. However, I regard this a bonus feature right now with a "should have" or "nice to have" status. Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From ernst at cron-it.de Thu Sep 18 09:39:00 2008 From: ernst at cron-it.de (Ernesto Baschny [cron IT]) Date: Thu, 18 Sep 2008 09:39:00 +0200 Subject: [TYPO3-project-4-3] Improving the language overlay performance In-Reply-To: References: Message-ID: Hi Francois, cool stuff, I have also thought about that issue some times. The non-performance gain on your tests might come from the fact that your mysql server has query_cache enabled, which means that several repeated queries return very fast (almost like it has been a single query). If you instruct apache benchmark to fetch the same page again and again, the same queries will probably be generated. So maybe you could try to fetch "random" records, making sure that no repeated records are being fetched on each call. Reading through the code it looks correct. Having a function like that in core would probably make the world a better place, as many more extensions might start doing it "right" when it comes to translated records. Cheers, Ernesto Francois Suter wrote: on 16.09.2008 13:00: > I have been working recently on extensions that can display any record > from the TYPO3 database. As such I have had a lot to do with the overlay > process with 2 main worries: performance and a useful API. > > The performance is the most important topic. Right now the typical way > to get a list of records is to use t3lib_db::exec_SELECTquery() and then > call t3lib_page::getRecordOverlay() for each record. The latter queries > the database each time, to retrieve the correct overlay. This would seem > to be a performance killer on a high-traffic site, especially with > USER_INT plug-ins (think search engines, for example). > > I tried to develop an alternate process, by querying all the relevant > overlays in one go, and matching them on the PHP-side (precise matching > is necessary because of versioning), thereby reducing the number of > calls to the database. > > I have bundled the code in an extension called "overlays" which I will > attach to this mail (if allowed by the list server) or that can be > gotten from forge [1]. > > I made some performance test on a page containing a USER_INT plugin > which calls 4 different tables, with a varying number of records each > (actually 1, 1, 6 and 25, respectively). I'm not a specialist of > benchmarking and I just used Apache bench with the following parameters: > > ab -n 250 -c 50 [URL of test page] > > and this clearly hasn't pushed the limits of my local server very far. > On several runs I see nearly no performance difference, but maybe I > should be pushing my server further and making more runs and averaging > the figures. I still wanted to describe all of this to you before going > much further, as a kind of sanity check. Do you think that what I'm > doing makes sense or am I barking up the wrong tree? > > I know that I have added some refinements to the whole overlay process > (for example, by making sure that the query contains all the necessary > fields for performing the overlay), so it may be that this additional > processing offsets part of the reduced database calls gains. > > Basically the "overlays" extension contains a class called tx_overlays > which contains methods to be called statically. In terms of API, there's > a method called tx_overlay::getAllRecordsForTable() which takes the same > arguments as t3lib_db::exec_SELECTquery() and takes care of returning > properly overlaid records. It calls on methods like > tx_overlays::getLanguageCondition() and > tx_overlays::getEnableFieldsCondition() that take care of setting the > right SQL clauses for the developer. > > So it's quite easy to test, because all you have to is include the > class.tx_overlays.php class file and call > tx_overlay::getAllRecordsForTable() with the same arguments as > t3lib_db::exec_SELECTquery() and you will get your fully overlaid > recordset. > > I would be very glad to have your feedback about this. From dmitry at typo3.org Thu Sep 18 09:44:09 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Thu, 18 Sep 2008 10:44:09 +0300 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Hi! Ingo Renner wrote: >> If you mean it will break extensions that clear cache_* tables, I say >> "Do it!" :) TCEmain should still clear cache properly after this change. > > Well, actually that came to my mind, too. The caching system doesn't > have a real API and is not used very often anyways, and direct > operations on the cache tables are bad, too. So it's not that a big > issue as I first thought... Another thing to think of: easily clear cache for a given cHash. I think it should be really easy with your proposed scheme, isn't it? Just use tag with cHash and that's it, right? >> addTags or addCacheTags? > > whatever, this was just a quick brain dump Let's to addCacheTags, otherwise we can conflict with any future tagging feature :) >> Looks like we will need certain rules for tag names. > > I'd say that extensions should just prepand their tags with tx_EXTKEY_ Perfect! -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/ From masi-no at spam-typo3.org Thu Sep 18 09:44:59 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Thu, 18 Sep 2008 09:44:59 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Ingo Renner schrieb: > Steffen Kamper wrote: > > Hi Masi, > >>> But it relies on the database for implementation. Do we really need such >>> a heavyweight code? DB down => auto loader breaks? Doesn't sound too >>> compelling to me. > > Well what's the difference to now? DB down => TYPO3 down, right? DB down => error message shown. But what if the display of the error message would require a class to be found via auto loader? > Of course it could be an option to have all class->file relations stored > in a huge array and then have that stored serialized. This however would > slow down the system because of the huge array. I rather find it better > to look only the requested classes/files. That's why I simply would go for a class name to file path translation. So we don't need no array or DB at all for single classes. We need only an array for class prefixes. t3lib_ => PATH_t3lib.'class.'... etc And we don't even need that if we use SPL. t3lib and tslib would simply have their own SPL autoload handler. With typo3 you need a bit more fiddling, but if we rearranged the code filename-wise (yes it would only be 99% compatible) even that is easy to manage. > I don't know whether you noticed this fine bit, but they store which > classes/files were needed for a certain URL path/menu entry. We could do > this too when binding it to the cHash or the pageId, right? This would > totally justify the use of a DB, wouldn't it? You could look up all the > files needed for a page with a single query. > > does that sound good? I don't see much benefit. The code called to render would still do a "require". Of course it will be loaded by then already, but I don't see how this will improve speed. Masi From dmitry at typo3.org Thu Sep 18 09:45:54 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Thu, 18 Sep 2008 10:45:54 +0300 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Hi! Martin Kutschker wrote: > May an extension/plugin also modify the cache expiry time? Let's say the > page starts with the default of 24 but the news plugin for a some site > thinks 2 hours is enough then it could change the value on-the-fly (only > reduce, never extend). Ow, this is a great idea! I actually would use this in comments extension (for automatic comments closing feature). Right now I use a hack for it, which is bad. I am very excited about this new caching thing :) -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/ From masi-no at spam-typo3.org Thu Sep 18 09:47:00 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Thu, 18 Sep 2008 09:47:00 +0200 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Ingo Renner schrieb: > Martin Kutschker wrote: > >> May an extension/plugin also modify the cache expiry time? Let's say the >> page starts with the default of 24 but the news plugin for a some site >> thinks 2 hours is enough then it could change the value on-the-fly (only >> reduce, never extend). > > not after the entry is saved in the cache (not yet at least), No need to. I was thinking of modification at render time like tagging which will also happen during the rendition and not afterwards. Masi From dmitry at typo3.org Thu Sep 18 09:49:16 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Thu, 18 Sep 2008 10:49:16 +0300 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi! Dmitry Dulepov [typo3] wrote: > Absolutely. Page browser uses HTML template. We could simply have its > markers in indexed search template file and pass path to this file to > the page browser. This also means one single template for indexed search > if it uses page browser. All integrated but still separate enough to > divide them again if necessary. I apologize for delay, now the extension is in TER with full manual. I appreciate if you tell me what is not clear in the manual. The ext is named "Universal page browser" and extension key is "pagebrowse" (notice: not "pagerbrowseR", "pagebrowser" was taken already). -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/ From info at sk-typo3.de Thu Sep 18 09:53:06 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 18 Sep 2008 09:53:06 +0200 Subject: [TYPO3-project-4-3] Rewrite of user setup / task center Message-ID: Hi, as in corelist shortly discussed here is the thread to collect ideas / wishes and needs for it. Both modules are old code, hard to maintain and GUI isn't sophisticated. So please add your ideas here so we have all together for a basic of rewrite. I start with a few: * merging user setup and task center * add possibility for extend by extensions (taskcenter already use such) * change the dynTabs (This may need a rewrite of dynTabs, also good for TCEForms) vg Steffen From ernst at cron-it.de Thu Sep 18 09:59:17 2008 From: ernst at cron-it.de (Ernesto Baschny [cron IT]) Date: Thu, 18 Sep 2008 09:59:17 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Ingo Renner wrote: on 18.09.2008 04:25: > Well what's the difference to now? DB down => TYPO3 down, right? > > Also of course we don't need everything they do. Drupal relies on > functions a lot, we don't, so we already only need to care for classes. > > Of course it could be an option to have all class->file relations stored > in a huge array and then have that stored serialized. This however would > slow down the system because of the huge array. I rather find it better > to look only the requested classes/files. > > I don't know whether you noticed this fine bit, but they store which > classes/files were needed for a certain URL path/menu entry. We could do > this too when binding it to the cHash or the pageId, right? This would > totally justify the use of a DB, wouldn't it? You could look up all the > files needed for a page with a single query. > > does that sound good? I don't think that this would be possible. A page Id and even a cHash doesn't necessarily means the same classes will be needed. Some USER_INT might load random classes that change on each request. Pre-loading them all for a hit probably won't give much performance benefit. Lazy loading seems to me the best solution, meaning getting rid of all "require_once" statements throughout TYPO3 (and extensions) code. Everybody just calls makeInstance() and its friends. That should start the autoloading: 1) class is loaded already: use it. Else: 2) search cache-array for an entry. Class found? load file, use it. Else: 3) find a filename conforming our conventions where that class should be in?, load the file, class is loaded? use it. Else: 4) rebuild the cache-array. Search cache-array again, found? use it. Will stop at step 2) next time. Not found? Error. Maybe add error-entry in cache-array so that it won't need to rebuild next time. In my eyes we don't need to have a "huge" file->class array or database cache with information on all classes. We just need that information for exotic classnames which cannot be found by means of naming conventions. So if one sticks to our naming conventions, we won't store that in the search-cache: - t3lib_TCEmain => t3lib/class.t3lib_tcemain.php - tslib_feTCE => tslib/class.tslib_fetce.php - tx_lowlevel_cleaner_core => EXT:lowlevel/class.tx_lowlevel_cleaner_core.php - tx_sv_authbase => EXT:sv/class.tx_sv_authbase.php But we will need to store the information (in 4) and use it (in 2) for stuff like: - tslib_cObj => tslib/class.tslib_content.php - FE_loadDBGroup => tslib/class.tslib_pagegen.php - myclass => EXT:myext/file.php etc. This will keep the cache "small" (by sticking to our naming conventions). I would store that in a simple classname => filename array in our temp_*localconf.php files. Cheers, Ernesto From masi-no at spam-typo3.org Thu Sep 18 10:35:33 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Thu, 18 Sep 2008 10:35:33 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Ernesto Baschny [cron IT] schrieb: > > In my eyes we don't need to have a "huge" file->class array or database > cache with information on all classes. We just need that information for > exotic classnames which cannot be found by means of naming conventions. > So if one sticks to our naming conventions, we won't store that in the > search-cache: > > - t3lib_TCEmain => t3lib/class.t3lib_tcemain.php > - tslib_feTCE => tslib/class.tslib_fetce.php > - tx_lowlevel_cleaner_core => > EXT:lowlevel/class.tx_lowlevel_cleaner_core.php > - tx_sv_authbase => EXT:sv/class.tx_sv_authbase.php Agreed (see other my other posts). > But we will need to store the information (in 4) and use it (in 2) for > stuff like: > > - tslib_cObj => tslib/class.tslib_content.php > - FE_loadDBGroup => tslib/class.tslib_pagegen.php > - myclass => EXT:myext/file.php > > etc. This will keep the cache "small" (by sticking to our naming > conventions). And we can even get rid of those if we split up those old files. Make a new file sticking to the naming scheme. The old file will the contain only a require for each of the classes it contained in earlier versions of TYPO3. So those who use the old require and the new autoloader will be happy. Masi From ernst at cron-it.de Thu Sep 18 11:25:14 2008 From: ernst at cron-it.de (Ernesto Baschny [cron IT]) Date: Thu, 18 Sep 2008 11:25:14 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Martin Kutschker wrote: on 18.09.2008 10:35: >> In my eyes we don't need to have a "huge" file->class array or database >> cache with information on all classes. We just need that information for >> exotic classnames which cannot be found by means of naming conventions. >> So if one sticks to our naming conventions, we won't store that in the >> search-cache: >> >> - t3lib_TCEmain => t3lib/class.t3lib_tcemain.php >> - tslib_feTCE => tslib/class.tslib_fetce.php >> - tx_lowlevel_cleaner_core => >> EXT:lowlevel/class.tx_lowlevel_cleaner_core.php >> - tx_sv_authbase => EXT:sv/class.tx_sv_authbase.php > > Agreed (see other my other posts). >> But we will need to store the information (in 4) and use it (in 2) for >> stuff like: >> >> - tslib_cObj => tslib/class.tslib_content.php >> - FE_loadDBGroup => tslib/class.tslib_pagegen.php >> - myclass => EXT:myext/file.php >> >> etc. This will keep the cache "small" (by sticking to our naming >> conventions). > > And we can even get rid of those if we split up those old files. Make a > new file sticking to the naming scheme. The old file will the contain > only a require for each of the classes it contained in earlier versions > of TYPO3. So those who use the old require and the new autoloader will > be happy. Sound reasonable! So if an extension wants to use "auto-loading", it just has to stick to the naming convention. If not, it uses the "good old" require_once(...) call. There are some other things that has to be cleaned up on that occasion, e.g. the classes in typo3/classes/ which seem to have been introduced for the new backend, but are somehow "lost" in that subdirectory. I would rather call that subdir "backend/" and the files class.backend_modulemenu.php and the classes "backend_modulemenu" etc. Also the *.inc files in typo3/. This is a bit difficult, because also here the class names would have to be changed (incompatible change in regard to XCLASSes). E.g. typo3/class.file_list.inc contains class fileList. Correct would be: typo3/class.filelist.php containing class typo3_filelist or something. Or make the typo3/ classes an exception, but then either no auto-loading or make that extensions known to the auto-loader. Cheers, Ernesto From masi-no at spam-typo3.org Thu Sep 18 11:53:22 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Thu, 18 Sep 2008 11:53:22 +0200 Subject: [TYPO3-project-4-3] Splitting t3lib_div and having autoloader instead of inclusions In-Reply-To: References: Message-ID: Ernesto Baschny [cron IT] schrieb: > > Also the *.inc files in typo3/. This is a bit difficult, because also > here the class names would have to be changed (incompatible change in > regard to XCLASSes). E.g. > > typo3/class.file_list.inc contains class fileList. > > Correct would be: > > typo3/class.filelist.php containing class typo3_filelist or something. > Or make the typo3/ classes an exception, but then either no auto-loading > or make that extensions known to the auto-loader. This is cruft. Ingo wanted to rewrite the list module anyway. Those files are IMHO internal to TYPO3. Let's move/rename/change them. May the cow fear for its life, my hatch is ready ;-) Masi From info at sk-typo3.de Thu Sep 18 13:18:29 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 18 Sep 2008 13:18:29 +0200 Subject: [TYPO3-project-4-3] indexed_search for 4.3 In-Reply-To: References: Message-ID: Hi, i also integrated flexforms so now it is possible to seperate form and result in 2 CE's, see screenshots vg Steffen -------------- next part -------------- A non-text attachment was scrubbed... Name: is_3.png Type: image/png Size: 18777 bytes Desc: not available Url : http://lists.netfielders.de/pipermail/typo3-project-4-3/attachments/20080918/8a60b1dd/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: is_4.png Type: image/png Size: 14142 bytes Desc: not available Url : http://lists.netfielders.de/pipermail/typo3-project-4-3/attachments/20080918/8a60b1dd/attachment-0003.png From dmitry at typo3.org Thu Sep 18 17:41:51 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Thu, 18 Sep 2008 18:41:51 +0300 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Hi! Steffen Kamper wrote: > this allows also other kind of reporting, see screenshot Very impressive! -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/ From info at sk-typo3.de Thu Sep 18 17:50:43 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 18 Sep 2008 17:50:43 +0200 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Hi, Dmitry Dulepov [typo3] schrieb: > Hi! > > Steffen Kamper wrote: >> this allows also other kind of reporting, see screenshot > > Very impressive! > thx. The fine thing is, that all is part of cc_debug, but it was never completed (comments says "Need configuration .-)) As Rene is no more active i forked the debug class (is 3rd party anyway) I also want to make it configurable which kind of error_reporting should be catched by debug and merge cc_devlog also, so we get a full package for developing. Any further ideas? vg Steffen From ernst at cron-it.de Thu Sep 18 18:00:19 2008 From: ernst at cron-it.de (Ernesto Baschny [cron IT]) Date: Thu, 18 Sep 2008 18:00:19 +0200 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Steffen Kamper wrote: on 18.09.2008 17:50: > Dmitry Dulepov [typo3] schrieb: >> Hi! >> >> Steffen Kamper wrote: >>> this allows also other kind of reporting, see screenshot >> >> Very impressive! >> > > thx. The fine thing is, that all is part of cc_debug, but it was never > completed (comments says "Need configuration .-)) > > As Rene is no more active i forked the debug class (is 3rd party anyway) > > I also want to make it configurable which kind of error_reporting should > be catched by debug and merge cc_devlog also, so we get a full package > for developing. > > Any further ideas? Haven't really looked at it, but keep in mind that Fracois took over the "cc_devlog" development and forked it into a TER-available extension called simple "devlog". Maybe you can get in touch with him to see what can be done about it? Cheers, Ernesto From info at sk-typo3.de Thu Sep 18 18:06:00 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Thu, 18 Sep 2008 18:06:00 +0200 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Hi Ernesto, Ernesto Baschny [cron IT] schrieb: > > Haven't really looked at it, but keep in mind that Fracois took over the > "cc_devlog" development and forked it into a TER-available extension > called simple "devlog". Maybe you can get in touch with him to see what > can be done about it? > thx, i will talk to Francois! vg Steffen From ingo at typo3.org Thu Sep 18 18:36:36 2008 From: ingo at typo3.org (Ingo Renner) Date: Thu, 18 Sep 2008 11:36:36 -0500 Subject: [TYPO3-project-4-3] changing the page cache to use the new caching framework In-Reply-To: References: Message-ID: Dmitry Dulepov [typo3] wrote: > Another thing to think of: easily clear cache for a given cHash. I think > it should be really easy with your proposed scheme, isn't it? Just use > tag with cHash and that's it, right? exactly > Let's to addCacheTags, otherwise we can conflict with any future tagging > feature :) sure, fine with me. Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From ingo at typo3.org Thu Sep 18 18:39:19 2008 From: ingo at typo3.org (Ingo Renner) Date: Thu, 18 Sep 2008 11:39:19 -0500 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Steffen Kamper wrote: > thx, i will talk to Francois! I also want to let you know that I have the extension key "debug" if needed ;) Ingo -- Ingo Renner TYPO3 Core Developer, Release Manager TYPO3 4.2 From fsuter at cobweb.ch Sat Sep 20 17:17:25 2008 From: fsuter at cobweb.ch (Francois Suter) Date: Sat, 20 Sep 2008 17:17:25 +0200 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Hi, > Haven't really looked at it, but keep in mind that Fracois took over the > "cc_devlog" development and forked it into a TER-available extension > called simple "devlog". Maybe you can get in touch with him to see what > can be done about it? Yes, it would be good to keep in mind all the possibilities for debugging/logging, which I already outlined in the original thread. Regarding the devLog, I have raised a point in the DAM Team list after having found a hard-coded reference to cc_devlog which would have its place in this discussion. [1] Basically the parameters passed to t3lib_div::devLog() are a message, a severity, a key (extension key or some core reference, e.g. Core/DB) and optional extra data in the form of an array. What devlog/cc_devlog additionally does is to retrieve the current page id when called from the FE context (from TSFE). However it would be convenient to be able to store a page id in a global variable also from another context (BE, AJAX, etc.) whenever it makes sense, so that devLog tools could make a reference to it. It is worth thinking where it would make sense to store that page id. $T3_VAR? Somewhere else? Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch [1] http://support.typo3.org/teams/dam/m/typo3-dam-devel-hard-coded-reference-to-cc-devlog-in-class-tx-dam-indexing-364121/p/8/ From fsuter at cobweb.ch Sun Sep 21 11:26:19 2008 From: fsuter at cobweb.ch (Francois Suter) Date: Sun, 21 Sep 2008 11:26:19 +0200 Subject: [TYPO3-project-4-3] Extended Problem Report In-Reply-To: References: Message-ID: Hi, > Any further ideas? Some extensions exist to integrate FirePHP. Might be worth keeping in mind (if only to provide config options that might be used by those extensions). Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch From dmitry at typo3.org Mon Sep 22 11:38:02 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 22 Sep 2008 12:38:02 +0300 Subject: [TYPO3-project-4-3] Rewrite of user setup / task center In-Reply-To: References: Message-ID: Hi! Steffen Kamper wrote: > * merging user setup and task center I never a system where user settings and task center are merged. Did you? Task center may change quite often but user settings are not. What are the advantages of merging these two things together? -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/ From info at sk-typo3.de Mon Sep 22 12:31:04 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 22 Sep 2008 12:31:04 +0200 Subject: [TYPO3-project-4-3] Rewrite of user setup / task center In-Reply-To: References: Message-ID: Hi Dmitry, Dmitry Dulepov [typo3] schrieb: > Hi! > > Steffen Kamper wrote: >> * merging user setup and task center > > I never a system where user settings and task center are merged. Did > you? Task center may change quite often but user settings are not. What > are the advantages of merging these two things together? > the suggestion came from Benni and the first thought was about the GUI to find a common one. But thinking more about i think you're right and it should be seperated. I will ask Jens to make a suggestion for the user settings, the modul has to be rewritten anyway as it's not maintainable / extendable atm, so it's the best to have the right concept before starting. vg Steffen From dmitry at typo3.org Mon Sep 22 12:42:47 2008 From: dmitry at typo3.org (Dmitry Dulepov [typo3]) Date: Mon, 22 Sep 2008 13:42:47 +0300 Subject: [TYPO3-project-4-3] Rewrite of user setup / task center In-Reply-To: References: Message-ID: Hi! Steffen Kamper wrote: > the suggestion came from Benni and the first thought was about the GUI > to find a common one. > > But thinking more about i think you're right and it should be seperated. > I will ask Jens to make a suggestion for the user settings, the modul > has to be rewritten anyway as it's not maintainable / extendable atm, so > it's the best to have the right concept before starting. I fully agree! -- Dmitry Dulepov TYPO3 Core team My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book In the blog: http://typo3bloke.net/post-details/tag_your_typo3_extension_releases_in_svn/ From typo3-german-02 at oliverklee.de Tue Sep 23 12:48:00 2008 From: typo3-german-02 at oliverklee.de (Oliver Klee) Date: Tue, 23 Sep 2008 12:48:00 +0200 Subject: [TYPO3-project-4-3] Call for suggestions: Unit tests for the 4.x core In-Reply-To: References: Message-ID: Hi, Oliver Hader schrieb: > Good news and thanks in advance that you'd like to write your thesis > about and for TYPO3. I would like to know some more things about your > diploma thesis: > * What's the exact title? We've kind of settled on the following title now: Unit testing as a way to detect design flaws and hidden bugs in existing TYPO3 code Oliver From typo3-german-02 at oliverklee.de Thu Sep 25 12:05:30 2008 From: typo3-german-02 at oliverklee.de (Oliver Klee) Date: Thu, 25 Sep 2008 12:05:30 +0200 Subject: [TYPO3-project-4-3] MVC for 4.3? In-Reply-To: References: Message-ID: Hi, Daniel P??tzinger schrieb: > I prefer to have a kind of kickoff meeting at t3con? > I think till then I can try to collect all ideas till then and maybe > have a first sketch allready. I've just e-mailed the T3CON organizers about making this a birds-of-feather session. Oliver From ben at netcreators.com Fri Sep 26 23:14:42 2008 From: ben at netcreators.com (ben van 't ende [netcreators]) Date: Fri, 26 Sep 2008 23:14:42 +0200 Subject: [TYPO3-project-4-3] MVC for 4.3? In-Reply-To: References: Message-ID: Oliver Klee wrote: > Hi, > > Daniel P??tzinger schrieb: >> I prefer to have a kind of kickoff meeting at t3con? >> I think till then I can try to collect all ideas till then and maybe >> have a first sketch allready. > > I've just e-mailed the T3CON organizers about making this a > birds-of-feather session. Hey Oliver, Did not quite get what this is about? We won't be at T3CON, but we do work according to the MVC model in our current extension development. Anything we could add eventhough we are not there? ;-) gRTz ben -- netcreators :: creation and innovation www.netcreators.com - www.TYPO3.nl From info at sk-typo3.de Mon Sep 29 09:55:10 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 29 Sep 2008 09:55:10 +0200 Subject: [TYPO3-project-4-3] CGL Exceptions Message-ID: Hi, i think we missed discussing about Exceptions at T3DD08, so maybe we can discuss it here. What i want to clarify is * naming convention of exceptions * using error handlers for exception Looking to trunk we already have several exceptions in core. Some general ones * throw new Exception() in t3lib_div, t3lib_lock some named ones * UnexpectedValueException(msg, number) * t3lib_cache_Exception * InvalidArgumentException * t3lib_cache_Exception_InvalidData * t3lib_cache_exception_InvalidCache * t3lib_cache_DuplicateIdentifier * t3lib_cache_Exception_NoSuchCache * t3lib_cache_exception_ClassAlreadyLoaded * JSMinException (in 3rd party jsmin) * and error handler adodb_throw in adodb (hope to catch all existing ones now) one question before: how to generate the number as second param? next: when defining exceptions we should use an error handler. Where should this be, one central or extra ones for t3lib / tslib / backend etc. Anyway i would prefer to have the errorhandlers implemented, even if they are empty for the start. vg Steffen From info at sk-typo3.de Mon Sep 29 10:00:11 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 29 Sep 2008 10:00:11 +0200 Subject: [TYPO3-project-4-3] CGL Exceptions In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > > one question before: how to generate the number as second param? > ok, Ingo answered this in core list: number is the output of time() (timestamp) at creation of line to be unique. vg Steffen From masi-no at spam-typo3.org Mon Sep 29 11:08:42 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Mon, 29 Sep 2008 11:08:42 +0200 Subject: [TYPO3-project-4-3] CGL Exceptions In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > Hi, > > i think we missed discussing about Exceptions at T3DD08, so maybe we can > discuss it here. > > What i want to clarify is > * naming convention of exceptions > * using error handlers for exception > > Looking to trunk we already have several exceptions in core. Some > general ones > * throw new Exception() in t3lib_div, t3lib_lock > some named ones > * UnexpectedValueException(msg, number) > * t3lib_cache_Exception > * InvalidArgumentException > * t3lib_cache_Exception_InvalidData > * t3lib_cache_exception_InvalidCache > * t3lib_cache_DuplicateIdentifier > * t3lib_cache_Exception_NoSuchCache > * t3lib_cache_exception_ClassAlreadyLoaded > * JSMinException (in 3rd party jsmin) > * I'd prefer as little named ones as possible. A good message description an id (code) and the stack trace is good enough. No need to create an extra class for everything. eg IMHO t3lib_cache_Exception_InvalidData is pointless, a general InvalidData is enough, though it?s not quite clear from the name *which* data are invalid. > next: when defining exceptions we should use an error handler. We should, but not only for exceptions. > Where should this be, one central or extra ones for t3lib / tslib / > backend etc. Anyway i would prefer to have the errorhandlers > implemented, even if they are empty for the start. You'll need different ones. If you want to catch errors and warnings you want to have different output when you are in the FE, BE and CLI. You don't want to have output when you're in an AJAX call or cron job but may want to log the error. Masi From info at sk-typo3.de Mon Sep 29 11:17:24 2008 From: info at sk-typo3.de (Steffen Kamper) Date: Mon, 29 Sep 2008 11:17:24 +0200 Subject: [TYPO3-project-4-3] CGL Exceptions In-Reply-To: References: Message-ID: Hi, Martin Kutschker schrieb: > >> Where should this be, one central or extra ones for t3lib / tslib / >> backend etc. Anyway i would prefer to have the errorhandlers >> implemented, even if they are empty for the start. > > You'll need different ones. If you want to catch errors and warnings you > want to have different output when you are in the FE, BE and CLI. You > don't want to have output when you're in an AJAX call or cron job but > may want to log the error. > i know, but what i meant is using one file having all the error handlers or spreaded. Initialisation should be in init-script setting the one dependend from context, as you already mentioned. vg Steffen From masi-no at spam-typo3.org Mon Sep 29 12:21:03 2008 From: masi-no at spam-typo3.org (Martin Kutschker) Date: Mon, 29 Sep 2008 12:21:03 +0200 Subject: [TYPO3-project-4-3] CGL Exceptions In-Reply-To: References: Message-ID: Steffen Kamper schrieb: > Hi, > > Martin Kutschker schrieb: >> >>> Where should this be, one central or extra ones for t3lib / tslib / >>> backend etc. Anyway i would prefer to have the errorhandlers >>> implemented, even if they are empty for the start. >> >> You'll need different ones. If you want to catch errors and warnings you >> want to have different output when you are in the FE, BE and CLI. You >> don't want to have output when you're in an AJAX call or cron job but >> may want to log the error. >> > > i know, but what i meant is using one file having all the error handlers > or spreaded. Of course spreaded or how else should the FE rendering work? > Initialisation should be in init-script setting the one dependend from > context, as you already mentioned. Right. And es every set_error_handler() overwrites the previous it wouldn't even matter if t3lib would add a dumb default cms would add a better one later in the code execution. Masi