zikula-modules / DizkusModule

Official repository for Dizkus, a fully integrated forum solution for Zikula 1.4+
21 stars 7 forks source link

javascript editing is broken #219

Closed craigh closed 11 years ago

craigh commented 11 years ago

Warning: spl_object_hash() expects parameter 1 to be object, string given in /Applications/MAMP/htdocs/core.git/src/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 1588

craigh commented 11 years ago

@drak - I'm wondering if this is possibly a recent change in the core or in Doctrine. This occurs from the ajax controller updatepostAction() method. which hasn't changed recently. It seems to be triggered in the persist method and I'm pretty sure Dizkus is attempting to persist an entity. Ajax is a bear to debug...

ghost commented 11 years ago

There are no changes I can think of.

cmfcmf commented 11 years ago

You have a relation persist cascading problem. If fails in \Doctrine\ORM\UnitOfWork#cascadePersist with $entity = ForumUserEntity when trying to get the $relatedEntities for the $assoc['fieldName'] = 'user', $relatedEntities is "2" but should be an object. Don't ask me why..

craigh commented 11 years ago

@cmfcmf how did you learn that? I cannot figure out how to debug this.

cmfcmf commented 11 years ago

I'm using PhpStorm + XDebug. Once you have configured it, it's quite easy to do, just as normal functions.

craigh commented 11 years ago

cool. I'm using storm as well. I will need you to show me how to configure sometime. I'll be back online in 4 or 5 hours if you are around. I'm using MAMP so I am not sure if Xdebug is installed or not though...

ghost commented 11 years ago

http://geek.michaelgrace.org/2011/08/xdebug-cachegrind-and-mamp-on-mac-osx/

craigh commented 11 years ago

thanks @drak, but that is MAMP Pro. which I do not have.

ghost commented 11 years ago

It's cheap :dollar:

craigh commented 11 years ago

oh, you're buying?

craigh commented 11 years ago

@cmfcmf - ok, I have xdebug installed (thanks @drak) and am ready to learn how to use it with phpStorm...