g2 just stopped working on me. Not sure what the problem is. Haven't looked into the code yet but thought I'd post in case someone had seen this before.
Thanks
Notice: Undefined offset: 76 in /usr/local/apps/gallery2/data/smarty/templates_c/%%4065470550/%%159/%%1596089014/albumBody.tpl.php on line 217
* in modules/core/classes/GallerySmarty.class at line 100 (gallerystatus::error)
* in modules/core/classes/GalleryTemplateAdapter.class at line 817 (gallerysmarty::trigger_error)
* in /usr/local/apps/gallery2/data/smarty/templates_c/%%4065470550/%%159/%%1596089014/albumBody.tpl.php at line 238 (gallerytemplateadapter::actionset)
* in lib/smarty/Smarty.class.php at line 1808
* in lib/smarty/core/core.smarty_include.php at line 41 (gallerysmarty::smarty_include)
* in /usr/local/apps/gallery2/data/smarty/templates_c/%%4065470550/%%124/%%124147064/ShowItem.tpl.php at line 5
* in lib/smarty/Smarty.class.php at line 1808
* in lib/smarty/core/core.smarty_include.php at line 41 (gallerysmarty::smarty_include)
* in /usr/local/apps/gallery2/data/smarty/templates_c/%%4065470550/%%-17/%%-1740578653/global.tpl.php at line 16
* in lib/smarty/Smarty.class.php at line 1316
* in modules/core/classes/GallerySmarty.class at line 82 (smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 154 (gallerysmarty::fetch)
* in main.php at line 299 (gallerytemplate::render)
* in main.php at line 24
Posts: 7985
This might happen if you update your G2 but don't tear it down and rebuild it from scratch. Can you verify that you've got the latest code and you can cause this error to happen after making a completely new install?
Posts: 26
This the timestamp from cvs checkout:
Oct 1 21:13 gallery2
I didn't update the g2 code. The only thing I can think of which caused this is that I added files to the g2 root album, I then created a new sub album and moved all the images to that sub album.
I guess I just go through the code update procedure and see if repeating the same process yeilds the same result. I tried to look through the template code to figure out what the problem was but sadly my php is a little rusty and the templating code appears quite complex.
Here is a pretty basic php question u might be able to help me with, How do I output to the log file? So let's say in
lib/smarty/Smarty.class.php
I want to write the name of the file that Smarty is trying to load to the log file. Is there an easy way to do this?
Thanks!
Posts: 26
I got the lastest code and followed the readme on the manual steps to reset my g2. I did get the setup and the empty main page to appear. I then added a set of pictures from a local server directory and they appeared with no thumbnails. Subsequently going to main.php generated the same error as before.
I just reset it all again and I ran the unit tests. Two failed:
Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 11520 bytes) in /usr/local/www/gallery2/modules/core/classes/GalleryAlbumItem.class on line 304
Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 8 bytes) in /usr/local/www/gallery2/modules/core/classes/Gallery.class on line 764
Module Class Function Success? Time
core admincorecontrollertest testchangevalues FAIL 0.1418
core admincorecontrollertest testadduploadlocalserverdir FAIL 0.0880
and the one at the bottom didnt' return a success or a time,
core albumtest testloadrootalbum
though that might be because I don't have anything in the album.
Posts: 7985
Hmm. Did you have ImageMagick or NetPBM enabled? Can you post the URL to the images that you uploaded so that I can try them in my dev G2? Thanks.
This problem is almost definitely going to screw up the results. You need to fix it first. See FAQ c.16
Posts: 26
I am pretty sure that was the problem. I had the module installed but not activated.
Oh thanks. Didn't think g2 issues would be in the faq.
Posts: 7985
Any update on these problems? I'm not able to reproduce them with the latest code...
Posts: 26
I adjusted my memory as per the faq and I don't have the problems I mentioned before. G2 must have been running out of memory and just dumping that message to me. I do have g1 running in addition to g2 so that probably exceeded the memory that php had available.
The no thumbnails thing I am pretty sure was that I hadn't activated the NetBPM or imageMagick.
Thanks for the help.