[SOLVED] Imageframe doesn't work on latest snapshot
lvthunder
Joined: 2003-09-12
Posts: 808 |
Posted: Thu, 2005-02-10 02:54 | |||
I have downloaded the latest snapshot and the imageframe doesn't show up. I deleted my gallery2 installation and loaded it with no mods. The only thing I did was upload pictures and turn on the imageframe module. I have attached the html of the album that should show the frames. Thanks, ----
|
||||
Posts: 25
I'm experiencing the same thing. Actually, I noticed that the basic, css-border-based frames (solid and dots) weren't working with an update a few days ago. (Sorry, can't say exactly when.) All others were working at the time.
As of an update this evening, none of the frames are working -- for either thumbnails or albums.
----
Gallery URL (optional):
Gallery version: 02-09-2005 Snapshot
Webserver (with version): Apache 1.3.31
Database (with version): MySQL 4.0.20
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system: Windows 2000
Web browser/version: Firefox 1
Posts: 8601
it's working fine for me.. i did refactor how imageframes are rendered recently; nothing in the past few days.
lvthunder, your attachment shows the CSS for wood imageframe is at the top but the images have id %ID%, class %CLASS% (these should have been rewritten with the approprate values) and no <table> around them. kinda looks like the custom {imageframe} smarty tag isn't getting processed correctly, or at all. i see both of you are on windows, perhaps there's a platform difference here.
can you put some print statements in modules/imageframe/classes/ImageFrameImpl.class, function renderImageFrame() or some text in modules/imageframe/templates/ImageFrame.tpl to see if either of those are being called at all?
Posts: 808
I put some text into ImageFrame.tpl and it didn't show up. I put this line in the function renderImageFrame and it didn't show up either.
If you need anything else let me know.
Posts: 25
I did the same and got the same results.
Since we're both using Firefox, I tested it in IE6, also. Got the same.
(Incidentally, when looking at Gallery in IE, in which I have a default background color of gray set, I noticed there's apparently no background color defined for Gallery.)
Posts: 8601
very odd... if you look in ImageFrameImpl::init() you'll see the "register_block" call.. this should route control to the renderImageFrame function when {imageframe} is used in a smarty template, as in layouts/matrix/templates/albumBody.tpl. i assume smarty would generate some sort of error if the register_block was completely ignored, but somehow it isn't processing the tag correctly.
if either of you can debug why this isn't working it would be great.. or if you can PM me your G2 url and a shell login to your server i can try to debug.
Posts: 8601
ok, i found the problem. the bug occurs if you view an album page before you activate the imageframe module (so anytime you don't install the module while in the installer, but do it later from site admin).
any of you can fix your site now by going to lib/tools/test/index.php and clicking the FlushTemplates test to clear your smarty cache. i'll work on a fix so this won't happen in future for new installs.
Posts: 808
Thanks Mindless this worked for me.
Posts: 25
FlushTemplates appears to have gotten most of the frames back, although the css-border-based frames (solid and dots) still aren't showing in either FF1 or IE6.
I've taken a look at the source and can't fathom why they wouldn't. Strangely, my random image in the left margin, which uses the same class, shows it just fine, while thumbnails in the main body don't. Weird. I'll try looking again after dinner.
I'm not sure this could be the entire cause, as I activated the image frame module from the installer. (I'm certain of this as I had to perform a completely fresh installation just last night due to an unrelated problem.)
Posts: 8601
some change must have been made in the matrix CSS to override imageframe CSS.. I put !important in the CSS for solid/dots to fix this. update from cvs or nightly snapshot tomorrow to get this fix.
i've also committed the fix for the root cause of this problem.. the new mechanism for modules to register custom smarty tags won't cause different things to get compiled into the smarty template depending whether a module is active or not...
Posts: 25
That seems to do the trick -- thanks!