dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 64 forks source link

Notice: Trying to get property 'name' of non-object #576

Closed raghuveerpixere closed 2 years ago

raghuveerpixere commented 2 years ago
  1. Magento community edition 2.4.2

We are getting the following cron error every once in a while. There are two dotdigital templates trying to sync on Magento 2 but one sync properly but another one not syncing. Also, The error getting when try to sync manually.

Notice: Trying to get property 'name' of non-object in vendor/dotmailer/dotmailer-magento2-extension/Model/Email/Template.php on line 394

sta1r commented 2 years ago

@raghuveerpixere this sounds like a problem with the dotdigital campaign that is being mapped to your template. Does it still exist in dotdigital? Try to unmap the template > save > remap.

raghuveerpixere commented 2 years ago

Yes, it exists in dotdigital. Even the syncing is working properly on the staging website but on PROD have something wrong. How can I do remap on the Magento?

sta1r commented 2 years ago

You have to go to Stores > Configuration > dotdigital > Email Templates and de-select any mapped templates. Then save, then re-select templates you want to be mapped. If this becomes more complicated I'd advise opening a ticket with our support team via https://support.dotdigital.com/. Closing here, since it sounds more like an environment / configuration issue as opposed to a fault with our code.