I have a lot of article drafts sitting unused in my WP DB and I’ve decided to release them even though I don’t have very much time to get into details.
Here’s one of them.
I always comment the code I write like:

// Bogdan -> initializing dispatcher
$this->dispatcher->init();
//-

Very often I’m required to extract the parts of the code I wrote, even though they are not full functions or classes, but just simple variables, or…
Read more

When issuing symfony-propel-build-model and using sfGuardPlugin, some errors might appear.
Error: Attempt to set foreign key to nonexistent table, sf_guard_user!

Solution: The solution is very simple and involves changing the name of the database in the schema.xml to propel. Don’t worry, the database name will remain the one set in propel.ini, this is just to leverage the different xml files so that foreign keys can be processed.
The whole line should be:

<database name="propel" defaultIdMethod="native" noxsd="true"   package="lib.model">

If that doesn’t work, try changing the package from lib.model to plugins.sfGuardPlugin.lib.model (not recommended but if it does the work, why not…;)).
Read more

Advertisements