When I upgraded my local php to 5.3 version I’ve got the problem that symfony model won’t build.
The error appeared was like: “Unable to return ‘affix’ for unknown CreoleType”
This is Creole issue – it cannot accept LONGVARCHAR and TEXT fields from Symfony schema.
To fix this Â please change text constant in CreoleTypes.php file (line 39 in my Creole version).
const TEXT = 30; //php 5.3.0 fix, using an unused int
This is not good solution but you need to build your model somehow. As temporary solution this is OK but we need to wait bugfix from Creole developers.
I’d like to share with this pretty simple script with you, hope it will save you few minutes.
You guys who familiar with this Symfony plugin for assets management probably know that it uses sfThumbnail plugin for making thumbnails of image assets.
sfThumbnail has configuration in app.yml and it looks like:
upload_dir: media # Asset library root, under the web/ dir
check_type: false # Set to true if you want to restrict the type of assets
types: ['image'] # Accepted asset types if check_type is true
thumbnail_dir: thumbnail # Where the image thumbnails are stored
use_ImageMagick: false # Set to true if you have the convert command
thumbnails: # Name and size (in pixels) of the thumbnails created at upload
tiny: # Displayed in the list page
small: # Displayed in the list page
shave: false # Cut strips to constraint the image size
large: # Displayed in the details page
original: # Displayed in the details page
search_pager_size: 20 # Number of resuts per page
mass_upload_size: 5 # Number of file upload controls displayed in the mass upload form
This is cool but when you have your project up and running and decided to add new type of thumbnail (for instance name it ‘big’)
you’ll have a problem: you need to resize all old images according to new thumbnail type.
Continue reading “Symfony sfAssetsLibraryPlugin assets resize script”