Bug #17614
closed
Modify class TSpagegen to call it as an object.
Added by Dmytro about 17 years ago.
Updated over 9 years ago.
Description
Class TSpagegen made in a way that it called statically, with :: from typo3/sysext/cms/tslib/pagegen.php. And also it contains static calls to it's own methods. This way of creating that class does not allow to extend it. E.g. I have wrote extension which modifies <base /> tag functionality to print it as <base ></base> for buggy IE, by extending TSpagegen. But as TSpagegen called statically I can not use my extension (and have to patch TSpagegen manually all the time after upgrade).
So, there is need to change only these 2 files (in version 4.2.0a, 4.1.2, 4.0.7).
typo3/sysext/cms/tslib/pagegen.php are same in all current versions. So t possible to use patch for them.
typo3/sysext/cms/tslib/class.tslib_pagegen.php differs a little bit. If you need patch for all the version I will send it.
(issue imported from #M6362)
Files
Also need to have patch for
typo3/sysext/cms/tslib/class.tslib_pagegen.php
Will send it later.
Hey Dmytro,
some annotations to your approach:
- Instead of fixing the <base...> tag stuff with that, couldn't you use
page.headerData.100 = TEXT
page.headerData.100.value = <base....></base>
instead of the baseURL config directive? Would save you lots of trouble.
- Isn't XCLASSing possible with static classes? I gotta find that one out.
- Thanks for the patch --- Could you make it "unified" (using the
u option), also you only need to make it for the latest Subversion revision (or, that's too difficult for you to get - 4.2 alpha1 should do it).
- Instead of fixing the <base...> tag stuff with that, couldn't you use
I am not sure that there are no extension which look at baseURL and so could break it operation.
- Isn't XCLASSing possible with static classes? I gotta find that one out.
As I see it impossible as you call it directly and not with API t3lib_div::makeInstance() (this method realize XCLASSing)
And it works as I changed static call to object call.
- Thanks for the patch --- Could you make it "unified" (using the
u option), also you only need to make it for the latest Subversion revision (or, that's too difficult for you to get - 4.2 alpha1 should do it).
I made diff with downloadable version from Download section (I did not do it for SVN version)
pagegen2.diff - unified patch
I am not sure if I did it correctly:
in the command line first file (labeled with --- ) was modified and second (+++) was from 4.2.0alpha1
Hi Dmytro, thanks for the patch. Unfortunately you mixed the old with the new version.
The diff-syntax is: "diff -ru OLD NEW"
e.g. "diff -ru typo3_src-4.1.2-orig typo3_src-4.1.2-modified"
class.tslib_pagegen.diff - diff to the class.tslib_pagegen.php on versions 4.2.0alpha1 and 4.1.2 (these two files are similar in these versions)
NOTE:
in this dif file I made first file (---) as new one, second file (+++) as from sources.
If this order is incorrect, please tell me and I will provide them in another order.
Ok.
Sorry.
pagegen3.diff and class.tslib_pagegen2.diff are corrected diff's.
class.tslib_pagegen407.diff - diff file for TYPO3 4.0.7
- Target version deleted (
0)
I would appreciate fixing this issue after five years.
Making tslib_pagegen extendable would save us a lot of effort to hack the source over and over again.
For example, we already have extensions that allow us to set the baseurl dynamically and to use the same pid for both list and single view for tt_news.
I'll provide patches for 4.5-4.99 if nescessary.
- Target version set to 4.5.26
- Description updated (diff)
- Category deleted (
Communication)
- Target version deleted (
4.5.26)
- Is Regression set to No
Hi,
as TYPO3 CMS 4.5 is in maintenance only mode, this change won't be applied there.
Is this issue resolved within TYPO3 6.2?
- Status changed from New to Needs Feedback
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Also available in: Atom
PDF