Hello,
sorry for my English.
I'm trying to make an application to communicate remotely with an installation of Gallery2.
Through GalleryRemote everything works properly. With what I've realized I can just log in and read the whole list of albums. If I try to create an album I get this error:
OK
Error: Error (ERROR_MISSING_OBJECT)<b>in</b> modules/remote/GalleryRemote.inc <b>at line</b> 1204 (GalleryCoreApi::error)
<b>in</b> modules/remote/GalleryRemote.inc <b>at line</b> 657 (GalleryRemoteController::_assertHasViewPermission)
<b>in</b> modules/remote/GalleryRemote.inc <b>at line</b> 139 (GalleryRemoteController::newAlbum)
<b>in</b> main.php <b>at line</b> 250 (GalleryRemoteController::handleRequest)
<b>in</b> main.php <b>at line</b> 104
<b>in</b> main.php <b>at line</b> 88
#__GR2PROTO__
debug_user=guest
debug_time=0,082s
debug_exception=
OK
Error: Error (ERROR_MISSING_OBJECT)<b>in</b> modules/remote/GalleryRemote.inc <b>at line</b> 1204 (GalleryCoreApi::error)
<b>in</b> modules/remote/GalleryRemote.inc <b>at line</b> 657 (GalleryRemoteController::_assertHasViewPermission)
<b>in</b> modules/remote/GalleryRemote.inc <b>at line</b> 139 (GalleryRemoteController::newAlbum)
<b>in</b> main.php <b>at line</b> 250 (GalleryRemoteController::handleRequest)
<b>in</b> main.php <b>at line</b> 104
<b>in</b> main.php <b>at line</b> 88
#__GR2PROTO__
debug_user=guest
debug_time=0,056s
debug_exception=
I used a command like this:
/main.php?g2_controller=remote:GalleryRemote&g2_authToken=" & authToken & "&g2_form[cmd]=new-album&g2_form[protocol_version]=2.1&g2_form[set_albumName]=" & TextBox1.Text
Same problem if I try to upload an image. In this case the error is the following:
OK
GalleryStatus Object
(
[_stack] =>
[_errorCode] => 8388609
[_errorMessage] => user id: 5 doesn't have permission: core.addDataItem for item id: 266299
[_stackTrace] => Array
(
[0] => Array
(
[file] => /ModuloGalleria/modules/core/classes/helpers/GalleryUserHelper_simple.class
[line] => 47
[function] => error
[class] => GalleryCoreApi
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => 8388608
[1] => /ModuloGalleria/modules/core/classes/helpers/GalleryUserHelper_simple.class
[2] => 45
[3] => user id: 5 doesn't have permission: core.addDataItem for item id: 266299
)
)
[1] => Array
(
[file] => /ModuloGalleria/modules/core/classes/GalleryCoreApi.class
[line] => 550
[function] => assertHasItemPermission
[class] => GalleryUserHelper_simple
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => 266299
[1] => core.addDataItem
)
)
[2] => Array
(
[file] => /ModuloGalleria/modules/remote/GalleryRemote.inc
[line] => 524
[function] => assertHasItemPermission
[class] => GalleryCoreApi
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => 266299
[1] => core.addDataItem
)
)
[3] => Array
(
[file] => /ModuloGalleria/modules/remote/GalleryRemote.inc
[line] => 128
[function] => addDataItem
[class] => GalleryRemoteController
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => Array
(
[protocol_version] => 2.1
[cmd] => add-item
[set_albumName] => 266299
)
[1] => GalleryRemoteProperties Object
(
[_map] => Array
(
[status] => 403
[status_text] => Upload failed\: 'user id\: 5 doesn't have permission\: core.addDataItem for item id\: 266299'.
)
)
)
)
[4] => Array
(
[file] => /ModuloGalleria/main.php
[line] => 250
[function] => handleRequest
[class] => GalleryRemoteController
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => Array
(
[protocol_version] => 2.1
[cmd] => add-item
[set_albumName] => 266299
)
)
)
[5] => Array
(
[file] => /ModuloGalleria/main.php
[line] => 104
[function] => _GalleryMain
[args] => Array
(
[0] =>
)
)
[6] => Array
(
[file] => /ModuloGalleria/main.php
[line] => 88
[function] => GalleryMain
[args] => Array
(
)
)
)
)
GalleryStatus Object
(
[_stack] =>
[_errorCode] => 8388609
[_errorMessage] => user id: 5 doesn't have permission: core.addDataItem for item id: 266299
[_stackTrace] => Array
(
[0] => Array
(
[file] => /ModuloGalleria/modules/core/classes/helpers/GalleryUserHelper_simple.class
[line] => 47
[function] => error
[class] => GalleryCoreApi
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => 8388608
[1] => /ModuloGalleria/modules/core/classes/helpers/GalleryUserHelper_simple.class
[2] => 45
[3] => user id: 5 doesn't have permission: core.addDataItem for item id: 266299
)
)
[1] => Array
(
[file] => /ModuloGalleria/modules/core/classes/GalleryCoreApi.class
[line] => 550
[function] => assertHasItemPermission
[class] => GalleryUserHelper_simple
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => 266299
[1] => core.addDataItem
)
)
[2] => Array
(
[file] => /ModuloGalleria/modules/remote/GalleryRemote.inc
[line] => 524
[function] => assertHasItemPermission
[class] => GalleryCoreApi
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => 266299
[1] => core.addDataItem
)
)
[3] => Array
(
[file] => /ModuloGalleria/modules/remote/GalleryRemote.inc
[line] => 128
[function] => addDataItem
[class] => GalleryRemoteController
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => Array
(
[protocol_version] => 2.1
[cmd] => add-item
[set_albumName] => 266299
)
[1] => GalleryRemoteProperties Object
(
[_map] => Array
(
[status] => 403
[status_text] => Upload failed\: 'user id\: 5 doesn't have permission\: core.addDataItem for item id\: 266299'.
[status_debug] => 1
)
)
)
)
[4] => Array
(
[file] => /ModuloGalleria/main.php
[line] => 250
[function] => handleRequest
[class] => GalleryRemoteController
[object] => GalleryRemoteController Object
(
[_optionInstances] =>
)
[type] => ->
[args] => Array
(
[0] => Array
(
[protocol_version] => 2.1
[cmd] => add-item
[set_albumName] => 266299
)
)
)
[5] => Array
(
[file] => /ModuloGalleria/main.php
[line] => 104
[function] => _GalleryMain
[args] => Array
(
[0] =>
)
)
[6] => Array
(
[file] => /ModuloGalleria/main.php
[line] => 88
[function] => GalleryMain
[args] => Array
(
)
)
)
)
#__GR2PROTO__
status=403
status_text=Upload failed\: 'user id\: 5 doesn't have permission\: core.addDataItem for item id\: 266299'.
status_debug=1
debug_user=guest
debug_time=0,045s
Can anyone help me??
Thank you.
Posts: 8339
http://galleryproject.org/node/111716#comment-404661
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 2
Thanks for your reply.
I look uploadfy but do not understand how to interact with it in a stand alone application (net framework). You have indications about?
I also tried with galleryadd.pl and I can do everything ... except that specify the parent album of a new album ... is there a solution?
Thank you.