{"action":"created","issue":{"url":"https://api.github.com/repos/tuxis-ie/nsedit/issues/100","repository_url":"https://api.github.com/repos/tuxis-ie/nsedit","labels_url":"https://api.github.com/repos/tuxis-ie/nsedit/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/tuxis-ie/nsedit/issues/100/comments","events_url":"https://api.github.com/repos/tuxis-ie/nsedit/issues/100/events","html_url":"https://github.com/tuxis-ie/nsedit/issues/100","id":170255470,"number":100,"title":"\"An error occured while communicating to the server.\" when clicking existing zones on new nsedit install","user":{"login":"damianharouff","id":2953243,"avatar_url":"https://avatars.githubusercontent.com/u/2953243?v=3","gravatar_id":"","url":"https://api.github.com/users/damianharouff","html_url":"https://github.com/damianharouff","followers_url":"https://api.github.com/users/damianharouff/followers","following_url":"https://api.github.com/users/damianharouff/following{/other_user}","gists_url":"https://api.github.com/users/damianharouff/gists{/gist_id}","starred_url":"https://api.github.com/users/damianharouff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianharouff/subscriptions","organizations_url":"https://api.github.com/users/damianharouff/orgs","repos_url":"https://api.github.com/users/damianharouff/repos","events_url":"https://api.github.com/users/damianharouff/events{/privacy}","received_events_url":"https://api.github.com/users/damianharouff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-09T19:54:20Z","updated_at":"2016-08-09T20:49:28Z","closed_at":null,"body":"I've recently upgraded an old existing PowerDNS installation to PowerDNS 4, and am replacing Poweradmin with nsedit.\r\n\r\nI've got everything working in terms of being able to log in and view a list of zones, however, when I click on **_some_** zones, it returns \"An error occurred while communicating to the server\":\r\n![ededazs1-049299fe95a2d195c2e4cd940e089a70](https://cloud.githubusercontent.com/assets/2953243/17531159/90276ebe-5e2f-11e6-9168-ec4e6678870f.png)\r\n\r\n\r\nEvery time I click on one of these zones that return the \"An error...\" message, I see the following in the HTTP server error log:\r\n\r\n`[Tue Aug 09 14:33:06.792372 2016] [:error] [pid 13398] [client x.x.x.x:41590] PHP Fatal error:  Call to undefined function Exception() in /var/www/html/nsedit/includes/class/Zone.php on line 243, referer: http://ns1.redacted.com/nsedit/index.php\r\n[Tue Aug 09 14:33:18.933587 2016] [:error] [pid 17214] [client x.x.x.x:41600] PHP Fatal error:  Call to undefined function Exception() in /var/www/html/nsedit/includes/class/Zone.php on line 243, referer: http://ns1.redacted.com/nsedit/index.php\r\n[Tue Aug 09 14:33:26.489658 2016] [:error] [pid 17287] [client x.x.x.x:41602] PHP Fatal error:  Call to undefined function Exception() in /var/www/html/nsedit/includes/class/Zone.php on line 243, referer: http://ns1.redacted.com/nsedit/index.php\r\n[Tue Aug 09 14:34:35.041491 2016] [:error] [pid 13420] [client x.x.x.x:41632] PHP Fatal error:  Call to undefined function Exception() in /var/www/html/nsedit/includes/class/Zone.php on line 243, referer: http://ns1.redacted.com/nsedit/index.php\r\n[Tue Aug 09 14:35:03.377555 2016] [:error] [pid 13398] [client x.x.x.x:41642] PHP Fatal error:  Call to undefined function Exception() in /var/www/html/nsedit/includes/class/Zone.php on line 243, referer: http://ns1.redacted.com/nsedit/index.php\r\n[Tue Aug 09 14:35:24.824011 2016] [:error] [pid 13444] [client x.x.x.x:41644] PHP Fatal error:  Call to undefined function Exception() in /var/www/html/nsedit/includes/class/Zone.php on line 243, referer: http://ns1.redacted.com/nsedit/index.php\r\n`\r\n\r\nOK so if we take a look at line 243 I see that it's part of this block of code:\r\n public function addRecord($content, $disabled = FALSE, $setptr = FALSE) {\r\n        foreach ($this->records as $record) {\r\n            if ($record->content == $content) {\r\n                throw Exception(\"Record already exists\");\r\n            }\r\n        }\r\n        $record = new Record($content, $disabled, $setptr);\r\n        array_push($this->records, $record);\r\n    }\r\n\r\n\r\nLine 243 is \"throw Exception\"... alright, I can see that this needs to be \"throw new Exception....\". I fix this, and now I get the following notice:\r\n![c4kp7nk6-e6f143d47283c06337e9842b3124924f](https://cloud.githubusercontent.com/assets/2953243/17531343/4e295918-5e30-11e6-94c3-93656c7375e1.png)\r\n\r\nI'd like to reiterate that this is an existing zone with data already in it, and it seems to affect only some of the zones. Other zones seem to work without issue.\r\n\r\nLet me know what more data I can provide to help troubleshoot. \r\n"},"comment":{"url":"https://api.github.com/repos/tuxis-ie/nsedit/issues/comments/238686592","html_url":"https://github.com/tuxis-ie/nsedit/issues/100#issuecomment-238686592","issue_url":"https://api.github.com/repos/tuxis-ie/nsedit/issues/100","id":238686592,"user":{"login":"damianharouff","id":2953243,"avatar_url":"https://avatars.githubusercontent.com/u/2953243?v=3","gravatar_id":"","url":"https://api.github.com/users/damianharouff","html_url":"https://github.com/damianharouff","followers_url":"https://api.github.com/users/damianharouff/followers","following_url":"https://api.github.com/users/damianharouff/following{/other_user}","gists_url":"https://api.github.com/users/damianharouff/gists{/gist_id}","starred_url":"https://api.github.com/users/damianharouff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianharouff/subscriptions","organizations_url":"https://api.github.com/users/damianharouff/orgs","repos_url":"https://api.github.com/users/damianharouff/repos","events_url":"https://api.github.com/users/damianharouff/events{/privacy}","received_events_url":"https://api.github.com/users/damianharouff/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T20:49:28Z","updated_at":"2016-08-09T20:49:28Z","body":"Yes, that does seem to be the issue... I deleted duplicates and it seems to load now. I appreciate the pointer on that. "}}
{"actor":{"display_login":"damianharouff"}}