PDF Preview Issue [SOLVED]

Hi

Just installed the 6.1.0 Beta & enabled Onlyoffice as subdirectory. All office documents are working fine.

When i click on a PDF i get this error

Page unavailable

Sorry, but the requested page is unavailable due to a server hiccup.

Our engineers have been notified, so check back later.

i have USE_PDFJS = True in my seahub_settings file

i checked earlier post about this but i dont have a seafevents.pid file. when i installed 6.1.0 it did not create a seafevent.conf as well

this is my seahub_django_request.log

2017-06-12 23:16:59,192 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /lib/a7c3e4cb-f5fe-48eb-a720-58ca076ecec5/file/test.pdf
Traceback (most recent call last):
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/seahub/auth/decorators.py", line 27, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/seahub/base/decorators.py", line 74, in _decorated
    return func(request, *args, **kwargs)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/seahub/views/file.py", line 372, in view_lib_file
    return _file_view(request, repo_id, path)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/seahub/views/file.py", line 553, in _file_view
    fileshare = l[0] if len(l) > 0 else None
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py", line 144, in __len__
    self._fetch_all()
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py", line 965, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py", line 238, in iterator
    results = compiler.execute_sql()
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/sql/compiler.py", line 840, in execute_sql
    cursor.execute(sql, params)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/utils.py", line 98, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/home/haiwen/haiwen/seafile-server-6.1.0/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/mysql/base.py", line 124, in execute
    return self.cursor.execute(query, args)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 226, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorvalue
OperationalError: (1054, "Unknown column 'share_fileshare.permission' in 'field list'")
1 Like

Your database is not correct. There is a missing file ‘share_fileshare.permission’. Have you run upgrade script?

thats it… ran the upgrade scripts & it worked. thanks a lot