This problem only occurs after releases of Gallery 3 beta 1 (snapshots from Github). After I do a clean install of a git snapshot, the image paths found in the combined CSS file are not getting written correctly. The only problem is forward slashes instead of backslashes occurring for all image files. So, I don't get the JQuery UI glass waves, or the superfish dropdown arrows. The same problem also occurs in the admin area. This problem also only occurs on Windows, Linux is fine.
I'm running Apache 2.2.11 (from apache.org), PHP 5.2.10/5.3.0, and MySQL 5.1.36.
Posts: 16504
Try specifying the full url, I just took a look at the CSS that's generated in a default install and that's what they're doing.
http://www.example.com/gallery3/themes/default/images/yourimage.png
Other than that, a link to your site would be helpful to see what's going on there.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
OK, I can't give you the website address (because my web server is in a vm), but I can give you some specific examples in the combined CSS where the paths are written incorrectly.
In the above example, the path for the background should be:
'http://192.168.124.130/gallery3/lib/superfish/images/arrows-ffffff.png', not:
'http://192.168.124.130/gallery3/lib\superfish\images\arrows-ffffff.png'
Notice the directions of the slashes. All other image assets in the CSS behave in the same manner. Another example:
The correct paths for these images should read:
http://192.168.124.130/gallery3/lib/themeroller/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png
http://192.168.124.130/gallery3/lib/themeroller/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
(respectively)
If you could find a way to fix this, it would be greatly appreciated. Thanks!
Posts: 16504
Is the server a windows server?
In the actual CSS file, before it gets combined, are the slashes, forward slashes or backslashes?
Are you using the default theme without any customization or have you customized a theme and CSS?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
I am using Windows XP SP3 as my server.
In the actual CSS file, the paths are correct (I assume whatever PHP script processes it switches the direction of the slashes)
I am simply using the latest snapshots from github with no customization.
Posts: 16504
I'll have to dig into the code and take a look. Right now, the only supported operating system for Gallery to run on is Linux.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
Should I post this issue on Trac, and if so, what should I name and/or put for the description?
Posts: 16504
You can try, again, G3 isn't supported on Windows and unless someone codes the fix and it doesn't break anything I doubt much effort will be put into it.
After staring at the code for awhile, I think it would be in /modules/gallery/libraries/Gallery_View.php that what ever change needed to happen would be. Possibly a minor change in either combine_files or process_css functions.
I don't have anything setup on Windows to test though.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16504
I just learned that the code for this is getting refactored and they have been made aware of what's going on here, so if it's a one-liner easy fix it may well be fixed.Scratch that, if I can find a fix for it, it might get added... I'm installing everything needed to run and test this on Windows now so, we'll see.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
Alright, thanks a lot nivekiam!
Posts: 16504
Make the change in /modules/gallery/libraries/Gallery_View.php on or about line 138 as shown here:
http://github.com/nivekiam/gallery3/commit/b96ac1eb81b7ccd5bd050ffab0ca9ce1feec8f4f
EDIT: 2009-07-15 Updated URL with more recent commit, code is out of the loop now.
I'm still trying to figure out this whole git push, merge, commit, stuff. That was modified on a file pulled from git yesterday morning.
In my testing on Apache and Win XP SP 3 it appears to work. Don't know if it's an acceptable fix. I'll find that out soon enough. But please test it before I send it to bharat for him to review.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
This fix doesn't fix the problem of the icons/images paths on Windows. Just to verify what I did:
I'm still using the actual G3 project git snapshot from 7/13/09 with your code changes, but nothing was changed in that time regarding this issue.
Posts: 16504
I guess I should have specified don't change the kohana_profiler... file. Don't know why or how that got modified on my local version. But I doubt that changed anything, I think an empty line return got added to my local copy. Again, I never even touched that file so I don't know what my git pull/clone did....
I only changed/added that one line in Gallery_View.php.
Oh wait, try this. Open one of your css files, like /themes/default/css/screen.css just open it in something like notepad or wordpad making sure to it's a plain text file editor and the formatting didn't go all screwy and just save it.
Then clear you browser cache or force a page reload (in FF ctrl+shift+R, don't know about IE)
That will force G3 to re-combine those files. It might not have been doing that if you just made the change. At least that's one behavior I observed. I gotta figure out how to clear the cache in G3
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
The image paths for the icons/images now work, but there is a slight problem with uploading images. Only the image process is kind of crapping out. Only the first image I upload only gets processed. This probably isn't related to your fix though, but it could be related...possibly. I'm not that experienced in PHP yet, so...
Posts: 16504
I'll try on my machine and check that out.
If not, is your site publicly accessible?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
No, sorry, I run my machine inside a VM.
Posts: 31
Here's a snippet of my error log when I tried to upload some images:
2009-07-14 11:46:22 -07:00 --- error: Caught exception rebuilding image: Desert
@todo EMPTY_INPUT_FILE
#0 [internal function]: graphics_Core::resize('C:\ss\apache2\h...', 'C:\ss\apache2\h...', Array)
#1 C:\ss\apache2\htdocs\gallery3\modules\gallery\helpers\graphics.php(155): call_user_func_array(Array, Array)
#2 C:\ss\apache2\htdocs\gallery3\modules\gallery\helpers\photo.php(111): graphics_Core::generate(Object(Item_Model))
#3 C:\ss\apache2\htdocs\gallery3\modules\gallery\controllers\simple_uploader.php(65): photo_Core::create(Object(Item_Model), 'C:\ss\apache2\h...', 'Desert.jpg', 'Desert')
#4 [internal function]: Simple_Uploader_Controller->add_photo('1')
#5 C:\ss\apache2\htdocs\gallery3\system\core\Kohana.php(291): ReflectionMethod->invokeArgs(Object(Simple_Uploader_Controller), Array)
#6 [internal function]: Kohana::instance()
#7 C:\ss\apache2\htdocs\gallery3\system\core\Event.php(209): call_user_func(Array)
#8 C:\ss\apache2\htdocs\gallery3\system\core\Bootstrap.php(55): Event::run('system.execute')
#9 C:\ss\apache2\htdocs\gallery3\index.php(85): require('C:\ss\apache2\h...')
#10 {main}
Posts: 16504
Yeah, I seriously doubt that has anything to do with this. I'd have to dig into this further, but that really sounds like your version of GD or ImageMagick (which ever you're using) is choking on that particular image. But I'll try it on my workstation when I get a chance.
Can you post or PM me a link to that particular image, just in case?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
Just kidding. I downloaded the latest git hub snapshot and it solved the image uploading issue. You should probably should submit this fix to bharat; it seems to work fine for me.
Posts: 31
Will this fix be included in the G3 beta 2 release. I have seen no indication of it, but...it would be nice to have this fix included with this release. Thanks!
Posts: 16504
No
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 31
Oh well, maybe in the next beta or final. Thanks! (I can always edit the code manually anyways)
Posts: 16504
Yeah, it's just too soon for B2, that's getting wrapped up and hope to be shipping today/tonight.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here