Knowledge Base Articles Not Showing Publicly: Root Cause Analysis and Permanent Resolution
A common issue in custom Knowledge Base (KB) systems is a mismatch between articles visible in the database and articles displayed on the public KB pages. Th...
A common issue in custom Knowledge Base (KB) systems is a mismatch between articles visible in the database and articles displayed on the public KB pages. This typically occurs due to visibility flags, publishing states, or filtering logic applied at the application layer.
This Knowledge Base article documents a real-world troubleshooting case where newly created KB articles appeared in SQL but were not visible on the public KB pages—and explains how to identify the root cause, apply the correct fix, and prevent recurrence.
Problem Statement
-
Newly created KB articles are visible in the database (SQL/phpMyAdmin)
-
Article IDs increment correctly (e.g., 429, 430)
-
Articles do not appear on the public Knowledge Base pages
-
No SQL errors or PHP errors are reported
Technical Explanation
Why This Happens
Most KB systems do not display all database records by default. Instead, frontend queries filter articles based on one or more internal flags such as:
-
Publish status
-
Visibility type
-
Article state (draft, public, internal)
-
Special or system markers
In this specific KB schema, article visibility is controlled by the column:
type ENUM('0','1','2')
Despite the confusing name, this column determines whether an article is public or hidden.
Visibility Logic (Confirmed Behavior)
Based on observed system behavior:
type Value | Meaning |
|---|---|
0 | ✅ Published / Public (Visible on KB) |
1 | ❌ Hidden / Draft / Internal |
2 | ⚠ Special / Reserved (Not public) |
Important:
This logic is inverted compared to many modern systems. In this KB, published articles usetype = '0'.
Root Cause
-
Newly created articles were saved with
type = '1'ortype = '2' -
Public KB pages filter articles using:
-
As a result, those articles were correctly excluded from public display
This is not a database bug, not a PHP bug, and not a caching issue.
Step-by-Step Solution
Step 1: Identify the Article Visibility State
If type is not 0, the article will not appear publicly.
Step 2: Publish the Articles (Make Them Public)
✔ Changes take effect immediately
✔ No service restart required
Step 3: Verify Public Visibility
This count should now match the number of articles shown on the KB page.
Use Cases
When This Issue Commonly Appears
-
After adding new KB articles via admin panel
-
After modifying editor or save logic
-
After importing articles from another system
-
During KB migrations or schema reuse
Who Is Affected
-
KB administrators
-
Content editors
-
IT support teams
-
Developers maintaining custom KB systems
Commands and Examples
Compare Visible vs Hidden Articles
List Hidden Articles
Common Issues & Fixes
Issue: Article exists in SQL but not on KB
Fix:
Set type = '0'
Issue: New articles always save as hidden
Fix:
Check admin save logic and default value assignment
Issue: Confusion about publish status
Fix:
Document type column behavior or rename at code level
Security Considerations
-
Avoid auto-publishing sensitive/internal articles
-
Ensure only authorized users can change article visibility
-
Audit changes to the
typecolumn -
Maintain role-based access control in admin UI
Best Practices
-
Clearly document visibility logic (
typemeanings) -
Add labels in admin UI (Published / Draft / Special)
-
Validate article state before saving
-
Periodically audit hidden articles
-
Avoid ambiguous column names in future schema designs
Conclusion
When KB articles appear in SQL but not on public pages, the issue is almost always due to visibility filtering rather than missing data. In this KB system, the type column controls publication state, with type = '0' representing published content.
Understanding and documenting this logic ensures:
-
Faster troubleshooting
-
Fewer publishing mistakes
-
Stable and predictable KB behavior
With the correct visibility flag applied, articles become publicly visible immediately and consistently.
Was this guide useful?
Your answer helps us keep BISONKB accurate and practical.