Piotr Pokora wrote:
Martin Gottlieb writes:

Hi!

My query was just looking up the GUID in question against the guid field
What is returned for this query?
SELECT id, metadata_created, metadata_revised FROM snippet WHERE guid=$GUID;


id metadata_created metadata_revised
9674    2009-08-04 21:09:13     2009-08-04 21:09:13

OK, we need to debug it.

Add this line somewhere before object is created:
midgard_connection::set_loglevel("debug");

And this one later:
midgard_connection::set_loglevel("warn");

If unsure where snippet is created, add first statement in midcom.php file.
Debug output will be huge though.

Logs are written either to log file configured in config file or to
apache's error log.
Try to create snippet once again and we'll see what's going on there.

ok, here are the pertinent entries in the log:

midgard-core (pid:5037):(info): midgard_snippet::create(...)
midgard-core (pid:5037):(debug):query=SELECT limit_sg_records, sg_records FROM quota WHERE typename='' and sitegroup=4 midgard-core (pid:5037):(debug):query=INSERT INTO snippet SET name='', up=257, guid='1de8206fb84f206820611de94e68762c0ce7a347a34',sitegroup=4,metadata_creator='8666c99d5e5a6388d37f5b0fd6a57289', metadata_created='2009-08-05 21:28:56+0000', metadata_revised='2009-08-05 21:28:56+0000', metadata_revision=0, metadata_revisor='8666c99d5e5a6388d37f5b0fd6a57289', metadata_size=197 ,metadata_locker='' ,metadata_locked='' ,metadata_approver='' ,metadata_approved='' ,metadata_authors='|8666c99d5e5a6388d37f5b0fd6a57289|' ,metadata_owner='7b8c7658f1ccb52310b8a3f2b5e4fb1c' ,metadata_schedule_start='' ,metadata_schedule_end='' ,metadata_hidden=0 ,metadata_nav_noentry=0 ,metadata_published='2009-08-05 21:28:56+0000' ,metadata_score=0 midgard-core (pid:5037):(debug):query=SELECT metadata_size FROM snippet WHERE id=9679 AND sitegroup=4 midgard-core (pid:5037):(debug):query=SELECT limit_sg_size, sg_size FROM quota WHERE typename='' and sitegroup=4 midgard-core (pid:5037):(debug):query=INSERT INTO repligard SET realm='snippet', guid='1de8206fb84f206820611de94e68762c0ce7a347a34', changed=NULL, action='create', typename='midgard_snippet', id=9679, sitegroup=4, object_action = 3 midgard-core (pid:5037):(debug):query=INSERT INTO snippet_i SET lang=0, doc='', code='', author='', sid=9679, sitegroup=4 midgard-core (pid:5037):(debug):query=INSERT INTO repligard (realm,guid,id,changed,action,sitegroup) VALUES ('snippet_i', '1de8206fb853400820611de94e68762c0ce7a347a34', 19162 , NULL, 'create', 4)
midgard-core (pid:5037):(debug):Object midgard_snippet created with id=9679

It's not showing any errors, but when I search for the guid in the repligard table, there are no records. Interestingly, if I try to run the insert statement, it fails with a duplicate record error. There is already a record with ID 9679. There are realm=snippet records going up to 9687 that do not seem to correspond to any real snippet records. Is it safe to delete these records ? Likewise the realm=snippet_i records.

Thanks.

Martin
_______________________________________________
user mailing list
[email protected]
http://lists.midgard-project.org/mailman/listinfo/user

Reply via email to