You are not logged in.
HI,
When trying to import the XML file of the rules from another server to the test server, the xml exported is showing.
In debugging mode, it is showing error:-
"Uncaught Exception RuntimeException: Empty IN are not allowed in /var/www/html/glpi/src/DBmysqlIterator.php at line 588"
My server is 10.0.6 updated from 10.0.5 recently.
Is this a bug or any rights issue?
Offline
Please provide the complete error stack trace from the "files/_log/php-errors.log" file.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hi,
Thank you for that reply. Here is the error shown in the php log file.
[2023-06-16 15:16:19] glpiphplog.CRITICAL: *** Uncaught Exception RuntimeException: Empty IN are not allowed in /var/www/html/glpi/src/DBmysqlIterator.php at line 588
Backtrace :
src/DBmysqlIterator.php:559 DBmysqlIterator->analyseCriterion()
src/DBmysqlIterator.php:314 DBmysqlIterator->analyseCrit()
src/DBmysqlIterator.php:111 DBmysqlIterator->buildQuery()
src/DBmysql.php:1056 DBmysqlIterator->execute()
src/CommonDBTM.php:577 DBmysql->request()
src/RuleCollection.php:1242 CommonDBTM->find()
front/rule.backup.php:61 RuleCollection::previewImportRules()
Offline
It seems like one or more pattern properties for criteria are invalid and look like empty arrays when processed by GLPI.
I don't know if there is an issue with the rule(s) themselves or the way GLPI exported it though.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Actually, the rules are been exported from another server which is our production server. The production server 10.0.6 has been updated recently. In this server, the rules for authorization and others are working fine.
Before upgrading to 10.0.6 I had exported the rule to our test server. It was working fine at that time. The error happened only after the upgradation.
Offline
I will share the XML if you want to...
Offline
Hi,
As you have told I have checked the rules one by one and found errors while importing one rule in "Authorizations assignment rules". But I couldn't understand why it is causing the error. I am sharing the XML of that file.
<?xml version="1.0"?>
<rules><rule><entities_id>Root Entity</entities_id><sub_type>RuleRight</sub_type><ranking>82</ranking><name>Entity assignment rules-Editorial xxxxx </name><description>xxxxxx Editorial office</description><match>AND</match><is_active>1</is_active><comment>Assign the entity xxxxxx for the users</comment><is_recursive>0</is_recursive><uuid>e346c578-e509fb39-648a89e6ac77b1.78018908</uuid><condition>0</condition><date_creation>2023-06-15 09:17:50</date_creation><rulecriteria><criteria>LDAP_SERVER</criteria><condition>0</condition><pattern>xxxxx.COM</pattern></rulecriteria><rulecriteria><criteria>dn</criteria><condition>5</condition><pattern>OU=Editorial Daily,OU=Head Office,OU=xxxxxx,DC=MPP,DC=COM</pattern></rulecriteria><ruleaction><action_type>assign</action_type><field>entities_id</field><value>Root Entity &#62; xxxxx_xxxx &#62; xxxxxx &#62; Headoffice &#62; Editorial_Headoffice</value></ruleaction><ruleaction><action_type>assign</action_type><field>_entities_id_default</field><value>Root Entity &#62; xxx_xxxx &#62; xxxxxxx &#62; Headoffice &#62; Editorial_Headoffice</value></ruleaction><ruleaction><action_type>assign</action_type><field>specific_groups_id</field><value></value></ruleaction><ruleaction><action_type>assign</action_type><field>groups_id</field><value>xxxx_Editorial department</value></ruleaction></rule></rules>
Offline
Sorry, I forgot to link the pull request I made for a possible fix after it was approved.
You can find a possible fix here:
https://github.com/glpi-project/glpi/pull/14946
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Thank you for that reply. I have tested. But I am another error saying that action was refused for the rule. This was the same rule for which I got the error.
The action was refused for the Field - group, Action -Assign
Offline