visual issue
  • 8 Comments sorted by
  • Hi Martin!

    Browser can not get your static files (images and css files) for some reason. There are couple of reasons why this could be happening and best would be to debug with Web Developer inside of browser to see what is going on. 

    If you are using Apache for hosting:
    - Maybe you did not do "./manage.py collectstatic" command
    - Maye your  THIS_BOOKTYPE_SERVER is pointing to wrong server name (and that would also make BOOKTYPE_URL point to wrong name), so browser can not fetch the right files.

    If you are using builtin python server to host it there is a silly bug in Django, where you would need to change config for these two parameters into this:
    STATIC_URL  = '/static/'
    DATA_URL  = '/data/'

    Aco
  • Hi,

    I've encountered the same issue, when I've tried the "./manage.py collectstatic" I got:

    Traceback (most recent call last):
      File "./manage.py", line 5, in <module>
        from unipath import Path
    ImportError: No module named unipath

    I suspect THIS_BOOKTYPE_SERVER is pointing to wrong server name, since the debug console gives me this:

    bejk.ad.mlp.cz/:19 GET http://booktype.mlp.cz/static/CACHE/js/2d386e957f90.js net::ERR_NAME_NOT_RESOLVED
    bejk.ad.mlp.cz/:31 GET http://booktype.mlp.cz/static/CACHE/js/22f995ced817.js net::ERR_NAME_NOT_RESOLVED
    (index):424 GET http://booktype.mlp.cz/static/core/img/footer_logo.png net::ERR_NAME_NOT_RESOLVED
    (index):315 Uncaught ReferenceError: $ is not defined

    Since I've installed it automatically on Ubuntu 14, could you please navigate me to the config?

    Thank you very much,

    Vojtech

  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Vojtech, you have a couple of potential issues here.

    First, make sure that http://booktype.mlp.cz/ is resolvable, it does not seem to be in public DNS so please check that first. If you are just testing locally, try setting up an entry for the IP address of your server in your /etc/hosts file. For example:

    192.168.1.2     booktype.mlp.cz  booktype

    If after that you still get errors about unipath, this module is a standard requirement for Booktype and should have been installed automatically in the pybundle. Is the pybundle file present in /var/lib/booktype on the server?

    Cheers!

    Daniel
  • Hi Daniel,

    thanks a lot for you reply. The thing is, I wanted to change http://booktype.mlp.cz/ into local IP address, because the URL won't work for now - I've tried to manually edit these:

    instance1_site/settings/base.py
    instance1_site/settings/dev.py
    instance1_site/settings/prod.py

    Tried adding the IP address to the /etc/hosts file - no change. About the pybundle - it seems alright:

     ls -l /var/lib/booktype/
    total 30732
    drwxr-xr-x  2 root root     4096 Mar 11 14:20 bin
    -rw-r--r--  1 root root 31437330 Nov 18 13:36 booktype-dependencies.pybundle
    drwxr-xr-x 24 root root     4096 Mar 11 14:14 build
    drwxr-xr-x  2 root root     4096 Mar 11 14:14 include
    drwxr-xr-x  8 root root     4096 Mar 11 16:10 lib
    drwxr-xr-x  2 root root     4096 Mar 11 14:14 local
    drwxr-xr-x  2 root root     4096 Mar 11 16:10 scripts
    drwxr-xr-x  3 root root     4096 Mar 11 14:14 src

    but I still get the unipath error. Is there a way of automatically reinstalling using the installation guide? After apt-get autoremove booktype I could get to the GUI installations guide.

    Thank you very much!

    Vojtech
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Vojtech,

    You do not need to add IP addresses by themselves to /etc/hosts - this file is the place to put host names which are not in DNS, including dummy domain names for testing. Could you paste a copy of what you have in this file for your Booktype server and desktop machine (where you use the web browser to access Booktype) please? If you are testing on the same machine, we only need to see the server file.

    Cheers!

    Daniel
  • Hi Daniel,

    please see the attached text files - I've added the dummy domain names both in desktop and server hosts. Now it takes me to localhost, where there's Apache2 Ubuntu Default Page (It works! etc.). 

    I've tried to reinstall booktype with following the Automated install guide, but now the result is the same. What I am doing wrong?

    Thanks in advance,

    Vojtech
  • Hi Daniel,

    I've made a mistake setting up postgresSQL database at start, missing a parameter. Now it all works fine.

    Sorry to bother and I really appreciate your help,

    Vojtech
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Vojtěch,

    Glad to hear you've got it working! Please post details of the database setup error, it may be useful for other users.

    Cheers!

    Daniel