Hi,
Please check if you can apply my patch. It fixes library definition according to documentation and it fixes this issue in multilingual websites:
https://www.drupal.org/docs/develop/creating-modules/adding-assets-css-j... →
This 3370546-01_fix_to_remove_https.patch patch does not resolve the issue on websites that are presented via http protocol.
Another thing to consider is to remove the library from this module and add a required dependency of openeuropa/oe_webtools. Since this library is already there defined correctly and included:
https://github.com/openeuropa/oe_webtools/blob/master/oe_webtools.librar...
Kind regards,
Michał Kozłowski.
Hi,
I'm trying Entity API. Have created Property entity type with some fields. I forgot to set image and body fields to be revisionable. Now I have some data in production database and wanted to make these fields revisionable from now on. I have updated the defionition of these fields setting them revisionable in PropertyEntity.php and tried following code to update database schema:
function mymodule_update_9001 {
$manager = \Drupal::entityDefinitionUpdateManager();
// Body field.
$body_storage_definition = $manager->getFieldStorageDefinition('body', 'property_entity');
$body_storage_definition->setRevisionable(TRUE);
$manager->updateFieldStorageDefinition($body_storage_definition);
// Image field.
$image_storage_definition = $manager->getFieldStorageDefinition('image', 'property_entity');
$image_storage_definition->setRevisionable(TRUE);
$manager->updateFieldStorageDefinition($image_storage_definition);
}
The code above works fine when there is no data in database. However once Properties are in database the code generates a following error:
Exception thrown while performing a schema update. SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'body__format' doesn't exist in table: ALTER TABLE "property_entity_field_revision" ADD INDEX `property_entity_field__body__format` (`body__format`); Array ( )
I was wondering if there is a quick trick to fix this, because only thing that comes to my mind is to do the following:
1. Get the data from database.
2. Truncate the tables.
3. Run the code above to update database schema on empty tables.
4. Fill updated tables with the data previously retrieved.
Thanks in advance for any suggestions.
Michał.