Forum OpenACS Development: Adding file from outside FS pkg

Request notifications

Collapse
Posted by Iuri Sampaio on
It says the callback call to fs.datasource can't find the SQL. However, fullquery's been properly installed, together with file-storage pkg

(i.e. procs.callback::search::datasource::impl::file_storage_object.fs_datasource)

The script runs fine, but after a few minutes, error.log throws the error below, in attempt run the callback.

p.s. Adding a file directly within /file-storage/ works just fine. I've written a custom TCL script and re-used fs::add_file

[10/Feb/2018:22:19:33][2037.7f49d8f97700][-driver:nsssl_v4-] Notice: ... sockAccept accepted 6 connections
[10/Feb/2018:22:19:40][2037.7f49d9f99700][-conn:evex:4-] Notice: FILESIZE 799473 | MAX 524288000
[10/Feb/2018:22:19:40][2037.7f49b5ffb700][-conn:evex:5-] Notice: FILESIZE 775831 | MAX 524288000
[10/Feb/2018:22:19:40][2037.7f49d9f99700][-conn:evex:4-] Notice: FOLDERID 32671
[10/Feb/2018:22:19:40][2037.7f49b5ffb700][-conn:evex:5-] Notice: FOLDERID 32671
[10/Feb/2018:22:19:40][2037.7f49d9f99700][-conn:evex:4-] Notice: TMP_FILENAME /tmp/ns-LqGYQB
NOTICE: content_revision__new/12 is deprecated, call content_revision__new/13 instead
[10/Feb/2018:22:19:40][2037.7f49b5ffb700][-conn:evex:5-] Notice: TMP_FILENAME /tmp/ns-tAjbvh
NOTICE: content_revision__new/12 is deprecated, call content_revision__new/13 instead
[10/Feb/2018:22:19:45][2037.7f49b5ffb700][-conn:evex:5-] Notice: FILESIZE 1680040 | MAX 524288000
[10/Feb/2018:22:19:45][2037.7f49b5ffb700][-conn:evex:5-] Notice: FOLDERID 32671
[10/Feb/2018:22:19:45][2037.7f49b5ffb700][-conn:evex:5-] Notice: TMP_FILENAME /tmp/ns-nQi3m9
NOTICE: content_revision__new/12 is deprecated, call content_revision__new/13 instead
[10/Feb/2018:22:19:55][2037.7f49b77fe700][-sched:10-] Error: search::indexer: error getting datasource for 32812 file_storage_object: No fullquery for dbqd.file-storage.tcl.file-storage-callback-procs.callback::search::datasource::impl::file_storage_object.fs_datasource and default SQL empty - query for statement missing
No fullquery for dbqd.file-storage.tcl.file-storage-callback-procs.callback::search::datasource::impl::file_storage_object.fs_datasource and default SQL empty - query for statement missing
while executing
"error "No fullquery for $statement_name and default SQL empty - query for statement missing""
(procedure "db_qd_replace_sql" line 10)
invoked from within
"db_qd_replace_sql $statement_name $pre_sql"
(procedure "db_exec" line 13)
invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_statement_name $sql]
}"
(procedure "::nsf::procs::db_0or1row" line 48)
invoked from within
"db_0or1row fs_datasource {} -column_array datasource"
(procedure "::callback::search::datasource::impl::file_storage_object" line 4)
invoked from within
"::callback::search::datasource::impl::file_storage_object -object_id 32812"
("uplevel" body line 1)
invoked from within
"::uplevel 1 [::list $procname {*}$args]"
invoked from within
"callback -impl $object_type search::datasource -object_id $object_id"
invoked from within
search::indexer
invoked from within
ad_run_scheduled_proc {{t f 31 search::indexer {} 1518278904 0 f}}

[10/Feb/2018:22:19:55][2037.7f49b77f

Collapse
Posted by Iuri Sampaio on
Files have been added, however, the callback error still remains.
I'm going to upgrade file-storage because of those warnings

NOTICE: content_revision__new/12 is deprecated, call content_revision__new/13 instead

Best wishes,

Collapse
Posted by Gustaf Neumann on
Dear Iuri,

as always, you can expect more and better answers, when you make the behavior reproduciable, by adding precise version numbers, etc. Forthermore, the right place for error reports is the issue tracker.

The error you sees comes from the indexer of the search package. When the issues does not show up for files added via the web interface of the file storage, but only files added via your custom code (that nobody can reproduce) then it seems most straightforward to compare what's different between these cases in your database.