by synolia

Create personalized MS Office or Open Office letters and documents from any Sugar module with one click. Define and create templates for any module and generate Office documents on any record and its related records. Great for mail merges and more!

Includes a 30 day guarantee
Try it Now

#3159 - PHP Fatal error when generating Doc

Closed Bug? created by danieljestrab 2 years ago


we are getting following error when trying to generate document from template in any module: PHP Fatal error: Call to a member function getRelatedModuleName() on null in /var/www/html/sugarcrm/custom/Synolia/SynoGenerateDoc/SynoGenerateDoc.php on line 128, referer:

We are not aware of any specific action, after which this behaviour started occurring. We have tried to reinstall the package, but it did not help.

Best Regards,
Daniel Jestrab

  1. synolia member avatar

    synolia Provider Affiliate

    2 years ago

    Hello Daniel,

    Please make sure you still have all the relationships selected in the template document available in Sugar. The error is triggered when GenerateDoc cannot find a required (selected) relationship defined in the template.

    To fix this you will have to check your Document template relationship (the multi-select field) and resave the Document.

    Kind regards,
    Synolia Support

  2. danieljestrab member avatar


    2 years ago


    Thank you for quick response, regenerating the relationships as you wrote solved the issue.

    Have a nice day!


    • synolia member avatar

      synolia Provider Affiliate

      2 years ago

      Glad the fix worked. Have a nice day.

      Kind regards,
      Synolia Support

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...

Keep up to date on the latest additions

We'll send you an email every month with handpicked add-ons, reviews, tricks and tips. Don't worry, we hate spam as much as you do.