HelloZeroNet / HelloZeroNet/ZeroNet

Nested content.jsons are not in sidebar.

Đang mở
#2,353 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
18.8k
Fork
2.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Step 1: Please describe your environment

* ZeroNet version: 0.7.1 (rev4253)
* Operating system: Fedora 30
* Web browser: Tor Browser
* Tor status: always
* Opened port: no
* Special configuration: -

### Step 2: Describe the problem:

Nested `content.json`s are not listed in the sidebar. under the `CHOOSE` section.
#### Steps to reproduce:

A new blank zite, the root `content.json` includes `data/content.json` with `includes_allowed` set to true.
`data/content.json` includes `L_admin/content.json`.

#### Observed Results:

The sidebar will not show `L_admin/content.json` or any other nested `content.json` that is not explicitly in the includes entry of the root content.json.

The problematic line is in [SidebarPlugin.py line 504](https://github.com/HelloZeroNet/ZeroNet/blob/py3/plugins/Sidebar/SidebarPlugin.py#L504):

```
contents += list(site.content_manager.contents.get("content.json", {}).get("includes", {}).keys())
```
It does not consider nested includes.

**Additional context**
This issue is mirrored from the [GitCenter ZeroNet repository](http://127.0.0.1:43110/1GitLiXB6t5r8vuU2zC6a8GYj9ME6HMQ4t/repo/issues/view/?1P4w4Rvh4vS9r6G5xTiSh8qEW87EKZtnJB/11@1DfrA2M9Qra6stqT6tzwNMYNweswY54KAC)(you need to install ZeroNet to visit this link)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start in plugins/Sidebar/SidebarPlugin.py around line 504 and inspect how the sidebar builds the CHOOSE list from content.json includes. Reproduce the nested data/content.json and L_admin/content.json setup described in the issue. Done means nested content.json files appear in the sidebar without being explicitly listed in the root includes entry.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.