Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2608 closed defect (fixed)

Blog Entries not showing up in the correct order.

Reported by: jtrahan Owned by: osimons
Priority: normal Component: FullBlogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I added a blog entry in earlier today. Then I added one a few hours later. When I added the new blog entry the one I added in earlier in the day came up before the newest blog entry.

When looked in database it looked like both blog entries were getting the same publish_time even though the entries were hours apart.

Attachments (0)

Change History (7)

comment:1 Changed 7 years ago by osimons

Strange. Very strange. Are you able to reproduce this with step-wise documentation? I have never seen it, or know how I could possibly research this without more information.

As a starter, it would be helpful to get some output from your db - could you please select this for me (replace post1 and post2 with the names of the strange posts you got):

select name, version, publish_time, version_time
from fullblog_posts where name in ('post1', 'post2'); 

comment:2 Changed 7 years ago by jtrahan

Because I changed the date on the backend I created 2 new posts a little bit set apart so you could see it. It appears it doesn't matter when I do it if I do 2 posts on the same day.

The version of python is 2.5 in case that makes a diff.

name version publish_time version_time
Post1 1 1203485395 1203531712
Post2 1 1203485395 1203531726

comment:3 Changed 7 years ago by osimons

Even stranger - I did not expect version_time to be different from publish_time for version 1...

I have to ask you for some more information; could you paste the overview of your versions from 'About' page. Just the 'System Information' section listing what software is installed and at what versions.

comment:4 Changed 7 years ago by jtrahan

Trac: 0.11dev-r6510 
Python: 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit (Intel)] 
setuptools: 0.6c7 
SQLite: 3.3.4 
pysqlite: 2.3.2 
Genshi: 0.5dev-r800 
mod_python: 3.3.1 
Pygments: 0.9 
Subversion: 1.4.6 (r28521) 
jQuery: 1.2.1 

comment:5 Changed 7 years ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

(In [3261]) FullBlogPlugin: Fix bug with post publish time.

A classic reference mistake as a datetime instance in a dict at class-level will only get initialised once (at inital module/class load). Always assumed these default values would be overwritten somewhere before saving, but no code actually took care of updating publish_time. Now it does.

While staring at publish and version times, also took the opportunity to remove 'Updated:' if there is only one version.

This is a highly recommended update for all users...

Closes #2608 - thanks for bug report, jtrahan!

comment:6 Changed 7 years ago by jtrahan

No Problem. I'll download your latest code and let you know if I see any other issues with it.

comment:7 Changed 7 years ago by jtrahan

I Downloaded you latest fixes and it does appear to be working properly now. Thanks again for the fix. :)

Add Comment

Modify Ticket

Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.