gpt4 book ai didi

python - "NodeAlreadySaved "使用djangocms发布页面更改时报错

转载 作者:行者123 更新时间:2023-12-04 11:05:07 32 4
gpt4 key购买 nike

使用djangocms发布页面更改时遇到错误。
当我跑 tail -f /var/log/apache2/error.log ,它返回:

treebeard.exceptions.NodeAlreadySaved: Attempted to add a tree node that is already in the database, referer: http://47.95.254.172/?edit
当我允许 settings.py DEBUG= True 并单击“发布页面更改”按钮时:
NodeAlreadySaved at /admin/cms/page/1/en/publish/
Attempted to add a tree node that is already in the database
Request Method: POST
Request URL: http://47.95.254.172/admin/cms/page/1/en/publish/
Django Version: 3.1.7
Exception Type: NodeAlreadySaved
Exception Value: Attempted to add a tree node that is already in the database
Exception Location: /root/env1/lib/python3.8/site-packages/treebeard/mp_tree.py, line 326, in process
Python Executable: /root/env1//bin/python
Python Version: 3.8.5

我跑了 python manage.py cms fix-tree但它没有用。虽然 python manage.py cms check返回 10次​​检查成功! .
我部署了 djangocms 项目:
apache2.4.41
mod-wsgi 4.8.0
Django 3.1.7
django-cms 3.8.0
venv中python版本是3.8.5,mod-wsgi是venv中python3.8.5编译的。
感谢您的帮助!

最佳答案

降级到 4.5.1 以下的 django-treebeard 版本,例如4.4.版本 4.5.1 似乎不兼容。

pip install django-treebeard==4.4

关于python - "NodeAlreadySaved "使用djangocms发布页面更改时报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66776994/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com