KevinTheJedi
Hello Kevin, thanks for the response:
in the apache2 error.log when I try to edit the template this error shows up:
[Thu Aug 29 10:02:57.075274 2019] [:error] [pid 7840] [client xxx.xx.210.179:61997] PHP Fatal error: Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 2 matching objects. in /var/www/html/include/class.orm.php:1355\nStack trace:\n#0 /var/www/html/include/class.orm.php(606): QuerySet->one()\n#1 /var/www/html/include/class.company.php(65): VerySimpleModel::lookup(Array)\n#2 /var/www/html/include/class.variable.php(183): Company::getVarScope()\n#3 /var/www/html/include/class.variable.php(292): VariableReplacer::compileScope(Array)\n#4 /var/www/html/include/class.template.php(586): VariableReplacer::getContextForRoot('message.autores...')\n#5 /var/www/html/include/staff/tpl.inc.php(106): EmailTemplate->getInvalidVariableUsage()\n#6 /var/www/html/scp/templates.php(173): require('/var/www/html/i...')\n#7 {main}\n thrown in /var/www/html/include/class.orm.php on line 1355, referer: http://xxx.xx.210.148/scp/templates.php?tpl_id=3
edit: Im looking inside the DB and the data is ok, I'll go trouble shoot the php files, but dont know the structure of the system, so any additional info will be appreciate.
edit2: I've monitored the log file while I edited and saved an another template, same kind of error
[Thu Aug 29 11:17:09.962698 2019] [:error] [pid 7306] [client xxx.xx.210.179:64465] PHP Fatal error: Uncaught ObjectNotUnique: One object was expected; however multiple objects in the database matched the query. In fact, there are 2 matching objects. in /var/www/html/include/class.orm.php:1355\nStack trace:\n#0 /var/www/html/include/class.orm.php(606): QuerySet->one()\n#1 /var/www/html/include/class.company.php(65): VerySimpleModel::lookup(Array)\n#2 /var/www/html/include/class.variable.php(183): Company::getVarScope()\n#3 /var/www/html/include/class.variable.php(292): VariableReplacer::compileScope(Array)\n#4 /var/www/html/include/class.template.php(586): VariableReplacer::getContextForRoot('ticket.autorepl...')\n#5 /var/www/html/include/staff/tpl.inc.php(106): EmailTemplate->getInvalidVariableUsage()\n#6 /var/www/html/scp/templates.php(173): require('/var/www/html/i...')\n#7 {main}\n thrown in /var/www/html/include/class.orm.php on line 1355, referer: http://xxx.xx.210.148/scp/templates.php?tpl_id=3&a=implement&code_name=ticket.autoreply
I guess is the php code doing some mess up while try to retrieve the data and sending a incomplete query. I'll continue searching through the php files, but if you could suggest where or how the code do this I appreciate.
cheers 🙂