owncloud-files-hubic icon indicating copy to clipboard operation
owncloud-files-hubic copied to clipboard

Temporary mount fix for Owncloud 8.2+

Open Jaimy85 opened this issue 9 years ago • 8 comments

The app didn't work for the latest stable Owncloud 8.2.0. After some investigation I managed to get it working by changing line 102 to: \OC_Mount_Config::registerBackend($shortMountPoint, Replaced AddMountPoint with registerBackend. At least it mount again, there are still some errors in the log that need investigation.

Jaimy85 avatar Oct 24 '15 16:10 Jaimy85

Badly it does not work on 8.2.2 My owncloud log shows: "Call to undefined method OC_Mount_Config::addMountPoint() at /var/www/owncloud/apps/files_hubic/lib/hubic.php#91"

But I have change the line 91, not 102, to \OC_Mount_Config::registerBackend Line 102 is only /**

Any solution for this? Is the file apps/files_hubic/lib/hubic.php the right one?

Here is the rest of teh log: {"reqId":"NOydwpPOdo1fD9XEJs4L","remoteAddr":"91.43.11.181","app":"PHP","message":"Only variables should be passed by reference at /var/www/owncloud/apps/files_hubic/lib/hubic.php#83","level":3,"time":"2015-12-25T14:47:12+00:00"} {"reqId":"NOydwpPOdo1fD9XEJs4L","remoteAddr":"91.43.11.181","app":"PHP","message":"Call to undefined method OC_Mount_Config::addMountPoint() at /var/www/owncloud/apps/files_hubic/lib/hubic.php#91","level":3,"time":"2015-12-25T14:47:12+00:00"} {"reqId":"Da9zGiKhMJfPGiX8Z2Qr","remoteAddr":"91.43.11.181","app":"files_external","message":"Exception: {"Exception":"Exception","Message":"Creating \OC\Files\Storage\Hubic storage failed","Code":0,"Trace":"#0 \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php(258): OC\Files\Storage\Hubic->__construct(Array)\n#1 \/var\/www\/owncloud\/apps\/files_external\/controller\/storagescontroller.php(237): OC_Mount_Config::getBackendStatus('\OC\Files\Stora...', Array, false)\n#2 \/var\/www\/owncloud\/apps\/files_external\/controller\/userstoragescontroller.php(113): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_external\Lib\StorageConfig))\n#3 [internal function]: OCA\Files_External\Controller\UserStoragesController->create('hubiC cloud', '\OC\Files\Stora...', 'builtin::builti...', Array, Array)\n#4 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(159): call_user_func_array(Array, Array)\n#5 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserStoragesController), 'create')\n#6 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(108): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserStoragesController), 'create')\n#7 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(45): OC\AppFramework\App::main('UserStoragesCon...', 'create', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#8 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#9 \/var\/www\/owncloud\/lib\/private\/route\/router.php(291): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#10 \/var\/www\/owncloud\/lib\/base.php(851): OC\Route\Router->match('\/apps\/files_ext...')\n#11 \/var\/www\/owncloud\/index.php(39): OC::handleRequest()\n#12 {main}","File":"\/var\/www\/owncloud\/apps\/files_hubi \/lib\/hubic.php","Line":192}","level":3,"time":"2015-12-25T14:50:37+00:00"} {"reqId":"ArHQ2iU6fLcPb/Nx8B7I","remoteAddr":"91.43.11.181","app":"files_external","message":"Exception: {"Exception":"Exception","Message":"Creating \OC\Files\Storage\Hubic storage failed","Code":0,"Trace":"#0 \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php(258): OC\Files\Storage\Hubic->__construct(Array)\n#1 \/var\/www\/owncloud\/apps\/files_external\/controller\/storagescontroller.php(237): OC_Mount_Config::getBackendStatus('\OC\Files\Stora...', Array, false)\n#2 \/var\/www\/owncloud\/apps\/files_external\/controller\/storagescontroller.php(257): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_external\Lib\StorageConfig))\n#3 \/var\/www\/owncloud\/apps\/files_external\/controller\/userstoragescontroller.php(73): OCA\Files_External\Controller\StoragesController->show('2')\n#4 [internal function]: OCA\Files_External\Controller\UserStoragesController->show('2')\n#5 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(159): call_user_func_array(Array, Array)\n#6 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserStoragesController), 'show')\n#7 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(108): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserStoragesController), 'show')\n#8 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(45): OC\AppFramework\App::main('UserStoragesCon...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#9 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#10 \/var\/www\/owncloud\/lib\/private\/route\/router.php(291): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#11 \/var\/www\/owncloud\/lib\/base.php(851): OC\Route\Router->match('\/apps\/files_ext...')\n#12 \/var\/www\/owncloud\/index.php(39): OC::handleRequest()\n#13 {main}","File":"\/var\/www\/owncloud\/apps\/files_hubic\/lib\/hubic.php","Line":192}","level":3,"time":"2015-12-25T14:50:46+00:00"} {"reqId":"ICkhQWjTTpl9i/zd5ii1","remoteAddr":"91.43.11.181","app":"PHP","message":"Argument 2 passed to OpenCloud\OpenStack::__construct() must be of the type array, none given, called in /var/www/owncloud/apps/files_hubic/lib/hubic.php on line 478 and defined at /var/www/owncloud/3rdparty/rackspace/php-opencloud/lib/OpenCloud/OpenStack.php#73","level":3,"time":"2015-12-25T14:50:46+00:00"} {"reqId":"ICkhQWjTTpl9i/zd5ii1","remoteAddr":"91.43.11.181","app":"PHP","message":"Only variables should be passed by reference at /var/www/owncloud/apps/files_hubic/lib/hubic.php#83","level":3,"time":"2015-12-25T14:50:46+00:00"} {"reqId":"ICkhQWjTTpl9i/zd5ii1","remoteAddr":"91.43.11.181","app":"PHP","message":"Call to undefined method OC_Mount_Config::addMountPoint() at /var/www/owncloud/apps/files_hubic/lib/hubic.php#91","level":3,"time":"2015-12-25T14:50:46+00:00"}

davodego avatar Dec 25 '15 14:12 davodego

OK solved by myself. It is importent to replaced AddMountPoint with registerBackend before activating ExternalStorage App. And then activate Hubic App.

Line in file owncloud/apps/files_hubic/lib/hubic.php was right.

Thanks

davodego avatar Dec 25 '15 15:12 davodego

@davodego @Jaimy85 Hi, I'm lost in your code cause I'm a dummy in this field...Unfortunately, I'm not a developer so I cannot do programming :-(

I have an hubic account (10To) and downloaded ownCloud 8.2.2 (not installed yet) on my windows 10.

I would like to do a clean set up. Please, could you send me the corrected files or updated the solution for the community to get a clean install?

Thanks for your time.

nb: Do you know if a donation page exist to support this project?

IGNICHAT avatar Dec 28 '15 16:12 IGNICHAT

OK, here is what I have done:

  • disable External Storage App
  • disable hubiC App
  • open file "your-path-to-webspace/owncloud/apps/files_hubic/lib/hubic.php"
  • search for line "\OC_Mount_Config::AddMountPoint($shortMountPoint,"
  • replace "AddMountPoint" to "registerBackend" like in first comment.
  • line must be "\OC_Mount_Config::registerBackend($shortMountPoint," now
  • activate External Storage App in Apps Section
  • activate hubiC app in Apps Section
  • Follow hubiC App instructions for connecting to hubiC

Hope it helps...

davodego avatar Dec 28 '15 23:12 davodego

@davodego Thanks! Seems to be clear. I'll follow your advices.

IGNICHAT avatar Dec 28 '15 23:12 IGNICHAT

Sorry, but it dont works in my installation. hubiC mount is not shown as folder. It's shown as gearwheel. When I tried to open owncloud offers me to download a file.

Here is the log: {"reqId":"xaJSa3zv0FhrE2bjHq/6","remoteAddr":"91.43.26.184","app":"files_external","message":"Exception: {"Exception":"Exception","Message":"Creating \OC\Files\Storage\Hubic storage failed","Code":0,"Trace":"#0 \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php(258): OC\Files\Storage\Hubic->__construct(Array)\n#1 \/var\/www\/owncloud\/apps\/files_external\/controller\/storagescontroller.php(237): OC_Mount_Config::getBackendStatus('\OC\Files\Stora...', Array, false)\n#2 \/var\/www\/owncloud\/apps\/files_external\/controller\/userstoragescontroller.php(113): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_external\Lib\StorageConfig))\n#3 [internal function]: OCA\Files_External\Controller\UserStoragesController->create('hubiC', '\OC\Files\Stora...', 'builtin::builti...', Array, Array)\n#4 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(159): call_user_func_array(Array, Array)\n#5 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserStoragesController), 'create')\n#6 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(108): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserStoragesController), 'create')\n#7 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(45): OC\AppFramework\App::main('UserStoragesCon...', 'create', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#8 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#9 \/var\/www\/owncloud\/lib\/private\/route\/router.php(291): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#10 \/var\/www\/owncloud\/lib\/base.php(851): OC\Route\Router->match('\/apps\/files_ext...')\n#11 \/var\/www\/owncloud\/index.php(39): OC::handleRequest()\n#12 {main}","File":"\/var\/www\/owncloud\/apps\/files_hubic\/lib\/hubic.php","Line":192}","level":3,"time":"2015-12-29T15:07:28+00:00"} {"reqId":"l8Okt2z5CNMwd21lcRGg","remoteAddr":"91.43.26.184","app":"files_external","message":"Exception: {"Exception":"Exception","Message":"Creating \OC\Files\Storage\Hubic storage failed","Code":0,"Trace":"#0 \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php(258): OC\Files\Storage\Hubic->__construct(Array)\n#1 \/var\/www\/owncloud\/apps\/files_external\/controller\/storagescontroller.php(237): OC_Mount_Config::getBackendStatus('\OC\Files\Stora...', Array, false)\n#2 \/var\/www\/owncloud\/apps\/files_external\/controller\/storagescontroller.php(257): OCA\Files_External\Controller\StoragesController->updateStorageStatus(Object(OCA\Files_external\Lib\StorageConfig))\n#3 \/var\/www\/owncloud\/apps\/files_external\/controller\/userstoragescontroller.php(73): OCA\Files_External\Controller\StoragesController->show('2')\n#4 [internal function]: OCA\Files_External\Controller\UserStoragesController->show('2')\n#5 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(159): call_user_func_array(Array, Array)\n#6 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_External\Controller\UserStoragesController), 'show')\n#7 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(108): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_External\Controller\UserStoragesController), 'show')\n#8 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(45): OC\AppFramework\App::main('UserStoragesCon...', 'show', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#9 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#10 \/var\/www\/owncloud\/lib\/private\/route\/router.php(291): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#11 \/var\/www\/owncloud\/lib\/base.php(851): OC\Route\Router->match('\/apps\/files_ext...')\n#12 \/var\/www\/owncloud\/index.php(39): OC::handleRequest()\n#13 {main}","File":"\/var\/www\/owncloud\/apps\/files_hubic\/lib\/hubic.php","Line":192}","level":3,"time":"2015-12-29T15:07:38+00:00"}

davodego avatar Dec 29 '15 15:12 davodego

@davodego Thanks for your info.

I haven't tried what you said yet but your last message disturbed me because I don't know anything about coding. Unfortunately I cannot help you.

I though @Jaimy85 and you found the solution.

Because I'm not a coder I may try to find a 1-click solution even if I have to pay someone or a online service. I'm common guy, I made a mistake trying to fit ownCloud and hubiC perhaps.

Thanks for your time @davodego

IGNICHAT avatar Dec 31 '15 08:12 IGNICHAT

@davodego @Jaimy85

OC_Mount_Config::registerBackend('\OC\Files\Storage\Hubic', [ 'backend' => (string)$l->t('Hubic'), 'priority' => 100, 'configuration' => [ 'configured' => '#configured', ------> ? 'client_id' => (string)$l->t('--------'), 'client_secret' => '&*'.$l->t('----------'), 'hubic_token' => '#hubic_token', ---> ? 'swift_token' => '#swift token' ----> ? ], 'custom' => '../../files_hubic/js/hubic', 'has_dependencies' => true, ]);

Can you guys please help me to configure the hubic in my owncloud 8.2, I know my client_id and client_secret, how and where can i get configured, hubic_token and swift_token. please guide me, appreciated.

javeedrahman avatar Feb 19 '16 11:02 javeedrahman