Print PDF works on all invoices except 1

Hi,
I’ve been trying to print an invoice. It’s 1 of 4 and all others printed fine with the same template and others (just for, you know, giggles). I can also print old invoices for the same client (i.e. account and contact), but not the one I need.
i have tried to duplicate it - no difference, made a new invoice with the same data (thinking I messed something up) - no difference.
I am a user without experience and no knowledge in programming (languages or otherwise), so ELI5 would be appreciated.

It would be great to find out what is actually going on. Here is a recount of what happens (or rather doesn’t):

When I hit print PDF, it takes forever before a white page is shown. Error message is:
“THIS SITE DOES NOT WORK. my URL cannot handle this request.
HTTP ERROR 500”
The site with the error is: http://myURL/suitecrm/index.php?entryPoint=generatePdf

I use a local version on my laptop Version 7.11.2 Sugar Version 6.5.25 (Build 344). I have full admin rights.

Here is a copy of the log entry for the failed PDF print:
Thu May 27 08:26:47 2021 [10624][1][FATAL] [ERROR] Failed to index bean to index
Thu May 27 08:26:47 2021 [10624][1][FATAL] [ERROR] SuiteCRM\Search\Exceptions\SearchException: Elasticsearch trying to re-indexing a bean but indexer is disabled in configuration. in C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php:121
Stack trace:
#0 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(103): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndex(Object(AOS_Products_Quotes))
#1 C:\xampp\htdocs\SuiteCRM\lib\Search\ElasticSearch\ElasticSearchHooks.php(76): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndexSafe(Object(AOS_Products_Quotes))
#2 C:\xampp\htdocs\SuiteCRM\include\utils\LogicHook.php(272): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->beanSaved(Object(AOS_Products_Quotes), ‘after_save’, ‘’)
#3 C:\xampp\htdocs\SuiteCRM\include\utils\LogicHook.php(213): LogicHook->process_hooks(Array, ‘after_save’, ‘’)
#4 C:\xampp\htdocs\SuiteCRM\data\SugarBean.php(3129): LogicHook->call_custom_logic(‘AOS_Products_Qu…’, ‘after_save’, ‘’)
#5 C:\xampp\htdocs\SuiteCRM\data\SugarBean.php(2442): SugarBean->call_custom_logic(‘after_save’, ‘’)
#6 C:\xampp\htdocs\SuiteCRM\modules\AOS_Products_Quotes\AOS_Products_Quotes.php(129): SugarBean->save(false)
#7 C:\xampp\htdocs\SuiteCRM\modules\AOS_Products_Quotes\AOS_Products_Quotes.php(118): AOS_Products_Quotes->save()
#8 C:\xampp\htdocs\SuiteCRM\modules\AOS_Line_Item_Groups\AOS_Line_Item_Groups.php(112): AOS_Products_Quotes->save_lines(Array, Object(AOS_Invoices), Array, ‘product_’)
#9 C:\xampp\htdocs\SuiteCRM\modules\AOS_Invoices\AOS_Invoices.php(88): AOS_Line_Item_Groups->save_groups(Array, Object(AOS_Invoices), ‘group_’)
#10 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(684): AOS_Invoices->save(false)
#11 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(525): SugarController->action_save()
#12 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(494): SugarController->do_action()
#13 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(468): SugarController->handle_action()
#14 C:\xampp\htdocs\SuiteCRM\include\MVC\Controller\SugarController.php(373): SugarController->process()
#15 C:\xampp\htdocs\SuiteCRM\include\MVC\SugarApplication.php(113): SugarController->execute()
#16 C:\xampp\htdocs\SuiteCRM\index.php(52): SugarApplication->execute()
#17 {main}

@VoiceTex

Welcome to community!

It’s some syntax php error. Do you have the file custom/modules/AOS_Products_Quotes/logic_hooks.php?

Hi and thanks for the reply.
Yes, I do have the file, but it’s in a different folder C:\xampp\htdocs\SuiteCRM\custom\modules

Content is this:

<?php
// Do not store anything in this file that is not part of the array or the hook version.  This file will	
// be automatically rebuilt in the future. 
 $hook_version = 1; 
$hook_array = Array(); 
// position, file, function 
$hook_array['after_save'] = Array(); 
$hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleChanges'); 
$hook_array['after_save'][] = Array(1, 'ElasticSearch Index Changes', 'lib/Search/ElasticSearch/ElasticSearchHooks.php','SuiteCRM\Search\ElasticSearch\ElasticSearchHooks', 'beanSaved'); 
$hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_select'); 
$hook_array['after_delete'] = Array(); 
$hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleDelete'); 
$hook_array['after_delete'][] = Array(1, 'ElasticSearch Index Changes', 'lib/Search/ElasticSearch/ElasticSearchHooks.php','SuiteCRM\Search\ElasticSearch\ElasticSearchHooks', 'beanDeleted'); 
$hook_array['after_restore'] = Array(); 
$hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleRestore'); 
$hook_array['after_ui_footer'] = Array(); 
$hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_onload'); 
$hook_array['after_ui_frame'] = Array(); 
$hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'mass_assign'); 
$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'include/social/hooks.php','hooks', 'load_js'); 



?>

@VoiceTex
This is standard file but some problem with file:

I believe this bug is already fixed, search for similar issues on Github and if you can, update to the latest version, it will probably solve it.

1 Like

OK thanks.
It’s hard to search for something if you don’t know what you should be looking for.

I’ll try my luck.

This is the part you should use to search. :point_up:

I think the fix is in 7.11.10, it has two parts:

:v: Thank you so much. This is extremely helpful.

1 Like