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

$installdefs parameter schedulers in manifest.php is not respected as documented while installing a module #10403

Open
isleshocky77 opened this issue Apr 15, 2024 · 0 comments

Comments

@isleshocky77
Copy link
Contributor

Issue

The documentation Module Installer states that there is a key for schedulers which would be

An array of schedulers to be installed. Each entry is an array with a single key:

This means that these should be copied to the schedulers directory.

However, in practice, this functionality does not work.

If you look at the $manifestMap in ModuleInstall/ModuleScanner.php:51 as well $tasks ModuleInstall/ModuleInstaller.php:123 you'll see there isn't actually a definition for schedulers or a install_schedulers task.

The work around for this is you need to use the copy key like such

    'copy' => [
        [
            'from' => '<basepath>/schedulers/CustomModule.php',
            'to' => 'custom/Extension/modules/Schedulers/Ext/ScheduledTasks/CustomModule.php',
        ],
    ],

Expected Behavior

When installing a custom module with a manifest.php file that has a key for schedulers, it should install the Scheduler. as documented.

Actual Behavior

The key schedulers key in manifest is just ignored.

Possible Fix

Add the correct functionality to ModuleInstall/ModuleScanner.php:51 and ModuleInstall/ModuleInstaller.php:123

Steps to Reproduce

  1. Create a Custom module
  2. Update the manifest.php to have an array with a key of schedulers
  3. Create in the module a Scheduler
  4. Install the custom module through Module Loader
  5. Look at scheduled jobs

Context

The documentation is wrong and takes a bit of debugging to figure out. You then need to use the copy key instead of a cleaner schedulers key for what is actually going on.

Your Environment

  • SuiteCRM Version used: 7.x
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): 123.0.6312.86
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

1 participant