GalleryTranslator.class not imported
|
pizzacat
Joined: 2008-10-05
Posts: 3 |
Posted: Sun, 2008-10-05 19:29
|
|
Hello all, I'm experiencing some strange behavior with my Gallery2 instalation: Quote:
PHP Fatal error: Class 'GalleryTranslator' not found in [...]\modules\core\classes\GallerySession.class on line 787 This error does not occur if the user is logged in when accessing the album. Perhaps this is because GalleryTranslator is imported as part of the login process? As a quick workaround I explicitly added an import statement right before the line that caused the error.
GalleryCoreApi::requireOnce('modules/core/classes/GalleryTranslator.class'); // <-- Added this line myself
list ($ret, $detectedLanguageCode) = GalleryTranslator::getDefaultLanguageCode();
This fixes the problem, but of course this is not a very good permanent solution. Did anyone else come across this error? Could there be something wrong with my G2 installation, causing an import to be skipped? Thanks! Guno
|
|
| Login or register to post comments |

Posts: 32324
- i can't reproduce this with gallery 2.3.
- i don't see how this can happen, neither with g2.2.6.
so the password's module entity onLoad handler does a GallerySession::start() ($session->start()) which then triggers the code in GallerySession.class which invokes GalleryTranslation::...
but GalleryTranslator.class is included early on before any password / onload code could run. it's included in main.php through GalleryInitFirstPass() -> $gallery->initTranslator().
if you can reproduce this issue with Gallery 2.3, please let me know. in that case we'll probably want to debug the issue on your server to see what's going on.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 3
I've upgraded to 2.3RC2, and the problem still persists.
Upgrade was done by copying my old config.php file into the unpacked 2.3 distribution, so there should be no traces left of previous installations.
The only thing that's changed is that the error now is thrown at line 780 instead of 787
Posts: 3
I'm having the same problem. Maybe this is something more to do with the fact that we're runnning on IIS......:
Gallery version = 2.2.6 core 1.2.0.8
PHP version = 5.2.6 cgi-fcgi
Webserver = Microsoft-IIS/7.0
Database = mysqli 5.0.67-community-nt, lock.system=database
Toolkits = Gd, SquareThumb, Thumbnail, Exif, Ffmpeg, ArchiveUpload, ImageMagick
Acceleration = none, none
Operating system = Windows NT WEB-FTP 6.0 build 6001
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
Rows in GalleryAccessMap table = 16869
Rows in GalleryAccessSubscriberMap table = 2411
Rows in GalleryUser table = 2
Rows in GalleryItem table = 2409
Rows in GalleryAlbumItem table = 71
Rows in GalleryCacheMap table = 0
Posts: 3
Looks like this error has disappeared in the 2.3 release. Nice
Posts: 1
I've encountered this problem as well. It seems to be only when I have URLs redirected in /gallery/config.php to use https.
(e.g. $gallery->setConfig('baseUri', 'https://server.mysite.edu/gallery/main.php'); )
This happened after I upgraded from 2.2.1 this past weekend. After implementing the fix above, it works, but this doesn't seem like a great solution.
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.6 (Fedora)
Database = mysqli 5.0.27-log, lock.system=flock
Toolkits = Getid3, LinkItemToolkit, Dcraw, Exif, ArchiveUpload, ImageMagick, NetPBM, Gd
Acceleration = partial/21600, partial/21600
Operating system = Linux myservername 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 15:12:59 EST 2007 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1
Rows in GalleryAccessMap table = 94
Rows in GalleryAccessSubscriberMap table = 35309
Rows in GalleryUser table = 11
Rows in GalleryItem table = 35307
Rows in GalleryAlbumItem table = 173
Rows in GalleryCacheMap table = 51
Posts: 1
This happens to me as well. I'm using https and on CentOS 5, PHP 5.1.6 (cli) (built: Jul 16 2008 19:52:52), and apache 2.2.3
Also the above fix resolves the problem flawlessly.
Posts: 1
Same issue - https on CentOS 5.2, PHP 5.1.6, Apache 2.2.3. As above, adding the extra line to GallerySession.class resolved the issue.
Not an ideal fix though, as I assume it will be broken upon an upgrade.