Archive for July, 2008

Symfony: sfAssetsLibraryPlugin – troubleshooting

July 28, 2008

Right, so I have this scenario:

I exclude propel.ini from my sync’s with our web server. So after installing a few things i forgot to make the corresponding change online:

* Enable Propel behavior support in propel.ini:

propel.builder.AddBehaviors = true

So when running this (while installing sfAssetsLibraryPlugin):

symfony sfassetlibrary-create-root backend

I would get the following bastard of an error:

Creating root node at media…
PHP Fatal error:  Call to undefined method sfAssetFolder::makeRoot() in /var/www/xxxx/plugins/sfAssetsLibraryPlugin/lib/model/sfAssetFolderPeer.php on line 36

Fatal error: Call to undefined method sfAssetFolder::makeRoot() in /var/www/xxxx/plugins/sfAssetsLibraryPlugin/lib/model/sfAssetFolderPeer.php on line 36

EXTRA NOTE: I also had to add this line at the end of the create function in sfAsset.php:

chmod($this->getFolderPath().”/”. $this->getFilename(), 0604);

This has something to do with the way dreamhost has permission setup and the above create root line.

(The error here was that you could not see the images once uploaded)

I did some work!! – sfContactGrabberPlugin

July 23, 2008

Today I released a plugin for Symfony, well, more of an update for an old broken one.

It feels quite good to finally give something back. You can find it here

It basically add’s those forms that you see all over the place on social networking esk type sites that allow you to grab contacts from your accounts in other places.

At the moment it’s only working for gmail and yahoo, but I might end up adding some more functionally in the future, all depending on how the current project im working on pans out.

symfony: No package found for database “” in generated-schema.xml

July 22, 2008

Ok so i was setting up a Symfony 1.0 project recently and was getting this error. It took me a while of poking around to figure out what was wrong. The error indicated a lack of database’y things and I had my empty one defined in databases.yml so i was stumped.

The error was this:

Execution of target “om-template” failed for the following reason: /usr/share/php/symfony/vendor/propel-generator/build-propel.xml:470:1: No package found for database “” in generated-schema.xml. The propel.packageObjectModel property requires the package attribute to be set for each database.
[phingcall] /usr/share/php/symfony/vendor/propel-generator/build-propel.xml:470:1: No package found for database “” in generated-schema.xml. The propel.packageObjectModel property requires the package attribute to be set for each database.

Basically what is happening, is that since I had one defined i also had to have one listed in the schema, even an empty one.. so

To fix:

add the following at the top of config/schema.yml:

propel:

^^^thats it.

I also heard you can also delete your schema.yml file, but i wouldnt recommend that, and im not sure if it would even work.