PDF Template Error

Hello,

So I have been seeing this error when I tried to create a module in PDF Template. At first I couldn’t access any of the modules because of it, until I disabled the AJAX. But I guess that’s not a solution.

$app_list_strings[“pdf_template_type_dom”][“cm_ja_Case”] = “cm_ja_Case”;
$app_list_strings[“pdf_template_type_dom”][“cm_ja_Case”] = “cm_ja_Case”;

cm_ja_Case is a now defunct custom module that I had created in my beta version of the app. I can still see it under /custom/modules/ and its conflicting here. How can I fix this issue?

Here is a pic of both my Modules and Custom/Modules directory. Are the custom modules supposed to appear in the Modules directory?

pic1

oh guys… its more than just a PDF template error… I can’t access my Studio either… I get this error

Check both your logs.

The suitecrm.log doesn’t reveal much. It just has this Sugar Bean error on a loop, which I read can be ignored.

Fri Sep 4 09:40:07 2020 [482][1][FATAL] SugarBean::populateDefaultValues $field_defs should be an array
Fri Sep 4 09:40:08 2020 [482][1][FATAL] SugarBean::populateDefaultValues $field_defs should be an array
Fri Sep 4 09:40:08 2020 [482][1][FATAL] SugarBean::populateDefaultValues $field_defs should be an array
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Connectors
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Connectors
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Versions
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Versions
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: CustomFields
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: CustomFields
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Connectors
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Connectors
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Versions
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: Versions
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: CustomFields
Fri Sep 4 09:40:09 2020 [915][1][FATAL] Cannot find bean file for module: CustomFields
Fri Sep 4 09:42:18 2020 [477][1][FATAL] Cannot find bean file for module: UserFeed
Fri Sep 4 09:42:18 2020 [477][1][FATAL] Cannot find bean file for module: UserFeed

And the PHP error log has this on loop -

PHP Notice: Undefined index: comment in /var/www/cms/modules/Administration/DiagnosticRun.php on line 671, referer: https://cms.jeevan-aadhar.org/index.php?module=Administration&action=Diagnostic

Could you please help me understand these errors?

Please check also Javascript errors in your browser’s Developer console.

Does this help?

That looks like Javascript is trying to interpret PHP commands, and failing…

Sometimes all that’s wrong is a delimiter - an apostrophe, a quote, a bracket somewhere…

@pgr
Another update. I just realized all of this began after I installed a third party plugin to create PDF templates for custom modules. It was all fine until I created the PDF template for this Cases Module and now I see this error. The module cm_ja_Case in the error was an older custom Module I created for Cases. But now I use the default Cases module within SuiteCRM.

I have uninstalled and deleted the plugin and also tried the Quick Fix/Repair. But I still get this error.

Is there anyway something about the plugin is still interfering with something?

That add-on looks just like the out-of-the-box “Print to PDF” feature. What functionality does it add, exactly? Full disclosure: I am interested because I am working on a similar thing right now.

About your bug - you need to work backwards to get to the point where it’s building that code in the server. Some PHP is leaking into the Javascript. You can try examining the Javascript in the browser and seeing what else is near that code, then go look for it in the SuiteCRM code base…

Its a simple add-on.
It basically adds the code in the modules (I guess) which enables it to create PDF templates for the custom modules you can’t by default in SuiteCRM.

1 Like

Can I delete the cm_ja_Cases directory from /customs/module?
I do not have that module in my database anymore.

Or will it cause further problems?

@jalex
You can delete this directory and do Quick Repair and Rebuild. If it directory will show again to check directory custom/Extension. This directory have files which aggregate into directories custom/modules and custom/application .

Thank you so much. @p.konetskiy
It doesn’t appear in the custom/modules director but I still have the error showing up.

$app_list_strings[“pdf_template_type_dom”][“cm_ja_Case”] = “cm_ja_Case”;
$app_list_strings[“pdf_template_type_dom”][“cm_ja_Case”] = “cm_ja_Case”;

@jalex
look at files into directory: custom/Extension/application/Ext/Language . There are present lines:

$app_list_strings[“pdf_template_type_dom”][“cm_ja_Case”] = “cm_ja_Case”;
$app_list_strings[“pdf_template_type_dom”][“cm_ja_Case”] = “cm_ja_Case”;

@p.konetskiy Thank you so much for the trip.

So i went to the said location and found a file ‘en_us.custom_modules.php’. I didn’t find an app_list_strings for pdf_template_type_dom, although I did for moduleList and I commented out the module cm_ja_Case on it.
But its still the same. I still get the same error.

@jalex
I think that you tested all standard directories and files. I use total search in this situation usually. It’s command for Unix system in directory with SuiteCRM:

find ./ -type f -exec grep cm_ja_Case {} \; -print 
2 Likes

@p.konetskiy - Man I am going to kiss your brains!!! hahahahahahhaa

I found the error. It was in ./custom/include/language/en_us.lang.php
There was an invalid argument, which I removed and Voila!!! its all good… :smiley:

Thank you soooo much… really appreciate all the help :smiley: :smiley: :smiley:

1 Like