Feature preview

Feature Introduction

How to handle the display and default value of the custom field after the field is launched, and the old article is empty.

After adding a new field to the custom content model, the empty value of this field in historical articles is a normal phenomenon. The problem lies in the display and value assumptions. The processing order is: first, add an empty value as a fallback in the template list display, then decide where to place the default value in the model layer or the write layer, and finally, only batch fill in the old articles that truly need unified values, to avoid a one-time change that exceeds the scope.

Custom field Content model

Feature Introduction

How to handle the situation where the value of the custom field is empty after the article is published? It's not an error to accept this performance itself: the new field only takes effect on new entries, and the column of the historical article does not have a value. There are two things to deal with - the list cannot be damaged by empty values, and where the default value should be placed, at the model level or the writing level.

What will happen to the old article after the new field is launched

After adding custom fields to the content model, common manifestations are divided into three categories. The item displays blank or leaves isolated tags on the detail page; when the field is used for conditional judgment on the list page, null values are treated as false values, causing the entire block of content not to be rendered; when filtering and sorting are performed based on the field value, old articles sink to the bottom or are filtered out.

The causes of these three categories are different. The first category is that the template does not have a fallback, the second category is that the judgment logic assumes that the field must have a value, and the third category is that the data itself is missing. Separate the three first, so as not to solve the display problem in bulk.

Where is the default value given?

The default value placed in the model layer serves as a starting value for new articles, it will not fill in old articles, nor will it change the performance of empty values when read. The default value placed in the write layer is to fill in during the save action, and historical data is not affected either.

A layer that needs to be supplemented when reading is the template bottom-up: first check for empty values before taking values, and use predefined text or omit the entire block when empty. AnQiCMS (AnQi CMS) supports custom content models and flexible field structures, and the addition or subtraction of fields mainly affects the form for entering new content, historical articles should remain the same, so the empty value check at the read layer is more secure than changing the data.

How does the list template bottom-up?

Split the writing into three steps: check for null, provide a substitute value, and control the layout.

Check for null before taking values, do not let the template directly output undefined fields; use a unified convention for substitute values, such as omitting the block or using category-level text, do not write a set for each article; layout control refers to the height of the list card and the column width should not collapse when there are empty values, otherwise the old articles with missing fields will look like broken pages.

Distinguish between formal documents and drafts: drafts can be previewed with the preview parameter, check the template first in the draft, which is safer than directly viewing it on the production page.

Which path should batch replacement take?

A unified value is indeed needed in scenarios such as adding the same parameter to all old articles or changing the field name to go for batch backfilling.

For a small-scale backfill, it is recommended to filter out the target collection by category in the background and confirm in batches; when it comes to rewriting the full-site text or links, use the full-site replacement tool, which will affect all matched articles in batch actions. Confirm that the matched string is unambiguous and corresponds to only one content that needs to be changed before making changes. After the replacement, check several articles to confirm that there is no injury.

Decide whether to resubmit the site map after the changes are made: it is not necessary to resubmit if it is just to fill in empty fields or the meaning of the main text does not change; if the title or abstract is changed, follow the rhythm of the new content to push.

When rolling back, delete the formal documents into the recycle bin instead of physical deletion, and make sure to leave a recoverable point before batch actions.

Common questions

Can old articles automatically inherit the default value?The read layer can simulate default display by checking for emptiness; explicit refill is required for consistent data.

Will refill affect indexing?Filling in empty fields generally does not affect; if the title and summary are changed, pay attention to the display surface.

What should be done when multiple sites share the same model?Fields in each site are independently effective, and refilling should be done separately by site, do not run the whole site at once.

Related functions

Preview

Can automatically generated tags and graphics be directly launched? Where should content review be placed?

AI automatically tags, automatically matches titles with images, and generates TDK, which can save the repetitive labor of entry, but the product itself may still be wrong: misaligned tags can distort in-site search, and image matching should consider the source and watermark. The review should be done before the draft is converted to a formal version, and sensitive word filtering and keyword replacement are just at the bottom layer, not replacing manual judgment of facts and compliance. Before mass production, the review should be passed first, and then scheduled for release.

Preview

How can user grouping and permissions be isolated when the same program manages multiple sites?

When managing multiple sites with the same content system, the isolation of user groups and permissions should be divided into two layers: first, define the site boundary, what operations the account can perform in which site; then, define the group boundary, the corresponding readable and writable scope for editors, operators, and external authors. AnQiCMS uses multi-site management and user groups with VIP groups to implement these two layers, and make a data backup before changing permissions, recover deleted documents from the recycle bin.

Preview

If the scheduled content is temporarily rescheduled, should the push be rerun?

Whether the push needs to be rerun after the rescheduling depends on whether this document has appeared in a formal state before. If it is only a draft changed to a later time, the URL has not entered the site map and has not been actively pushed, there is no need to rerun; once the document has been launched or pushed, the rescheduling must be rescheduled according to the order of the site map and link push.