smyfony cmf / doctrine-cache + node IDs (pathlength in windows)

51 views
Skip to first unread message

Christian Ruttorf

unread,
Dec 6, 2014, 6:40:44 AM12/6/14
to symfony-...@googlegroups.com
Hi there,

I am currently experimenting with the Symfony CMF and experiencing some problems if I develop in Windows 7 that i'd like to share: While trying to create a bit of a deeper page structure/document tree I happened to get the following Exception:

Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Warning: file_put_contents(): Filename cannot be empty in [...]\vendor\doctrine\cache\lib\Doctrine\Common\Cache\FilesystemCache.php line 117") [...]"

Since I'm quite new to the Symfony CMF, Doctrine, and what the Cache does I am not entirely sure why the filename parameter is actually empty or where this problem arrises in the first place but I am guessing that the problem lies with the Doctrine Cache useing the whole node ID/path (and other things) to create the Filename for the Cached Node. So, what happens, for example, is the following, the Cache creates the following file for a page called 'faq'

[...]\app\cache\dev\doctrine\cache\file_system\85731b9f91aa69bd\883cbc88bf0d9dfc\183c59eb1c7bda7b\cef02de912422eb8\[nodes weak references cmscontentfaq, routeContent, default][1].doctrinecache.data
 
which leaves me in my case more or less 34 more characters before it seems like the Windows (7?) maximum-pathlength is exceeded (at least on my system/cmf setup). If i'm trying to add 'deeper' pages like 2 or 3 levels deep with mediocre path names I start running into problems, like the exception up there, while on linux it doesn't seem to matter. 

My question now is: Am I missing something? Is there any way around this problem? If it is an Issue that should be adressed, where would I do that?

Thanks for the read!
Chris

Lukas Kahwe Smith

unread,
Dec 8, 2014, 4:53:25 AM12/8/14
to symfony-...@googlegroups.com, Christian Ruttorf
You can quickly “fix” the issue by disabling the cache:
http://symfony.com/doc/current/cmf/cookbook/database/doctrine_cache.html

Now the issue itself seems to be inside the Doctrine Cache library. I seem to remember that they worked on this a while back, but it seems they didn’t find a solution :-/

regards,
Lukas Kahwe Smith
sm...@pooteeweet.org



signature.asc

Christian Ruttorf

unread,
Dec 8, 2014, 7:18:23 AM12/8/14
to symfony-...@googlegroups.com, h3rz...@gmail.com

Ok, thanks for the insight! Will try to disable the cache and see how it influences the perfomance while developing.

As it seems this is a known issue, may i suggest to mention it in the documentation somewhere? The way it behaved on my end was at first pretty much without a pattern which made it even harder to come up with an idea of what's wrong there, might be a bit discouraging for beginners (like me).

Lukas Kahwe Smith

unread,
Dec 8, 2014, 7:50:13 AM12/8/14
to symfony-...@googlegroups.com, h3rz...@gmail.com
I thought it was fixed but generally we have to admit that none of our core devs are using Windows, so we simply do not test :-/
It would be good if you could contact the Doctrine dev team about your issue to confirm if there isn’t a work around. Once you have confirmed please submit a PR to the docs.
signature.asc
Reply all
Reply to author
Forward
0 new messages