AnQiCMS (AnQiCMS) is an efficient system designed for content management and SEO optimization, and its TDK (Title, Description, Keywords) settings are the core links of website search engine optimization.As an experienced website operator, I am well aware of the importance of the correct activation of TDK settings for the visibility of the website.However, in practice, sometimes you may encounter a situation where the TDK settings do not take effect as expected.At this time, the system provides a series of troubleshooting and debugging methods to help us quickly locate and solve the problem.

Troubleshoot the issue of TDK settings not taking effect, first, you should start with the most basic system configuration and content management.AnQi CMS allows configuration of TDK at multiple levels, including the global homepage, category page, article/product detail page, single page, and tag page.This multi-level setting provides great flexibility, but it also means that troubleshooting needs to be done layer by layer.

Check the TDK configuration source

First, confirm whether the TDK is filled in correctly at the corresponding position in the background.

ForHome pageYou need to check if the 'Home Title', 'Home Keywords', and 'Home Description' have been filled in completely under 'Background Settings' and 'Home TDK Settings'.This is the foundation of the TDK for the entire site, leaving it blank may cause the TDK on the homepage to be missing.

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

ForDocument details page for articles, products, etc.Check if the 'SEO Title', 'Document Keywords', and 'Document Summary' are set in the 'Publish Document' or 'Edit Document' interface under 'Content Management', as well as in the 'Other Parameters' section.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 Introduction" are configured.

As forTab pageIn the "Content Management" under "Document Tags", edit the tags and check if the "SEO Title", "Tag Keywords", and "Tag Description" have been filled in correctly.

After completing these background configuration checks, we still need to focus on the implementation at the template level.

Template tag calls and level overrides

AnQiCMS's TDK is dynamically output through template tags, which means that the template file must correctly call the corresponding TDK tags.

The system provided a general "万能TDK tag"{% tdk 变量名称 with name="字段名称" %}on the website.base.htmlIn the template used to define the common file for HTML header information, it is usually called in this way:

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

HeresiteName=trueIt means the website name will be appended after the page title,sep="_"You can customize the separator, andshowParent=trueThe title of the parent category will be displayed, these parameters may affect the final TDK presentation. If these tags are not present in the template, or the tags'nameThe property value is incorrect, the TDK cannot take effect naturally.

Moreover, due to the hierarchical overlay 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 TDK of the global homepage.Therefore, if the TDK display of a page is incorrect, it is necessary to check whether the page itself has set the TDK, as well as whether the upper level (such as categories) has also set the TDK, to confirm which level's settings are taking effect.Sometimes, we expect to display the 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 in system design.

When a custom template file is applied to a specific page, category, or document (for example, when specified on the document or category editing page)download.htmlAs a template), if these custom templates do not correctly contain TDK tags, or hard-code TDK content, it will also cause the TDK settings not to take effect.In this case, you need 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, uses caching to accelerate page loading.If the TDK settings are changed and the front page still displays old content, it is likely due to the cache not being updated.Now, be sure to go to the background management interface and perform the 'Update Cache' function,Full site cache cleanupSometimes, the cache of the browser itself may affect the 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 identification of TDK.AnQiCMS supports flexible pseudo-static configuration to optimize URL structure.If the static rule configuration is not set properly, the system may not be able to correctly parse the type and ID of the current page, thus unable to extract the corresponding TDK information.Ensure that the rules you select or customize under "Feature Management" in "URL Rewrite Rule" are correct and match your URL structure.Especially when using a custom mode, it is necessary to carefully check the rules.archive/category/pageWhether the definitions are accurate.

Other troubleshooting details

If the above steps cannot solve the problem, the following points can be considered:

  1. Check the HTML source codeRight-click on the problematic page, select 'View Page Source', and search directly<title>/<meta name="keywords">/<meta name="description">The label can intuitively tell you whether the TDK really has no output or whether the output content meets expectations.If the label is completely missing, the problem may be in the template file;If the content is incorrect, you need to check the backend configuration or the parameters of the template tags.
  2. Check the GoLang template encodingAlthough the document emphasizes that the template file should be encoded in UTF8, if the template file is saved with incorrect encoding (especially when edited in a Windows environment), it may cause garbled characters or label parsing failure, indirectly affecting the display of TDK.
  3. Multi-site environmentIf you have used the multi-site management function 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.

By 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.

Frequently Asked Questions (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' function, and perform a full site cache cleaning operation.At the same time, to exclude the impact of browser caching, it is recommended to access the page in incognito mode or force refresh the browser (usually Ctrl+F5).

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

Q3: I have customized a template file to display specific content, but the TDK is not working, how can I check?A3: If you used a custom template, you need to check the custom template file (for exampledownload.html)的<head>whether the region 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 configured on the backend.Make sure the custom template is the same as the default template and that the TDK tags are called correctly.