PDF-Template is Empty

After removing all changes from pdf_template_type_dom and doing a Quick Repair and Rebuild, do you still get the same error in the logs?

[08-Mar-2021 05:43:07 America/Los_Angeles] PHP Notice: Undefined index: vname in C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\modules\AOS_PDF_Templates\views\view.edit.php on line 89
[08-Mar-2021 05:43:07 America/Los_Angeles] PHP Notice: Undefined index: nccas_NC_Case in C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\modules\AOS_PDF_Templates\views\view.edit.php on line 104
[08-Mar-2021 05:43:07 America/Los_Angeles] PHP Fatal error: Uncaught Error: Class name must be a valid object or a string in C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\modules\AOS_PDF_Templates\views\view.edit.php:105
Stack trace:
#0 C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\modules\AOS_PDF_Templates\views\view.edit.php(32): AOS_PDF_TemplatesViewEdit->setFields()
#1 C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\include\MVC\View\SugarView.php(226): AOS_PDF_TemplatesViewEdit->display()
#2 C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\include\MVC\Controller\SugarController.php(435): SugarView->process()
#3 C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\include\MVC\Controller\SugarController.php(375): SugarController->processView()
#4 C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\include\MVC\SugarApplication.php(113): SugarController->execute()
#5 C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\index.php(52): SugarApplication->execute()
#6 {main}
thrown in C:\Bitnami\suitecrm-7.11.2-0\apps\suitecrm\htdocs\modules\AOS_PDF_Templates\views\view.edit.php on line 105

Yes I did get the same error

I think you still have a reference to nccas_NC_Case somewhere, and it’s causing the error…

This is what I’m receiving now for the related module. This dpt_department is a custom module. But I’m not understanding the logic of the error message. dpt_department_users_1
dpt_department_ida
dpt_department_users_1
dpt_department_ida
dpt_department_users_1
dpt_department_ida
jjwg_maps_lng_c
surveyresponses_campaigns
dpt_department_users_1
dpt_department_ida
dpt_department_users_1
dpt_department_ida
dpt_department_users_1
dpt_department_ida
jjwg_maps_lng_c
jjwg_maps_lng_c

So I commented out this line for testing and page was able to be loaded

 foreach ($module->field_defs as $module_name => $module_arr) {
                if (isset($module_arr['type']) && $module_arr['type'] == 'relate' && isset($module_arr['source']) && $module_arr['source'] == 'non-db') {
                    $options_array = array(''=>'');
                    if (isset($module_arr['module']) &&  $module_arr['module'] != '' && $module_arr['module'] != 'EmailAddress') {
                        $relate_module_name = $beanList[$module_arr['module']];
                        $relate_module = new $relate_module_name();

                        foreach ($relate_module->field_defs as $relate_name => $relate_arr) {
                            if (!((isset($relate_arr['dbType']) && strtolower($relate_arr['dbType']) == 'id') || $relate_arr['type'] == 'id' || $relate_arr['type'] == 'link')) {
                                if ((!isset($relate_arr['reportable']) || $relate_arr['reportable']) && isset($relate_arr['vname'])) {
                                    $options_array['$'.$module_arr['name'].'_'.$relate_name] = translate($relate_arr['vname'], $relate_module->module_dir);
                                }
                            }
                        } //End loop.
					
                        $options = json_encode($options_array);

                        if ($module_arr['vname'] != 'LBL_DELETED') {
                            $options_array['$'.$module->table_name.'_'.$name] = translate($module_arr['vname'], $module->module_dir);
                            $fmod_options_array[$module_arr['vname']] = translate($relate_module->module_dir).' : '.translate($module_arr['vname'], $module->module_dir);
                        }
                        $test = $module_arr['vname'];
                        $insert_fields_js2 .="'$test':$options,\n";
						print $relate_name;
						
                    }
                }
            }

But how do I correct this portion of the code

We’re 46 messages into this thread, and it’s obvious you can’t figure things out on your own, and I can’t find out from a distance. So I guess the only real strategy for you is to find a developer that can log in to your system and examine things close-up.

My guess is that you got something wrong somewhere in your customizations, some left-over, some incoherence, that is tripping that part of the code. But only debugging that look and inspecting the values of field_defs in a debugger will get you somewhere. Sorry. Good luck.