-
Notifications
You must be signed in to change notification settings - Fork 41
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
ebook reader doesn't save anything #44
Comments
Hi, I got the exact same issue The only logs I have are this event every time I open the document:
|
Which database do you use? |
Hi, MySQL: 5.7.18 Ubuntu 16.04.2 LTS Best regards Johan |
Hello again, Ubuntu Server 16.04.02 LTS (seems like I've been looking for the wrong VM last time) This server is virtualized with virtualbox and I am using an apache reverse proxy with a ssl cert from letsencrypt.org sitting behind an ipfire firewall. I've searched the Logs and find the same Error Log as @jryberg "Undefined index: title at /var/www/nextcloud/apps/files_reader/templates/epubreader.php#37". Best regards |
I'll look into this when I have some time to dedicate to these apps... |
Same issue here. |
OK, this seems to be a real issue so I'll just have to find some time. Stay tuned but don't hold your breath... |
Same issue here. |
Same issue here.
|
Is there anything we can do to help you debug this? |
I've just tried to reproduce this on a clean VM with ownCloud 10.0.3 (the app can only be installed manually because its maximum ownCloud version is set to 9.2). The app works exactly as in Nextcloud 12.0.3 - reading works, but saving data doesn't. |
I've managed to make a temporary fix for this issue.
After this, bookmarks, settings and navigation work, are saved and restored when opening the document. The proper way to do this without hardcoding the URL would be to use official JS API, but I'm too inexperienced in making ownCloud/Nextcloud apps :) |
Good catch, I'll look into this ASAP |
The issue is caused by mismatched quoting in the templates ( data-basepath='<?php p($urlGenerator->linkTo("files_reader",""));?>' I'll release a new version tomorrow which fixes this and adds PDF support. The PDF renderer is ready, the UI is more or less ready, only the position saving bits have not been wired up yet. That'll come soon enough... |
Thanks! |
hmmm. I changed the quotes in the line as you mentioned, rebooted the server, but I am still not able to save anything. Anyway, I'll wait for your updated app. Thanks! |
scurrvy2020, maybe the problem is that there are two templates in Yetangitu, thanks again for the app! PDF support will be a great addition. And position saving will be a killer feature, since ownCloud/Nextcloud's PDF viewer doesn't support it. |
I manually changed the referenced code to double quotes in both template files, and that did not fix it for me. I am unsure if I needed to make that change in other places in the same file.
…Sent from my iPhone
On Oct 12, 2017, at 12:50 PM, Frank de Lange ***@***.***> wrote:
Change both templates to make sure you changed the correct one.
The PDF reader does not support position saving yet but that will come. It does support 2-page spreads though:
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Do you get any error messages in the javascript console (use 'inspect' to show the console, make sure it is set to show all messages)? Did you restart the PHP container service (php-fpm, mod-php or whatever you use)? Sometimes it does not seem to pick up changes until after it has been restarted, even though it should 'just work'. |
It’s saying:
POST <nextcloud_url>/apps/files_reader/bookmark 404 (Not Found)
…Sent from my iPhone
On Oct 12, 2017, at 1:53 PM, Frank de Lange ***@***.***> wrote:
Do you get any error messages in the javascript console (use 'inspect' to show the console, make sure it is set to show all messages)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
For some reason, in my case
returns In my example above, I've hardcoded |
urlGenerator should return the correct URL (with or without $frontControllerActive = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
...
$urlLinkTo = \OC::$WEBROOT . '/index.php/apps/' . $app;
if ($frontControllerActive) {
$urlLinkTo = \OC::$WEBROOT . '/apps/' . $app;
} If you get 'wrong' URLs it might be that you've got one of those parameters ( |
For some weird reason (in my case) pdfreader makes requests to URLs with Maybe the reason why pdfreader works is because it generates PHP URLs in PHP urlGenerator and JS URLs in JavaScript's You're definitely right that OC/NC's urlGenerator should return correct URLs, so it's not plugin's fault. |
mpodshivalin, I've tried adding the url with index.php to the ready.js file, but it still doesn't work :-/ I'm still getting 404 errors. I've rebooted the server as well. If I edit the message and add "index.php" to the referrer url, the message will successfully post. Did you do anything else to hardcode the index.php into the url? |
Did you clear your web browser's cache after editing ready.js file? |
yes, cleared the cache, tried different browsers, different computers. nothing worked |
The Javascript-version of the urlgenerator ( if(oc_config.modRewriteWorking == true) {
return OC.webroot + _build(url, params);
}
return OC.webroot + '/index.php' + _build(url, params); ...where 'modRewriteWorking' => (\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') The path taken is different but the logic used is similar. You can view the contents of oc_config by requesting ...
var oc_config={"session_lifetime":1440,"session_keepalive":true,"version":"11.0.2.7","versionstring":"11.0.2","enable_avatars":true,"lost_password_link":null,"modRewriteWorking":true};
... Look for the value of |
I had to go to
looks like mine is false... |
I added these two lines to my config.php and used
After rebooting the server and clearing the browser cache I am now able to save items in the reader app. However, there are some icons in the header of nextcloud that are giving error 404. (update: disabling the theming app fixes the icons, there is a known bug with theming and rewrite: https://help.nextcloud.com/t/icons-missing-path-not-rewritten/4722/18) |
I don't use |
A new version was released today, but unfortunately, this issue still remains. :( |
Same messages in the console? I mean this one: POST <nextcloud_url>/apps/files_reader/bookmark 404 (Not Found) Does the link work if you include index.php before /apps? |
I see this: POST https://nextcloud.mydomain.net/apps/files_reader/bookmark 404 (Not Found) As far as including index.php before /apps, how would I do that? Is there a file I would edit somewhere to add that? Thanks! |
Try the following query in a browser in which you're logged in to your instance of NC:
This should produce a JSON response containing the last visited location in that publication, like so: {"name":"__CURSOR__","type":"bookmark","value":14,"content":null,"lastModified":"1516640984881243"} I got the file_id (
If that query works (i.e. you get either a JSON or |
For some reason my reply shows before yours. The first link doesn't work but the second one does. You mentioned that there may be something wrong with the rewrite logic, can you please elaborate more? |
Which webserver do you use? The rewrite rules for Apache are kept in the |
This server is using Apache. The .htaccess file is default, I've made no changes to it. I have read the documentation regarding Apache, and it mentions to make sure that the .htaccess file is writable by the Apache user (it is), that mod env and rewrite are enabled (they are) and config.php has: From an Apache perspective, everything seems fine according to the documentation. Perhaps there's an issue with the .htaccess file that ships with Nextcloud and I need to file a bug against it? Thanks! |
This is resolved for me. I fixed it by getting "pretty urls" to work with Apache following the documentation. I didn't really understand what you guys were referring to with the different URLs but now I understand it. However, my thought process right now is why does this app require pretty urls? Why can't it work without it? All the other apps I've used with Nextcloud all work perfectly fine right out of the box but for some reason this one doesn't. I'm glad it's working now, though. Thank you all for your assistance. |
Reader does not require 'pretty URLs', it works just fine with ugly ones as well (which I used myself until recently). The way Reader works probably makes it more sensitive to problems in the rewrite logic, it is implemented as a plugin to the Files app and uses it in the background to download publications to show in the browser. |
Closing this as all known problems in Reader seem to be resolved; problems caused by faulty rewrite logic lie outside of the scope of this bug tracker. |
Hello, I am struggling to make the history and bookmarks working for files_reader. I am using nginx, so I followed these guide to add rewrite rules: I am having exactly the same problems with POST queries getting 404 as an answer. So both oc_reader_bookmarks and oc_reader_preferences tables are not populated. Any hints will be very appreciated. Best regards, |
Hello,
I'm using the ebook reader app 1.0.4 on my private nextcloud 11 server (latest stable build on ubuntu server 14.04).
It can read the ebooks without any issue and i can save bookmarks and annotations, but after closing and reopening an ebook all saves are gone. The reader isn't saving the last reading postion too and I need to search for my last opened page every time I want to continue reading.
Is this a common issue or is there just something wrong with my nextcloud installation?
Greetings from Germany!
The text was updated successfully, but these errors were encountered: