Problem/Motivation

Deploy is amazing! :) After getting basic nodes working, I spent many hours trying to figure out why files were not working with Deploy, combed through issue queues, tested dev versions, etc. I eventually dug around enough in the code to find where the file was being encoded and figured out that the code was not running, and from there figured out that it was because hook_deploy_entity_alter() was never being invoked.

I rolled back to just before d64d5b8 and everything worked fine, and I was able to determine that the issue was introduced there, but only for new installs. For existing installs dependency_plugin will be empty and DeployIterator will be used unless you go in and re-save your plan configuration, then dependency_plugin will be default_iterator and you'll be stuck, UI-wise.

Dependency plugin dropdown

Proposed resolution

Add DeployIterator as an option for the dependency plugin via hook_entity_dependency_iterator(). It ends up being the first item in the dropdown and this looks to effectively make it the default.

Remaining tasks

Patch needs review.

User interface changes

Addition of a "Deploy Iterator" option to the Dependency plugin dropdown.

API changes

n/a

Comments

star-szr’s picture

Status: Active » Needs review
StatusFileSize
new713 bytes

Here's a patch, feedback please!

star-szr’s picture

Issue summary: View changes

Fixing commit link.

star-szr’s picture

Issue summary: View changes

Clarifying that this can also affect existing installs if a user goes in and re-saves the plan configuration.

fearlsgroove’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, I burned about two hours trying to figure out why all my entities where deploying with ids instead of UUIDs. Patch looks fine to me and fixes my problem.

I think there's more to be done around this -- is there a use case for the default entity dependency iterator to be available, since it doesn't have UUIDS? I'm setting RTBC under the assumption module devs have a longer term plan here, and this patch makes the current -dev versions usable.

star-szr’s picture

Title: DeployIterator not available as an option from the UI (affects new installs) » DeployIterator not available as an option from the UI (affects new installs and can break existing installs)

Thanks @fearlsgroove!

chrinor2002’s picture

Any news on when this will end up in the dev version?

deciphered’s picture

Title: DeployIterator not available as an option from the UI (affects new installs and can break existing installs) » File deployment doesn't work due to missing DeployIterator plugin.

Thanks @cottser, equally wasted time figuring out this issue.

Renaming this issue to make it a little clearer, because when the File deployment isn't working it's unlikely someone will search for DeployIterator (I know I didn't).

lisa.rae’s picture

Tested patch from #1 above, works as described.

  • dixon_ committed 98043f8 on 7.x-2.x
    Issue #2290059 by Cottser: Fixed File deployment doesn't work due to...
dixon_’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone for working and testing this one!

Committed to 7.x-2.x. A new release should not be too far away.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joseph.olstad’s picture

Related issues: +#2601374: File deployment

Posting this because I spent a day scrambling until I found 'deploy_plus' to do bulk file deployment with admin_views.

For bulk operation file deployment the super easy way:

  1. The easiest way to make file deployment work using admin_views and bulk operations is this:
  2. Upgrade to the deploy 7.x-3.x-alpha1 (latest version as of I write this)
  3. Install the "deploy_plus" module
  4. Then go to the admin/structure/views/view/admin_views_file
  5. click on "bulk operations"

    see illustration:
  6. illustrate selection of views bulk operations for adding file entity to managed deploy plan
  7. then from the list: put a checkmark here:
    " Manage entity in deployment plan "
  8. Now you can deploy files in batch with bulk-operations at admin/content/file

It is easiest to do it with the built in capabilities of deploy_plus as I described above.

IMHO, deploy_plus works so well, it should be included as a sub-module to deploy.. However for now its a separate module that depends on deploy.

Alternatively, if you want to do it the harder way with rules (possibly without deploy_plus) , that works too, you can make a custom rule and then select it in views bulk operations, however why do this when you can just enable deploy_plus? More info about rules in the video below:
https://drupalize.me/videos/using-rules-components-vbo?p=1157