shorten
shorten copied to clipboard
Problems with "non standard" owncloud apps setup
Hi, I'm running a bit non standard configuration for owncloud as I'm trying to be as restrictive as possible on my server in particular I using this snippet in my config.php
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/share/webapps/owncloud/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/srv/http/cloud.nyloc.de/apps',
'url' => '/wapps',
'writable' => true,
),
),
This is documented at https://doc.owncloud.org/server/8.2/developer_manual/core/configfile.html So it's official not some hack, just to clarify.
The real problem arises in your code when you do something like
var newurl = OC.linkTo("shorten",url).replace("apps/shorten","index.php/apps/shorten");
this results in a link like
https://mydomain.tld/windex.php/apps/shorten...
with result in a 404 error as the w from wapps/shorten is not replaced.
I'm not familiar with owncloud app development so I can't say if this is good practice to do something like that, but it can definitive lead to problems that are very hard to debug for people without dev experience.
If this replacement is really needed it would be nice if you could do that with a regexp like replace
"/(.+)/shorten" with "/index.php/apps/shorten". This should work for most setups I guess.
If you need any more information just let me know.