We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37521 ☆ A M B ☆
    • 30 Posts
    I try to remove deprecated system setting of my component via resolver
    foreach ($settings as $setting)
        {
            $vehicle = $builder->createVehicle($setting, $attributes);
            $vehicle->resolve('php',array(
                'source' => $sources['resolvers'] . 'resolve.settings.php',
            ));
            $builder->putVehicle($vehicle);
        }

    Early it was one setting but now the component has 5 settings which depend on old setting. I want to populate new settings by the value of old setting and then remove it.

    While updating package I get that:
    Skipping vehicle object of class modSystemSetting (data object exists and cannot be upgraded);
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Can you show what's in your resolver?

      I think you may want to add the settings as vehicles like you are doing, but without adding the resolver on each setting. Instead, add the resolver to something else that is configured to be updated during an update (the category usually is I think?), and in there remove/update settings with basic xPDO.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.