Running Task Reset Globally Enabled elements

GET /dev/tasks/DNADesign-ElementalVirtual-Tasks-ResetGloballyEnabledElements

[Emergency] Uncaught Error: Class 'SilverStripe\Core\Config' not found

GET /dev/tasks/DNADesign-ElementalVirtual-Tasks-ResetGloballyEnabledElements

Line 21 in /srv/users/serverpilot/apps/pagebuildr/public/vendor/dnadesign/silverstripe-elemental-virtual/src/Tasks/ResetGloballyEnabledElements.php

Source

12 {
13     protected $title = 'Reset Globally Enabled elements';
14 
15     protected $description = 'Reset individual elements \'AvailableGlobally\' setting with the default_global_elements config';
16 
17     public function run($request)
18     {
19         // get all classes of BaseElement
20         $elementClasses = ClassInfo::subclassesFor(BaseElement::class);
21         $default = Config::inst()->get(BaseElement::class, 'default_global_elements') ? 1 : 0;
22 
23         // first update all to the default
24         DB::query("UPDATE Element SET AvailableGlobally = $default");
25         DB::query("UPDATE Element_Live SET AvailableGlobally = $default");
26         DB::query("UPDATE Element_versions SET AvailableGlobally = $default");
27 

Trace