{"action":"opened","issue":{"url":"https://api.github.com/repos/eea/eea.facetednavigation/issues/114","repository_url":"https://api.github.com/repos/eea/eea.facetednavigation","labels_url":"https://api.github.com/repos/eea/eea.facetednavigation/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/eea/eea.facetednavigation/issues/114/comments","events_url":"https://api.github.com/repos/eea/eea.facetednavigation/issues/114/events","html_url":"https://github.com/eea/eea.facetednavigation/issues/114","id":180247231,"number":114,"title":"Batch not working on Plone 5","user":{"login":"Martronic-SA","id":6492010,"avatar_url":"https://avatars.githubusercontent.com/u/6492010?v=3","gravatar_id":"","url":"https://api.github.com/users/Martronic-SA","html_url":"https://github.com/Martronic-SA","followers_url":"https://api.github.com/users/Martronic-SA/followers","following_url":"https://api.github.com/users/Martronic-SA/following{/other_user}","gists_url":"https://api.github.com/users/Martronic-SA/gists{/gist_id}","starred_url":"https://api.github.com/users/Martronic-SA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martronic-SA/subscriptions","organizations_url":"https://api.github.com/users/Martronic-SA/orgs","repos_url":"https://api.github.com/users/Martronic-SA/repos","events_url":"https://api.github.com/users/Martronic-SA/events{/privacy}","received_events_url":"https://api.github.com/users/Martronic-SA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-30T08:22:35Z","updated_at":"2016-09-30T08:22:35Z","closed_at":null,"body":"When you click on a page in batch navigation, you always get the first page.\r\nThe problem is that the request url is:\r\n@@faceted_query?b_start%5B%5D=40&version=0efb47f17f1f466fcada64f5f7925879\r\nthere is a [] just after the b_start parameter.\r\nI've found that this is coming from that part of the view.js javascript\r\n\r\n`  get: function(){\r\n    var hash = jQuery.bbq.getState();\r\n    console.debug(hash);\r\n    var query = {};\r\n    var types = [\"number\", \"boolean\", \"string\"];\r\n    jQuery.each(hash, function(key, value){\r\n      var value_type = typeof(value);\r\n      if(jQuery.inArray(value_type, types) !== -1){\r\n        value = [value];\r\n      }\r\n      query[key] = value;\r\n    });\r\n    return query;\r\n  },\r\n`\r\nThe following lines:\r\n      if(jQuery.inArray(value_type, types) !== -1){\r\n        value = [value];\r\n      }\r\nadds the [ ] around the value which is bad with b_start. I don't really understand the aim of doing that.\r\n\r\nIf you comment those three lines, the batching work as expected."}}
{"actor":{"display_login":"Martronic-SA"}}