{"action":"closed","issue":{"url":"https://api.github.com/repos/Mashape/kong/issues/1041","repository_url":"https://api.github.com/repos/Mashape/kong","labels_url":"https://api.github.com/repos/Mashape/kong/issues/1041/labels{/name}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/1041/comments","events_url":"https://api.github.com/repos/Mashape/kong/issues/1041/events","html_url":"https://github.com/Mashape/kong/issues/1041","id":138355411,"number":1041,"title":"plugin enabled table merge error in version 0.7.0","user":{"login":"hou-xn","id":17630210,"avatar_url":"https://avatars.githubusercontent.com/u/17630210?v=3","gravatar_id":"","url":"https://api.github.com/users/hou-xn","html_url":"https://github.com/hou-xn","followers_url":"https://api.github.com/users/hou-xn/followers","following_url":"https://api.github.com/users/hou-xn/following{/other_user}","gists_url":"https://api.github.com/users/hou-xn/gists{/gist_id}","starred_url":"https://api.github.com/users/hou-xn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hou-xn/subscriptions","organizations_url":"https://api.github.com/users/hou-xn/orgs","repos_url":"https://api.github.com/users/hou-xn/repos","events_url":"https://api.github.com/users/hou-xn/events{/privacy}","received_events_url":"https://api.github.com/users/hou-xn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mashape/kong/labels/task/bug","name":"task/bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"thefosk","id":964813,"avatar_url":"https://avatars.githubusercontent.com/u/964813?v=3","gravatar_id":"","url":"https://api.github.com/users/thefosk","html_url":"https://github.com/thefosk","followers_url":"https://api.github.com/users/thefosk/followers","following_url":"https://api.github.com/users/thefosk/following{/other_user}","gists_url":"https://api.github.com/users/thefosk/gists{/gist_id}","starred_url":"https://api.github.com/users/thefosk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefosk/subscriptions","organizations_url":"https://api.github.com/users/thefosk/orgs","repos_url":"https://api.github.com/users/thefosk/repos","events_url":"https://api.github.com/users/thefosk/events{/privacy}","received_events_url":"https://api.github.com/users/thefosk/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-03-04T02:14:15Z","updated_at":"2016-03-09T05:23:43Z","closed_at":"2016-03-09T05:23:43Z","body":"Hi\r\nI found a bug in kong 0.7.0 when I add some custom plugins to kong.yml.\r\nwhen I use management api to get the plugins list  (http://localhost:8001/plugins/enabled)\r\nI found the plugin names on the top of the list which should be the exist plugins are overwritten by the custom plugin names.\r\n\r\nPerhaps it because the code below (kong/tools/config_loader.lua   row 185) \r\nconfig.plugins = utils.table_merge(constants.PLUGINS_AVAILABLE, config.custom_plugins)\r\n\r\nWhen merge the two tables (key=index ,value=plugin name) with util.table_merge, the second table will  use the same index key to overwrite the first table's value but not append itself because they have the same key.   "}}