pluginsGLPI / geninventorynumber

Inventorynumber generation
GNU General Public License v3.0
8 stars 14 forks source link

Inventory numbers not generating #59

Closed AD-cp closed 2 years ago

AD-cp commented 2 years ago

Hi, Just updated to 2.8.0 and I can't generate any numbers , it stays like that : MON_<#######> Even when you click on regenerate and ovveride , it does it but the Inventory number isn't generating.

cconard96 commented 2 years ago

Do you have anything in the GLPI logs (files/_log/php-errors.log and files/_log/sql-errors,log) from around the time it tried generating numbers?

AD-cp commented 2 years ago

I just tried to generate and here's the log in php-errors.log

[2022-06-23 14:22:54] glpiphplog.WARNING: *** PHP Warning (2): Invalid argument supplied for foreach() in /var/www/html/glpi/src/Html.php at line 6602 Backtrace : ajax/fuzzysearch.php:43 Html::fuzzySearch()

I had it with the plugin disabled and regenerating it changed it to MON_<#######> once more.

kabassanov commented 2 years ago

Hi AD-cp,

What version did you use before?

AD-cp commented 2 years ago

Hi kabassanov, it was working alright with glpi 9.7.5 and the plugin in 2.5.0

kabassanov commented 2 years ago

OK, I know what the problem is... There was a code modification in 2.6.0 that dropped this. I've just discovered it also. I know the right place to modify. Just need to do it :)

kabassanov commented 2 years ago

I've just made a pull request for this. #60

AD-cp commented 2 years ago

I've just made a pull request for this. #60

Just updated the code on my install from your pull request , seems like it works, thanks ! :)

kabassanov commented 2 years ago

I replaced suffixPosition variable name by maskPosition...

cedric-anne commented 2 years ago

Fixed by #60