{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/229","repository_url":"https://api.github.com/repos/Automattic/wp-super-cache","labels_url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/229/comments","events_url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/229/events","html_url":"https://github.com/Automattic/wp-super-cache/issues/229","id":223822429,"number":229,"title":"REST API Issues","user":{"login":"donnapep","id":1190420,"avatar_url":"https://avatars1.githubusercontent.com/u/1190420?v=3","gravatar_id":"","url":"https://api.github.com/users/donnapep","html_url":"https://github.com/donnapep","followers_url":"https://api.github.com/users/donnapep/followers","following_url":"https://api.github.com/users/donnapep/following{/other_user}","gists_url":"https://api.github.com/users/donnapep/gists{/gist_id}","starred_url":"https://api.github.com/users/donnapep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donnapep/subscriptions","organizations_url":"https://api.github.com/users/donnapep/orgs","repos_url":"https://api.github.com/users/donnapep/repos","events_url":"https://api.github.com/users/donnapep/events{/privacy}","received_events_url":"https://api.github.com/users/donnapep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dbtlr","id":195095,"avatar_url":"https://avatars1.githubusercontent.com/u/195095?v=3","gravatar_id":"","url":"https://api.github.com/users/dbtlr","html_url":"https://github.com/dbtlr","followers_url":"https://api.github.com/users/dbtlr/followers","following_url":"https://api.github.com/users/dbtlr/following{/other_user}","gists_url":"https://api.github.com/users/dbtlr/gists{/gist_id}","starred_url":"https://api.github.com/users/dbtlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbtlr/subscriptions","organizations_url":"https://api.github.com/users/dbtlr/orgs","repos_url":"https://api.github.com/users/dbtlr/repos","events_url":"https://api.github.com/users/dbtlr/events{/privacy}","received_events_url":"https://api.github.com/users/dbtlr/received_events","type":"User","site_admin":false},"assignees":[{"login":"dbtlr","id":195095,"avatar_url":"https://avatars1.githubusercontent.com/u/195095?v=3","gravatar_id":"","url":"https://api.github.com/users/dbtlr","html_url":"https://github.com/dbtlr","followers_url":"https://api.github.com/users/dbtlr/followers","following_url":"https://api.github.com/users/dbtlr/following{/other_user}","gists_url":"https://api.github.com/users/dbtlr/gists{/gist_id}","starred_url":"https://api.github.com/users/dbtlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbtlr/subscriptions","organizations_url":"https://api.github.com/users/dbtlr/orgs","repos_url":"https://api.github.com/users/dbtlr/repos","events_url":"https://api.github.com/users/dbtlr/events{/privacy}","received_events_url":"https://api.github.com/users/dbtlr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2017-04-24T13:36:01Z","updated_at":"2017-04-25T13:14:53Z","closed_at":null,"body":"The following settings all return `null` instead of a value:\r\n\r\n`cache_mobile_browsers` - lists the mobile browsers when \"Mobile device support\" is enabled.\r\n`cache_mobile_prefixes` - lists the mobile prefixes when \"Mobile device support\" is enabled.\r\n`cache_mutex_disabled` - \"Coarse file locking\" setting.\r\n`cache_hello_world` - \"Proudly tell the world your server is Stephen Fry proof\" setting.\r\n`cache_gzencode` - Shows a warning that compression is disabled if gzencode function was not found.\r\n`cache_disable_locking` - Show / hide \"Coarse file locking\" setting.\r\n`cache_readonly` - Shows a warning that the cache path is not read-only.\r\n`cache_writable` - Shows a warning that the cache path is currently writable.\r\n\r\nThe following settings are missing from the API:\r\n\r\n`cache_gc_email_me` - \"Email me when the garbage collection runs\" setting.\r\n`cache_schedule_interval` - Value of \"Interval\" setting when clock scheduling is enabled.\r\n`cache_next_gc` - Value of \"Next scheduled garbage collection\".\r\n`accepted_files` - Accepted filenames.\r\n`rejected_uri` - Rejected URIs.\r\n`rejected_user_agent` - Rejected user agents.\r\n`lock_down` - Flag that determines what text is displayed in the \"Lock Down\" section.\r\n`cache_direct_pages` - Directly cached files.\r\n`http_only` - This setting is used for the cache tester functionality on the Easy tab and should return a default value of `true`.\r\n\r\n_Cache Stats_\r\nFor caching stats, `cached_list` and `expired_list` for both `supercache` and `wpcache` are objects where age is the key. Could we return these as an array of objects instead where each object has the following structure:\r\n\r\n`{ age: 1000, uri: \"donnapep.wpsandbox.me/blog/blah\" }`\r\n\r\n_Cache Type_\r\n`is_super_cache_enabled` is always returned as `false` by the API regardless of what caching type is selected. The strange thing is that the test harness *does* return the correct value, but the network request in Calypso does not.\r\n\r\n_Saving_\r\nPOSTing data does not work at all. The API returns `updated: true` as the response, but when fetching the settings again, the values are not updated.\r\n\r\nScreenshot of Easy tab POST request:\r\n\r\n![form-data](https://cloud.githubusercontent.com/assets/1190420/25339709/95402fa4-28d1-11e7-9c0a-a7fb1d65fadf.jpg)\r\n"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/comments/297025843","html_url":"https://github.com/Automattic/wp-super-cache/issues/229#issuecomment-297025843","issue_url":"https://api.github.com/repos/Automattic/wp-super-cache/issues/229","id":297025843,"user":{"login":"donnapep","id":1190420,"avatar_url":"https://avatars1.githubusercontent.com/u/1190420?v=3","gravatar_id":"","url":"https://api.github.com/users/donnapep","html_url":"https://github.com/donnapep","followers_url":"https://api.github.com/users/donnapep/followers","following_url":"https://api.github.com/users/donnapep/following{/other_user}","gists_url":"https://api.github.com/users/donnapep/gists{/gist_id}","starred_url":"https://api.github.com/users/donnapep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donnapep/subscriptions","organizations_url":"https://api.github.com/users/donnapep/orgs","repos_url":"https://api.github.com/users/donnapep/repos","events_url":"https://api.github.com/users/donnapep/events{/privacy}","received_events_url":"https://api.github.com/users/donnapep/received_events","type":"User","site_admin":false},"created_at":"2017-04-25T13:14:53Z","updated_at":"2017-04-25T13:14:53Z","body":"> In terms of the saving, I've refactored that endpoint a bit to be more explicit in the mapping of fields to saving methods and in the process uncovered some typos in these save field for is_cache_enabled.\r\n\r\nTo clarify, none of the settings were saving. `is_cache_enabled` was just an example. I did a bit of debugging on the plugin side and [this line](https://github.com/Automattic/wp-super-cache/blob/rest_api_settings_page/rest/class.wp-super-cache-rest-update-settings.php#L15) results in an empty array. I didn't debug any further than that, so I'm not sure if the problem is in the plugin, in Calypso, or both.\r\n\r\nTo test saving from Calypso, you can use [this branch](https://github.com/Automattic/wp-calypso/pull/13302).\r\n\r\nLet me know if you need more info. Thx!"}}
{"actor":{"display_login":"donnapep"}}