问题标签 [sulu]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
symfony - Sulu Admin 中的客户模块安装问题
我已经在我的 Sulu 标准安装中集成了示例模块。我用于示例模块的代码来自以下存储库:
https://github.com/sulu/ExampleNewsBundle
我遵循的集成步骤来自此
http://blog.sulu.io/how-to-develop-a-bundle-in-the-sulu-admin-1
安装后我在为模块加载 JS 时收到此错误:
经过一番研究,我发现 404 错误是由于 URL 中附加了 locale(en) 造成的。
是否可以从 URL 中删除语言环境?
任何参考将不胜感激。
symfony - 尝试访问 sulu-standard 的前端和管理员时,在此服务器上找不到请求的 URL /en
我正在尝试将 sulu 作为 CMS 开始,并按照“入门”指南中提到的步骤流程,我已将我的虚拟服务器设置为“个人”,这是我的网络空间
我已经使用
有没有我可以看到的任何 sulu 日志,除了我的 xml 被命名为 personal.xml 之外,我没有进行其他更改。帮助 ?
当我尝试在 phpcrsh shell 中查找路由时,我找到了一个节点
symfony - 管理员限制中的 sulu 位置国家/地区列表
我在 Sulu 1.2 中做一个项目,我想在加拿大设置一个地址,但我似乎无法加载该国家/地区。
为什么位置类型中的国家/地区列表有限,如何查看所有国家/地区以及可以修改的位置?
sulu - 有没有办法在 sulu 设置选项卡中添加我自己的属性?
我想为 sulu 中的每个页面添加两个可选属性,菜单图标的名称和每个菜单项的附加长标题。我认为添加这些的最佳位置是“设置”选项卡,该选项卡在管理员中编辑单个页面时显示,位于“显示页面”选项下方。
有什么方法可以将我自己的字段添加到此选项卡,还是我必须在每个页面模板中将其设为单独的属性?为什么强制页面标题不是像“在页面中显示”这样不需要包含在单个页面模板中的选项?
php - app/console sulu:security:user:create 工作但 sulu-login 不起作用
我是使用 Symfony 和 Sulu CMS 管理网站的新手。
但现在我必须根据现有项目设置一个测试环境。到目前为止,我认为我已经设法让 Symfony 和 Sulu 基本正常工作。
现在我的问题是:我创建了一个用户,php app/console sulu:security:user:create
这工作正常。到目前为止,我还无法创建角色,但 MySQL 数据库中存在现有角色,因此我将其中一个角色用于我的新用户。当我尝试登录 sulu.lo/admin 页面时,用户和密码的新组合不起作用。
有没有我可以执行的检查来提示问题可能是什么?
请向我询问所需的额外信息。
此致
content-management-system - 构建页面未显示在管理面板上?
正如您在此处看到的:[1]:https ://i.stack.imgur.com/oVfts.png 。我已经从模板构建了一些页面,但它们没有显示在管理面板中。例如,当我转到 :http://sulu-dev.lo/contact
时,它会打开该页面。
symfony - sulu CMF 上的无效 CSRF 令牌(生产)
我已经成功建立了一个运行 Symfony 和 sulu cmf 的开发环境。对于生产,我做了同样的事情,但是 Symfony 和 sulu 都具有生产环境设置。
除了一个小问题,一切都运行良好。当我想登录时,Chrome 控制台显示“无效的 CSRF 令牌”
我已经清除了浏览器和服务器的缓存,但没有任何区别。
对此问题有任何建议/经验吗?
sulu - How can I create and update pages dynamically in Sulu CMS?
I have the following situation:
- A database stores information about houses (address, number of rooms, date built, last selling price, etc.)
- This database is being manipulated through an app (let's call that app the "backend house app") that cannot be directly integrated in a Sulu-driven app. I can access the stored data through an API that gives me JSON-representations of House-objects. I can also have the app launch some sort of call to a Sulu-driven app when a house is created, updated or deleted.
- The Sulu-driven app (let's call that the "frontend house app") with templates for "house", "room", etc., is connected to a different database on a different server. This Sulu-driven app's website-environment shows house-pages with room-pages where some content is pre-filled through a connection to the "backend house app". Other content only exists on the database of the "frontend house app", like user comments, appraisals of interior design, etc., according to configured aspects of the Sulu-templates.
What I want to achieve, is a way to automate the creation, updating and deletion of "frontend house app"-pages based on activity in the "backend house app".
For instance, when a new house is added in the "backend house app", I want it to notify the "frontend house app" so that the "frontend house app" will automatically create the entire node-tree for the newly added house. Meaning: a "house"-page with the required data filled in, "room"-pages for each room, etc., so that the content manager of the "frontend house app" can see the entire tree of the newly added house in the workspace and can start manipulating content in the already available templates. In addition to automatically creating these pages, I also want to pre-set the rights to update and create, since the content manager of the "frontend house app" must not be able to create new rooms or change the name of the house, for instance.
I did not manage to get it working, I'll just add what I already done to show where I got stuck.
I started out with the following code, in a controller that extends Sulu's own WebsiteController:
Now, when I fire the controller action, I first get the exception
Property "url" in structure "house" is required but no value was given.
I tried to fix this by just manually binding the property 'url'
with value '/huizen/' . $house->getId()
to $structure
, at the point where I bind the other values. But this doesn't fix it, as apparently the url value is overwritten somewhere in the persist event chain, and I haven't yet found where.
However, I can, just for testing purposes, manually override the url in the StructureSubscriber
that handles the mapping for this particular persist event. If I do this, something gets created in the Sulu-app-database - hurray!
My phpcr_nodes
table lists two extra records, one for the RouteDocument referring to /cmf/immo/routes/nl/huizen/1
, and one for the PageDocument referring to /cmf/immo/contents/huizen/smurfhouse
. Both have the workspace_name
column filled with the value default_live
. However, as long as there are not also records that are complete duplicates of these two records except with the value default
in the workspace_name
column, the pages will not appear in the Sulu admin CMS environment. Needless to say, they will also not appear on the public website proper.
Furthermore, when I let the DocumentManager in my controller action try to ->find
my newly created document, I get a document of the class UnknownDocument
. Hence, I cannot have the DocumentManager go ->publish
on it; an Exception ensues. If I visit the pages in the Sulu admin environment, they are hence unpublished; once I publish them there, they can be found by the DocumentManager in the controller action - even if I later unpublish them. They are no longer UnknownDocument
, for some reason. However, even if they can be found, I cannot have the DocumentManager go ->unpublish
nor ->publish
- that just has NO effect on the actual documents.
I was hoping there would be a Sulu cookbook-recipe or another piece of documentation that extensively describes how to create fully published pages dynamically, thus without going through the 'manual labor' of the actual CMS environment, but so far I haven't found one... All help is much appreciated :)
PS: For the purposes of being complete: we're running Sulu on a Windows server environment on PHP 7.1; dbase is PostgreSQL, Sulu being a local forked version of release tag 1.4.7 because I had to make some changes to the way Sulu handles uploaded files to get it to work on a Windows environment.
EDIT: a partial solution for making a new house page if none exists already (not explicitly using the AdminKernel, but should of course be run in a context where the AdminKernel is active):
symfony - Homestead vagrant box 下的 SULU CMS 安装失败
我尝试按照本手册安装SULU CMS :http: //docs.sulu.io/en/latest/book/getting-started.html但是当转到http://sulu.app/website.php(我的本地开发URL)我得到了这些错误:
致命错误:未捕获的 PDOException:SQLSTATE [42S02]:未找到基表或视图:1146 /home/vagrant/Code/sulu/app/Resources/views/master.html.twig 中不存在表“homestead.ro_routes”在第 18 行 Twig_Error_Runtime:在渲染模板期间引发了异常(“您需要登录才能进行此操作”)。在第 18 行的 /home/vagrant/Code/sulu/app/Resources/views/master.html.twig
在此之前,所有安装步骤都很顺利,我没有看到任何错误。
在此命令之后,我在 mysql 数据库中也有空表:
bin/adminconsole sulu:构建产品
这是我的parameters.yml文件:
我使用 homestead vagrant box v.5.,主机 Ubuntu 16.04,Virtualbox v.5
这是我的 Homestead.yaml 内容(所有标准选项):
任何想法为什么以及如何解决?提前致谢!
symfony - Sulu 自定义捆绑包。生产环境中的空白页面
我使用本课http://blog.sulu.io/how-to-develop-a-bundle-in-the-sulu-admin-1开发了自定义捆绑包。当开发环境打开时,一切正常,但在产品中我看到一个带有左侧菜单的空白页面。Bundle 的 main.js console.log() 没有触发。有人可以帮助我吗?
路由
管理类