Digital Products Module Error

Hi There,

I want to sell digital products in my shop. I’m using Commerce 1.4.0-pl.

When I install and enable the Digital Product for Commerce module (which I know is a third party module) I get the following error in the console:

[2024-05-30 10:03:43] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:43] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:43] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:47] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:47] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:47] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:47] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:47] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:47] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:48] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:48] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:48] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:49] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:49] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:49] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:50] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:50] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:50] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:52] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:52] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:52] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:54] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:54] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:54] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:56] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:56] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/components/commerce/index.class.php(42): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modManagerResponse.php(108): CommerceManagerController->initialize()
#5 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(173): MODX\Revolution\modManagerResponse->outputContent(Array)
#6 /home/account/domain.com/core/src/Revolution/modManagerRequest.php(143): MODX\Revolution\modManagerRequest->prepareResponse()
#7 /home/account/domain.com/manager/index.php(60): MODX\Revolution\modManagerRequest->handleRequest()
#8 {main}
[2024-05-30 10:03:56] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.
[2024-05-30 10:03:56] (ERROR @ /home/account/domain.com/core/components/commerce_digitalproduct/src/Modules/Digitalproduct.php : 46) PHP warning: Undefined property: Commerce::$twig
[2024-05-30 10:03:56] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 354) [Commerce] Fatal Error initialising module Digital Products for Commerce (RogueClarity\Digitalproduct\Modules\Digitalproduct): Call to a member function getLoader() on null // #0 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(345): RogueClarity\Digitalproduct\Modules\Digitalproduct->initialize(Object(modmore\Commerce\Dispatcher\EventDispatcher))
#1 /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php(286): Commerce->loadModules()
#2 /home/account/domain.com/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php(1260): Commerce->__construct(Object(MODX\Revolution\modX), Array)
#3 /home/account/domain.com/core/cache/includes/elements/modx/revolution/modsnippet/95.include.cache.php(11): xPDO\xPDO->getService('commerce', 'Commerce', '/home/ajcarartc...', Array)
#4 /home/account/domain.com/core/src/Revolution/modScript.php(88): include('/home/ajcarartc...')
#5 /home/account/domain.com/core/src/Revolution/modParser.php(508): MODX\Revolution\modScript->process(NULL)
#6 /home/account/domain.com/core/components/pdotools/src/Parsing/Parser.php(276): MODX\Revolution\modParser->processTag(Array, true)
#7 /home/account/domain.com/core/src/Revolution/modParser.php(221): ModxPro\PdoTools\Parsing\Parser->processTag(Array, true)
#8 /home/account/domain.com/core/components/pdotools/src/Parsing/Parser.php(73): MODX\Revolution\modParser->processElementTags('', '<!DOCTYPE html>...', true, false, '[[', ']]', Array, 9)
#9 /home/account/domain.com/core/src/Revolution/modResource.php(521): ModxPro\PdoTools\Parsing\Parser->processElementTags('', '<!DOCTYPE html>...', true, false, '[[', ']]', Array, 10)
#10 /home/account/domain.com/core/src/Revolution/modResource.php(469): MODX\Revolution\modResource->parseContent()
#11 /home/account/domain.com/core/src/Revolution/modResponse.php(72): MODX\Revolution\modResource->prepare()
#12 /home/account/domain.com/core/src/Revolution/modRequest.php(154): MODX\Revolution\modResponse->outputContent(Array)
#13 /home/account/domain.com/core/src/Revolution/modRequest.php(138): MODX\Revolution\modRequest->prepareResponse()
#14 /home/account/domain.com/core/src/Revolution/modX.php(1499): MODX\Revolution\modRequest->handleRequest()
#15 /home/account/domain.com/index.php(63): MODX\Revolution\modX->handleRequest()
#16 {main}
[2024-05-30 10:03:56] (ERROR @ /home/account/domain.com/core/components/commerce/model/commerce/commerce.class.php : 371) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.

Is this module not compatible with MODX 3? Or Commerce 1.4.0?
The Extra hasn’t been updted since 2019, so I wondering if there’s another solution out there?

Thanks
Andy

Aha -I just found that there is a much newer version in the Modmore repository!
The original one i downloaded was from the modx.com repository which was much older and had no recent updates.

I have no errors after installing this version!

1 Like

Ah!
Yeah the Digital Products module was originally developed by Tony Klapatch, and that version is still on the main MODX repo. When modmore took over maintaining it, this new version became available on the modmore repo.