sfMediaLibrary symfony 1.1 broken images

October 9, 2008

After installing sfMediaLibrary plugin on my local dev environment (OSX, MAMP, symfony v1.1 PEAR), I found the paths to the images were incorrect as the forward slashes in the directories to the images were doubled up (eg: //uploads//assets//imagename.jpg).

I found a hack solution by editing youproject/plugins/sfMediaLibraryPlugin/modules/sfMediaLibrary/lib/BasesfMediaLibraryActions.class

In the executeIndex() function I removed the extra forward slashes by changing the following line:

$this->webAbsCurrentDir = $this->getRequest()->getRelativeUrlRoot().’/’.$this->uploadDirName.’/’.$currentDir;

to:

$this->webAbsCurrentDir = $this->getRequest()->getRelativeUrlRoot().$this->uploadDirName.$currentDir;

I know this solution is less than ideal, but will do for now.

Advertisements

One Response to “sfMediaLibrary symfony 1.1 broken images”


  1. […] sfMediaLibrary symfony 1.1 broken images Be trained by symfony experts – Oct 29 Atlanta – Oct 29 Montreal – Nov 19 Paris – Nov 26 Atlanta – Dec 10 Paris […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: