{"action":"created","issue":{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3177","repository_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads","labels_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3177/labels{/name}","comments_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3177/comments","events_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3177/events","html_url":"https://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues/3177","id":58461256,"number":3177,"title":"widgets.php breaks with a large number of products","user":{"login":"itibook","id":5264935,"avatar_url":"https://avatars.githubusercontent.com/u/5264935?v=3","gravatar_id":"","url":"https://api.github.com/users/itibook","html_url":"https://github.com/itibook","followers_url":"https://api.github.com/users/itibook/followers","following_url":"https://api.github.com/users/itibook/following{/other_user}","gists_url":"https://api.github.com/users/itibook/gists{/gist_id}","starred_url":"https://api.github.com/users/itibook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itibook/subscriptions","organizations_url":"https://api.github.com/users/itibook/orgs","repos_url":"https://api.github.com/users/itibook/repos","events_url":"https://api.github.com/users/itibook/events{/privacy}","received_events_url":"https://api.github.com/users/itibook/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/labels/Has%20PR","name":"Has PR","color":"009800"},{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/labels/Needs%20Testing","name":"Needs Testing","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"cklosowski","id":1390124,"avatar_url":"https://avatars.githubusercontent.com/u/1390124?v=3","gravatar_id":"","url":"https://api.github.com/users/cklosowski","html_url":"https://github.com/cklosowski","followers_url":"https://api.github.com/users/cklosowski/followers","following_url":"https://api.github.com/users/cklosowski/following{/other_user}","gists_url":"https://api.github.com/users/cklosowski/gists{/gist_id}","starred_url":"https://api.github.com/users/cklosowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cklosowski/subscriptions","organizations_url":"https://api.github.com/users/cklosowski/orgs","repos_url":"https://api.github.com/users/cklosowski/repos","events_url":"https://api.github.com/users/cklosowski/events{/privacy}","received_events_url":"https://api.github.com/users/cklosowski/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/milestones/123","html_url":"https://github.com/easydigitaldownloads/Easy-Digital-Downloads/milestones/2.5.10","labels_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/milestones/123/labels","id":1587520,"number":123,"title":"2.5.10","description":null,"creator":{"login":"pippinsplugins","id":1034109,"avatar_url":"https://avatars.githubusercontent.com/u/1034109?v=3","gravatar_id":"","url":"https://api.github.com/users/pippinsplugins","html_url":"https://github.com/pippinsplugins","followers_url":"https://api.github.com/users/pippinsplugins/followers","following_url":"https://api.github.com/users/pippinsplugins/following{/other_user}","gists_url":"https://api.github.com/users/pippinsplugins/gists{/gist_id}","starred_url":"https://api.github.com/users/pippinsplugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pippinsplugins/subscriptions","organizations_url":"https://api.github.com/users/pippinsplugins/orgs","repos_url":"https://api.github.com/users/pippinsplugins/repos","events_url":"https://api.github.com/users/pippinsplugins/events{/privacy}","received_events_url":"https://api.github.com/users/pippinsplugins/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":15,"state":"open","created_at":"2016-02-17T03:16:15Z","updated_at":"2016-03-10T17:02:31Z","due_on":null,"closed_at":null},"comments":35,"created_at":"2015-02-21T14:34:44Z","updated_at":"2016-03-10T17:04:38Z","closed_at":null,"body":"Hello,\r\n\r\nI spent a few hours on this one, unsure if this is the wanted behaviour or not, but here's my findings...\r\n\r\nMy widgets.php was breaking right after the Download Detail widget. As soon as I unregistered the widget everything went back to normal. I also had issue on the customise.php that was not working.\r\n\r\nIn /includes/widgets.php at line 302 there's the args array for the get_posts function. \r\n\r\n\t\t$args = array( \r\n\t            'post_type'      => 'download', \r\n\t            'posts_per_page' => -1, \r\n\t            'post_status'    => 'publish', \r\n\t        );\r\n$downloads = get_posts( $args );\r\n\r\nI am not sure if the -1 for the post_per_page is the meant to be that way, but in my case, where I have thousands of downloads it seems that it had a negative effect (sometimes also had memory issues popping up as errors).\r\n\r\nas soon as I changed the -1 to a normal number (e.g. 20) the issue disappeared.\r\n\r\ncould you please confirm if this is an issue only affecting installation with large amount of downloads or if the -1 is indeed a bad practice and should be changed to something more sensible. I am not sure if there are other implications by changing the -1 (I did not see any, but who knows..)\r\n\r\nciao\r\n\r\nLuca \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/comments/194957750","html_url":"https://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues/3177#issuecomment-194957750","issue_url":"https://api.github.com/repos/easydigitaldownloads/Easy-Digital-Downloads/issues/3177","id":194957750,"user":{"login":"cklosowski","id":1390124,"avatar_url":"https://avatars.githubusercontent.com/u/1390124?v=3","gravatar_id":"","url":"https://api.github.com/users/cklosowski","html_url":"https://github.com/cklosowski","followers_url":"https://api.github.com/users/cklosowski/followers","following_url":"https://api.github.com/users/cklosowski/following{/other_user}","gists_url":"https://api.github.com/users/cklosowski/gists{/gist_id}","starred_url":"https://api.github.com/users/cklosowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cklosowski/subscriptions","organizations_url":"https://api.github.com/users/cklosowski/orgs","repos_url":"https://api.github.com/users/cklosowski/repos","events_url":"https://api.github.com/users/cklosowski/events{/privacy}","received_events_url":"https://api.github.com/users/cklosowski/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T17:04:38Z","updated_at":"2016-03-10T17:04:38Z","body":"@pippinsplugins Unit tests updated."}}