YetiForceCompany / YetiForce

One of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
4 stars 3 forks source link

[YF 7.0.2] Error while moving calendar events in graphical mode #61

Open andrelouca69 opened 4 days ago

andrelouca69 commented 4 days ago

šŸž bug report

Error while moving event on Calendar (graphic mode)

šŸ”„ How to trigger the error

Move the event from one day to another in graphic mode

šŸ‘Ž Actual Behavior

While moving calendar events to another date/time in graphic mode with mouse drag is show's the following error: "You do not have permission to modify Calendar entries".

āœļø Resolution process

I saw a post that recommended to change line 207 of file "modules/com_vtiger_workflow/WorkFlow.php" from: if ('' == $this->test) { return true; } return $this->conditionStrategy->evaluate($this->test, $recordModel);

to

return '' == $this->test ? true : false; return $this->conditionStrategy->evaluate($this->test, $recordModel);

It solved the calendar problem but it caused workflows to stop working. So it's a non-solution.

ā‰ļø Complete error message

E_WARNING: Undefined variable $value in /modules/com_vtiger_workflow/VTJsonCondition.php, line 336

0 modules/com_vtiger_workflow/VTJsonCondition.php:37 >> VTJsonCondition->checkCondition(,[subject,does not contain,,rawtext,,and,1])

1 modules/com_vtiger_workflow/Workflow.php:211 >> VTJsonCondition->evaluate('[{"fieldname":"sendnotification","operation":"is","value":"1","valuetype":"rawtext","joincondition":"","groupjoin":"and","groupid":0},{"fieldname":"subject","operation":"does not contain","value":"","valuetype":"rawtext","joincondition":"","groupjoin":"and","groupid":"1"}]')

2 modules/Vtiger/handlers/Workflow.php:129 >> Workflow->evaluate(,577569)

3 modules/Vtiger/handlers/Workflow.php:58 >> Vtiger_Workflow_Handler->performTasks(,[1,2,3,4])

4 app/EventHandler.php:544 >> Vtiger_Workflow_Handler->entityAfterSave(,[3,EntityAfterSave,Vtiger_Workflow_Handler,1,,,5,0,0])

5 app/EventHandler.php:520 >> App\EventHandler->triggerHandler([3,EntityAfterSave,Vtiger_Workflow_Handler,1,,,5,0,0])

6 modules/Vtiger/models/Record.php:570 >> App\EventHandler->trigger('EntityAfterSave')

7 modules/Calendar/models/Calendar.php:279 >> Vtiger_Record_Model->save()

8 modules/Vtiger/actions/Calendar.php:129 >> Calendar_Calendar_Model->updateEvent(577569)

9 app/Controller/ExposeMethod.php:68 >> Vtiger_Calendar_Action->updateEvent()

10 app/Controller/ExposeMethod.php:81 >> Vtiger_Calendar_Action->invokeExposedMethod('updateEvent')

11 include/main/WebUI.php:161 >> Vtiger_Calendar_Action->process()

12 index.php:26 >> Vtiger_WebUI->process()

13 public_html/index.php:13 >> require('index.php')

E_WARNING: Undefined variable $value in /modules/com_vtiger_workflow/VTJsonCondition.php, line 339

0 modules/com_vtiger_workflow/VTJsonCondition.php:37 >> VTJsonCondition->checkCondition(,[subject,does not contain,,rawtext,,and,1])

1 modules/com_vtiger_workflow/Workflow.php:211 >> VTJsonCondition->evaluate('[{"fieldname":"sendnotification","operation":"is","value":"1","valuetype":"rawtext","joincondition":"","groupjoin":"and","groupid":0},{"fieldname":"subject","operation":"does not contain","value":"","valuetype":"rawtext","joincondition":"","groupjoin":"and","groupid":"1"}]')

2 modules/Vtiger/handlers/Workflow.php:129 >> Workflow->evaluate(,577569)

3 modules/Vtiger/handlers/Workflow.php:58 >> Vtiger_Workflow_Handler->performTasks(,[1,2,3,4])

4 app/EventHandler.php:544 >> Vtiger_Workflow_Handler->entityAfterSave(,[3,EntityAfterSave,Vtiger_Workflow_Handler,1,,,5,0,0])

5 app/EventHandler.php:520 >> App\EventHandler->triggerHandler([3,EntityAfterSave,Vtiger_Workflow_Handler,1,,,5,0,0])

6 modules/Vtiger/models/Record.php:570 >> App\EventHandler->trigger('EntityAfterSave')

7 modules/Calendar/models/Calendar.php:279 >> Vtiger_Record_Model->save()

8 modules/Vtiger/actions/Calendar.php:129 >> Calendar_Calendar_Model->updateEvent(577569)

9 app/Controller/ExposeMethod.php:68 >> Vtiger_Calendar_Action->updateEvent()

10 app/Controller/ExposeMethod.php:81 >> Vtiger_Calendar_Action->invokeExposedMethod('updateEvent')

11 include/main/WebUI.php:161 >> Vtiger_Calendar_Action->process()

12 index.php:26 >> Vtiger_WebUI->process()

13 public_html/index.php:13 >> require('index.php')

: strpos(): Passing null to parameter #2 ($needle) of type string is deprecated in /modules/com_vtiger_workflow/VTJsonCondition.php, line 339

0 modules/com_vtiger_workflow/VTJsonCondition.php:339 >> strpos('teste',NULL)

1 modules/com_vtiger_workflow/VTJsonCondition.php:37 >> VTJsonCondition->checkCondition(,[subject,does not contain,,rawtext,,and,1])

2 modules/com_vtiger_workflow/Workflow.php:211 >> VTJsonCondition->evaluate('[{"fieldname":"sendnotification","operation":"is","value":"1","valuetype":"rawtext","joincondition":"","groupjoin":"and","groupid":0},{"fieldname":"subject","operation":"does not contain","value":"","valuetype":"rawtext","joincondition":"","groupjoin":"and","groupid":"1"}]')

3 modules/Vtiger/handlers/Workflow.php:129 >> Workflow->evaluate(,577569)

4 modules/Vtiger/handlers/Workflow.php:58 >> Vtiger_Workflow_Handler->performTasks(,[1,2,3,4])

5 app/EventHandler.php:544 >> Vtiger_Workflow_Handler->entityAfterSave(,[3,EntityAfterSave,Vtiger_Workflow_Handler,1,,,5,0,0])

6 app/EventHandler.php:520 >> App\EventHandler->triggerHandler([3,EntityAfterSave,Vtiger_Workflow_Handler,1,,,5,0,0])

7 modules/Vtiger/models/Record.php:570 >> App\EventHandler->trigger('EntityAfterSave')

8 modules/Calendar/models/Calendar.php:279 >> Vtiger_Record_Model->save()

9 modules/Vtiger/actions/Calendar.php:129 >> Calendar_Calendar_Model->updateEvent(577569)

10 app/Controller/ExposeMethod.php:68 >> Vtiger_Calendar_Action->updateEvent()

11 app/Controller/ExposeMethod.php:81 >> Vtiger_Calendar_Action->invokeExposedMethod('updateEvent')

12 include/main/WebUI.php:161 >> Vtiger_Calendar_Action->process()

13 index.php:26 >> Vtiger_WebUI->process()

14 public_html/index.php:13 >> require('index.php')