opentiny / opentiny/tiny-engine

🐛 [Bug]: 编辑器新建区块,不选择‘区块分类’,编辑保存后,无法在编辑器的‘区块管理’查看新保存的区块

Open
#867 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
2.8k
Forks
476
Avg merge
17h 35m
Merged PRs (30d)
1

Description

Environment

edge 130,win10 22H2,node 18.20.3

Version

node 18.20.3,MySQL 8.4.0

Version

当前使用的提交历史版本 8507b656833732d86265948ff366a0d392f21cd2

Link to minimal reproduction

切换区块管理,点击新建区块,填入区块名称、区块id后,点击确定
image

拖动文本组件,修改文本显示内容,点击保存按钮
image

提示新建区块成功
image

数据库中已有新区块Test11Comp
image

Step to reproduce

刷新页面,重新加载区块信息,无刚刚保存的Test11Comp区块
image

新建区块Test12Comp
image

编辑保存Test12Comp
image

刷新页面重新请求区块数据后,能看到新建的Test12Comp
image

What is expected

如果区块分类不是必填,希望新建区块时,填入区块名称、区块id后,点确定后编辑的区块,在保存后可以在区块管理中显示。
如果区块分类是必填,希望新建区块没有填入区块分类时,提示必填区块分类。

What is actually happening

新建区块时不选择区块分类,保存存入数据库后,不能在区块管理中显示。

What is your project name

tiny-engine

Any additional comments (optional)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the editor's block-management flow using the steps and versions in the report. Trace creation and saving for a block without a category, then reload the block data and compare it with a categorized block. Done means uncategorized blocks appear after reload, or the form clearly requires a category before saving.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, node.js
Domain
database, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.