Open neaai opened 10 years ago
@neaai I too have run into this issue. The way the authors have chosen to implement this plugin, it will fail with stock installs with SQLite or MySQL. However, for MySQL, you can fix this issue by installing Time Zone Support into the database server. See here for a blog post I've found useful in addressing this: http://www.larryullman.com/2011/05/27/utc-and-time-zone-support-in-mysql/
Once you've installed TZ support in MySQL, it works like a champ. I don't know if it is possible to fix SQLite to work with this plugin, sorry.
@mkoistinen I tried to change the database from sqlite to mysql and followed the article mentioned to check and provide TimeZone support into the database server. Switching to mysql and adding timezone support, did not make a difference for me, still the "latest entries plugin" is created empty and broken. I will verify again whether I properly installed the timezone support into mysql, but on the other hand, the plugin was working two weeks ago, more or less, and I was using sqlite for the tests at the time.
Thank you and regards.
More on this issue,
If one uses Django 1.5.5 then this trouble is not there. When one uses Django 1.6 then there is the mentioned behaviour. I have also tried with Django 1.7b and the situation is the same as with 1.6. so in all, of all these tests that I have been able to perform, the combination for full functionality discussed, is achieved by:
Django-1.5.5 + CMS-3.0 + aldryn-blog-0.3.7
The database used in the tests was sqlite, unchanged from what the cms installer put there initially. I hope this to be of help. Thank you and regards.
The troublemaker is line 136 in models.py Adding from future import unicode_literals was enough for me to make it work
I have tried this several times and in different installations. How I replicate this everytime with the same results is like this:
I tried this also (but I don't know if this is related to the above):
I got the following error lines:
Traceback (most recent call last): File "", line 1, in
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 71, in repr
data = list(self[:REPR_OUTPUT_SIZE + 1])
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 96, in iter
self._fetch_all()
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 854, in _fetch_all
self._result_cache = list(self.iterator())
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
for row in compiler.results_iter():
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 709, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 782, in execute_sql
cursor.execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/util.py", line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 450, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: no such table: aldryn_blog_latestentriesplugin
I hope this helps. Regards.