Code in _gallery_init treats ERROR_MISSING_OBJECT to mean the user is not mapped into G2.. however, the same error is returned when URL rewrite is in use and an invalid path is given. Not sure if this is the best resolution, but the attached patch at least gets the right error into drupal watchdog for bad path.

CommentFileSizeAuthor
#1 gallery_user.txt590 bytesSigne
gallery_init_patch.txt2.79 KBmindless
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Signe’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Priority: Minor » Critical
FileSize
590 bytes

A much simpler solution. Don't attempt to create a G2 user for anonymous. This causes the Gallery module to return the standard G2 'path not found' error.

mindless’s picture

what if a non-guest accesses an invalid path?

kiz_0987’s picture

Priority: Critical » Normal
Status: Needs review » Needs work

Committed a modified version of this. Still does not work for logged in users, but certainly helps.

profix898’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Status: Needs work » Fixed

As in the 5--2 branch the user sync does no longer happen in gallery_init(), this problem should be fixed. Invalid paths are handled in gallery_handle_request() now, this works for logged in users as well. (An admin will still see ERROR_MISSING_OBJECT, but its catched nicely and remains invisible for 'normal' users.)

Anonymous’s picture

Status: Fixed » Closed (fixed)