Import from a file: ask the old site for its category and tag prefixes when the content doesn't show them
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start in app/Domain/Import/File/FileAddresses.php at bases(), which picks the prefix from content links and falls back to the WordPress defaults. Then read app/Domain/Media/Downloads/FileDownloader.php to see how the checked, pinned requests to the old site are made, and resources/js/components/import/file-plan.tsx for where the prefixes are shown. Done means that a site with no prefix-revealing links gets its prefixes from the old site's category and tag addresses, and the content links and defaults still apply as before.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens now
When an export file is read, Teme guesses the old site's category and tag prefixes (FileAddresses::bases()): it looks at the links in the content that point to the site's own categories and tags, and takes the prefix they use most. When the content has no such links, it falls back to WordPress's defaults, category and tag.
So a site that stripped the category prefix (for example with Yoast's "Remove category prefix") and whose posts never link to a category gets category prefilled. Someone who doesn't remember the old setting imports with the wrong addresses, and every old category link answers 404.
What it could do
When the old site answers (the plan page already asks it, for the media download), and the content gave no answer, ask the site itself: request one category's address with the prefix and without (/category/<slug>/ and /<slug>/), and one tag's the same way, and prefill whichever answers. The links in the content still decide when they exist; WordPress's defaults stay the last fallback. The person can still change the prefixes on the plan page, as today.
Where: app/Domain/Import/File/FileAddresses.php (bases()), app/Domain/Media/Downloads/FileDownloader.php (the checked, pinned requests to the old site), resources/js/components/import/file-plan.tsx.
Related: #696 (the same check of the old site).
- Ngôn ngữ chính
- PHP
- Star
- 1
- Fork
- 1
- Merge trung bình
- 1 giờ 40 phút
- Pull request đã merge (30 ngày)
- 143
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temecms/teme
-
area/admin type/enhancement when/soon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/media type/enhancement when/soon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/admin type/bug when/soon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/import type/documentation when/soon
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/admin area/import type/bug when/later
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
2DAW-CarlosIII/eportfolio_g5#35 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
2DAW-CarlosIII/eportfolio_g4#33 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
2DAW-CarlosIII/eportfolio_g1#34 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
P2 Team S Type: Infrastructure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
google/site-kit-wp#14271 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Display price Views field throws TypeError when the row has no productCó thể đã có người làm @albanycomputers đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
backdrop-contrib/ubercart#610 ·