So re: this thread, I’ve done some more research and the snippet from the above referenced file seems to relate to this.
Any ideas why restoring my settings might cause a problem for this function?
What I’d really like to do is ‘reset’ FreePBX without reinstalling but I gather this is not possible?
Thanks
function core_hint_get($account){
global $astman;
static $hintCache;
if (isset($hintCache[$account])) {
return $hintCache[$account];
}
$chan_dahdi = ast_with_dahdi();
// We should always check the AMPUSER in case they logged into a device
// but we will fall back to the old methond if $astman not open although
// I'm pretty sure everything else will puke anyhow if not running
//
if ($astman) {
$device=$astman->database_get("AMPUSER",$account."/device");
$device_arr = explode('&',$device);
$sql = "SELECT dial, hint_override from devices where id in ('".implode("','",$device_arr)."')";
} else {
$sql = "SELECT dial, hint_override from devices where user = '{$account}'";
}
$results = sql($sql,"getAll",DB_FETCHMODE_ASSOC);
//create an array of strings
if (is_array($results)){
foreach ($results as $result) {
$hint = !empty($result['hint_override']) ? $result['hint_override'] : $result['dial'];
if ($chan_dahdi) {
$dial[] = str_replace('ZAP', 'DAHDI', $hint);
} else {
$dial[] = $hint;
}
}
}
//create a string with & delimiter
if (isset($dial) && is_array($dial)){
$hint = implode($dial,"&");
} else {
if (isset($results[0]['dial'])) {
$hint = $results[0]['dial'];
} else {
$hint = null;
}
}
$hintCache[$account] = $hint;
return $hint;
}
If I delete ALL extensions I can get it to reload. If I try to recreate an extension I get the following error:
EDIT Think I sorted it. I rolled back Core a few versions, reinstated the backup, THEN upgraded Core.
I still think the backup that was taken of my system wasn’t a brilliant one - or there were difficulties instating it - there were quite a few gremlins I had to find. e.g. mysterious additional empty destinations on an IVR that were causing errors until deleted.
The error is pretty clear. It can’t insert the device data because the column ‘hint_override’ isn’t found. Where version where you on, what version did you roll back to, what version did you upgrade to after the roll back?
Yes I agree THAT error is pretty clear but I had to delete lots of settings in stages and attempt a reload after each one. THEN I had to attempt creating a new extension. Only then do you get the clear error. It seems FreePBX is SUPER fussy about versions. I gather they’re fixing this in version 15?
I’ve just noticed more settings which either weren’t backed up or can’t be restored. This time it’s a custom destination. Looks like I have my work cut out for me this morning!
Thanks Tom.
Sorry Tom, I’ll reply with the info when I’m back at the machine in question. Have been at work all day and wrote my previous from work.
Just to be clear, I am now able to reload
Similar error from System Recordings module when trying to add a recording, one which I can probably also resolve by rolling back to 13.0.30.6 (at a wild guess) and then rolling forward to 13.0.30.13
Am just wondering if my system is now going to be plagued forevermore by such gremlins! @mmishra I’m guessing that the effort is going into FreePBX 15’s backup/restore module rather than FreePBX 14’s at this point?
Thanks
Hi PitzKey - I used the RasPBX image. No doubt that was stupid. However, my system is fully up to date and there are no warnings or errors showing in the dash or “module admin” or anywhere like that.
I got the errors from restoring from a backup. I suspect my backup was made on a FreePBX where a few of the modules were a couple of versions behind what is now current, perhaps, and then when I restored from the backup I got a lot of moaning from the system about missing database columns etc. I think the FreePBX team are aware of the issues with the backup/restore in 14, hence prioritising it for 15.
At the moment I (think) I’ve resolved my outstanding issues my performing selective roll backs and upgrades when issues crop up.