3D FlipBook - Why do I keep getting 404 errors?

p***n@magikweb.ca
2021-05-28
2021-06-19

Hi!

I've been setting up a flipbook on one of our customer's website and so far, I got it working, but I keep getting 404 errors in my console:

GET https://www.magikweb.net/gasq-ca/templates/default-book-view.html 404
GET https://www.magikweb.net/gasq-ca/css/black-book-view.css 404
GET https://www.magikweb.net/gasq-ca/js/default-book-view.js 404

I'm using Wordpress, but due to some restrictions I'm using the jQuery plugin instead of the WP plugin. The files themselves are not at the root so I defined the locales like the documentation shows. The errors I'm getting seem to be linked to the templates, even though I've defined my templates paths and resources. Some part of the code seems to assume that the files are placed at the root of the server (https://www.magikweb.net/gasq-ca/ is the root).

Locales:

window.PDFJS_LOCALE = {
  pdfJsWorker: '<?=get_site_url()?>/wp-content/themes/pro-child/sites/177/3d-flipbook/js/pdf.worker.js',
  pdfJsCMapUrl: '<?=get_site_url()?>/wp-content/themes/pro-child/sites/177/3d-flipbook/cmaps'
};

Initialization code:

$(document).ready(function(){
                    $('.solid-container').FlipBook({
                        pdf: '<?=get_site_url()?>/wp-content/uploads/sites/177/2021/05/offre-service-gasq-livre.pdf',
                        preloadPages: 16,
                        cachedPages: 16,
                        pagesForPredicting: 16,
                        template: { 
                            html: '<?=get_site_url()?>/wp-content/themes/pro-child/sites/177/3d-flipbook/templates/default-book-view.html',
                            styles: [
                                '<?=get_site_url()?>/wp-content/themes/pro-child/sites/177/3d-flipbook/css/black-book-view.css'
                            ],
                            links: [{
                                rel: 'stylesheet',
                                href: '<?=get_site_url()?>/wp-content/themes/pro-child/sites/177/3d-flipbook/css/font-awesome.min.css'
                            }],
                            script: '<?=get_site_url()?>/wp-content/themes/pro-child/sites/177/3d-flipbook/js/default-book-view.js',
                            printStyle: undefined, 
                        },
                        controlsProps: {
                            actions: {
                                cmdBackward: {
                                    code: 37,
                                },
                                cmdForward: {
                                    code: 39
                                },
                                mouseCmdWheelZoom: {
                                    enabled: true,
                                    flags: 1
                                },
                                cmdZoomIn: {
                                    code: 187
                                },
                                cmdZoomOut: {
                                    code: 189
                                }
                            }
                        }
                    });
                });

As I said, the Flipbook is working, but I would like to get rid of the 404 errors in the console so any help would be appreciated. Thanks!

Replies

a***r@3dflipbook.net
2021-06-19
2021-06-19

if the question is still actual we need a link to a test page.

p***n@magikweb.ca
2021-06-21
2021-06-21
a***r@3dflipbook.net
2021-06-30
2021-06-30

remove CSS class flip-book-container

Log In to leave a comment