Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings for the default viewer are not working with NC 20.0.0 #20

Open
ummon29 opened this issue Oct 7, 2020 · 6 comments
Open

Settings for the default viewer are not working with NC 20.0.0 #20

ummon29 opened this issue Oct 7, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@ummon29
Copy link

ummon29 commented Oct 7, 2020

Running epubreader (1.4.2) on Nextcloud 20.0.0 I'm not able to change the default viewer settings for Epub, PDF, CBR/CBZ.
Clicking one of the checkboxes triggers the box and the save dialog opens but never finishes. When the page is reloaded the setting is switched back to the previous state. When activated epubreader is the default viewer for all options (Epub, PDF, CBR/CBZ) and I'm not able to deactivate the settings.

Thanks for your great work.

@e-alfred
Copy link
Owner

e-alfred commented Nov 1, 2020

Can you test if the problem still appears with release 1.4.4? Do you see any error in the Browser console or logs?

@e-alfred e-alfred added the bug Something isn't working label Nov 1, 2020
@ummon29
Copy link
Author

ummon29 commented Nov 1, 2020

It changed a bit. The save dialog still stays forever but is seems to change the underlying configuration. PDFs are now opened with the PDF viewer. Sadly as a side effect I now get an internal server error when I try to open an epub or cbz.

I get the following logmessage:

[index] Error: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT * FROM oc_reader_prefs WHERE scope=? AND file_id=? AND user_id=?' with params ["epubreader", 0, "ummon29"]:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_reader_prefs' doesn't exist at <>

  1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... t", Doctrine\DBAL\Dr ... ]})
  2. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 149
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... t")
  3. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php line 162
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "SELECT * FROM ` ... ?", {1: "epubreader",2: 0,3: "ummon29"})
  4. /var/www/nextcloud/lib/public/AppFramework/Db/Mapper.php line 253
    Doctrine\DBAL\Statement->execute()
  5. /var/www/nextcloud/lib/public/AppFramework/Db/Mapper.php line 341
    OCP\AppFramework\Db\Mapper->execute("SELECT * FROM ` ... ?", ["epubreader",0,"ummon29"], null, null)
  6. /var/www/nextcloud/apps/epubreader/lib/Db/PreferenceMapper.php line 47
    OCP\AppFramework\Db\Mapper->findEntities("SELECT * FROM ` ... ?", ["epubreader",0,"ummon29"])
  7. /var/www/nextcloud/apps/epubreader/lib/Service/PreferenceService.php line 44
    OCA\Epubreader\Db\PreferenceMapper->get("epubreader", 0, null)
  8. /var/www/nextcloud/apps/epubreader/lib/Service/PreferenceService.php line 77
    OCA\Epubreader\Service\PreferenceService->get("epubreader", 0, null)
  9. /var/www/nextcloud/apps/epubreader/lib/Controller/PageController.php line 103
    OCA\Epubreader\Service\PreferenceService->getDefault("epubreader")
  10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 169
    OCA\Epubreader\Controller\PageController->showReader()
  11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Epubreader\C ... {}, "showReader")
  12. /var/www/nextcloud/lib/private/AppFramework/App.php line 152
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Epubreader\C ... {}, "showReader")
  13. /var/www/nextcloud/lib/private/Route/Router.php line 308
    OC\AppFramework\App::main("OCA\Epubreader ... r", "showReader", OC\AppFramework\ ... {}, {action: null,_r ... "})
  14. /var/www/nextcloud/lib/base.php line 1009
    OC\Route\Router->match("/apps/epubreader/")
  15. /var/www/nextcloud/index.php line 37
    OC::handleRequest()

GET /index.php/apps/epubreader/?file=%2Fremote.php%2Fwebdav%2Febook%2FA_book.epub&type=application%2Fepub%2Bzip
from 192.168.x.x by ummon29 at 2020-11-01T13:43:17+00:00

@ummon29
Copy link
Author

ummon29 commented Nov 1, 2020

Version 1.4.5 (on NC 20.0.1) is working better than 1.4.4 . No internal server error anymore. epub, pdf and cbz are opening fine in epubreader. The configuration is still not working for me. Changing an option in Settings -> Additional settings changes the checkbox and shows a save dialog that stays forever. A reload of the page shows all boxes as checked again. an pdf is still opened in epubreader when clicked. The 'view' option in the menu is opening the pdf in PDF viewer as a workaround. 1.4.5 and 1.4.3 behaves similar in that regard. Changing the options doesn't give me any output in the log.

@rhein
Copy link

rhein commented Jan 13, 2021

V 1.4.5 on NC 20.0.4 shows the same for me. Classic install, not docker or snap.

I looked at the http traffic, and it seems the ajax post request from the admin page to /index.php/apps/epubreader/ajax/personal.php never gets through, the server responds immediatelly with a 302 redirect to /apps/dashboard - the request never even reaches personal.php

Might be due to some csrf protection setting or just a misconfiguration on my side, I am still trying to find some documentation on how requests are actually routed on NC.

@gpgmailencrypt
Copy link

Having the same problem. The browser (firefox) throws following error

Uncaught TypeError: t.data is undefined
    finishedAction msg.js:81
    finishedSaving msg.js:66
    afterSave settings.js:15
    jQuery 7
    save settings.js:12
    jQuery 9
    <anonymous> settings.js:19
    jQuery 6
    Webpack 6
msg.js:81:8
    finishedAction msg.js:81
    finishedSaving msg.js:66
    afterSave settings.js:15
    jQuery 7
    save settings.js:12
    jQuery 9
    <anonym> settings.js:19
    jQuery 6
    Webpack 6

@sysadminstory
Copy link

My PR #41 should fix the issue about the redirect done after changing settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants