Hi,
In âmodules/AOS_PDF_Templates/formLetterPdf.phpâ script, plural to single module name convertion is not correct and it prevents âGenerate Letterâ action in Opportunities Module.
$module_type_create = rtrim($module_type,âsâ);
Works fine for âLead(s )â, âAccount(s )â, âContact(s )â, and all other which plural is made by appending an âsâ, but not for Opportinity(ies ).
PHP Fatal error: Class âOpportunitieâ not found in modules/AOS_PDF_Templates/formLetterPdf.php on line 39âŚ
Regards,
Vitor Monteiro
Will
28 April 2014 10:39
2
Hi Vitor,
Thank you for highlighting this issue.
Regards,
Will.
Hi there, i have a little problem, i get this error when i try to implement PDF to Cases module
Fatal error: Class âCaseâ not found in /modules/AOS_PDF_Templates/formLetterPdf.php on line 39
this is what i have in view.detail.php
require_once(âmodules/AOS_PDF_Templates/formLetter.phpâ);
formLetter::DVPopupHtml(âCasesâ);
is there any way to fix this?
Thx for your answer
Matt
10 November 2014 17:25
4
in modules/AOS_PDF_Templates/formLetterPdf.php
change this :-
$module_type = $_REQUEST['module'];
$module_type_create = rtrim($module_type,'s');
$module_type_low = strtolower($module_type);
$module = new $module_type_create();
to something like
global $beanFiles, $beanList;
$module_type = $_REQUEST['module'];
require_once($beanFiles[$beanList[$module_type]]);
$module = new $beanList[$bean_name];
3 Likes
Hi, first off all thank you so much for your reply,
If i make the that change i get another error from all modules that i try to generate pdfs
Fatal error: Class name must be a valid object or a string in modules/AOS_PDF_Templates/formLetterPdf.php on line 46
global $beanFiles, $beanList;
$module_type = $_REQUEST[âmoduleâ];
require_once($beanFiles[$beanList[$module_type]]);
line 46: $module = new $beanList[$bean_name];
1 Like
Matt
11 November 2014 12:31
6
replace $bean_name with $module_type
2 Likes
Working perfect, thank you very much for your help :cheer: :cheer: :woohoo: :woohoo: :woohoo: