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

ISLE 8 installation is missing the document media type and related field configs #1820

Open
dwk2 opened this issue May 12, 2021 · 3 comments
Labels
Subject: Docker ISLE Related to the maintenance and upkeep associated with ISLE’s docker image.

Comments

@dwk2
Copy link

dwk2 commented May 12, 2021

Our ISLE 8 installation (originally a demo install, then updated to a local install) is missing the following document media type and related field configs:

  • media.type.document.yml
  • core.entity_form_display.media.document.default.yml
  • core.entity_view_display.media.document.default.yml
  • core.entity_view_display.media.document.pdfjs.yml
  • field.field.media.document.field_file_size.yml
  • field.field.media.document.field_media_document.yml
  • field.field.media.document.field_media_of.yml
  • field.field.media.document.field_media_use.yml
  • field.field.media.document.field_mime_type.yml
  • field.field.media.document.field_original_name.yml
  • rdf.mapping.media.document.yml
  • system.action.digital_document_generate_a_thumbnail_from_an_original_file.yml

The solution was to add the above files and update the context.context.all_media.yml to include the document media type (document: document).

Our install is 4 weeks old. Not sure why these files were not included, but I wanted to report it here in case this occurs for others.

@hachacha
Copy link

hachacha commented May 12, 2021

Is this possibly related to #1818 ?
And if there are missing configs is it the proper solution to manually add the yml files to the config/sync directory?
@dwk2 do you have all of your controlled_access_terms configs available to you such as the genre taxonomy term?

@seth-shaw-unlv
Copy link
Contributor

seth-shaw-unlv commented May 12, 2021

@hachacha , there is a good chance. With the different ways you can get a site up with isle_dc and how much flux it has been through in the last few months there is a good chance something slipped through the cracks.

As to your second question, I just commented on the related thread, but using the config/sync to address missing configs is certainly the most reliable way of getting them in there (in my experience).

In some cases they are part of "features" where you can use the feature import command (e.g. drush fim -y islandora_defaults) or Features UI to get them in, but those can be temperamental. You also need to know which feature they are a part of (whereas with config/sync you know you are dealing with the whole site's configs).

@dwk2
Copy link
Author

dwk2 commented May 12, 2021

In case it's of interest or useful for documentation, these are the steps I used to add the missing files (much thanks for help from @seth-shaw-unlv):

ISSUE: Missing Files: ISLE 8 install missing the following Document media type and related field configs:

media.type.document.yml
core.entity_form_display.media.document.default.yml
core.entity_view_display.media.document.default.yml
core.entity_view_display.media.document.pdfjs.yml
field.field.media.document.field_file_size.yml
field.field.media.document.field_media_document.yml
field.field.media.document.field_media_of.yml
field.field.media.document.field_media_use.yml
field.field.media.document.field_mime_type.yml
field.field.media.document.field_original_name.yml
rdf.mapping.media.document.yml
system.action.digital_document_generate_a_thumbnail_from_an_original_file.yml

SOLUTION:

# Clone islandora_defaults.git
cd ~/dwk2-tmp/
git clone https://github.com/Islandora/islandora_defaults.git

Docker into container

docker exec -it isle-dc_drupal_1 bash

Export all your current configs into config/sync (using Drush)

drush cex -y

Copy the following missing Document media type and related field configs into /var/www/drupal/config/sync and make any other necessary edits

Docker cp files from tmp folder to 'isle-dc_drupal_1' container:

exit
docker cp ~/dwk2-tmp/islandora_defaults/config/install/media.type.document.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/core.entity_form_display.media.document.default.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/core.entity_view_display.media.document.default.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/core.entity_view_display.media.document.pdfjs.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/field.field.media.document.field_file_size.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/field.field.media.document.field_media_document.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/field.field.media.document.field_media_of.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/field.field.media.document.field_media_use.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/field.field.media.document.field_mime_type.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/field.field.media.document.field_original_name.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/rdf.mapping.media.document.yml isle-dc_drupal_1:/var/www/drupal/config/sync
docker cp ~/dwk2-tmp/islandora_defaults/config/install/system.action.digital_document_generate_a_thumbnail_from_an_original_file.yml isle-dc_drupal_1:/var/www/drupal/config/sync

Docker into container to set owner and group permissions

docker exec -it isle-dc_drupal_1 bash
cd /var/www/drupal/config/sync
chown nginx:nginx media.type.document.yml
chown nginx:nginx core.entity_form_display.media.document.default.yml
chown nginx:nginx core.entity_view_display.media.document.default.yml
chown nginx:nginx core.entity_view_display.media.document.pdfjs.yml
chown nginx:nginx field.field.media.document.field_file_size.yml
chown nginx:nginx field.field.media.document.field_media_document.yml
chown nginx:nginx field.field.media.document.field_media_of.yml
chown nginx:nginx field.field.media.document.field_media_use.yml
chown nginx:nginx field.field.media.document.field_mime_type.yml
chown nginx:nginx field.field.media.document.field_original_name.yml
chown nginx:nginx rdf.mapping.media.document.yml
chown nginx:nginx system.action.digital_document_generate_a_thumbnail_from_an_original_file.yml

Load all the new and modified configs (using Drush)

drush cim -y

Clear cache

drush cr
exit

Check your work: Are the files now in this directory on server (not container)?

cd /home/isleroot/isle-dc/codebase/config/sync

@kstapelfeldt kstapelfeldt added Subject: Docker ISLE Related to the maintenance and upkeep associated with ISLE’s docker image. and removed ISLE labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: Docker ISLE Related to the maintenance and upkeep associated with ISLE’s docker image.
Projects
Development

No branches or pull requests

4 participants