我正在尝试使用创建包 symfony cmf。到目前为止一切正常,因为我能够编辑块但我无法保存我的内容。我收到以下错误:
Error occurred while saving
[{"message":"Not found: cms\/test","class":"RuntimeException","trace":[{"namespace":"","short_class":"","class":"","type":"","function":"","file":"\/var\/www\/JudoSharp\/vendor\/midgard\/createphp\/src\/Midgard\/CreatePHP\/Mapper\/DoctrinePhpcrOdmMapper.php","line":86,"args":[]},{"namespace":"Midgard\\CreatePHP\\Mapper","short_class":"DoctrinePhpcrOdmMapper","class":"Midgard\\CreatePHP\\Mapper\\DoctrinePhpcrOdmMapper","type":"->","function":"getBySubject","file":"\/var\/www\/JudoSharp\/vendor\/symfony-cmf\/create-bundle\/Symfony\/Cmf\/Bundle\/CreateBundle\/Controller\/RestController.php","line":89,"args":[["string","cms\/test"]]},{"namespace":"Symfony\\Cmf\\Bundle\\CreateBundle\\Controller","short_class":"RestController","class":"Symfony\\Cmf\\Bundle\\CreateBundle\\Controller\\RestController","type":"->","function":"getModelBySubject","file":"\/var\/www\/JudoSharp\/vendor\/symfony-cmf\/create-bundle\/Symfony\/Cmf\/Bundle\/CreateBundle\/Controller\/RestController.php","line":108,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"],["string","cms\/test"]]},{"namespace":"Symfony\\Cmf\\Bundle\\CreateBundle\\Controller","short_class":"RestController","class":"Symfony\\Cmf\\Bundle\\CreateBundle\\Controller\\RestController","type":"->","function":"putDocumentAction","file":null,"line":null,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"],["string","cms\/test"]]},{"namespace":"","short_class":"","class":"","type":"","function":"call_user_func_array","file":"\/var\/www\/JudoSharp\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php","line":117,"args":[["array",[["object","Symfony\\Cmf\\Bundle\\CreateBundle\\Controller\\RestController"],["string","putDocumentAction"]]],["array",[["object","Symfony\\Component\\HttpFoundation\\Request"],["string","cms\/test"]]]]},{"namespace":"Symfony\\Component\\HttpKernel","short_class":"HttpKernel","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","function":"handleRaw","file":"\/var\/www\/JudoSharp\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php","line":61,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"],["string","1"]]},{"namespace":"Symfony\\Component\\HttpKernel","short_class":"HttpKernel","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"->","function":"handle","file":"\/var\/www\/JudoSharp\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/DependencyInjection\/ContainerAwareHttpKernel.php","line":62,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"],["string","1"],["boolean",true]]},{"namespace":"Symfony\\Component\\HttpKernel\\DependencyInjection","short_class":"ContainerAwareHttpKernel","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"->","function":"handle","file":"\/var\/www\/JudoSharp\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php","line":187,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"],["string","1"],["boolean",true]]},{"namespace":"Symfony\\Component\\HttpKernel","short_class":"Kernel","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->","function":"handle","file":"\/var\/www\/JudoSharp\/web\/app_dev.php","line":28,"args":[["object","Symfony\\Component\\HttpFoundation\\Request"]]}]}]
我正在使用的前端代码如下:
<div about="cms/test" typeof="schema:WebPage" xmlns:schema="http://schema.org/">
<h1 property="schema:headline">Hey bra</h1>
<div property="schema:text">
<h2>Welcome to the Symfony CMF Demo</h2>
<p>If you see this page, it means that the...</p>
</div>
<p>Brotha!</p>
<p property="schema:sdlkfj">hey</p>
</div>
我不确定的是“关于”属性的用途。“about=cms/test”只是我输入的一些任意值。我猜它代表了一些 phpcr-odm 节点,但我什至不确定在哪里设置该节点,甚至不确定这些文档是如何工作的。我已经为我的项目创建了我的 phpcr-odm 数据库并且 phpcr-odm 正在工作,但我不确定所有这些东西是如何工作的。我对 symfony cmf 真的很陌生。请让我知道如何使用 create bundle 保存内容,因为文档很烂。我还阅读了有意义的 phpcr-odm 学说文档,但我不确定如何将它与这个问题联系起来。
谢谢。