-
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
CBR can not be read. #85
Comments
Please check your webserver configuration, this looks to be the same problem as described in #58 (comment) |
The webserver looks fine, I can open collabora and other applications I can open with the Reader (ebook reader) PDFs and EPUBs without problems. I saw that SMB/WND is not the problem other files can be opened with the reader. |
Can you open CBx when it is not on a shared folder? Can you open the same CBR when it is not on a shared folder? Do you use 'pretty URLs', i.e. do your URLs include 'index.php' (in which case you're not using 'pretty URLs') or not? Do you see anything in the console.log (use 'Inspect' in your browser) which could be related? These problems often seem to be related to CSP settings, in which case you should see messages about resources not being loaded due to CSP settings. |
No, I can't open any of the cbr files in any local folder or shared folder.
I'm using the standard URL, with index.php, I don't want to rewrite the base Url.:
|
This is a problem between your server and your browser, not in Reader. You're using Chrome or Chromium with strict mime checking enabled (as gleaned from those Try to shift-reload the page to bypass the cache, does that work? See GoogleChromeLabs/sw-precache#180 for a similar problem in a totally unrelated project. Try again with the inspector open on the
Another thing to try is to check |
I tried with Firefox and Chrome, I just gave you the output from Chrome . Here is From Firefox: Archive.js: Status 200 Content-Type
I get 3 errors 302:
|
where The reason why these problems started cropping up is that NC/OC now include a hard-coded CSP directive which sets |
I only use ownCloud |
I tried to add in the config.php:
But there are no changes |
Did you also update As far as Nextcloud versus Owncloud is concerned there are no differences (yet) in this respect. |
Yes, I did the |
Not Can you access those files which resulted in |
|
Try without index.php: |
|
Try to access |
redirects me immediately to |
let me try over curl |
|
There is some problem with the way urls are handled on your server, leading to these results. Check this page: https://doc.owncloud.org/server/10.0/admin_manual/configuration_server/index_php_less_urls.html ...for more information on how to enable 'pretty urls'. You can either try to enable them and see if it works, or try to disable any lingering rewrite logic. You installation currently seems to be rewriting some urls but not others, something which in combination with the hard-coded I'd try to enable them as this is more or less becoming the norm. |
I don't want to disable the index.php, that is only optional |
the only problem is with the cbr. the pdf and epub are working fine. as I said, all other apps follow the index.php redirect. |
Try the following workaround: diff --git a/files_reader/templates/cbreader.php b/files_reader/templates/cbreader.php
index 24bac88..9bb2d6a 100644
--- a/files_reader/templates/cbreader.php
+++ b/files_reader/templates/cbreader.php
@@ -32,13 +32,13 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
- <!-- <base href="<?php p($urlGenerator->linkTo('files_reader',''));?>"> -->
+ <base href="<?php p($urlGenerator->linkTo('files_reader',''));?>">
<title>
<?php p($title);?>
</title>
<link rel="shortcut icon" href="img/book.png">
- <link rel="stylesheet" href="vendor/icomoon/style.css?v=<?php p($version) ?>">
- <link rel="stylesheet" href="vendor/cbrjs/css/cbr.css?v=<?php p($version) ?>">
+ <link rel="stylesheet" href="<?php p($urlGenerator->linkTo('files_reader', 'vendor/icomoon/style.css')) ?>?v=<?php p($version) ?>">
+ <link rel="stylesheet" href="<?php p($urlGenerator->linkTo('files_reader', 'vendor/cbrjs/css/cbr.css')) ?>?v=<?php p($version) ?>">
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'js/lib/Blob.js')) ?>?v=<?php p($version) ?>"> </script>
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/epubjs/libs/jquery.min.js')) ?>?v=<?php p($version) ?>"> </script>
<script type="text/javascript" nonce="<?php p($nonce) ?>" src="<?php p($urlGenerator->linkTo('files_reader', 'vendor/sindresorhus/screenfull.js')) ?>?v=<?php p($version) ?>"> </script> This re-enables the |
The book can be closed by navigating to the book reader bar and then close it. |
As said this is a workaround for problems caused by faulty rewrite logic, the real solution would be to get that working. Is there any reason why you don't want 'pretty' urls? Rewrite happens whether you have those or not. Without 'pretty' urls relative links for javascript worker scripts - normally directly loaded resources, i.e. without Suffice to say that scripts and styles are directly-loaded in all situations, i.e. without |
And indeed, you should not use the browser back button/key to navigate 'back' to the Files app. Reader is implemented as a plugin to the Files app and needs to be closed by either using its own close button (which you found), by reloading the page (which lands you in the Files app at the directory where you opened Reader) or pressing the Files app button (which lands you in the root directory of the Files app). On a mobile touch device Reader will open in its own window or tab (depending on which browser you use) in which case you can just close that window/tab. |
BTW, those
Where did |
I prefer to use the default index.php because that is the default ownCloud configuration. I use this server to test real ownCloud problems. About the CSP, I will come to you later. I remember the first time I installed the reader app (1.2.1) opened a new window after I upgraded to 1.2.2 was an issue that oC did not work fine, you helped me to fix it and in 1.2.3 was ok, but no new windows anymore. Well, that is not so important now. I have 2 valid domains: cloud.damken.com and damken.cloud (without com) |
Hey love your app, getting rid of the index.php worked for me as well. One question, can it be made compatible with CBR and CBZ files that use the WEBP format instead of JPG? There is a really great compressor I have used on most of my files that makes the CBZ/R file like 60% smaller, but the new files are WEBP on the inside. Just wondering if that would be hard/impossible? |
I didn't remove the index.php, I patched using #85 (comment) Talking with some engineers, the about the Compressed CBR, IMO looks like a good idea, but it will be better to create a separate issue as a feature request, that way it's better to track it. Am a right @Yetangitu ? |
not solved for me, using #85 (comment) |
Same problem as reported by Ryonez. |
After applying the commands:
The issue was resolved. |
Would you mind explaining what the commands are doing? |
@Ryonez
|
I'm not seeing a reff link in your reply. |
I hope that this URL points to the referenced comment |
Yup, that linked. Interesting, I'll look at it when I get up later. I'm just a little wary of editing core files like this, so gonna look at what exactly the commands are doing to the url first. Nice find though, will let you know what I find. |
@Yetangitu |
I have Reader (ebook reader) version 1.2.3 and ownCloud 10.0.7
I tried to open a cbr and I only can see:
I don't see anything in the log files:
The files is in a SMB/WND Share (if that helps)
The text was updated successfully, but these errors were encountered: