tomolimo / processmaker

GLPI plugin that provides an interface with ProcessMaker (http://www.processmaker.com/)
30 stars 11 forks source link

Facing issues while running pmusers automatic action script #66

Closed vikijha closed 6 years ago

vikijha commented 6 years ago

Fatal error: Call to a member function login() on null in processmaker.class.php on line 1153

tomolimo commented 6 years ago

Hello @vikijha Could you copy/paste your Processmaker plugin configuration? And give version of plugin and version of GLPI? It looks like plugin is not initialized correctly. Thank you regards, Tomolimo

vikijha commented 6 years ago

correct I did config changes and now its showing following error

PHP Notice: Undefined index: pm_users_id in /Applications/XAMPP/xamppfiles/htdocs/glpi-9.2/plugins/processmaker/inc/processmaker.class.php at line 215 PHP Notice: Undefined index: pm_users_id in /Applications/XAMPP/xamppfiles/htdocs/glpi-9.2/plugins/processmaker/inc/processmaker.class.php at line 216

Fatal error: Cannot redeclare plugin_init_processmaker() (previously declared in /Applications/XAMPP/xamppfiles/htdocs/glpi-9.2/plugins/processmaker/setup.php:6) in /Applications/XAMPP/xamppfiles/htdocs/glpi-9.2/plugins/Processmaker/setup.php on line 120

image
tomolimo commented 6 years ago

Hello @vikijha

I think that you have a problem with the ProcessMaker server configuration itself. Are you using the server I've provided? See: https://github.com/tomolimo/processmaker/wiki/Introduction

This plugin is dedicated to provide a process management linked to tickets. This goal is achieved using a customized ProcessMaker server (https://github.com/tomolimo/processmaker-server).

Could copy/paste the configuration screen shots of the ProcessMaker server configuration? See: https://github.com/tomolimo/processmaker-server/wiki/ProcessMaker-server-configuration-check

Thank you Regards, Tomolimo

vikijha commented 6 years ago

Yes let me download updated one i merged your yesterday code. Let me download full code.

tomolimo commented 6 years ago

???

tomolimo commented 6 years ago

Which version of ProcessMaker server did you use?

vikijha commented 6 years ago
image
vikijha commented 6 years ago
image image image
tomolimo commented 6 years ago

Thank you Do you still have the issue?

vikijha commented 6 years ago

yes still I am not able to execute pmusers script

tomolimo commented 6 years ago

Could you copy/paste the ProcessMaker server PHP error logs? To find this file, you have to look at the php_config() results: see https://github.com/tomolimo/processmaker-server/wiki/ProcessMaker-server-configuration-check#php-information

vikijha commented 6 years ago

in process maker I am not finding any error but in glpi following message is appearing

2018-07-05 09:09:49 [2@vikass-MacBook-Pro.local] *** PHP Notice(8): Undefined index: pm_users_id Backtrace : ...ins/processmaker/inc/processmaker.class.php:216 plugins/processmaker/hook.php:382 PluginProcessmakerProcessmaker->login() : plugin_processmaker_post_init() inc/plugin.class.php:1272 call_user_func() inc/includes.php:123 Plugin::doHook() front/crontask.form.php:37 include() 2018-07-05 09:09:50 [2@vikass-MacBook-Pro.local] From PluginProcessmakerProcessmaker::login() in /Applications/XAMPP/xamppfiles/htdocs/glpi-9.2/plugins/processmaker/inc/processmaker.class.php line 234 Processmaker Plugin: - Soap problem: stdClass Object ( [status_code] => 3 [message] => User not registered! [version] => 2.0 [timestamp] => 2018-07-05 05:09:50 )

vikijha commented 6 years ago

processmaker.class.php - there is line which is commented 1152 . I uncommented this and working fine

// start a processmaker session 1152 $PM_SOAP = new PluginProcessmakerProcessmaker(); 1153 if (!$PM_SOAP->login( true )) { 1154 $task->log( "Error PM: '".print_r($PM_SOAP->lasterror, true)."'" ); 1155 return -1; 1156 }

tomolimo commented 6 years ago

Ok I understand the issue... By default I try to login the current GLPI user, but if the current user is not in glpi_plugin_processmaker_users table then login crashes and when in a cron, there is no current user...

tomolimo commented 6 years ago

Thank you for you post-back. I believe there is a side effect between login and post_init which tries to log current user... Thank you for your feedback, I'll check this in details.

vikijha commented 6 years ago

when I am attaching process to ticket getting following error

image
tomolimo commented 6 years ago

In your profile setting, you should check the rights to view the cases

tomolimo commented 6 years ago

image

vikijha commented 6 years ago

Getting following error when attaching process in ticket

image
tomolimo commented 6 years ago

I advise you to change the default session timeout and set it to 10hours, or at least to the same value than for GLPI image

tomolimo commented 6 years ago

to workaround this: logout from GLPI and login again

tomolimo commented 6 years ago

Any news? or workaround for this issue?

vikijha commented 6 years ago

Hi Tomolimo ,

Sorry I was out yes issues resolved but setting cookie parameter 👍