I had to reorganize my installation of Omeka because I wanted to keep the core omeka directory separate from /files, /plugins and /themes (for the sake of using svn externals for easy updates)
So, my root directory consists of
/core is the BASE_DIR -- that's where bootstrap.php resides.
/extensions has two subfolders:
I have changed bootstrap.php to reflect this:
define('APP_DIR', BASE_DIR . '/application');
define('PLUGIN_DIR', BASE_DIR . '/../extensions/plugins');
define('ADMIN_DIR', BASE_DIR . '/admin');
define('FILES_DIR', BASE_DIR . '/../files');
define('ADMIN_THEME_DIR', BASE_DIR . '/admin/themes');
define('PUBLIC_THEME_DIR', BASE_DIR . '/../extensions/themes');
define('INSTALL_DIR', BASE_DIR . '/install');
define('MODEL_DIR', APP_DIR . '/models');
define('FORM_DIR', APP_DIR . '/forms');
define('CONTROLLER_DIR', APP_DIR . '/controllers');
define('LIB_DIR', APP_DIR . '/libraries');
define('CONFIG_DIR', APP_DIR . '/config');
define('LOGS_DIR', APP_DIR . '/logs');
define('VIEW_SCRIPTS_DIR', APP_DIR . '/views/scripts');
define('VIEW_HELPERS_DIR', APP_DIR . '/views/helpers');
define('UPGRADE_DIR', APP_DIR . '/migrations');
define('LANGUAGES_DIR', APP_DIR . '/languages');
define('SCHEMA_DIR', APP_DIR . '/schema');
define('SCRIPTS_DIR', APP_DIR . '/scripts');
Now both the admin side of things and the plugins work as expected, but the frontend displays pure text without any styling. In other words, both the theme directory and the files are getting 404.
Any idea on how to troubleshoot this?
just a little update — i tried to make a new, clean installation of omeka with the following set up just to test and i got the same results.
this can't be right. has anybody successfully managed to change the default directory structure using bootstrap.php? any tips would be greatly appreciated.
I'm still looking for a solution here — I would really appreciate it if somebody form the Omeka team would help me out.
It doesn't look like you have also changed WEB_ROOT and other WEB_* constants later on in bootstrap.php. Maybe making the changes there will do the trick.
I tried different things there but it didn't seem to help. That, however, may have to do with the fact that I don't understand what "WEB_DIR depends on the bootstrap used (public/admin)" really means...
If you can guess what the values should be there based on my actual paths set above, please let me know...
// WEB_ROOT is always the root of the site, whereas WEB_DIR depends on the bootstrap used (public/admin)
define('WEB_ROOT', $base_root . (!empty($dir) ? '/' . $dir : '') );
define('WEB_THEME', WEB_DIR . '/themes');
define('WEB_PLUGIN', WEB_ROOT . '/plugins');
define('WEB_FILES', WEB_ROOT . '/files');
define('WEB_PUBLIC_THEME', WEB_ROOT . '/themes');
define('WEB_VIEW_SCRIPTS', WEB_ROOT . '/application/views/scripts');
i am still looking in vain for an answer to my question about how to keep themes and plugins and files outside of the core Omeka directory.
I wonder though if the following might be helpful in troubleshooting the issue: if I point to a specific file from the theme which is not in root folder and with the above setup (for instance: http://prepis.dev/themes/novi-prepis/css/style.css), I get the following:
Action "noviPrepis" does not exist and was not trapped in __call()
#0 /Users/ttasovac/Development/prepis.org/trunk/core/application/libraries/Zend/Controller/Action.php(518): Zend_Controller_Action->__call('noviPrepisActio...', Array)
#1 /Users/ttasovac/Development/prepis.org/trunk/core/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('noviPrepisActio...')
#2 /Users/ttasovac/Development/prepis.org/trunk/core/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#3 /Users/ttasovac/Development/prepis.org/trunk/core/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#4 /Users/ttasovac/Development/prepis.org/trunk/core/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#5 /Users/ttasovac/Development/prepis.org/trunk/core/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#6 /Users/ttasovac/Development/prepis.org/trunk/core/index.php(23): Omeka_Application->run()
Your input will be greatly appreciated.
Because of the way Omeka builds routes to pages, trying out direct expected paths won't work --those will always be interpreted via Omeka's routing mechanism, not as direct paths to the file.
I suspect that adjusting the WEB_THEME and WEB_PLUGIN constants to reflect where you have moved the plugins and themes under /extensions will still be the way to go. Maybe echoing out their values will help you see where they are not being put together properly.
I don't see how WEB_THEME or WEB_PLUGIN would change anything — they have nothing to do with the actual path but what is shown in the URL. Having said that, I tried changing them as well, but to no avail.
If I echo them, they show what i think they should show: site.com/themes and site.com/plugins.
Also, as I said earlier, plugins work without any problems in the set up I am describing, even though my plugins are also outside the root. It is only /themes and /files that do not.
Is it not possible that the problem is in the Omeka controller or somewhere else in the system?