Forum .LRN Q&A: Re: Download Archive link throws an error when you have XoWiki pages

Hmm, i tried to recreate the behavior, in a 
new install, but i failed.

 - dotlrn 2.3.1 (including File Storage 5.3.1)
 - the actual xowiki portlet and applet 
 
The problem is that the xowiki-folder should not be 
located under the file-store-folder, and/or that the
file-store-download should not look into folders that 
are not under its control.

I would recommend to check, where the xowiki folder
of the community is located. Figure out the package_id
of the xowiki community instance

(e.g. in /ds/shell
::xowiki::Package initialize -url /dotlrn/classes/.../xowiki/ )

and query in the database

select i.name, f.folder_id, i.parent_id  from cr_folders f, cr_items i  where f.package_id = 4261 and i.item_id = f.folder_id;

with the approproate package_id. The parent_id of the 
folder should be outside of the file-storage. If this is
the case, i would check what folders are processed by the
bulk-download, and how it gets the idea to look for the
xowiki folder.

Hope this helps
-gustaf neumann



Hi Gustaf,

Thanks for the help on that. I've performed you query with the approppiate package_id and the parent_id was -100. I don't know if this sounds good or bad, but when I look at the object_type I can see a content folder.

When I access the file storage community folder, I can also see the XoWiki pages. The funny thing is: it doesn't happen for all the communities, just for some of them. Doing a little more of investigation, I can see another odd thing: The XoWiki object for this instance is ::4247, and I can see the ::3075 object file in the file storage community folder. So, I've erased the ::3075 object and the Index Page wich where being seen in the community folder, and even now the download archive link throws an error.

I've been using XoWiki Portlets and Applets from the very beginning. Do you think the errors have something to do with how the older versions treated the pages creation?

parent_id == -100 is ok, it means that the xowiki-folder is
not under the fs-folder, which is correct. 
So how does the file-store find some xowiki pages? 
Maybe, there are some xowiki-pages in the wrong folder? 

You should figure out the folder_id of the file-storage and do

  select item_id, name, content_type, storage_type  
  from cr_items where parent_id = 2533;

So far, i have not seen this, we are using xowiki-portlet in
various version in production since beginning and have not 
seen a problem there.


Hi Gustaf,

Thanks for the help and I'm sorry for the late answer. I've done the investigation just like you told me. I've found the community folder_id, and this is what I've found:

item_id | name | content_type | storage_type
---------+------------------------+------------------+--------------
108765 | ::3758 | ::xowiki::Object | text
108767 | en:index | ::xowiki::Page | text
573010 | arquivo-antigo | content_folder | text
20233 | software-cacic | content_folder | text
39706 | hist-rico-do-bate-papo | content_folder | text
3759 | public | content_folder | text

It seems like there are some XoWiki objects inside the community folder. The funny thing is: when I go to XoWiki administration page and look for its objects, the instance object is ::4247, what means that this Xowiki object doesn't exist in the community instance. And I've also tried to erase the folders manually and download it again, but the error is still there.

Any clue?

Ok, this is the problem. The main question is, how they get there. When i look at the item_ids, the two entries appear quite old. In a next step, i would recommend to output as well the creation_date and the package_id to figure the age and the xowiki instance. If these are quite old, this might have been some unknown earlier bug. If you find fresh entries, one should track the problem down.

The following query will list on your site all xowiki pages which are in in folders together with other folders:

select a.item_id, a.name, b.name, a.parent_id
from cr_items a, cr_items b,cr_folders f
where a.parent_id = f.folder_id and b.parent_id = f.folder_id
and a.content_type like '::%' and b.content_type = 'content_folder';

Ok, these are the query results. The first one, with creation_date:

item_id | name | content_type | storage_type | creation_date
---------+------------------------+------------------+--------------+-------------------------------
20233 | software-cacic | content_folder | text | 2007-02-23 10:19:54.19227-03
108765 | ::3758 | ::xowiki::Object | text | 2007-03-30 12:00:06.974362-03
108767 | en:index | ::xowiki::Page | text | 2007-03-30 12:00:07.064489-03
573010 | arquivo-antigo | content_folder | text | 2007-05-02 14:04:41.461104-03
39706 | hist-rico-do-bate-papo | content_folder | text | 2007-03-14 18:30:33.551438-03
3759 | public | content_folder | text | 2007-02-06 11:17:18.221666-03

Now the second one that you suggested with creation_date too:

item_id | name | name | parent_id | creation_date
---------+-----------+------------------------+-----------+-------------------------------
108765 | ::3758 | arquivo-antigo | 3758 | 2007-03-30 12:00:06.974362-03
108767 | en:index | arquivo-antigo | 3758 | 2007-03-30 12:00:07.064489-03
108765 | ::3758 | public | 3758 | 2007-03-30 12:00:06.974362-03
108767 | en:index | public | 3758 | 2007-03-30 12:00:07.064489-03
108765 | ::3758 | software-cacic | 3758 | 2007-03-30 12:00:06.974362-03
108767 | en:index | software-cacic | 3758 | 2007-03-30 12:00:07.064489-03
108765 | ::3758 | hist-rico-do-bate-papo | 3758 | 2007-03-30 12:00:06.974362-03
108767 | en:index | hist-rico-do-bate-papo | 3758 | 2007-03-30 12:00:07.064489-03
523419 | ::5657 | Arquivos do sisau | 5657 | 2007-04-26 17:00:57.975437-03
523421 | en:index | Arquivos do sisau | 5657 | 2007-04-26 17:00:58.193165-03
523419 | ::5657 | public | 5657 | 2007-04-26 17:00:57.975437-03
523421 | en:index | public | 5657 | 2007-04-26 17:00:58.193165-03
1491998 | en:index | curso-eproinfo | 31218 | 2007-08-15 01:28:39.608321-03
1491998 | en:index | public | 31218 | 2007-08-15 01:28:39.608321-03
464380 | ::51437 | sgd-1-0 | 51437 | 2007-04-23 15:20:24.41398-03
464382 | en:index | sgd-1-0 | 51437 | 2007-04-23 15:20:24.576715-03
464380 | ::51437 | public | 51437 | 2007-04-23 15:20:24.41398-03
464382 | en:index | public | 51437 | 2007-04-23 15:20:24.576715-03
464380 | ::51437 | new-folder-4206473 | 51437 | 2007-04-23 15:20:24.41398-03
464382 | en:index | new-folder-4206473 | 51437 | 2007-04-23 15:20:24.576715-03
464380 | ::51437 | new-folder | 51437 | 2007-04-23 15:20:24.41398-03
464382 | en:index | new-folder | 51437 | 2007-04-23 15:20:24.576715-03
2272500 | ::560894 | artigos-para-publica-o | 560894 | 2007-11-14 13:44:46.059727-03
2272500 | ::560894 | site | 560894 | 2007-11-14 13:44:46.059727-03
2272500 | ::560894 | public | 560894 | 2007-11-14 13:44:46.059727-03
3772749 | ::3390856 | new-folder-3654118 | 3390856 | 2008-04-16 11:58:51.743952-03
3772749 | ::3390856 | new-folder | 3390856 | 2008-04-16 11:58:51.743952-03