FriendsOfTYPO3/compatibility6

imagecaption_position is used by css_styled_content and must be in Core!

Closed this issue · 11 comments

Hi!

It is stated in:
typo3_src (7.6 LTS)/typo3/sysext/core/Documentation/Changelog/7.2/Breaking-65922-MoveUnusedTt_contentTcaFieldsToCompatibility6.rst

that:

There are some database fields defined in 'frontend' which are not used by frontend or css_styled_content. These fields have been moved to compatibility6.

  • altText
  • imagecaption
  • imagecaption_position
  • image_link
  • longdescURL
  • titleText

This is wrong. At least imagecaption_position - possibly also other fields, but that I did not test - are indeed used by css_styled_content!
Therefore, this field must be migrated back into the core. To use current functionality (as captionAlign), it is madness to use a compatibility extension.

See also: \TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController::render_textpic() , Ctrl+F for 'captionAlign', and
(7.6 LTS) typo3_src/typo3/sysext/css_styled_content/static/setup.txt:795

imagecaption_position is also used as css_styled_content imageblock palette in: typo3_src/typo3/sysext/css_styled_content/Configuration/TCA/Overrides/tt_content.php:431

css_styled_content is not the default rendering-library in TYPO3 7.6.
Moving these fields to compatibility6 avoids mandatory usage of css_styled_content , if I understand it right.
This is especially important as full usage of css_styled_content and fluid_styled_content side by side is not possible in the moment because they both reset any definitions.
Might be, that the recited Changelog is mistaking but I suppose some fields just have been moved from core / frontend to css_styled_content.

@DavidBruchmann
They should have, but they have actually been moved into compatibility6, even though they are still an active feature of css_styled_content --> So these fields should have been moved into that extension, rather than into compatibility6.
It's a 7.x feature, so it must be in 7.x code.

@LeoniePhiline You're right that it's not completely reasonable what was made with these fields.
Is there any request on forge to recover the fields again either in the core or in css_styled_content?

@DavidBruchmann Here https://forge.typo3.org/issues/80609#change-328301

Would be glad to get your backing in the forge ticket. :)

I also made a workaround (https://typo3.org/extensions/repository/view/nc_imagecaption_position), but I wouldn't want to advertise that in the forge ticket.
The workaround is not a fix and should not be treated as a full solution.

I just had installed compatibility6 just to write the fields in the database and then it can be already uninstalled again ;-)

When the fields are migrated to css_styled_content they still have to be removed from compatibility6 I think. So this issue has to wait till the forge-ticket is done, right?
BTW: Perhaps you like to write a patch for css_styled_content, @LeoniePhiline ?

I pushed a pull request to the core. You can see and vote here https://review.typo3.org/#/c/53666/

Thank you, Nicole!

Would the removal of the fields from compatibility6 happen in a separate PR?

Hi Leonie,

I wouldn't recommend to remove the fields from compatibility6 for reasons of backwards compatibility.

As the patch in core was merged, this issue should be solved.