Hi Marc. I had exactly this problem when I was duplicating some pages with attachments via the copyDocument() method and the attachment was not transferring. I ended up with a reference to the attachment in the xwikiattachment table but no corresponding record in xwikiattachment_content. This lack of content was preventing me from using the normal delete. So I located the content of the attachment that was to be copied (eg "id = 66666") and inserted the content from that using the missing reference number as the id. Then the page could display correctly and the usual delete method worked. Example SQL (55555 is the missing content id): INSERT INTO xwikiattachment_content SELECT '55555', XWA_CONTENT from xwikiattachment_content where XWA_ID = '66666'; A rbit messy, but it worked. Good luck. Cheers, Mark On Thu, 2006-02-16 at 01:29 -0500, Marc Lijour wrote:
On February 16, 2006 01:21 am, jeremi joslin wrote:
On 2/16/06, Marc Lijour <[email protected]> wrote:
I'm not sure, it can be this. Have you restart your tomcat?
I just tried and nothing changed.
I wonder how it can display an attachment which is not (visible to me) in the database?
can you just do an select * from xwikiattachment;
I did this one:
mysql> select * from xwikiattachment where XWA_AUTHOR = 'XWiki.OsnerJoseph';
and the document was not there (see 2nd email in the thread). This was last time.
After restarting xwiki, here is what I get: mysql> select * from xwikiattachment where XWA_AUTHOR = 'XWiki.OsnerJoseph'; +-------------+------------+----------------+----------+---------------------+-------------------+-------------+-------------+ | XWA_ID | XWA_DOC_ID | XWA_FILENAME | XWA_SIZE | XWA_DATE | XWA_AUTHOR | XWA_VERSION | XWA_COMMENT | +-------------+------------+----------------+----------+---------------------+-------------------+-------------+-------------+ | 493824533 | 1329616320 | 132795189.img | 81721 | 2006-02-10 09:45:26 | XWiki.OsnerJoseph | 1.1 | | | -1859509744 | 337185142 | nicky.jpg | 23505 | 2006-02-10 10:01:51 | XWiki.OsnerJoseph | 1.3 | | | 1870603601 | 337185142 | osner.jpg | 31151 | 2006-02-10 11:34:43 | XWiki.OsnerJoseph | 1.3 | | | -427375445 | 337185142 | hotel3.jpg | 91538 | 2006-02-10 10:18:25 | XWiki.OsnerJoseph | 1.1 | | | 1895209951 | 337185142 | joseph.bmp | 800754 | 2006-02-10 11:23:08 | XWiki.OsnerJoseph | 1.1 | | | 1612673344 | -593433723 | HatPicture.jpg | 104435 | 2006-02-11 15:23:30 | XWiki.OsnerJoseph | 1.1 | | | 444268704 | -593433723 | osner.jpg | 31151 | 2006-02-14 10:03:38 | XWiki.OsnerJoseph | 1.1 | | | 652278503 | 1329616320 | jo.jpg | 91538 | 2006-02-14 09:55:37 | XWiki.OsnerJoseph | 1.1 | | | -857322110 | -593433723 | jo.jpg | 91538 | 2006-02-14 09:58:20 | XWiki.OsnerJoseph | 1.1 | | | 2105339254 | 337185142 | josephos.doc | 0 | 2006-02-15 09:20:14 | XWiki.OsnerJoseph | 1.1 | | | 1134896447 | 337185142 | soj.doc | 0 | 2006-02-15 09:16:51 | XWiki.OsnerJoseph | 1.1 | | +-------------+------------+----------------+----------+---------------------+-------------------+-------------+-------------+ 11 rows in set (0.00 sec)
My 2 rogue documents are back! I still can't delete them, the same error appears.
I also have a jo.jpg in 2 places with the same version number, humm, is that correct?
Can I just delete them from this table then? What about the jo.jpg, do I remove one version?
jeremi
-- Blog: http://www.jeremi.info LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724 http://www.xwiki.org skype: jeremi23 -- msn et gtalk : [email protected]
plain text document attachment (message-footer.txt) -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Mark Robinson Regional Clarity Project Manager (HK & AU)
TNT Freight Managment (Australia) Limited TNT Freight Managment (Hong Kong) Limited 3rd floor, Two Harbourfront, 18-22 Tak Fung Street, Hung Hom, Kowloon, Hong Kong Tel: +852 26213688 (ext. 374) Mob: +852 90335711 Em : [email protected] Web: http://www.tntfreight.com