Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | gallery_user.txt | 590 bytes | Signe |
gallery_init_patch.txt | 2.79 KB | mindless |
Comments
Comment #1
Signe CreditAttribution: Signe commentedA 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.
Comment #2
mindless CreditAttribution: mindless commentedwhat if a non-guest accesses an invalid path?
Comment #3
kiz_0987 CreditAttribution: kiz_0987 commentedCommitted a modified version of this. Still does not work for logged in users, but certainly helps.
Comment #4
profix898 CreditAttribution: profix898 commentedAs 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.)
Comment #5
(not verified) CreditAttribution: commented