loki36 / user-otp

OTP Backend for owncloud
34 stars 21 forks source link

owncloud 8 #93

Closed xfoezhfp closed 9 years ago

xfoezhfp commented 9 years ago

Installing the app on owncloud 8, trying to use the app via the app menu just creates blank page;

Error PHP js file not found: script:js/jquery.inview serverroot:/var/www/owncloud at /var/www/owncloud/lib/private/template/resourcelocator.php#46 2015-02-10T09:57:45+00:00 Fatal index Exception: {"Message":"js file not found: script:js\/jquery.inview serverroot:\/var\/www\/owncloud","Code":0,"Trace":"#0 \/var\/www\/owncloud\/lib\/private\/templatelayout.php(155): OC\Template\ResourceLocator->find(Array)\n#1 \/var\/www\/owncloud\/lib\/private\/templatelayout.php(106): OC_TemplateLayout::findJavascriptFiles(Array)\n#2 \/var\/www\/owncloud\/lib\/private\/template.php(118): OC_TemplateLayout->__construct('user', 'user_otp')\n#3 \/var\/www\/owncloud\/lib\/private\/template\/base.php(103): OC_Template->fetchPage()\n#4 \/var\/www\/owncloud\/apps\/user_otp\/list_users.php(112): OC\Template\Base->printPage()\n#5 \/var\/www\/owncloud\/lib\/private\/route\/route.php(135) : runtime-created function(1): require_once('\/var\/www\/ownclo...')\n#6 [internal function]: __lambda_func(Array)\n#7 \/var\/www\/owncloud\/lib\/private\/route\/router.php(250): call_user_func('?lambda_2707', Array)\n#8 \/var\/www\/owncloud\/lib\/base.php(763): OC\Route\Router->match('\/apps\/user_otp\/...')\n#9 \/var\/www\/owncloud\/index.php(36): OC::handleRequest()\n#10 {main}","File":"\/var\/www\/owncloud\/lib\/private\/template\/resourcelocator.php","Line":46}

kneissel commented 9 years ago

Hello,

It look's like it's because this js is no more in the core directory of owncloud (https://mailman.owncloud.org/pipermail/devel/2014-November/000703.html)

I've got a workaroud :

Get the jquery.inview.js from here: https://github.com/protonet/jquery.inview/blob/master/jquery.inview.js

Copy to the apps/user_otp/js/ directory. Then edit apps/user_otp/list_users.php and replace :

OC_Util::addScript('core', 'jquery.inview');

By :

OC_Util::addScript('user_otp', 'jquery.inview');

And it seem's to work for me.