redbaron76 / PongoCMS-Laravel-cms-bundle

a CMS bundle for Laravel 3.2 and Twitter Bootstrap 2.2.0
http://pongocms.com
Other
100 stars 32 forks source link

Using Image Marker returns incorrect URL #37

Open drew1two opened 11 years ago

drew1two commented 11 years ago

Hi, If you insert the IMAGE marker into your content you get an invalid URL (hence no image showing). The URL created is this:- /cms/image/resize/100/100/no/imag0167.jpg

there is no cms/image directory.

If you use THUMB marker, all works well. But this is because the application is just requesting the thumbnail that's already been created. The IMAGE marker is trying to create it on the fly, but barfs when URL::to_action. Which in turn is using 'convention' instead of 'explicit'. Not sure this is making the difference or not. Maybe we should be using something other than URL::to_action.

I've no idea myself. This is my first look at Laravel and am so glad for PongoCMS to help get my head around it all :)

Anyone else noticed this problem using IMAGE marker?

redbaron76 commented 11 years ago

In the first case the image has been created dynamically by GD library. It's the route that creates it. Please check if your environment has GD library installed.

Il giorno 04/set/2013, alle ore 09:11, drew1two notifications@github.com ha scritto:

Hi, If you insert the IMAGE marker into your content you get an invalid URL (hence no image showing). The URL created is this:- /cms/image/resize/100/100/no/imag0167.jpg

there is no cms/image directory.

If you use THUMB marker, all works well. But this is because the application is just requesting the thumbnail that's already been created. The IMAGE marker is trying to create it on the fly, but barfs when URL::to_action. Which in turn is using 'convention' instead of 'explicit'. Not sure this is making the difference or not. Maybe we should be using something other than URL::to_action.

I've no idea myself. This is my first look at Laravel and am so glad for PongoCMS to help get my head around it all :)

Anyone else noticed this problem using IMAGE marker?

— Reply to this email directly or view it on GitHub.

drew1two commented 11 years ago

Yes'm Red, I have GD installed.

gd GD Support enabled GD Version 2.0 FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.4.8 T1Lib Support enabled GIF Read Support enabled GIF Create Support enabled JPEG Support enabled libJPEG Version unknown PNG Support enabled libPNG Version 1.2.46 WBMP Support enabled

drew1two commented 11 years ago

php5-gd: Installed: 5.3.10-1ubuntu3.6 Candidate: 5.3.10-1ubuntu3.7

redbaron76 commented 11 years ago

Sorry for the silly questions but...

Il giorno 04/set/2013, alle ore 11:34, drew1two notifications@github.com ha scritto:

php5-gd: Installed: 5.3.10-1ubuntu3.6 Candidate: 5.3.10-1ubuntu3.7

— Reply to this email directly or view it on GitHub.

drew1two commented 11 years ago

Hi Red, The link is a 404. And the mapping is:- 'PhpThumbFactory' => '(:bundle)/libraries/thumb/ThumbLib.inc.php',

It's just a copy and paste from the pongocms website. I gather all looks ok here.

drew1two commented 11 years ago

Hi Red, I'm actually seeing a lot of gobbly-gook (like the source of an image file) at that link. apologies.

I am using nginx however, and that's definately got something to do with it, because I have it setup to serve image files directly. When I switch off this setting and allow apache to process, I can see the image.

Guess I'll have to allow jpg's to slip through to apache (or maybe all)