Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » General » No Last Post datas in Threads

Page: 1 2 Next

I'm confronted with difficulties at this point. TIA
don't worry be happy, bitch!
Attachments
this is weird.. i've had similar reports before.. but was never able to reproduce the problem..
what software + version are you using ? mysql ? django trunk ? sct trunk ?
Hey, we have Signatures !!! Great, isn't it ? ;)
WinXP Sp2
Python 2.5.1
Django trunk
SCT trunk
Mysql 5.0.22

One more weakness i'm find when replying to thread - url of link "Board" is corrupt (http://127.0.0.1:8000/forums/reply/show/0/ instead http://127.0.0.1:8000/forums/show/0/)
don't worry be happy, bitch!
could you please try out a few debugging statements.. i have written a few thoughts here: http://code.google.com/p/sct-project/issues/detail?id=81&colspec=ID%20Type%20Status%20Priority%20Milestone%20Component%20Owner%20Summary#c9 - although haven't gotten any notice what the result was..

ok .. so let's find a few useful debugging statements..
first of all you need to configure the logger.. if you haven't done so ..

for example i'm using the following (in my settings_local.py - i'm not really an
expert on the python logging framework but this is how it works for me :) ):

import logging
from logging.handlers import RotatingFileHandler

formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S', )

handler = RotatingFileHandler( '/var/log/sct/debug.log',
maxBytes = 1024 * 1024,
backupCount = 9,
)

handler.setFormatter( formatter )
handler.setLevel( logging.DEBUG )
logging.getLogger( '' ).setLevel( logging.DEBUG )
logging.getLogger( '' ).addHandler( handler )


now.. in sphene/sphboard/models.py line 759 right after ret = super(Post,
self).save() add:

logger.debug("saved post / threadinformation: %s" %
(str(post.get_threadinformation())))
logger.debug("page count: %s" % (post.get_threadinformation().get_page_count()))

if this outputs everything correctly ... it is probably a bug in the email template..
if not .. something went wrong when creating the thread information object.. so
please try this first..




Alexsandr Isayko said @ 2008-01-31 13:05:22:
One more weakness i'm find when replying to thread - url of link "Board" is corrupt (http://127.0.0.1:8000/forums/reply/show/0/ instead http://127.0.0.1:8000/forums/show/0/)


seems to be a simple bug.. never noticed that before.. i have created an issue for it http://code.google.com/p/sct-project/issues/detail?id=87
Hey, we have Signatures !!! Great, isn't it ? ;)
you mean the debug.log remained empty ? but was it created ?

anyway .. you can also try to use normal print statements instead of logger.debug in sphene/sphboard/models.py .. try it, start the debugging server.. and try to reproduce it ..


fyi: i've now tried it with mysql 5.0 .. and everything worked as it should.. so it's probably no DB specific problem.. neither from the python version (since i'm using python2.5 on this server) .. i still have no idea actually :(


--- Last Edited by Herbert Poul at 2008-01-31 22:26:21 ---
Hey, we have Signatures !!! Great, isn't it ? ;)
ah .. and .. could you look into the database if you get any results with:
select * from sphboard_threadinformation; .. if you have any results.. get a ID from a post (e.g. /board/thread/684/ take that 684):
select * from sphboard_threadinformation where root_post_id = 684; ... do you get any results ?
Hey, we have Signatures !!! Great, isn't it ? ;)
select * from sphboard_threadinformation where root_post_id = 684 -- -- -- no results !!! jh my god! Мляяятьь
don't worry be happy, bitch!
Alexsandr Isayko said @ 2008-01-31 22:35:13:
select * from sphboard_threadinformation where root_post_id = 684 -- -- -- no results !!!
have you replaced 684 with a post id that exists on your setup ? :)


is there an easy way i could try to directly debug SCT within your project ? maybe you could send me your project (in a zip file or something) .. or do you have a server where i could debug it remotely or something ?
Hey, we have Signatures !!! Great, isn't it ? ;)
Alexsandr Isayko said @ 2008-01-31 22:35:13:
select * from sphboard_threadinformation where root_post_id = 684 -- -- -- no results !!!
:) Third beer it would be out of place :) Sorry

In general - mysql return the records on this query
is there an easy way i could try to directly debug SCT within your project ? maybe you could send me your project (in a zip file or something) .. or do you have a server where i could debug it remotely or something ?

access to project i c't give because it commercial


don't worry be happy, bitch!
Alexsandr Isayko said @ 2008-02-01 06:37:36:
access to project i c't give because it commercial
ok .. let's try it another way :) .. update from subversion .. and then replace the file communitytools/sphenecoll/sphene/sphboard/models.py with the file i've attached to this post ..

afterwards run the development server.. and post a new thread.. you should see something like:

Updating thread information for testing
done updating thread information.
saved post / threadinformation: ThreadInformation object
[02/Feb/2008 13:58:13] "POST /board/post/3/ HTTP/1.1" 302 0

Hey, we have Signatures !!! Great, isn't it ? ;)
Attachments

Page: 1 2 Next

Please login to post a reply.



Powered by Sphene Community Tools