If I try to open gallery page as non-root user (UID > 1), I see next error message:

Fatal error: Call to undefined function node_gallery_get_relationship() in sites/all/modules/contrib/node_gallery/node_gallery_api.module on line 1177

CommentFileSizeAuthor
#1 1790710-non-root-permissions.patch5.82 KBzengenuity

Comments

zengenuity’s picture

StatusFileSize
new5.82 KB

Please try the attached patch. Make sure to clear cache after applying.

Cray Flatline’s picture

Sorry, but I can't apply patch to latest git version.

[layer13basestation] node_gallery > git apply -v 1790710-non-root-permissions.patch
Checking patch node_gallery_api.inc...
error: while searching for:
function node_gallery_api_get_gallery_list($type, $uid = NULL) {
$query = db_select('node', 'n')->fields('n', array('nid', 'title'))->condition('type', $type);
$items = array();
if ($uid && !node_gallery_api_user_access('edit', $type)) {
$query->condition('uid', $uid);
}
$result = $query->execute();

error: patch failed: node_gallery_api.inc:1186
error: node_gallery_api.inc: patch does not apply
Checking patch node_gallery_api.module...
error: while searching for:
'page callback' => 'node_gallery_json_get_sorted_images',
'page arguments' => array(3, 5, 6),
'access callback' => 'node_gallery_user_access',
'access arguments' => array('edit image', 3),
'file' => 'node_gallery.pages.inc',
'type' => MENU_CALLBACK,
);

error: patch failed: node_gallery_api.module:116
error: node_gallery_api.module: patch does not apply
Checking patch node_gallery_api.pages.inc...
error: while searching for:
// 'drupal_plupload_import_field_type' => $filefield_name,
// );
$output = '';
if (!user_access('bulk upload files with plupload')) {
drupal_set_message(t('You have permissions to view this tab, but not to upload images. Please inform an administrator that you need the \'bulk upload files with plupload\' permission.'), 'warning');
}
else {
if (!empty($gallery->edit_after_plupload)) {
$settings = array(
'ngid' => $gallery->nid,

error: patch failed: node_gallery_api.pages.inc:638
error: node_gallery_api.pages.inc: patch does not apply

Cray Flatline’s picture

Today's dev version is working well. Thanks a lot! Do you need more testing or it's too early to create bug reports? ;)

quicksketch’s picture

Status: Active » Fixed

This patch seems to have already been applied to the project and is in the unstable2 release. Can we mark it fixed? I'm looking for unfixed problems. ;)

zengenuity’s picture

Yes, I will make some issues for the items I know about.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.