OpenVBX.home doesn't include trailing slash for tenants...

59 views
Skip to first unread message

Andrew Watson

unread,
Mar 17, 2011, 11:00:30 PM3/17/11
to openv...@googlegroups.com
Ok,  I figured out the cause of my other issues with the latest release... but I think this one is a real bug...


in global.js OpenVBX.home is set like this:

OpenVBX.home = $('#openvbx-logo a').eq(0).attr('href');

but when logged in as a tenant that URL is http://blah.com/Tenant37  with no trailing slash.  What ends up happening is that in the inbox the links to the message details end up coming out as http://blah.com/Tenant37messages/details/2988 which obviously doesn't work.

So I modifed that line to add a + "/" to the end and now tenants can pull up messages...


Andrew Watson
http://tumblr.gleep.org/


Adam Ballai

unread,
Mar 18, 2011, 1:44:09 AM3/18/11
to openv...@googlegroups.com, Andrew Watson
The main problem here is when you use index.php/ as a handler instead
of mod_rewrite. Can you come up with the right way to prefix urls for
both frontend and backend url generation? This would solve a lot of
the bugs we find in different environments.

-adam

Andrew Watson

unread,
Mar 18, 2011, 9:13:16 PM3/18/11
to openv...@googlegroups.com, Adam Ballai
I haven't yet run it without mod_rewrite, actually!

Between my day job, VoiceCloud and side projects I don't think I'll have any time to pursue that level of completeness... :)

Andrew Watson

unread,
Mar 20, 2011, 12:03:37 AM3/20/11
to openv...@googlegroups.com, Adam Ballai
ugh. so I put my code in production and the JS minimizer won't run on that box and my fix wouldn't go into effect so I added the slash to the href of the logo in OpenVBX/views/layout/content/header.php ... I know.  Terrible.

Anyone ever seen this error on a box?

java -jar compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS \
 --js flows.js \
 > /tmp/openvbx.IYxxUeFUUmlygwmAevk991/flows.js
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
make: *** [flows.min.js] Error 1
-sh-3.00$ 

Andrew Watson

unread,
Mar 28, 2011, 10:29:23 PM3/28/11
to openv...@googlegroups.com, Adam Ballai
Another twist... it seems that putting the / after the href for the logo caused the code in pickers.js to break.  It was assuming that it wouldn't end in a / and adding one plus all the callbacks to /audiofiles/ were adding their own / to the start so I removed them as well...

so now the POST to /audiofiles/add_from_twilio_recording is working correctly but somewhere along line 218 of OpenVBX/controllers/audiofiles.php it seems to be still encountering an error...

anybody else having problems like this?
Reply all
Reply to author
Forward
0 new messages