I wanted to increase the amount of voice menus a tenant has but receive this error:
Server returned error code = -1
Error in 'execute' when updating table 'tenants': Cannot add or update a child row: a foreign key constraint fails (`pbxconf`.`tenants`, CONSTRAINT `tenants_ibfk_1` FOREIGN KEY (`primary_locationid`) REFERENCES `locations` (`id`))
There is an error if I change any of the limits for the one tenant. They are tenant 21.
-Matt
We got the same problem with
We got the same problem with new created tenants.
It can take from several minites up to 2 days for the error to disappear.
for extra info we run a drbd cluster.
Same error for newly created
Same error for newly created tenants...
I ran MySQL traces on things to determine exactly what is causing the problem so Thirdlane can resolve the issue. It does not make sense exactly why it fixes itself based on cleartalk's feedback, but...
For whatever reason the "primary_locationid" and "secondary_locationid" fields that are probably hidden fields in the edit tenant GUI screen are not properly getting pulled from the database on newly created tenants. The correct values exist in the MySQL database tenants table, but when "save" is clicked on the edit tenant screen for new tenants, the MySQL statement that is executed attempts to change these values from "1" to "NULL".
As only an option for "1" is in the location table by default, this breaks a constraint configure on the table and the error is thrown.
Why this suddenly starts working after a few hours or days I have absolutely no idea. The only thing I can think of is that the select query to retrieve these values somehow relies on the date created time in some manner.
TL knows about this issue and
TL knows about this issue and will address it in the next release which i'm told is very soon.
I only run yum updates when TL releases come out. When this issue popped up for me I went ahead an ran it and there were a couple of TL updates along with the centos updates and it fixed it so far.
Did a yum update overnight.
Did a yum update overnight. I did not see any new Thirdlane updates pushed to the server.
Same problem exists on new tenants created yesterday.
Still waiting to see if "cleartalk"'s comment of the problem disappearing on its own after a couple days comes to fruition or whether he performs some other unknown action on his new tenants that makes the problem disappear..
Here is a screenshot