MarcusBarnes / islandora_compound_batch

Provides the basic ability to batch import compound objects into Islandora.
GNU General Public License v3.0
3 stars 12 forks source link

minimal commit to correct batch_gui #39

Open flummingbird opened 5 years ago

flummingbird commented 5 years ago

Resolves #22 @mjordan special thanks to you!

MarcusBarnes commented 5 years ago

@flummingbird Would it be possible to either attach or send me a sample batch of compound objects to test the pr against? Thanks in advance.

flummingbird commented 5 years ago

These are some odd items. FYI. I'm not sure why but the images aren't showing up. but at least the structure looks good.

Let me know if you encounter any issues. -Will

On Mon, Oct 29, 2018 at 1:48 PM Marcus Emmanuel Barnes < notifications@github.com> wrote:

@flummingbird https://github.com/flummingbird Would it be possible to either attach or send me a sample batch of compound objects to test the pr against? Thanks in advance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MarcusBarnes/islandora_compound_batch/pull/39#issuecomment-434032549, or mute the thread https://github.com/notifications/unsubscribe-auth/ADe_35qXgA1GUA3C4qSwHiRZ8qr0Qw5kks5up01ogaJpZM4Xcz38 .

bondjimbond commented 5 years ago

So, some problems:

First, I zipped up the top-level directory (root) where paths are root/object1/child1 etc.

Result: A single compound object called MODS, every file in all directories is its child.

Second, I tried zipping all the child objects together (no root directory). Result: errors.

Notice: Undefined index: icbp_verbose in IslandoraCompoundBatchPreprocessor->preprocess() (line 20 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Warning: Missing argument 1 for get_dir_name() in get_dir_name() (line 77 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/structure.inc). Warning: Missing argument 1 for get_dir_name() in get_dir_name() (line 77 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/structure.inc). Warning: Missing argument 1 for get_dir_name() in get_dir_name() (line 77 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/structure.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc).

Third, tried the first approach again, but with structure.xml appropriately included. Result: errors.

Notice: Undefined index: icbp_verbose in IslandoraCompoundBatchPreprocessor->preprocess() (line 20 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Warning: Missing argument 1 for get_dir_name() in get_dir_name() (line 77 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/structure.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc). Notice: Undefined variable: input_path in IslandoraCompoundBatchPreprocessor->preprocess() (line 66 of /var/www/drupal/sites/all/modules/islandora_compound_batch/includes/preprocessor.inc).

Fourth, tried the second approach (zip compound object directories together, no root directory), with structure.xml generated. Result: Success!

Conclusions:

bondjimbond commented 5 years ago

Further notes: For the batch that was ingested successfully, I never did get derivatives out of them. Perhaps it's not calling for derivative generation? Ingesting via Drush there were no problems.

flummingbird commented 5 years ago

Apologies for the bad zips, and lack of instructions.

The batches are failing to call derivative regeneration. I will look to fix this as soon as I make sense of the bad zips I gave originally.

I just ran a quick test locally. I had success with two zips (I will include w/ instructions), one with a structure.xml included and one without. Both created good looking compounds (minus derivatives).

I had expected anyone doing a GUI zip batch would rather not run a script like create_structure_files.php, so I had the module run the script.

I'll see if I can get it to generate derivatives as well.

Thank you for your time, -Will

On Tue, Jan 22, 2019 at 1:08 PM Brandon Weigel notifications@github.com wrote:

Further notes: For the batch that was ingested successfully, I never did get derivatives out of them. Perhaps it's not calling for derivative generation? Ingesting via Drush there were no problems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MarcusBarnes/islandora_compound_batch/pull/39#issuecomment-456524015, or mute the thread https://github.com/notifications/unsubscribe-auth/ADe_36hV3oFNQ9nhcBRkKEYtLeMhURxrks5vF2HEgaJpZM4Xcz38 .

the zip files are already structured to be ingested via islandora_compound_batch

You will not need to unzip them, they are structured as (root_dir/compound_object/child_obj)

parent.zip includes a valid structure.xml file.

two_parents.zip does not include a structure file. (but one will be created)

parent.zip creates a single compound object with two children images (large_image_cmodel).

two_parents.zip creates two separate compound objects, each with their own two children images (basic_image_cmodel)

flummingbird commented 5 years ago

parent.zip README.txt two_parents.zip