27363[TASK] Make ContentObject TEXT behave consistently
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 1
Review log 20
-
Chris topher uploaded patch set 2 02/05/14, 16:28
-
Mr. Jenkins commented on patch set 1 02/05/14, 17:03
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/13731/ : SUCCESS https://ci.typo3.org/job/typo3-v4-core-gerrit/13730/ : SUCCESS -
Mr. Jenkins commented on patch set 2 02/05/14, 17:17
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/13732/ : SUCCESS https://ci.typo3.org/job/typo3-v4-core-gerrit/13731/ : SUCCESS -
Markus Klein commented on patch set 2 02/05/14, 18:23
TextContentObject.php:66two versions after 6.2. -
Chris topher uploaded patch set 3 02/05/14, 18:41
-
Chris topher commented on patch set 2 02/05/14, 18:42
TextContentObject.php:66ReplyDone -
Mr. Jenkins commented on patch set 3 02/05/14, 19:09
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/13740/ : SUCCESS https://ci.typo3.org/job/typo3-v4-core-gerrit/13739/ : SUCCESS -
Markus Klein voted on patch set 3 V +1 CR +1 02/05/14, 19:16
-
Benni Mack commented on patch set 3 02/06/14, 06:42
Hey, with the deprecating this functionality we're back to the old HTML cObject which did exactly the behavior described above. We deprecated HTML in favor for TEXT. - and now we're switching the TEXT behavior back. I personally opt that we should keep the behavior although it is different from the other. TEXT however is special, as it only contains one property. -
Francois Suter commented on patch set 3 02/06/14, 08:06
Let's discuss this more openly in the core list. BTW the patch would need to include changes to css_styled_content, so that the Core itself doesn't throw deprecation warnings. -
Xavier Perseguers commented on patch set 3 CR +1 02/06/14, 08:24
Thought about it for a while, although as pointed out by Benni this will make TEXT behave like old HTML, it makes the whole cObject family much more united and definitely makes sense to do, so in the end this is good towards less "magic" and more consistency. -
Ernesto Baschny commented on patch set 3 V -1 02/06/14, 09:29
We have to change all usages of this deprecated properties in css_styled_content at the same time, else the core will render pages with tons of deprecation messages! Is this really a gain? -
Dmitry Dulepov commented on patch set 3 02/06/14, 09:38
I agree with Benni and I am against this change too. -
Jo Hasenau commented on patch set 3 CR -1 02/06/14, 11:56
See core list -
Markus Klein voted on patch set 3 V 0 CR 0 02/06/14, 12:02
-
Chris topher commented on patch set 3 02/06/14, 20:49
I have seen the discussion on Core List and I will still wait a bit until no new arguments come up. Currently it looks like the majority of the consistency friends prefers to not remove properties, but to add rootlevel properties to the other cObjects. While I think the rootlevel properties are not really necessary, it is true that my first patch would in fact require changes to existing TypoScript code. I don't think this is a telling argument against this patch set, as this is the case for _every_ deprecation of properties. However, adding rootlevel properties will in contrast be fully backwards compatible. I would also provide a patch for that. -
Jo Hasenau commented on patch set 3 02/06/14, 21:30
Actually we would have to change the existing TypoScript anyway, due to the fact that there are some rootlevel properties that match the stdWrap properties, but are executed before the stdWrap call. COA.wrap currently comes before(!) COA.stdWrap.whatever, even before COA.stdWrap.innerWrap so moving one or the other would lead to inconsistencies, that would have to be fixed in each and every TypoScript-Template out there. So IMHO the impact of a change in this case is much higher than the benefits. -
Chris topher commented on patch set 3 02/08/14, 20:39
Although I first thought adding rootlevel properties to each cObject might consistency-wise be a good idea, it turns out that it isn't: The order of properties would then have to be changed or would at least be problematic in several cObjects: * E.g. for COA and COA_INT there currently are properties in this order: if, wrap, stdWrap. The rootlevel properties of the TEXT cObject however follow the order from inside stdWrap, which is: stdWrap, if, wrap. To make the cObject COA consistent _by adding properties_ the order there would have to be changed. So this solution also would not be backwards-compatible. * Since the execution order would change, people would have to change their TS code with _this_ solution just as they will have to with the other one. * Another problem would be the cObjects USER and USER_INT, which allow developers to add basically any properties they want to the rootlevel. These might then conflict with the stdWrap properties to be added. Two possible solutions for this problem, both bad: Either disallow the developers to add own rootlevel properties (which would be no smaller compatibility break than deprecating rootlevel properties for cObject TEXT would be) or do not add rootlevel properties for this cObject (which would then make _cObject USER_ inconsistent to the rest). After all adding rootlevel properties would blow up the scope of this patch and would require changes in more or less all cObjects, which would create more inconsistencies than it would solve. Only changing cObject TEXT however would avoid the problems mentioned above. * We would neither blow up the scope of this patch nor would we create a number of new inconsistencies. * People would not have to change their code for several different cObjects (like COA or COA_INT) at several places (like for "if" and for "wrap"), but only for TEXT and also there only for "stdWrap". * I also think the argument that we would again have a cObject like HTML again does not really fit: For a big part, it was not cObject TEXT, but HTML, which got deprecated and finally removed, because HTML had a misleading _name_. This cObject allowed you to basically output any text, not only html. TEXT was kept, because it did have the right _name_; not because its _properties_ were so nice. * That TS code needs to be adapted also is not new - this basically is the case after _every_ deprecation. The fact that this cObject is rather prominent is only another reason to finally make it behave consistently. Some years ago we basically had the same situation with the cObject HTML: It could do the same as the cObject TEXT and people asked themselves, what it would be there for. It was deprecated and today it is removed. People have adapted their code and I have not really heard people complain about that. Let me just explain a bit, what I would like to have the PHP code look like after deprecation: I imagine having this code afterwards: $content = $conf['value']; if (isset($conf['value.'])) { $content = $this->cObj->stdWrap($content, $conf['value.']); } if (isset($conf['stdWrap.'])) { $content = $this->cObj->stdWrap($content, $conf['stdWrap.']); } return $content; Clean and consistent to what we have everywhere else. So, although some people on Core List preferred to add properties to the other cObjects, I honestly think removing them from cObject TEXT will be the better solution. Should there not come other ideas, which achieve consistency in a better way, I would go for removing the rootlevel properties. -
Dmitry Dulepov commented on patch set 3 V -1 02/18/14, 08:59
No need to change the most used TS object and break every site out there. -
Chris topher abandoned the change 03/18/14, 16:15