Problem/Motivation

The status report never shows the E-Arkiv requirements, so a site without httrack gets no warning until an archive job fails.

  1. Wrong setting names. Hooks::requirements() reads the settings archiver and storage from earkiv.settings, but they are called default_archiver_plugin and default_storage_plugin. No plugin requirements are ever checked, and earkiv_requirements('runtime') returns an empty array.
  2. Missing tar or gzip is not detected. HTTrackArchiver::requirements() checks str_contains($return, 'command not found'), but shell_exec() returns NULL when the command is missing, because the message goes to stderr. The check is then FALSE and no error is reported.
  3. Wrong service in Hooks::create(). It passes language_manager where the constructor expects the config factory. This is not hit today because the class is autowired as a service, but it fails as soon as create() is used.

Steps to reproduce

  1. Install the module on a server without httrack and select the HTTrack archiver.
  2. Open the status report, or run drush php:eval 'print_r(earkiv_requirements("runtime"));'.
  3. No E-Arkiv requirement is shown.

Proposed resolution

  • Read default_archiver_plugin and default_storage_plugin in Hooks::requirements().
  • Treat an empty result from shell_exec() as a missing command for httrack, tar and gzip alike.
  • Pass config.factory in Hooks::create().

The deprecated REQUIREMENT_* constants are left as they are; they are replaced in #3597448.

Remaining tasks

  • Implement and test.
  • Review.

User interface changes

The status report shows the HTTrack, tar, gzip and private file system requirements of the selected plugins.

API changes

None.

Data model changes

None.

AI-Generated: Yes (Used Claude Code to find the bugs, draft this issue and write the merge request.)

Issue fork earkiv-3636584

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thomas alsén created an issue. See original summary.

  • thomas alsén committed 3415429c on 1.0.x
    fix: #3636584 Status report never warns when HTTrack, tar or gzip are...
thomas alsén’s picture

Status: Active » Fixed

Merged into 1.0.x!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.