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

Use Nodes instead of our custom FedoraResource entity #643

Closed
3 tasks
dannylamb opened this issue May 24, 2017 · 14 comments
Closed
3 tasks

Use Nodes instead of our custom FedoraResource entity #643

dannylamb opened this issue May 24, 2017 · 14 comments
Assignees

Comments

@dannylamb
Copy link
Contributor

dannylamb commented May 24, 2017

This is a long-term strategic move to more closely align islandora with the Drupal community. Drupal expects/wants you to use nodes and media to model your content (Media is becoming core in 8.4), so by falling in line we will open up access to a larger swathe of contributed modules and open up islandora to a much larger user community.

This is a large shift that will require PRs against all of our Drupal modules.

  • Remove the custom FedoraResource entity from the core islandora module. Any special actions done in response to entity CRUD events will need to get shuffled into node hooks. Remove any custom UI work for the admin/content menu.
  • Re-model collections in islandora_collection and re-export
  • Re-model images in islandora_image and re-export

We can possibly use the config:export:content:type (cect) command with the Drupal console to do those re-exports.

@whikloj
Copy link
Member

whikloj commented May 24, 2017

@dannylamb
Copy link
Contributor Author

@whikloj We still need to create Content Entities using RDF. So those pulls are still totally relevant. We just need to make them work with Nodes instead.

@dannylamb
Copy link
Contributor Author

I've got this roughly working with nodes and have re-exported the core and collection yaml. When I've got images re-exported i'll issue PRs for all three so people can take a test drive.

@dannylamb
Copy link
Contributor Author

dannylamb commented May 31, 2017

You can totally run through these commands and check everything out, but #649 will need to get resolved before things will flush to Fedora again. Just a heads up.

The PRs for this issue are:

Testing Instructions

  • Uninstall the islandora_image, islandora_collection, and islandora modules. You will need to delete any existing FedoraResource entities before doing so. If you uninstall through the web interface at /admin/modules/uninstall it will help do this for you.
  • vagrant ssh into your environment
  • Update the islandora module from my fork using git
    • cd /var/www/html/drupal/web/modules/contrib/islandora
    • git remote add danny https://github.com/dannylamb/islandora.git
    • git fetch danny
    • git checkout issue-643
  • Update the islandora_collection module from my fork using git
    • cd /var/www/html/drupal/web/modules/contrib/islandora_collection
    • git remote add danny https://github.com/dannylamb/islandora_collection.git
    • git fetch danny
    • git checkout issue-643
  • And repeat those commands one more time for islandora_image
    • cd /var/www/html/drupal/web/modules/contrib/islandora_image
    • git remote add danny https://github.com/dannylamb/islandora_image.git
    • git fetch danny
    • git checkout issue-643
  • Install the islandora image module. This will install the other two modules for you since they're declared as dependencies
  • To add content, click the 'Add Content' link in the menu, or click the Content button in the admin toolbar to navigate to /admin/content
    screenshot from 2017-05-31 10-07-01
  • You'll notice there is no 'Fedora Resource' tab anymore. We're using nodes, so click the blue + Add Content button to be brought to the list of available content types.
    screenshot from 2017-05-31 10-07-52
  • Click on Islandora Collection to create a collection
    screenshot from 2017-05-31 10-09-55
  • Fill out the form and click the blue Save and Publish button
    screenshot from 2017-05-31 10-10-23
  • You'll notice that I've replaced the Members tab with a block underneath the content. This saves a click for the end user and also works around https://www.drupal.org/node/2489932, which was making the Members tab appear on all bundles even when explictly told not to.
    screenshot from 2017-05-31 10-11-41
  • Now make an image by going back to /admin/content, clicking the blue + Add Content, and clicking Islandora Image
  • Fill out the form and make it a member of the previously created collection.
    screenshot from 2017-05-31 11-03-42
  • Check out your newly created image
    screenshot from 2017-05-31 11-12-41
  • Navigate back to your collection, and the Members block should be populated
    screenshot from 2017-05-31 11-13-29

Wanna get really crazy?

  • Enable the devel_generate module
  • Go to /admin/config and click on Generate media to be brought to /admin/config/development/generate/media
  • Generate media for all of our defined types
    screenshot from 2017-05-31 11-16-20
  • Now go to /admin/config and click on Generate contet to be brought to /admin/config/development/generate/content
  • Generate content for all of our defined types
    screenshot from 2017-05-31 11-18-40
  • Go to the homepage and look at all that content.
    screenshot from 2017-05-31 11-20-23

@ruebot
Copy link
Member

ruebot commented May 31, 2017

Tested and all works as expected. Really great to be able to use generate content to test out now. Nodes open up a really nice world in Drupal that I've been missing for about 10 years now 😄

@whikloj
Copy link
Member

whikloj commented Jun 1, 2017

👍 All 3 work as expected.

We'll need to consider whether an islandora_image that is saved but not published should be synced to Fedora.

@whikloj
Copy link
Member

whikloj commented Jun 1, 2017

@ruebot you go ahead and pull the trigger on these 3 PRs if everyone is ready. Then we need to fix our Travis setup.

@kimpham54
Copy link
Contributor

Tested all 3 pull requests. Everything works as expected, except when I test devel generate content it generates txt files as the OBJ and JP2 for Islandora Images. Is there a way to get it to generate images like it does for MEDIUM_SIZE and TN?

Thanks for the clear instructions @dannylamb

@whikloj
Copy link
Member

whikloj commented Jun 1, 2017 via email

@ruebot
Copy link
Member

ruebot commented Jun 1, 2017

Thanks for testing y'all. I'm going to merge these.

@dannylamb
Copy link
Contributor Author

@kimpham54 Ha! That's awesome you actually checked out those files. I guess it does text as a sensible default.

@dannylamb
Copy link
Contributor Author

#64 might fix it. We can revert #652 if that's the case.

@dannylamb
Copy link
Contributor Author

Finally closed with #65

dannylamb pushed a commit to Islandora/islandora_ci that referenced this issue Oct 30, 2020
dannylamb added a commit to Islandora/islandora_ci that referenced this issue Oct 30, 2020
…52)" (#653)

This reverts commit 31d465fff07d06a35c3703168c9e2298fb72c672.
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

No branches or pull requests

4 participants