Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding configurable handling of image metadata to migraterelations #74

Merged
merged 10 commits into from
Sep 2, 2015

Conversation

dneuge
Copy link
Contributor

@dneuge dneuge commented Jul 15, 2015

As it turned out, image metadata (captions, titles, alt texts) are not handled uniformly across different TYPO3 installations. Please see Documentation/MigrateRelationsChainOptions.rst from our branch for details.

We are therefore introducing configurable "chains" of fields, enabling users to specify the order of applying image text fields from content elements or DAM and how they should be handled afterwards (overriding with an empty string so later changes don't take effect or using the default behaviour of falling back to central FAL metadata fields by not setting "override" option = setting NULL on database).

Daniel Neugebauer added 10 commits June 26, 2015 19:44
This commit consists of the following changes:

- setting actual image captions (new field is "description", not
  "title")
- migrating actual title text
- migrating alt text
- using title as description in media (still have to check if that's
  really correct, but seems so)
- still needs investigation as to what to set for media

Unfortunately, the correct way of migration those settings varies
from installation to installation as it depends on FE rendering
setup. Especially, it depends on whether dam_ttcontent had been
added to static includes before (default with DAM if used: set
title & alt texts in any case from DAM, only override by tt_content
if set; default if not used: only printing what's directly in
tt_content). Any way, user may have overridden rendering to something
else in tt_content.image.20.1 so we need some configuration options
to allow user to set the correct action (may still be a problem on
huge installations with multiple templates having been set up
differently). So this is not the ultimate solution yet...
$useIndividualTitles and $useIndividualAltTexts can now be used to
remove default texts previously copied as default from file metadata
to content element relation (removing file-based titles & alt texts
if not defined in content element, as would be the default behaviour
if, with DAM, static include dam_ttcontent would have been missing).

Still, we may want an option to disable default copy from file
metadata all together to allow central texts changes as we had with
DAM, so there will be at least one more patch before this is done...
Git history looks like processing "image" fields on pages and
language overlays has accidentally been introduced. Furthermore,
"media" migration on pages/language overlays appears to query
tt_content with a page ID accidentally used for a content element
UID. This was supposed to perform migration for dam_pages extension
but (just from reading) doesn't appear to make any sense. Added a
comment and left it enabled so far, will open a bug report together
with this pull request.
As previous attempts at correctly migrating caption, title and alt
texts revealed that migration cannot be done in one or two uniform
ways but requires individual configuration depending on TS setup of
a website we are now introducing "chains". Please refer to command
reference and MigrateRelationsChainOptions.rst for details on how
this works.
# Conflicts:
#	Classes/Controller/DamMigrationCommandController.php
#	Classes/Service/MigrateRelationsService.php
#	Documentation/CommandReference/Index.rst
#	Documentation/UserManual/Index.rst
Tuurlijk pushed a commit that referenced this pull request Sep 2, 2015
adding configurable handling of image metadata to migraterelations
@Tuurlijk Tuurlijk merged commit e8ad08e into b13:master Sep 2, 2015
@@ -259,6 +324,7 @@ protected function execSelectDamReferencesWhereSysFileExists() {
sys_file_metadata.title,
sys_file_metadata.description,
sys_file_metadata.alternative,
sys_file_metadata.caption,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks a lot migrations as the caption field is added by EXT:filemetadata which is deactivated by default and a SQL error is thrown now.

@dneuge dneuge deleted the fix_imagecaption branch September 21, 2015 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants