cancel
Showing results for 
Search instead for 
Did you mean: 

temando.CRITICAL: "accountId" is required. Enter and try again.

SOLVED
Highlighted

Re: temando.CRITICAL: "accountId" is required. Enter and try again.

Great to know!! If my answer helped you then please accept it as solution. Regards.

Re: temando.CRITICAL: "accountId" is required. Enter and try again.

This is not Resolved.

Removal of the module using a composer replace will cause error in product exports and product saves because the "ts_" attribute source models will no longer exist.

 

If you disable the module you will run into the same errors.

 

The only option would be to remove the ts_ attributes from every atttribute set, delete the attributes, then remove the module.

 

What I also found is other modules use these attributes, my attempts to decouple Temando_Shipping from core magento lead to alot of work and hardship.

 

Since we do not use Temando_Shipping in our store I am looking into other ways to silence the error.

Highlighted

Re: temando.CRITICAL: "accountId" is required. Enter and try again.

Found it

 

Temando_Shipping module add the following attributes:

ts_dimensions_length
ts_dimensions_width
ts_dimensions_height
ts_hs_code
ts_country_of_origin
ts_packaging_id
ts_packaging_type

 

the ts_packaging_id has an attribute source model

class :Temando\Shipping\Model\Source\Packaging
path:vendor/temando/module-shipping-m2/Model/Source/Packaging.php

 

This makes an API call in

Temando\Shipping\Rest\Adapter:getContainers()

which makes a call to Temando API that causes an exception if you are missing an account Id.

 

Could make a patch that makes this attribute check to see if the Temando shipping method is enabled but since we are not using Temando the least impactful fix would be to just remove the attribute from your products attribute set and that will remove the error.

Highlighted

Re: temando.CRITICAL: "accountId" is required. Enter and try again.

Disabling the module does not solve the issue. If you disable the module the default attribute set also has references to the module's (ts_) attributes (you will need to remove them) and also the Google Shopping Ads extensions will also fail because the attributes are set to "is_visible=1" which you do not administer in the back end and crashes as well!

Highlighted

Re: temando.CRITICAL: "accountId" is required. Enter and try again.

To remove the error without disabling the module remove source_model ts_packaging_id 

via sql

UPDATE `eav_attribute` SET `source_model` = null WHERE `eav_attribute`.`attribute_code` = 'ts_packaging_id';

or via an UpgradeSchema.php (replace namespace and increment module version in module.xml)

 

<?php
namespace XXX\YYY\Setup;

class UpgradeSchema implements \Magento\Framework\Setup\UpgradeSchemaInterface
{
    /**
     * Eav setup factory
     * @var EavSetupFactory
     */
    private $eavSetupFactory;

    /**
     * Init
     * @param EavSetupFactory $eavSetupFactory
     */
    public function __construct(\Magento\Eav\Setup\EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    /**
     *
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    public function upgrade(\Magento\Framework\Setup\SchemaSetupInterface $setup, \Magento\Framework\Setup\ModuleContextInterface $context)
    {
        $installer = $setup;
        $installer->startSetup();
        if (version_compare($context->getVersion(), '1.0.1', '<')) {
            $eavSetup = $this->eavSetupFactory->create();

            $id = $eavSetup->getAttributeId(
                \Magento\Catalog\Model\Product::ENTITY,
                'ts_packaging_id'
            );
            $eavSetup->updateAttribute(
                \Magento\Catalog\Model\Product::ENTITY,
                $id,
                'source_model',
                null
            );
        }
    }
}
Highlighted

Re: temando.CRITICAL: "accountId" is required. Enter and try again.

Works like a charm and this way you can find the change back in the code, not only in the database  Smiley Happy