Project

General

Profile

Actions

Bug #15907

closed

Caption Split doesn't work with default setup for IMGTEXT objects according to TSref

Added by JoH about 18 years ago. Updated almost 18 years ago.

Status:
Closed
Priority:
Must have
Category:
Communication
Target version:
-
Start date:
2006-03-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using captionSplit in 4.0 seems to be completely moved from the original Parameter to the caption Parameter. Thus removing the whole funcitonality of captionSplit for sites that re not using CSS-styled-content but simple individual setups of IMGTEXT.

Try this code snippet in 3.8.1 and 4.0rc2:

tt_content = CASE
tt_content {
key.field = CType
textpic = COA
textpic {
10 = TEXT
10.field = header
10.wrap = <h3>|</h3>
20 = IMGTEXT
20 {
imgList.field = image
imgPath = uploads/pics/
1 {
file.import.current = 1
}
captionSplit = 1
captionSplit.cObject = TEXT
captionSplit.cObject.field = imagecaption
}
}
}

page = PAGE
page.10 = CONTENT
page.10 {
table = tt_content
}

While 3.8.1 will show you nicely splitted captions, 4.0 doesn't show anything.

Setting caption in addition to captionSplit will give you the captions back in 4.0 but as a whole block of all captions under each image, unless you setup a split function that does the job which was supposed to be done by captionSplit.

Since this split function is neither documented nor the default of IMGTEXT objects, this will be a blocker for all sites using captionSplit without CSS-styled-content.

I will dive deeper into IMGTEXT the next days to find out if there are other issues ...

Joey
(issue imported from #M3005)


Files

typo3-4.0-captionSplit.diff (2.01 KB) typo3-4.0-captionSplit.diff Administrator Admin, 2006-04-12 12:53
Actions #1

Updated by JoH about 18 years ago

Sorry - wrong category.
Scroll wheel + selectbox sometimes drives me nuts ;-)
could someone change that please ?

Actions #2

Updated by Ernesto Baschny about 18 years ago

"captionSplit.token" and ".cObject" has been deprecated in 4.0. This hasn't been documented yet because 4.0 hasn't been released.

Having this in mind, I only see that we have the bug that this isn't being considered in "content (default)", which still tries to use those properties. I have no idea how one can change "content(default)" in the source-code. Maybe by changing the "INSERT INTO static_template" line from typo3/sysext/cms/ext_tables_static+adt.sql? So I cannot provide a patch here.

Manually added TypoScript has to be adapted acordingly. In my opinion, having stdWrap do the splitting is much more generic and we shouldn't carry on redundant code. This was Stucki's view too. But this has to be discussed again with core-people.

Actions #3

Updated by JoH about 18 years ago

The problem is that most of the developers only seem to take people into account who are using content(default) or CSS-styled-content while forgetting the rest of the users.

Of course content(default) is not recommended anymore and people are supposed to use CSS-styled-content, but what about all those people that simply used an IMGTEXT Object in their TS-setup without ever touching one of the static templates?

A functionality that has been working flawless for years is removed and called deprecated for which reason? It will break the output of a big number of sites especially those created by TYPO3 professionals, that don't rely on things like CSS-styled-content or content(default).

And IMHO there is a big difference between labelling a functionality deprecated and removing it completely.

Is there any other functionality that has been removed in a similar way? Could save me a lot of time if you can tell me in advance what else could be broken while updating from 3.8 to 4.0

BTW: You might be correct if you say stdWrap.split is more generic, but if this is the only reason for kicking the current default behaviour I don't think it's a good idea to sacrifice backwards compatiblity for it.

Actions #4

Updated by Ernesto Baschny about 18 years ago

I understand the problem, but I would say: If a professional has made a site with IMGTEXT cObject, and he is contracted to upgrade to 4.0 he has to take care of everything included in the process. I don't expect a "newby" to upgrade such a site from 3.8 to 4.0 anyway. But I do expect newbies that are using css_styled_content and content(default) upgrading.

So I'm still not in favor of maintaining this ugly code just for that reason, but I'm not to decide this. If someone tells me that captionSplit.token and .cObject should go back in, I will try to do that. I would have broken much more "backwards compatibility" issues here to clean up the code at 4.0, as this is clearly a "MAJOR" release and not just a minor upgrade. But someone has decided this will be done in 5.0, so I have to bend to that.

Actions #5

Updated by Ernesto Baschny about 18 years ago

Hi, this is something I cannot decide. The "backwards-compatibility" problem of the removed captionSplit.token and .cObject problem for the IMGTEXT cObject.

We had discussed that via chat/email and my proposed solution was adopted, but JoH has a good point in saying that this shouldn't break existing sites that are working with custom IMGTEXT variants (which is currently the case).

Please skim through the discussion in this bug report, and then give me some instruction on what to do. If you want, discuss this with the core team. I'll do whatever you tell me. :)

Actions #6

Updated by Ingmar Schlecht about 18 years ago

Hi Ernesto,

first of all once again thanks a lot for the excellent support you have given for the Core integration of css based imgtext!

I just read through the comments, and I must say I agree with Joey, we should not drop backwards compatibility for the standard cObject IMGTEXT if we can avoid it.

So, If it isn't too much work for you, it would be great if you could reintroduce those functions and add "@deprecated" to the JavaDoc comment.

cheers,
Ingmar

Actions #7

Updated by Michael Stucki about 18 years ago

I think it is easy to bring this back, therefore I agree with Ingmar and Joey.

Ernesto, please let me know whether you can write a patch for this.

- michael

Actions #8

Updated by Ingmar Schlecht about 18 years ago

Hi Ernesto,

as we are going to release rc3 later today, I'd like to know whether you're going to work on re-introducing the old way captionSplit worked. It not, no problem, then Stucki and me will probably do it.

cheers,
Ingmar

Actions #9

Updated by Ernesto Baschny about 18 years ago

Sorry, Ingmar, I have no time to work on that today. So if you or Stucki could do that, it would be great. Else you'll have to wait until tomorrow or wednesday for a proper patch from me.

Actions #10

Updated by Ingmar Schlecht about 18 years ago

Thanks for the feedback, Ernesto! We'll see what we'll do.

cheers,
Ingmar

Actions #11

Updated by Ernesto Baschny about 18 years ago

Attached patch should apply on TYPO3 4.0 and should re-add the "captionSplit.cObject", ".token" and ".stdWrap" handling to the IMGTEXT object that was dropped. No change was done to the handling in css_styled_content, since it comes with its own TypoScript. Could you JoH and others please test if this is ok?

Actions #12

Updated by Ingmar Schlecht about 18 years ago

Thanks, Ernesto!

I have submitted the patch to the core list.

Joey, can you please test that it works as expected?

I guess you have the best test-cases already set up...

cheers
Ingmar

Actions #13

Updated by Ernesto Baschny about 18 years ago

JoH, could you please test the attached patch?

Actions #14

Updated by Ingmar Schlecht about 18 years ago

Sorry for the priority/severity change, I was editing the wrong bug.

Actions #15

Updated by old_mountain about 18 years ago

How to execute the patch file. Is there an explanation on how to patch certain solutions to bugs.

I did the following:

patch -p1 /var/lib/typo3-src4.0/......... < patchfile

After this captionsplit was working again.
Is this the correct way to patch the system? using:

patch -p1 source_file < patch_file ???

Actions #16

Updated by Ernesto Baschny almost 18 years ago

Submitted to core for discussion

Actions #17

Updated by Ernesto Baschny almost 18 years ago

Commited to CVS (trunk and TYPO3-4_0)

Actions

Also available in: Atom PDF