AnQiCMS (AnQiCMS) is an efficient system designed for content management and SEO optimization, and its TDK (Title, Description, Keywords) settings are the core link of website search engine optimization.As a senior website operations personnel, I fully understand the importance of the correct effectiveness of TDK settings on the visibility of the website.However, in actual operation, sometimes there may be a situation where the TDK settings do not take effect as expected.This system provides a series of troubleshooting and debugging methods to help us quickly locate and solve problems.

Troubleshoot the issue of TDK settings not taking effect. First, start with the most basic system configuration and content management.Auto CMS allows configuration of TD坤 at multiple levels, including the global homepage, category pages, article/product detail pages, single pages, and tag pages.This multi-level setting provides great flexibility, but it also means that it is necessary to check layer by layer when troubleshooting.

Check the source of TDK configuration

Firstly, confirm that the TDK is filled in correctly at the corresponding position in the background.

ForHome page of the websiteYou need to check if the 'Home Title', 'Home Keywords', and 'Home Description' are filled in completely under 'Background Settings' -> 'Home TDK Settings'.This is the foundation of the entire site's TDK, if it is left blank, it may cause the home page TDK to be missing.

ForCategory page,Enter 'Content Management' and 'Document Categories', edit the target category, and check whether 'SEO Title', 'Keywords', and 'Category Description' (as description) are configured in 'Other Parameters'.It should be noted that if these fields are not filled in, the system may attempt to extract content from general fields such as category name, category introduction, etc.

ForDocument details pages for articles, products, etc.In the 'Content Management' under the 'Publish Document' or edit document interface, check 'SEO Title', 'Document Keywords', and 'Document Description' in the 'Other Parameters' section to see if they have been set.These settings will override the TDK of the category hierarchy.

Forsingle page(such as "About Us", "Contact Us"), edit under "Page Resources" in "Page Management", and also check whether the "SEO Title", "Keywords", and "Single Page Description" are configured.

As forTab PageEdit tags under 'Content Management' in 'Document Tags', check if 'SEO Title', 'Tag Keywords', and 'Tag Description' are correctly filled in.

After completing these background configuration checks, we also need to pay attention to the implementation at the template level.

Template tag calls and hierarchy overlay

AnQiCMS's TDK is dynamically outputted through template tags, which means the corresponding TDK tags must be correctly called in the template file.

The system provides a general "万能TDK tag".{% tdk 变量名称 with name="字段名称" %}in the website.base.htmlIn the (or the common file in your template used to define HTML header information), it is usually used in the following way to call TDK:

<title>{% tdk with name="Title" siteName=true %}</title>
<meta name="keywords" content="{% tdk with name="Keywords" %}">
<meta name="description" content="{% tdk with name="Description" %}">

Here are thesiteName=trueIt indicates that the site name will be appended after the page title,sep="_"Can customize the separator, andshowParent=trueit will display the title of the parent category, these parameters may affect the final TDK display. If these tags are not present in the template, or the tags'nameThe attribute value is incorrect, which means TDK cannot take effect naturally.

In addition, due to the hierarchical override relationship of TDK settings, for example, the TDK of the document detail page takes precedence over the TDK of its category, and the category TDK takes precedence over the global homepage TDK.Therefore, if the TDK of a page is displayed incorrectly, it is necessary to check whether the page itself has set the TDK and whether the parent level (such as categories) has also set the TDK to confirm which level's settings are taking effect.Sometimes, we expect to display global TDK, but a category or article has set a custom TDK, causing the global TDK to be overridden. This is not an error, but an expected behavior of system design.

When a custom template file is applied to a specific page, category, or document (for example, when specifying a document or category editing page)download.htmlAs a template), if these custom templates do not correctly include TDK tags, or hard-code TDK content, it will also cause the TDK settings not to take effect.In this case, it is necessary to check and modify the corresponding custom template file.

Cache and pseudo-static rules

Website cache is a common factor affecting the effectiveness of TDK.AnQiCMS as a high-performance system, will use caching to accelerate page loading.If the TDK settings are changed and the front-end page still displays old content, it is likely that the cache has not been updated.Full site cache cleanup.Sometimes, the browser's own cache may also affect the view results, it is recommended to use the browser's incognito mode or force refresh (Ctrl+F5 or Cmd+Shift+R) to verify.

The configuration of pseudo-static rules will also affect the correct recognition of TDK.AnQiCMS supports flexible pseudo-static configuration to optimize URL structure.If the rewrite rule is not configured properly, the system may fail to correctly parse the type and ID of the current page, thus failing to extract the corresponding TDK information.In the "Feature Management" under "URL Rewrite Rules", please ensure that the rule you select or customize is correct and matches your URL structure.archive/category/pageWhether the following definitions are accurate.

Other troubleshooting details

If the above steps cannot solve the problem, consider the following points:

  1. Check HTML source codeOn the page where you encounter a problem, right-click "View Page Source", and search directly<title>/<meta name="keywords">/<meta name="description">Label.This can intuitively tell you whether the TDK is truly not outputting or if the output content is as expected.If the label is completely missing, the problem may be with the template file; if the content is incorrect, you need to check the backend configuration or the parameters of the template tags.
  2. Check GoLang template encodingAlthough the document emphasizes that template files should be encoded in UTF8, if the encoding is incorrect when saving template files (especially when edited in the Windows environment), it may cause garbled characters or failure to parse tags, indirectly affecting the display of TDK.
  3. Multi-site environment:If you have used the multi-site management feature of AnQiCMS, please make sure that the TDK settings are completed in the background of the target site, and that there are no errors in specifying other sites in the template tags.siteIdParameter.

Through systematically checking TDK configuration, template tag usage, cache status, and potential pseudo-static issues, you should be able to locate and resolve the problem of TDK settings not taking effect in AnQiCMS.

Common Questions and Answers (FAQ)

Q1: I have modified the TDK of the article, but the front page is still the same. Why is that?A1: The most common reason is that the website cache has not been updated.Please log in to the AnQiCMS backend, find the "Update Cache" feature, and perform a full site cache cleaning operation once.At the same time, to exclude the influence of browser cache, it is recommended to access the page in incognito mode or force refresh the browser (usually Ctrl+F5).

Q2: I have set the global TDK in the background, but why do some category pages and article pages show different TDKs? Is this normal?A2: Yes, that is normal.AnQiCMS's TDK settings follow the principle of hierarchical coverage.Articles/products, categories, single pages, etc. have their own independent TDK configurations, which take precedence over the global TDK.If you want a specific page to display global TDK, you need to make sure that the TDK field (such as SEO title, keywords, description) of the page itself is left blank, allowing the system to trace back to the global settings.

Q3: I have customized a template file to display specific content, but the TDK is not taking effect. How can I check it?A3: If you have used a custom template, you need to check the custom template file (for exampledownload.html) of<head>whether the area contains the correct TDK template tags, for example<title>{% tdk with name="Title" siteName=true %}</title>.If these tags are missing, or if you have hardcoded TDK content in the template, the system will not be able to dynamically load the TDK you have configured on the backend.Ensure that the custom template is the same as the default template and the TDK tags are correctly called.