Stepping through the code I noticed that the function file_validate_number gets called without a max_number parameter, therefore failing for any one but the administrator user.

Perhaps this is my configuration issue. However, I have updated the code quickly to:

if (isset($max_number) && $current_number >= $max_number) { // Updated *AM 22-SEP-2009 (Line 525)

Comments

kmonty’s picture

Assigned: Unassigned » kmonty
Status: Active » Needs review
kmonty’s picture

Status: Needs review » Needs work

Your solution is a temporary work around but not a long-term problem solver. One thing I noticed:

The function is function file_validate_number($file, $max_number) { yet the function is called as 'file_validate_number' => array($limits['max_number']),. It seems that we are not passing the $file var. Additionally, the function itself never uses the $file var, so maybe we can just remove $file, and see if that solves the issue.

function file_validate_number($max_number) {. Did you try switching line 547 to that?

kmonty’s picture

Version: 6.x-2.0-alpha10 » 6.x-2.x-dev
kmonty’s picture

Title: You can only upload files » Authenticated users cannot upload files, only root user is able to
Priority: Normal » Critical
kmonty’s picture

kmonty’s picture

Marked a lengthy thread as a dup #488676: Only admin can upload images

kmonty’s picture

Status: Needs work » Postponed (maintainer needs more info)

Is anyone still having this issue? I maybe close this issue if no one can verify the problem continues to exist.

dddave’s picture

Status: Postponed (maintainer needs more info) » Fixed

Guess this is fixed as nobody complained for months.

Status: Fixed » Closed (fixed)

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

moosh101’s picture

Assigned: kmonty » moosh101
Status: Closed (fixed) » Active

Hi,

I have just downloaded the latest version 2 release (the stable beta) and I am also experiencing this issue, that is, only the admin can upload images. I have performed a permission rewrite and assigned the appropriate permissions for the authenticated user role, but still no go.

I am using the latest versions of all required and associated modules, Drupal 6.17 and PHP 5.3.1.

I sincerely appreciate any assistance you can provide.

Many thanks for your time,

Shane.

hexblot’s picture

Had the same problem, the following solved it for me (Drupal 6.17, PHP 5.1.6):
* Go to /admin/settings/node_gallery/list and edit your relationship
* you don't need to change anything on the first screen, so click next
* on the second screen, make gallery directory non-blank ( e.g. add gallery/%gid )

Clear cache, enjoy :)
Hope it helps some people.

dddave’s picture

Assigned: moosh101 » Unassigned
Status: Active » Fixed

No more reports, fix in #11 and any new user should start with NG3 now anyways.

Status: Fixed » Closed (fixed)

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