@@ -, +, @@ --------- S> delete from systempreferences where variable='automatic_item_modification_by_age_configuration'; S> quit echo | sudo tee /var/log/koha/kohadev/plack-error.log restart_all -- notice there is a nasty warn -- this time no nasty warns --- misc/cronjobs/automatic_item_modification_by_age.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/misc/cronjobs/automatic_item_modification_by_age.pl +++ a/misc/cronjobs/automatic_item_modification_by_age.pl @@ -22,7 +22,10 @@ pod2usage(1) if $help; $verbose = 1 unless $confirm; # Load configuration from the syspref -my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration'); +C4::Context::clear_syspref_cache; +my $syspref_content = C4::Context->preference('automatic_item_modification_by_age_configuration') // q{}; +pod2usage({ -message => 'Set up automatic item modifications by age rules in tools first!', -exitval => 1 }) if $syspref_content !~ /\S/xsm; + my $rules = eval { JSON::from_json( $syspref_content ) }; pod2usage({ -message => "Unable to load the configuration : $@", -exitval => 1 }) if $@; --