pluginsGLPI / order

Order plugin for GLPI
GNU General Public License v3.0
39 stars 44 forks source link

The template cannot be used #323

Closed r0bertk closed 2 years ago

r0bertk commented 2 years ago

The template cannot be used. After saving an error appears: Uncaught Exception Error: Call to undefined method PluginOrderOrder :: clone () in /var/www/glpi/src/CommonDBTM.php at line 1224

php-errorr.log: [2022-06-03 10:34:02] glpiphplog.CRITICAL: *** Uncaught Exception Error: Call to undefined method PluginOrderOrder::clone() in /var/www/glpi/src/CommonDBTM.php at line 1224 Backtrace : marketplace/order/front/order.form.php:52 CommonDBTM->add()

r0bertk commented 2 years ago

Hello, following this solution: https://github.com/glpi-project/glpi/pull/11264/files the problem is probably fixed. I added at the beginning marketplace/order/inc/order.class.php : use Glpi\Features\Clonable;

next add to class: class PluginOrderOrder extends CommonDBTM { use Clonable;

and finally added: public function getCloneRelations(): array { return []; } }

Regards

cconard96 commented 2 years ago

Hello @r0bertk, Could you open a pull request with this change so it can be fixed in a future release?

r0bertk commented 2 years ago

Sorry but i don't know how to make pull request this issues