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

GUI hangs on line 75 of batch.form.inc #22

Open GarrettArm opened 6 years ago

GarrettArm commented 6 years ago

Fatal error: Class 'IslandoraCompoundBatch' not found in /opt/mounts/drupal/ldl/sites/all/modules/islandora_compound_batch/includes/batch.form.inc on line 75

$preprocessor = new IslandoraCompoundBatch($connection, $parameters);

The class IslandoraCompoundBatch is not defined. I'm seeing the previous commit of this line was: $preprocessor = new IslandoraNewspaperBatch($connection, $parameters); which referenced islandora_compound_batch.inc: class IslandoraNewspaperBatch extends IslandoraScanBatch .....

The file islandora_compound_batch.inc was removed in later commits. Along with it, the class IslandoraNewspaperBatch (or IslandoraCompoundBatch) was eliminated.

The GUI won't work until there is an IslandoraCompoundBatch class defined.

Any advice on your reasoning before I try to craft my own IslandoraCompoundBatch class?

MarcusBarnes commented 6 years ago

@GarrettArm From the Introduction we have that this module provides a "... Drush command to ingest compound objects." The inclusion of batch.form.inc was partial work from initial development. Sorry to have mislead you. If someone is able to get the batch GUI working like for other content models, a pull-request would be most welcome. Thanks!

mjordan commented 6 years ago

I've added a GUI batch ingest feature to a new solution pack I'm working on and would like to point out the salient bits that make it work. They might be applicable to creating a GUI for this batch module.

  1. Within the .module file, add a menu item and access callback for the GUI batch link.
  2. Add a batch.form.inc file to the includes directory.
  3. Within the preprocessor base class, add logic for detecting the zip file, and add a method to unzip the file.

I'm going to add some code to clean up the uploaded zip file and temporary extracted content directory soon.

I can help with this, or, if you want, take an initial stab at it.