Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fatal error in production environment #39

Closed
pentarim opened this Issue · 7 comments

3 participants

@pentarim

After fresh install I get the following error when accessing main page

PHP Fatal error: Class 'PHPCRProxies\SandboxMainBundleDocumentEditableStaticContentReferenceProxy' not found in /home/pentarim/webdev/symfony2/cmftest/vendor/symfony-cmf/vendor/doctrine-phpcr-odm/lib/Doctrine/ODM/PHPCR/Proxy/ProxyFactory.php on line 94

When accessing the main page in dev environment there is no such error.

@lsmith77
Owner

also there might be some CSS issues too

@dbu
Owner

sorry for being slow to investigate this. its indeed a problem with generating the proxies. when you change app/config/config.yml

doctrine_phpcr:
    odm:
        auto_generate_proxy_classes: true

(instead of %kernel.debug%) and then run app/console cache:clear --env=prod the page loads.

running cache:warmup --env=prod --no-debug does indeed generate the proxies (this should probably go into the readme) but the proxy is not found.

@uwej711 do you know why we only require the file if we generated it? should we not otherwise look if the file is there and include it in case? or should that happen somewhere else?
https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Proxy/ProxyFactory.php#L87

regarding css issues: the frontend editing integration is atm relying on app_dev.php serving things. we work on cleaning this up, but might take a moment. the rest should work afaik.

@lsmith77
Owner

we should probably look at how things are handled in the CouchDB ODM and it looks quite similar there:
https://github.com/doctrine/couchdb-odm/blob/master/lib/Doctrine/ODM/CouchDB/Proxy/ProxyFactory.php

i am not sure if we expect some autoloading to trigger loading the proxy classes ..

@lsmith77
Owner

looking at the ORM the code looks slightly different:
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L84

don't have time atm to debug this .. but i suspect the issue is with the handling of the autoGenerate property

@dbu
Owner

ok, i will look into this. just wanted to be sure to understand what to do and not do some weird hack :-)

@dbu dbu closed this issue from a commit
@dbu dbu updating to latest phpcr-odm with fixed ProxyFactory and adjusting to…
… removed alias parameter. fixes #39
c3d89c8
@dbu dbu closed this in c3d89c8
@dbu
Owner

one bug less. thanks for spotting this one, @pentarim!

@pentarim

Thanks for quick fix @dbu & @lsmith77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.