Hi Gerard,
I think the culprid could be the use of a model named Event. I remember having similar seemingly unexplainable errors when using a model named Event. If I remember correctly, it is Doctrine interpreting the name Event that's causing the issue.
Can you try with a different name and see if this helps? You can still name your modules Event if you need..
Hope this helps,
Kind regards,
Erik Van Kelst
IT specialist - OpenSource developer
--
sent from my mobile phone
Hi Gerard,
You can clean your model files with a symfony doctrine task after removing them from your schema.yml. Just type php symfony, you should find the command in the list.
Alternatively, you can delete all your custom model, form and filter files in your lib dir inclusive those in the base folders. Also make sure to clean any autogenerated admin modules and drop the corresponding tables in your database. Empty the cache folder and do a php symfony cc(c)
Then try adding model by model and look for an alternative name for Event, I spent hours finding that on out.
Kind regards,
Erik Van Kelst
IT specialist - OpenSource developer
--
sent from my mobile phone
Hi Gerard,
This starts to sound really weird, I never experienced anything alike. Have you restarted apache / php? Are you using apc?
Kind regards,
Erik Van Kelst
IT specialist - OpenSource developer
--
sent from my mobile phone
if u give me ur code base and a database backup i can try to run it on
my instalation and see if it runs or give me the same error, maybe
that can help...
2012/1/11 gerard....@leadfusion.com <gerard....@leadfusion.com>:
first thing u need to know about migrations is DDL QUERYS CANT RUN IN
TRANSACTIONS (AT LEAST IN MYSQL) SO, THEY CANT BE ROLLED BACK.
second thing is: DOCTRINE DOESNT MAKE SAFE DDL QUERYS this means
doctrine doesnon put yours fields names between [`] (i dont know the
name of that character :P) so YOU CANT USE SQL RESERVED WORDS FOR
FIELDS OR TABLE NAMES (for example you canot use order, or exists for
a field name, this is the full list
http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html)
when u dont have that 2 things in mind (like me, long time ago) u do
things like this one:
u define this table:
News:
actAs: [ Timestampable, Sortable, DmVersionable ]
columns:
title: { type: string(255), notnull: true }
date: { type: date, notnull: true, unique: false }
excerpt: { type: string(800) }
body: { type: clob, extra: ckeditor }
image_id: { type: integer }
is_active: { type: boolean, notnull: true, default: false }
run migrations, a creates the tables and all run fine.
and then u change your model like this
News:
actAs: [ Timestampable, Sortable, DmVersionable ]
columns:
title: { type: string(255), notnull: true }
date: { type: date, notnull: true, unique: false }
excerpt: { type: string(800) }
body: { type: clob, extra: ckeditor }
image_id: { type: integer }
is_active: { type: boolean, notnull: true, default: false }
user_id: { type: integer }
order: { type: integer }
relations:
User:
class: User
local: user_id
User:
columns:
name: { type: string(255), notnull: true }
looks fine right? well this kind of thing can mess ur life, the
migration version generated here will not run complete,
it will first create the user table, wich is OK
then it will try to add the 2 fields in the News tables
user id is OK
but ORDER its a reserved word, and this will throw an error, but for
the time this happend the user table is already in the database and
the user_id field is in the news table
u cant be able to roll it back, beacause it wont update the migration version,
and when u find the error is the field named order and change the name
and generate a new version you will find migrations broken and not
running saying than table exists, or field exist or someting like
that, and the only way to fix it is manually,
u need to find where the migrations scipt breaks and undo query by
query manually, then delete the broken version files, then fix ure
schema, and start again.
its a fucking pain in the ass... but with caution... u dont need to worry...
that is my expierience... and the only real issue i found in migrations.
2012/1/11 Javier Neyra <javier....@gmail.com>:
So, I created a new diem project from git, completed the installation
process and when I ran dm:setup, it failed with the same error I'm
experiencing in my current project. I've been trying to research this
error, but all I could dig up is that it never turns out to be too
descriptive of the actual problem :-/
>> tokens /home/webapps/lfcms/lib/model/doctrine/dmUserPlugin/base/BaseDmRecordPermissionGroup.class.php
>> tokens /home/webapps/lfcms/lib/model/doctrine/dmUserPlugin/base/BaseDmRecordPermissionUser.class.php
>> autoload Resetting application autoloaders
>> file- /home/webapps/lfcms/cache/admin/dev/config/config_autoload.yml.php
>> autoload Resetting application autoloaders
>> file- /home/webapps/lfcms/cache/admin/dev/config/config_autoload.yml.php
>> diem Loading adminConfiguration...
>> doctrine dropping tables
SQLSTATE[HY000]: General error: 2014 Cannot execute queries while
other unbuffered queries are active. Consider using
PDOStatement::fetchAll(). Alternatively, if your code is only ever
going to run against mysql, you may enable query buffering by setting
the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.
On Jan 8, 4:10 am, "gerard....@leadfusion.com"
<gerard....@leadfusion.com> wrote:
> Yeah, I use service httpd restart and service mysql restart. I use APC
> and have only cleared opcode cache.
>
> It definitely is very weird, especially because everything else works
> great. I'm at the point where I may start with a fresh project and
> rebuild, but I would have really liked to avoid that.
>
> On Jan 8, 3:52 am, 4levels <4le...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi Gerard,
>
> > This starts to sound really weird, I never experienced anything alike.
> > Have you restarted apache / php? Are you using apc?
>
> > Kind regards,
>
> > Erik Van Kelst
> > IT specialist - OpenSource developer
> > --
> > sent from my mobile phone
> > On Jan 8, 2012 12:23 PM, "gerard....@leadfusion.com" <
>
> > gerard....@leadfusion.com> wrote:
> > > And the site tree and xml site map still generate urls for all the
> > > modules that were created and deleted including the individual records
> > > that no longer exist...
>
> > > On Jan 8, 2:46 am, "gerard....@leadfusion.com"
> > > <gerard....@leadfusion.com> wrote:
> > > > Followed suggestions. Still the same issue with front list displays
> > > > and slugs, but updating project no longer stalls.
>
> > > > I removed tables, but there are still records in tables like
> > > > dm_auto_seo and dm_page_view. I removed everything from schema.yml or
> > > > are you referring to some other schema files (e.g. tmp/
> > > > timestamp_schema)?
>
> > > > I manually deleted models, filters, forms, removed references in
> > > > modules.yml and deleted modules from front and admin.
> > > > I ran doctrine:build --sql, doctrine:insert-sql, dm:setup
>
> > > > I recreated the news object and it was unfortunately exhibiting the
> > > > same bug.
>
> > > > I'm using symfony 1.4.7-DEV php 5.3.8
>
> > > > I also migrated the project from a local wamp instance to lamp
> > > > (centOS, AWS, rightscale deployment). Not sure if the difference in
> > > > environment could have affected things.
>
> > > > Kye, I don't have any blogs. One site, where I'm trying to create
> > > > three modules that resemble the Article example, but without comments,
> > > > author or translation. I also added a date field.
>
> > > > On Jan 8, 1:08 am, Jacek Jêdrzejewski <jacek.jed...@gmail.com>