Found a minor problem with migrated default content after installing fresh via drush-make this morning. The French alt text for the images are duplicated with another value in French but with an undefined language. See table below:
wetkit_db=> SELECT * FROM field_data_field_file_image_alt_text;
entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_file_image_alt_text_value | field_file_image_alt_text_format
-------------+--------+---------+-----------+-------------+----------+-------+---------------------------------------+----------------------------------
file | image | 0 | 1 | 1 | en | 0 | Web Experience Toolkit Logo | plain_text
file | image | 0 | 2 | 2 | en | 0 | Drupal Trademark Logo | plain_text
file | image | 0 | 3 | 3 | en | 0 | Photo of people holding hands | plain_text
file | image | 0 | 1 | 1 | fr | 0 | Boîte à outils de expérience Web Logo | plain_text
file | image | 0 | 1 | 1 | und | 0 | Boîte à outils de expérience Web Logo |
file | image | 0 | 2 | 2 | fr | 0 | Drupal logo de la marque | plain_text
file | image | 0 | 2 | 2 | und | 0 | Drupal logo de la marque |
file | image | 0 | 3 | 3 | fr | 0 | Photo de personnes se tenant la main | plain_text
file | image | 0 | 3 | 3 | und | 0 | Photo de personnes se tenant la main |
(9 rows)
This is not reproducible by adding content manually:
wetkit_db=> SELECT * FROM field_data_field_file_image_alt_text;
entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_file_image_alt_text_value | field_file_image_alt_text_format
-------------+--------+---------+-----------+-------------+----------+-------+---------------------------------------+----------------------------------
file | image | 0 | 1 | 1 | en | 0 | Web Experience Toolkit Logo | plain_text
file | image | 0 | 2 | 2 | en | 0 | Drupal Trademark Logo | plain_text
file | image | 0 | 3 | 3 | en | 0 | Photo of people holding hands | plain_text
file | image | 0 | 1 | 1 | fr | 0 | Boîte à outils de expérience Web Logo | plain_text
file | image | 0 | 1 | 1 | und | 0 | Boîte à outils de expérience Web Logo |
file | image | 0 | 2 | 2 | fr | 0 | Drupal logo de la marque | plain_text
file | image | 0 | 2 | 2 | und | 0 | Drupal logo de la marque |
file | image | 0 | 3 | 3 | fr | 0 | Photo de personnes se tenant la main | plain_text
file | image | 0 | 3 | 3 | und | 0 | Photo de personnes se tenant la main |
file | image | 0 | 5 | 5 | en | 0 | BoC EN alt text here |
file | image | 0 | 5 | 5 | fr | 0 | BoC FR alt text here |
(11 rows)
It all works well... just might be something to look at on a rainy day.
Comments
Comment #1
rob_johnston commentedSupplemental:
The migration is putting values for all 3 default content images into field_data_field_file_image_alt_text but only 2 of them into field_data_field_featured_image. It misses the first, "Web Experience Toolkit Logo".
Makes me wonder why are the alt and title texts in their own two tables (field_data_field_file_image_alt_text and field_data_field_file_image_title_text) and also together in field_data_field_featured_image? And why would the wetkit_page be using the former but any view I create uses the latter table? And why would the wetkit_page be using the former instead of the latter table? Hmmm. Anything to that?Been reading up on why there are two tables for alt and title text. It's a confusing jumble between file entity and media modules, but I think #2065507: Image field alt and title text should be preferred over file alt and title text is current enough to be the most helpful starting point. Is there anything that WetKit is doing that overrides this behaviour of falling back to the file alt and title text if the image field alt and title are not available, or did I not understand that? If there are values in field_data_field_featured_image but not in field_data_field_file_image_alt_text then no alt text shows, and I would expect the fallback behaviour to show something.
Comment #2
sylus commentedFixed with the following commit looks like an option was missing for assigning language.
Commit: http://drupalcode.org/project/wetkit_migrate.git/commit/4decafc
Checked records and they now evenly match in both tables after rolling back and importing.