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

Drupal 8.5 admin/content页面"ADD CONTENT"按钮消失求助

Troubleshooting the Missing "ADD CONTENT" Button on Drupal 8.5's Admin/Content Page (Seven Theme)

Hey there, let's dig into why that "ADD CONTENT" button vanished from your /admin/content page in Drupal 8.5 with the Seven theme. Here are the most likely fixes to work through step by step:

1. Double-Check User Permissions

This is the most common culprit—your user role might have lost the necessary permissions to create content.

  • Head over to /admin/people/permissions in your Drupal backend.
  • Find the role assigned to your account (e.g., Administrator, Editor). Make sure you’ve checked:
    • Access content overview (under the System permissions group)
    • All relevant permissions under the Create content group (e.g., "Create page content", "Create article content")
  • Save the permissions, then refresh the /admin/content page to see if the button comes back.

2. Verify Seven Theme Customizations

If you’ve modified the Seven theme (or created a subtheme), you might have accidentally removed the button’s code:

  • If you’re using a Seven subtheme, temporarily switch back to the core Seven theme to test if the button reappears. If it does, the issue is in your subtheme’s templates or hooks.
  • Check for a custom template file like page--admin--content.html.twig in your theme’s templates folder. Compare it to the core Seven theme’s version of the file—you might have deleted the section that renders the "ADD CONTENT" button.
  • Look for custom hooks in your theme’s .module file (if any) like hook_preprocess_page or hook_page_attachments_alter that could be removing the button from the page.

3. Rule Out Module Conflicts or Glitches

Modules that modify admin interfaces or content permissions can sometimes break this button:

  • Disable any modules you’ve recently installed or updated (especially ones like Content Access, Admin Toolbar, or custom modules that tweak content management). Refresh the page after each disable to see if the button returns.
  • Clear all Drupal caches by going to /admin/config/development/performance and clicking "Clear all caches". Stale cache often causes UI elements to go missing.
  • Check your Content Views configuration: Go to /admin/structure/views/view/content, edit the view. Look in the Header section—if the "Add content" button block was removed, re-add it. Also, ensure the view’s settings haven’t disabled the ability to add content.

4. Check for Core File Corruption or Database Errors

If none of the above works, let’s rule out deeper issues:

  • Re-upload the Drupal 8.5 core files (make sure not to overwrite your sites/ directory, which contains your config, themes, and modules). This fixes any corrupted core files that might be causing the button to not render.
  • Check the Drupal error log at /admin/reports/dblog for recent errors related to the /admin/content page. Look for messages about permission denied, template rendering failures, or missing hooks—these can point you to the root cause.

Bonus: Inspect the Page with Browser Dev Tools

Sometimes the button is actually there but hidden by custom CSS. Right-click on the area where the button should be, select "Inspect", and check if the button element exists but has display: none or visibility: hidden applied. If so, track down the CSS rule hiding it and adjust it.


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.25 03:23:21