You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kiwi-TCMS v8.4部署新环境后遇DataTables警告,本地运行正常

Troubleshooting DataTables 'plan_id' Error in Kiwi-TCMS v8.4 Deployment

Hey there, let's figure out why you're hitting that DataTables error after deploying Kiwi-TCMS v8.4 to your non-local environment! The Requested unknown parameter 'plan_id' for row 0, column 0 message typically means there's a mismatch between what the frontend DataTables component expects from the backend and what's actually being sent—especially since everything works fine locally. Here are targeted steps to diagnose and fix this:

  • Inspect the backend API response
    Open your browser's DevTools (F12), go to the Network tab, and refresh the page where the error occurs. Locate the API request that feeds data to resultsTable (it might look something like /api/test-executions/ or a similar endpoint). Compare the JSON response from your deployment environment with the one from your local machine:

    • Does the deployment response include the plan_id field for every row?
    • Is the field name spelled correctly (e.g., no camelCase planId instead of snake_case plan_id)?
      If plan_id is missing or misnamed in the deployment response, that's the root cause.
  • Validate database migrations
    Kiwi-TCMS relies on Django database migrations to keep table structures in sync. Double-check that you ran python manage.py migrate in your deployment environment during setup. If migrations were skipped, the database table associated with these records might lack the plan_id column entirely. You can also directly inspect the database (e.g., using psql for PostgreSQL) to confirm the column exists in the relevant table (like testruns_testexecution) and that data is populated.

  • Compare environment configurations
    Look for differences between your local local_settings.py and the one in your deployment environment. Are there any flags or settings that alter how test execution data is fetched? For example, a feature toggle that's enabled locally but disabled in deployment might be excluding the plan_id from API responses. Also, ensure both environments are connecting to the correct database instances—if deployment uses a different DB with incomplete data, that could cause missing plan_id values.

  • Check for missing or incomplete data
    The error mentions "row 0", so find the corresponding record in your deployment database. Does this record actually have a valid plan_id associated with it? It's possible that when you migrated data to the deployment environment, some test execution records weren't linked to test plans properly, leading to missing plan_id values. Compare this record with the equivalent one in your local database to spot discrepancies.

  • Verify frontend code consistency
    While less likely (since local works), confirm that the frontend code deployed matches your local version. Check the DataTables initialization code for resultsTable—does it explicitly reference plan_id as the data source for column 0? A typo or outdated code in deployment could cause the component to look for a field that doesn't exist.

If you've gone through these steps and still can't pinpoint the issue, sharing a snippet of the API response (redacted for privacy) or details about your deployment setup (e.g., containerized vs. bare metal, database type) would help narrow things down further.

内容的提问来源于stack exchange,提问作者nanika21

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 08:57:43