{"action":"closed","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/8071","labels_url":"https://api.github.com/repos/owncloud/core/issues/8071/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/8071/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/8071/events","html_url":"https://github.com/owncloud/core/issues/8071","id":30924685,"number":8071,"title":"Installer wizard fails in case a /templates directory exists in the root of the filesystem","user":{"login":"rrjk","id":4373064,"avatar_url":"https://avatars.githubusercontent.com/u/4373064?v=3","gravatar_id":"","url":"https://api.github.com/users/rrjk","html_url":"https://github.com/rrjk","followers_url":"https://api.github.com/users/rrjk/followers","following_url":"https://api.github.com/users/rrjk/following{/other_user}","gists_url":"https://api.github.com/users/rrjk/gists{/gist_id}","starred_url":"https://api.github.com/users/rrjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrjk/subscriptions","organizations_url":"https://api.github.com/users/rrjk/orgs","repos_url":"https://api.github.com/users/rrjk/repos","events_url":"https://api.github.com/users/rrjk/events{/privacy}","received_events_url":"https://api.github.com/users/rrjk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/won'%20t%20fix","name":"won' t fix","color":"DDDDDD"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-04-05T21:39:09Z","updated_at":"2015-03-23T10:51:10Z","closed_at":"2015-03-23T10:51:10Z","body":"### Steps to reproduce\r\n1. Ensure a /templates directory exists in the root of the file system\r\n2. Install Owncloud\r\n3. Go to the http://domain.ext/owncloud to start the installer\r\n\r\n### Expected behaviour\r\nInstaller wizard should start\r\n\r\n### Actual behaviour\r\nA blank screen is shown\r\n\r\n### Server configuration\r\nUbuntu 13.10\r\n\r\n**Web server:**\r\nApache\r\n\r\n**Database:**\r\nNone yet\r\n\r\n**PHP version:**\r\n5\r\n\r\n**ownCloud version:** (see ownCloud admin page)\r\nInstalled 6.0.2\r\n\r\n**Updated from an older ownCloud or fresh install:**\r\nFresh install\r\n\r\n**List of activated apps:**\r\nNone yet\r\n\r\n**The content of config/config.php:**\r\n<?php\r\n$CONFIG = array (\r\n  'instanceid' => 'oc161f5b47c6',\r\n);\r\n\r\n**Are you using external storage, if yes which one:** local/smb/sftp/...\r\nNo\r\n\r\n**Are you using encryption:** yes/no\r\nNo\r\n\r\n### Client configuration\r\n**Browser: Firefox\r\n\r\n**Operating system: Kubuntu 13.10\r\n\r\n### Logs\r\n#### Web server error log\r\n[Sat Apr 05 23:32:47.392083 2014] [access_compat:error] [pid 31574] [client 192.168.2.12:58028] AH01797: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt\r\n\r\n\r\n\r\n#### ownCloud log (data/owncloud.log)\r\n{\"app\":\"PHP\",\"message\":\"Undefined variable: message at \\/var\\/www\\/owncloud\\/lib\\/public\\/util.php#95\",\"level\":3,\"time\":\"2014-04-05T19:38:24+00:00\"}\r\n{\"app\":\"index\",\"message\":\"Exception: template file not found: template:layout.guest formfactor:\",\"level\":4,\"time\":\"2014-04-05T19:38:24+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"template file not found: template:layout.guest formfactor: at \\/var\\/www\\/owncloud\\/lib\\/private\\/template\\/templatefilelocator.php#43\",\"level\":3,\"time\":\"2014-04-05T19:38:24+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"Undefined variable: message at \\/var\\/www\\/owncloud\\/lib\\/public\\/util.php#95\",\"level\":3,\"time\":\"2014-04-05T19:38:25+00:00\"}\r\n{\"app\":\"index\",\"message\":\"Exception: template file not found: template:layout.guest formfactor:\",\"level\":4,\"time\":\"2014-04-05T19:38:25+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"template file not found: template:layout.guest formfactor: at \\/var\\/www\\/owncloud\\/lib\\/private\\/template\\/templatefilelocator.php#43\",\"level\":3,\"time\":\"2014-04-05T19:38:25+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"Undefined variable: message at \\/var\\/www\\/owncloud\\/lib\\/public\\/util.php#95\",\"level\":3,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"index\",\"message\":\"Exception: template file not found: template:layout.guest formfactor:\",\"level\":4,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"template file not found: template:layout.guest formfactor: at \\/var\\/www\\/owncloud\\/lib\\/private\\/template\\/templatefilelocator.php#43\",\"level\":3,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"Undefined variable: message at \\/var\\/www\\/owncloud\\/lib\\/public\\/util.php#95\",\"level\":3,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"index\",\"message\":\"Exception: template file not found: template:layout.guest formfactor:\",\"level\":4,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"template file not found: template:layout.guest formfactor: at \\/var\\/www\\/owncloud\\/lib\\/private\\/template\\/templatefilelocator.php#43\",\"level\":3,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"Undefined variable: message at \\/var\\/www\\/owncloud\\/lib\\/public\\/util.php#95\",\"level\":3,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"index\",\"message\":\"Exception: template file not found: template:layout.guest formfactor:\",\"level\":4,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"template file not found: template:layout.guest formfactor: at \\/var\\/www\\/owncloud\\/lib\\/private\\/template\\/templatefilelocator.php#43\",\"level\":3,\"time\":\"2014-04-05T19:38:26+00:00\"}\r\n{\"app\":\"PHP\",\"message\":\"Undefined variable: message at \\/var\\/www\\/owncloud\\/lib\\/public\\/util.php#95\",\"level\":3,\"time\":\"2014-04-05T19:40:09+00:00\"}\r\n{\"app\":\"index\",\"message\":\"Exception: template file not found: template:layout.guest formfactor:\",\"level\":4,\"time\":\"2014-04-05T19:40:09+00:00\"}\r\n\r\n#### Browser log\r\nn/a\r\n\r\n### Own investigation into the problem, possibly showing the function where the bug is:\r\nInstallation of owncloud fails with a blank screen, in case a directory /templates exists in the root directory of the filesystem in which owncloud is installed.\r\n\r\nInstalled on ubuntu 13.10\r\n\r\nWhen a clean owncloud install is first accessed, it first tries to load the template \"installation\". This works fine.\r\n\r\nAfter that, it tries to load the template \"layout.guest\", which fails in \"var/www/owncloud/lib/private/template.php(171): OC\\Template\\TemplateFileLocator->find('layout.guest')\"\r\n\r\nAs part of the above function, amongst others \r\n\"protected function findTemplate($theme, $app, $name, $fext) {\"\r\nis called.\r\n\r\nFor the second template, the $app is equal to \"core\"\r\nwhich means \"$dirs = $this->getAppTemplateDirs($theme, $app, OC::$SERVERROOT, OC_App::getAppPath($app));\" gets executed.\r\n\r\nThis function is as follows:\r\n\r\n        protected function getAppTemplateDirs($theme, $app, $serverroot,$app_dir) {\r\n                // Check if the app is in the app folder or in the root\r\n                if( file_exists($app_dir.'/templates/' )) {\r\n                        return array(\r\n                                $serverroot.'/themes/'.$theme.'/apps/'.$app.'/templates/',\r\n                                $app_dir.'/templates/',\r\n                        );\r\n                }\r\n                return array(\r\n                        $serverroot.'/themes/'.$theme.'/'.$app.'/templates/',\r\n                        $serverroot.'/'.$app.'/templates/',\r\n                );\r\n        }\r\n\r\nFor some reason, the app directory for \"core\"is empty.\r\nThat means that the if statement file_exists($app_dir.'/templates/' )) checks whether a templates directory exists in the root of the filesystem. If it exists, exactly that directory is returned as the AppTemplateDirs (and another directory). Obviously in the /templates directory in the root no owncloud templates can be found, resulting in owncloud presenting a blank screen, with no clue of the problem at hand.\r\n\r\nRemoving the /templates directory in the root shows the installer.\r\n\r\n\t\r\n\r\n\r\n"}}