Page 1 of 1

Problem with plugin in windows development

Posted: Wed Sep 25, 2019 9:16 am
by jemiris
Hi,

I'm facing the problem with the plugin. Whenever I make changes in the plugin it does not appear it takes more time to appear the results. I have followed this wiki page https://wiki.processmaker.com/3.0/Plugi ... r_REST_API

Note:
1. Do I need to make any configurations?
2. Could you provide me an idea?
3. While developing a custom plugin sometimes it's very hard to develop?
4. I don't know how to figure out this problem. where I'm facing the problem calling the rest API from my application

Re: Problem with plugin in windows development

Posted: Wed Sep 25, 2019 5:11 pm
by amosbatto
If your plugin contains JavaScript or HTML, you should clear the ProcessMaker cache. You also may need to clear your web browser's cache.

If you make changes in the principal PHP file that registers plugin (ex: /workflow/engine/plugins/yourPlugin.php) then you will need to deactivate and then reactivate the plugin. For changes in other PHP files, the changes should take effect immediately.

Add this setting to your env.ini file:
debug=1

Press F12 in your web browser to open the browser's debugger and go to the "Network" tab to watch the traffic.

Re: Problem with plugin in windows development

Posted: Wed Sep 25, 2019 11:37 pm
by jemiris
1. Do i need enable and disable the plugin If I change in pluigns/classes/class.pmFunctions.php also?
2. If I change single line in the pluigns/classes/class.pmFunctions.php every time i need to disable and enable ?
3. It's sometimes very hard always enable and disable the plugins. Why do we need to enable and disable every time?

Re: Problem with plugin in windows development

Posted: Thu Sep 26, 2019 9:58 pm
by amosbatto
It has been a long time since I played with plugins/classes/class.pmFunctions.php. If I recall correctly, it was necessary to disable the plugin and then re-enable it again if you change the name of a function in the file or change the parameters of a function, but it wasn't necessary to disable and enable the plugin if changing the code inside the functions.

The same rule applies for REST endpoints defined in plugins. If you change the header of a REST endpoint, then you have to disable and enable the plugin, but not if changing the code inside the functions.

ProcessMaker tries to save time by saving cached versions of HTML, JavaScript, PM Functions and REST endpoints. If ProcessMaker doesn't seem to be reading your new code, then disable and re-enable the plugin.

Re: Problem with plugin in windows development

Posted: Thu Sep 26, 2019 11:32 pm
by jemiris
Thanks for the information