Project

General

Profile

Actions

Bug #17614

closed

Modify class TSpagegen to call it as an object.

Added by Dmytro over 16 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-09-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

pagegen.diff (430 Bytes) pagegen.diff Administrator Admin, 2007-09-18 17:25
pagegen2.diff (1.28 KB) pagegen2.diff Administrator Admin, 2007-09-19 16:18
class.tslib_pagegen.diff (3.17 KB) class.tslib_pagegen.diff Administrator Admin, 2007-09-19 16:29
pagegen3.diff (1.28 KB) pagegen3.diff Administrator Admin, 2007-09-19 16:35
class.tslib_pagegen2.diff (3.17 KB) class.tslib_pagegen2.diff Administrator Admin, 2007-09-19 16:36
class.tslib_pagegen407.diff (2.38 KB) class.tslib_pagegen407.diff Administrator Admin, 2007-09-19 16:52
Actions #1

Updated by Dmytro over 16 years ago

Also need to have patch for
typo3/sysext/cms/tslib/class.tslib_pagegen.php
Will send it later.

Actions #2

Updated by Benni Mack over 16 years ago

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).
Actions #3

Updated by Dmytro over 16 years ago

  • 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)

Actions #4

Updated by Dmytro over 16 years ago

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

Actions #5

Updated by Oliver Hader over 16 years ago

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"

Actions #6

Updated by Dmytro over 16 years ago

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.

Actions #7

Updated by Dmytro over 16 years ago

Ok.
Sorry.
pagegen3.diff and class.tslib_pagegen2.diff are corrected diff's.

Actions #8

Updated by Dmytro over 16 years ago

class.tslib_pagegen407.diff - diff file for TYPO3 4.0.7

Actions #9

Updated by Moritz Ahl about 11 years ago

  • 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.

Actions #10

Updated by Moritz Ahl about 11 years ago

  • Target version set to 4.5.26
Actions #11

Updated by Alexander Opitz over 9 years ago

  • 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?

Actions #12

Updated by Alexander Opitz over 9 years ago

  • Status changed from New to Needs Feedback
Actions #13

Updated by Alexander Opitz almost 9 years ago

  • 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.

Actions

Also available in: Atom PDF