[TYPO3-core] RFC: #10320: Feature: Split css styled content templates in version templates to get rid of the compat version checks

Francois Suter fsuter at cobweb.ch
Fri Mar 13 22:51:46 CET 2009


Hi,

> Attached is a new version that uses the update wizard to perform the
> necessary changes.

It took me the better of a full day's work, but it's done, I've reviewed 
version 3 of this patch :-)

Attached you will find a new version, which corrects the things listed 
below. There are also a couple of open questions:

1) Files must be removed with svn delete. So the following files should 
not be in patch:

- typo3/sysext/css_styled_content/static/constants.txt
- typo3/sysext/css_styled_content/static/setup.txt

They should be deleted manually when you test the patch and will be 
deleted cleanly when committing, by using svn delete.

2) In typo3/sysext/install/ext_localconf.php:

- I added a comment before inclusion of tx_coreupdates_cscsplit to 
explain what it does and since which version it is there, as for the 
other update wizards.

3) I wonder about the version numbers. The compatibility check was made 
for version 3.9, but this never existed since the version number was 
finally bumped up to 4.0. Now that we are cleaning this up, shouldn't we 
take this opportunity to mark this version as 4.0?

4) In the update wizard:

4.1) use strpos instead of preg_replace when looking for 
css_styled_content inclusions

4.2) the update script didn't test versions properly:

- when comparing to "3.8", "4.2", etc., it is necessary to use 
t3lib_div::int_from_ver() too
- comparing to version "3.9" is not correct as this version has never 
existed for real (it existed only as a compatibility switch in TS, see 
point 3). I changed the test to <= "4.1".

4.3) as the update wizard for css_styled_contents needs to be able to 
change version back to 4.2, I added the possibility to select "4.2" as a 
TYPO3 version in the compat version update wizard. I guess this would 
have necessary anyway, but maybe it should be a separate RFC.

5) In the constants file, the following lines were added by RFC #10083 + 
its follow up patch:

   borderSelector = DIV.csc-textpic-border DIV.csc-textpic-imagewrap 
.csc-textpic-image IMG
     # cat=content/cImage/i5; type=boolean; label= Image row separation: 
Whether images should be rendered/wrapped in separated rows, e.g. inside 
a DIV.csc-textpic-imagerow element
   separateRows = 1

So I included these lines should be included in current, 4.2 and 3.9 
version of constants (since RFC #10083 added this constant for TYPO3 
version 4.1, 4.2 and TRUNK).

6) In the setup files:

6.1) The rendering of image and text with image content elements was 
totally broken. A lot of TS was not copied over to the setup files for 
versions > 3.8. I copied everything that was needed to version 3.9, 4.2 
and current.

6.2) same for menu/sitemap content elements. Some critical parts of TS 
were not copied for versions > 3.8.

7) There was an open question by Susanne in the content rendering list, 
about how best to update the t3lib_extMgm::addTypoScript() method to 
handle addition of TS now that there are several static templates for 
css_styled_contents. Her solution for now is to add the TS to all of the 
versions, which is a bit overkill and needs updates every time we 
introduce a new version, which is not optimal. One possible improvement 
might be to test the compat version and add the TS only to the 
appropriate version, but there's no guarantee that the included TS files 
match the compat version. Anyone has a better idea?


I have carefully checked the TypoScript, in particular the setup, and 
tested the most common content elements with a variety of options, in 
particular the image content element. However I can't exclude that small 
bugs will pop up here and there, but that's why we have alpha and beta 
testing :-)

After this caveat, here's my +1 on reading and testing and sweating to 
what I think is a great improvement in content rendering. The open 
questions above should be answered too.

Thanks a lot to Susanne for her work and her patience.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 10320_split_css_styled_content_v4.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090313/cc9fcad0/attachment-0001.ksh 


More information about the TYPO3-team-core mailing list