{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/10815","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10815/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10815/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10815/events","html_url":"https://github.com/joomla/joomla-cms/pull/10815","id":160133084,"number":10815,"title":"[cache] Catch cache storage exception","user":{"login":"csthomas","id":9054379,"avatar_url":"https://avatars.githubusercontent.com/u/9054379?v=3","gravatar_id":"","url":"https://api.github.com/users/csthomas","html_url":"https://github.com/csthomas","followers_url":"https://api.github.com/users/csthomas/followers","following_url":"https://api.github.com/users/csthomas/following{/other_user}","gists_url":"https://api.github.com/users/csthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/csthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csthomas/subscriptions","organizations_url":"https://api.github.com/users/csthomas/orgs","repos_url":"https://api.github.com/users/csthomas/repos","events_url":"https://api.github.com/users/csthomas/events{/privacy}","received_events_url":"https://api.github.com/users/csthomas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":29,"created_at":"2016-06-14T09:14:04Z","updated_at":"2016-07-25T09:54:03Z","closed_at":"2016-07-25T09:54:03Z","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/10815","html_url":"https://github.com/joomla/joomla-cms/pull/10815","diff_url":"https://github.com/joomla/joomla-cms/pull/10815.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/10815.patch"},"body":"This is a part of other my PR #10565.\r\nI split it because it is more important part and simpler to test.\r\n\r\n[UPDATED]\r\n\r\n#### Summary of Changes\r\nCatch exception from storage (ex memcache) class in main cache class.\r\n\r\nIf we turn off memcache for a few seconds or minutes or set incorrect port then joomla website display JLIB_APPLICATION_ERROR_COMPONENT_NOT_LOADING.\r\n\r\nOn php7 memcache is not available so when admin move to php7 \r\nthen website should display correct error message.\r\n\r\n#### Testing Instructions\r\nBefore patch:\r\n1) Go to joomla backend and enable working cache like memcache(-d).\r\n2) Turn off cache server or change the port (for memcache) from 11211 to some not working like 11234.\r\n3) You should get error JLIB_APPLICATION_ERROR_COMPONENT_NOT_LOADING.\r\n\r\nAfter patch:\r\n1) Go to joomla back-end and enable working cache like memcache(-d).\r\n2) Turn off cache server or change the port (for memcache) from 11211 to some not working like 11234.\r\n3) You should get correct warning message.\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/234910751","html_url":"https://github.com/joomla/joomla-cms/pull/10815#issuecomment-234910751","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/10815","id":234910751,"user":{"login":"csthomas","id":9054379,"avatar_url":"https://avatars.githubusercontent.com/u/9054379?v=3","gravatar_id":"","url":"https://api.github.com/users/csthomas","html_url":"https://github.com/csthomas","followers_url":"https://api.github.com/users/csthomas/followers","following_url":"https://api.github.com/users/csthomas/following{/other_user}","gists_url":"https://api.github.com/users/csthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/csthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csthomas/subscriptions","organizations_url":"https://api.github.com/users/csthomas/orgs","repos_url":"https://api.github.com/users/csthomas/repos","events_url":"https://api.github.com/users/csthomas/events{/privacy}","received_events_url":"https://api.github.com/users/csthomas/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T09:54:03Z","updated_at":"2016-07-25T09:54:03Z","body":"> I still don't agree with the notion of adding new code in 2016 that catches and returns an Exception object;\r\n\r\nOK I agree. Then I close that PR.\r\n\r\n>Honestly I don't think a public facing isConnected() method is all that helpful to the API and considering\r\n\r\nIMHO it will be helpful in storage.php as:\r\n```php\r\n\tpublic static function isConnected()\r\n\t{\r\n\t\treturn static::isSupported();\r\n\t}\r\n```\r\n\r\nand only for a few storages (memcachE, redis, memcacheD) we will overrides that method.\r\nI have problem with explaining benefits so I leave it for a next PR. "}}
{"actor":{"display_login":"csthomas"}}