Closed PercyP closed 7 years ago
Hi, I have managed to get it working by removing protected from this line:
protected function getRecordModelFromRequest(\App\Request $request)
Will this have any impact on anything else?
Hi,
in the end I had to go back to the developer and get the code changes made. It now works :-D
I updated from v4.0 to 4.2 and have spent a few days trying to get a custom uitype to work (created by a 3rd party). I have just one outstanding problem with it. I have to add some code to the /modules/vtiger/actions/save.php but when I do, I cannot save any module data. This worked perfectly on version 4.0. The code I am adding is:
`//added by jayant for signature :start---------------Contacts // //isset($request->get('jbase64')) && if( !empty($request->get('imagedata')) ) { $currentUserModel = Users_Record_Model::getCurrentUserModel();
foreach($request->get('imagedata') as $fieldname => $imagedata ){ if(!empty(trim($imagedata))){ $data = $imagedata;
$uploadPath = $this->decideFilePath();
Which I insert at line 120. So my Save.php looks like this:
`<?php /* +***
class Vtiger_Save_Action extends Vtiger_Action_Controller {
//added by jayant for signature :start---------------Contacts // //isset($request->get('jbase64')) && if( !empty($request->get('imagedata')) ) { $currentUserModel = Users_Record_Model::getCurrentUserModel();
foreach($request->get('imagedata') as $fieldname => $imagedata ){ if(!empty(trim($imagedata))){ $data = $imagedata;
$uploadPath = $this->decideFilePath();
}
` In phperror.php it shows the following errors:
`[14-Aug-2017 14:33:48 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined method Vtiger_Record_Model::getJsignDetails() in /home/mysite/public_html/crm/cache/templates_c/basic/e2549a66197684cedb5de36a611b87cefbe2ae9c_0.file.JsignDetailView.tpl.php:27 Stack trace:
0 /home/mysite/public_html/crm/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(128): content_5991a408a8d105_65482006(Object(Smarty_Internal_Template))
1 /home/mysite/public_html/crm/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(172): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
2 /home/mysite/public_html/crm/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(206): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
3 /home/mysite/public_html/crm/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(372): Smarty_Internal_Template->render()
4 /home/mysite/public_html/crm/cache/templates_c/basic/67c73e333f79b8d14c83b09c844e1578ec132a80_0 in /home/mysite/public_html/crm/cache/templates_c/basic/e2549a66197684cedb5de36a611b87cefbe2ae9c_0.file.JsignDetailView.tpl.php on line 27
[14-Aug-2017 19:28:06 Europe/London] PHP Warning: Declaration of Vtiger_Jsign_UIType::getDisplayValue($value) should be compatible with Vtiger_Base_UIType::getDisplayValue($value, $record = false, $recordInstance = false, $rawText = false) in /home/mysite/public_html/crm/modules/Vtiger/uitypes/Jsign.php on line 32 [14-Aug-2017 20:22:10 Europe/London] PHP Parse error: syntax error, unexpected 'protected' (T_PROTECTED) in /home/mysite/public_html/crm/modules/Vtiger/actions/Save.php on line 221 ` The line at 221 (in save.php) is:
protected function getRecordModelFromRequest(\App\Request $request)
With my added code none of the modules save anymore, I get error 500, if I take it out it works, so it is obviously something in my code that needs changing. I noticed you have replaced 'vtiger' with 'App' could this be my problem?
Any guidance would be most appreciated
Kind regards