Drupal 7 文件上传字段为空

Drupal 7 File Upload Field Empty

我管理的网站出现问题,用户无法上传文件,因为文件附件部分未显示任何输入:

我们的开发环境中完全相同的代码按预期工作,具有几乎相同的数据库:

我怀疑问题与文件权限或上传大小限制有关,但我不确定。

关于此的 Drupal 文档和论坛非常少。有任何想法吗?


编辑:我在状态报告中看到这条错误消息。可能有关系?

检查您的配置(file_uploads = On 必须设置为 "On")

PHP配置:

要使文件上传正常,PHP 必须正确配置。可能需要在您的 PHP php.ini 文件、.htaccess 文件或 settings.php 文件中设置或配置以下 PHP 配置变量。

file_uploads = On must be set to "On"
upload_max_filesize = 24M can't be larger than post_max_size
max_input_time = 300 small values may cause timeouts for large file uploads
memory_limit = 64M small values may cause out of memory errors for large file 
uploads
max_execution_time = 180 small values may cause timeouts for large file uploads
post_max_size = 24M limits the size of input submitted to the website (including 
attached files)

在后端转到配置 -> 媒体 -> 文件系统,然后点击 "Save configuration" 按钮而不更改任何内容。如果某些路径有问题(不可写),它的字段将变成红色轮廓。

感谢大家的帮助。这个问题的答案比我预期的要简单得多——我们只需要清除 Drupal 缓存。由于我们无法完全控制生产服务器,这让事情变得复杂,但一旦我们从浏览器中清除了缓存,一切又恢复正常了。希望对遇到类似情况的人有所帮助。

清除缓存似乎应该是解决 Drupal 问题的首要步骤之一!早该想到的