Ad Widget

Collapse

ERROR when adding a host to a template. Please help quickly!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • waardd
    Member
    • Aug 2014
    • 82

    #1

    ERROR when adding a host to a template. Please help quickly!!

    When we try to add a host to one of our templates i get the following error:

    Error in query [INSERT INTO application_template (applicationid,templateid,application_templateid) VALUES ('1374','1774','1878')] [Duplicate entry '1878' for key 'PRIMARY']
    SQL statement execution has failed "INSERT INTO application_template (applicationid,templateid,application_templateid) VALUES ('1374','1774','1878')". [templates.php:256 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CTemplate->update() → CTemplate->massUpdate() → CTemplate->massAdd() → CHostGeneral->link() → CApplicationManager->link() → CApplicationManager->inherit() → CApplicationManager->save() → CApplicationManager->update() → DB::replace() → DB::save() → DB::insert() → DB::exception() in include/classes/db/DB.php:441]
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    Originally posted by waardd
    When we try to add a host to one of our templates i get the following error:

    Error in query [INSERT INTO application_template (applicationid,templateid,application_templateid) VALUES ('1374','1774','1878')] [Duplicate entry '1878' for key 'PRIMARY']
    SQL statement execution has failed "INSERT INTO application_template (applicationid,templateid,application_templateid) VALUES ('1374','1774','1878')". [templates.php:256 → CFrontendApiWrapper->update() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CTemplate->update() → CTemplate->massUpdate() → CTemplate->massAdd() → CHostGeneral->link() → CApplicationManager->link() → CApplicationManager->inherit() → CApplicationManager->save() → CApplicationManager->update() → DB::replace() → DB::save() → DB::insert() → DB::exception() in include/classes/db/DB.php:441]
    if you go to the host itself - and try to add the template what error does it gives you ?
    in the GUI

    maybe a duplicate item ?

    Comment

    • waardd
      Member
      • Aug 2014
      • 82

      #3
      When we made a new template and copied (by hand) the items and then set them to the hosts all went well....

      How can we prevent this in the future?

      Comment

      • batchenr
        Senior Member
        • Sep 2016
        • 440

        #4
        Originally posted by waardd
        When we made a new template and copied (by hand) the items and then set them to the hosts all went well....

        How can we prevent this in the future?
        first of all did it worked for you ?
        second- what was the gui error ? not mysql

        Comment

        Working...