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

Fix reader data saving #42

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sysadminstory
Copy link

This is a work in progress fix for the "not saving" anything #33 #29

This first fix is about the epub reader.

I tested this fix with :

  • epubreader in the 'apps' folder and Pretty URLs disabled
  • epubreader in the 'customapps' (additional custom app directory) folder and Pretty URLs disabled
  • epubreader in the 'apps' folder and Pretty URLs enabled
  • epubreader in the 'customapps' (additional custom app directory) folder and Pretty URLs enabled

Does it this PR fix anything for other epub users ?

Saving data for ePub File is fixed by updating the base path take as
reference.
Saving data for ePub File is fixed by updating the base path taken as
reference.
Move the loading of the 'pdf.worker.js' file from ready.js to pdfreader.php
@sysadminstory
Copy link
Author

This first fix is about the PDF reader.

I tested this fix with :

  • epubreader in the 'apps' folder and Pretty URLs disabled
  • epubreader in the 'customapps' (additional custom app directory) folder and Pretty URLs disabled
  • epubreader in the 'apps' folder and Pretty URLs enabled
  • epubreader in the 'customapps' (additional custom app directory) folder and Pretty URLs enabled

Does it this PR fix anything for other PDF users ?

Saving data for ePub File is fixed by updating the base path taken as
reference.
@ummon29 ummon29 mentioned this pull request Jan 30, 2022
@@ -28,7 +28,7 @@
?>

<html dir="ltr">
<head class="session" data-nonce='<?php p($nonce);?>' data-downloadlink='<?php print_unescaped($downloadLink);?>' data-fileid='<?php print_unescaped($fileId);?>' data-filetype='<?php print_unescaped($fileType);?>' data-filename='<?php print_unescaped($fileName);?>' data-version='<?php print_unescaped($version);?>' data-basepath='<?php p($urlGenerator->linkTo("epubreader",""));?>' data-scope='<?php print_unescaped($scope);?>' data-cursor='<?php print_unescaped($cursor);?>' data-defaults='<?php print_unescaped($defaults);?>' data-preferences='<?php print_unescaped($preferences);?>' data-metadata='<?php print_unescaped($metadata);?>' data-annotations='<?php print_unescaped($annotations);?>'>
<head class="session" data-nonce='<?php p($nonce);?>' data-downloadlink='<?php print_unescaped($downloadLink);?>' data-fileid='<?php print_unescaped($fileId);?>' data-filetype='<?php print_unescaped($fileType);?>' data-filename='<?php print_unescaped($fileName);?>' data-version='<?php print_unescaped($version);?>' data-basepath='<?php p($urlGenerator->linkToRoute('epubreader.page.showReader'));?>' data-scope='<?php print_unescaped($scope);?>' data-cursor='<?php print_unescaped($cursor);?>' data-defaults='<?php print_unescaped($defaults);?>' data-preferences='<?php print_unescaped($preferences);?>' data-metadata='<?php print_unescaped($metadata);?>' data-annotations='<?php print_unescaped($annotations);?>'>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sysadminstory can you explain this change? Will linkToRoute produce apps/epubreader instead of custom_apps/epubreader?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have read linkTo was deprecated, so I changed it to a non deprecated function.

To be honest, I'm totally not sure about what's wrong and what's right here !

Static files (like css, js, ...) are now loaded using the 'data-staticpath' parameter, that was added to every template.

Static files must be loaded using the real physical URL (un the
"customapps" folder if used) instead of the dynamic files, that must be
loaded using the index.php file (hidden if the URL rewriting is
activated)
@sysadminstory sysadminstory changed the title WIP Fix reader data saving Fix reader data saving Mar 22, 2022
@devnoname120
Copy link

@sysadminstory Is anything missing for merging this pull request? 🙏

devnoname120 pushed a commit to devnoname120/epubviewer that referenced this pull request Jul 30, 2023
Original PR: e-alfred#42

Saving data is fixed by updating the base path taken as reference.
@sysadminstory
Copy link
Author

@sysadminstory Is anything missing for merging this pull request? 🙏

Well, on my point of view, no, but the owner of this repo seems to be inactive :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants