Hướng dẫn php fatal error: cannot redeclare drupal_get_filename - php lỗi nghiêm trọng: không thể khai báo lại drupal_get_filename

Đã cài đặt 8.x-5.2 Phiên bản phân phối tiền điện tử trước.

Cập nhật văn bản phiên bản lõi Drupal từ 8,8 đến 9.1 trong composer.json bởi các thay đổi bên dưới:-

"Drupal/Core CompoCher-Scaffold": "^8.8", => "Drupal/Core CompoCter-Scaffold": "^9.1", "Drupal/Core-Project-Message": "^8.8" Drupal/Core-Project-Message ":"^9.1 "," Drupal/Core được đề xuất ":"^8.8 ", =>" DRUPAL/CORE được đề xuất ":"^9.1 "," Drupal/Core-Vendor-Hardening ":"^8.8 "=>" Drupal/Core-Vendor-Hardening ":"^9.1 "
"drupal/core-project-message": "^8.8", => "drupal/core-project-message": "^9.1",
"drupal/core-recommended": "^8.8", => "drupal/core-recommended": "^9.1",
"drupal/core-vendor-hardening": "^8.8" => "drupal/core-vendor-hardening": "^9.1"

Sau đó, sử dụng lệnh "Cập nhật trình soạn thảo" chạy cập nhật Drupal
run drupal update

Drupal Core được cập nhật mà không có bất kỳ vấn đề nào.

Tôi đã áp dụng https: //www.drupal.org/project/view_arg_order_sort/issues/3142079#comme ... bản vá cho phiên bản mới nhất của Drupal8.

Tôi đã sử dụng "Chế độ xem_arg_order_sort" Chỉ để sắp xếp theo chế độ xem "Tiền tệ hàng đầu" (/quản trị/cấu trúc/chế độ xem/view/top_currencies) trong D8.

Có, chế độ xem_arg_order_sort không có sẵn trong Drupal 9. Đó là lý do tại sao tôi đã loại bỏ sự phụ thuộc mô -đun này khỏi phiên bản drupal9 của phân phối tiền điện tử.
that's why I have removed this module dependency from Drupal9 version of crypto distribution.

Kính thưa tất cả,

Đã nâng cấp thành công phiên bản Drupal lên phiên bản mới nhất 9.3.12 nhưng sau khi chạy lệnh "Drush Updb" nhận lỗi như:
getting error like:

$ Drush Updb Php Lỗi nghiêm trọng: Không thể tái lập Drupal_Get_Filename () (đã khai báo trước đó trong /var/www/html/q8/.d_project/vendor/drupal/core/includes/bootstrap.inc:189) Q8/.D_Project/web/lõi/bao gồm/bootstrap.inc trên dòng 164 [CẢNH BÁO] DRUSH Lệnh chấm dứt bất thường.
PHP Fatal error: Cannot redeclare drupal_get_filename() (previously declared in /var/www/html/q8/.d_project/vendor/drupal/core/includes/bootstrap.inc:189) in /var/www/html/q8/.d_project/web/core/includes/bootstrap.inc on line 164
[warning] Drush command terminated abnormally.

Bạn có thể vui lòng giúp tôi sắp xếp vấn đề này?

Tag1 Tư vấn hỗ trợ Drupal.

Hướng dẫn php fatal error: cannot redeclare drupal_get_filename - php lỗi nghiêm trọng: không thể khai báo lại drupal_get_filename

Tôi tiếp tục gặp vấn đề chuyển hướng Drupal sang core/install.php như hình dưới đây:

Hướng dẫn php fatal error: cannot redeclare drupal_get_filename - php lỗi nghiêm trọng: không thể khai báo lại drupal_get_filename

Tôi đã đặt max_allowed_packet thành 64MB trên AWS RDS. Tôi không chắc tôi còn thiếu gì nữa. Xin vui lòng giúp đỡ

Lỗi trong nhật ký là:

Lỗi gây tử vong: Không thể tái lập _drupal_shutdown_function_handle_exception () (đã tuyên bố trước đó trong /var/www/html/web/core/includes/bootstrap.inc:1066) in /var/www/html/vendor Trên dòng 1066

Và sau đây là nhà soạn nhạc của tôi.json

{
  "name": "xxx/yyy",
  "description": "zzz",
  "type": "project",
  "license": "GPL-2.0-or-later",
  "authors": [
    {
      "name": "QQQ EEE",
      "role": "Developer"
    }
  ],
  "repositories": [
    {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    }
  ],
  "require": {
    "php": ">=5.6",
    "aws/aws-sdk-php": "^3.108",
    "composer/installers": "^1.2",
    "cweagans/composer-patches": "^1.6.5",
    "drupal-composer/drupal-scaffold": "^2.5",
    "drupal/console": "^1.0.2",
    "drupal/core": "^8.7.0",
    "drupal/ldap": "^3.0@beta",
    "drupal/redis": "^1.1",
    "drupal/s3fs": "^3.0",
    "drush/drush": "^9.0.0",
    "predis/predis": "^1.1",
    "vlucas/phpdotenv": "^2.4",
    "webflo/drupal-finder": "^1.0.0",
    "webmozart/path-util": "^2.3",
    "zaporylie/composer-drupal-optimizations": "^1.0"
  },
  "require-dev": {
    "webflo/drupal-core-require-dev": "^8.7.0"
  },
  "conflict": {
    "drupal/drupal": "*"
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "config": {
    "sort-packages": true
  },
  "autoload": {
    "classmap": [
      "scripts/composer/ScriptHandler.php"
    ],
    "files": ["load.environment.php"]
  },
  "scripts": {
    "pre-install-cmd": [
      "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
    ],
    "pre-update-cmd": [
      "DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
    ],
    "post-install-cmd": [
      "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
    ],
    "post-update-cmd": [
      "DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
    ]
  },
  "extra": {
    "composer-exit-on-patch-failure": true,
    "patchLevel": {
      "drupal/core": "-p2"
    },
    "installer-paths": {
      "web/core": ["type:drupal-core"],
      "web/libraries/{$name}": ["type:drupal-library"],
      "web/modules/contrib/{$name}": ["type:drupal-module"],
      "web/profiles/contrib/{$name}": ["type:drupal-profile"],
      "web/themes/contrib/{$name}": ["type:drupal-theme"],
      "drush/Commands/{$name}": ["type:drupal-drush"]
    },
    "drupal-scaffold": {
      "initial": {
        ".editorconfig": "../.editorconfig",
        ".gitattributes": "../.gitattributes"
      }
    }
  }
}

Nhiều người dùng Drupal đã gặp phải một thông báo tương tự như "Lỗi nghiêm trọng: Không thể tái lập System_Requirements () (đã khai báo trước đây trong /modules/system/system.install:12) trong /modules/modules/system.Nếu bạn đang đối mặt với một thông báo lỗi tương tự như nó trong trang web Drupal của bạn thì hãy đọc tiếp để tìm hiểu thêm.

Thực hiện theo các bước bên dưới để khắc phục thông báo lỗi.

  • Bạn sẽ thấy thông báo lỗi này nếu có nhiều hơn một bản sao cùng một mô -đun trong cài đặt Drupal
  • Tìm kiếm (các) bản sao đang gây ra lỗi trong thư mục mô -đun hoặc trang web/tất cả/mô -đun/thư mục
  • Xóa các thư mục trùng lặp khi bạn tìm thấy chúng

Hy vọng điều đó sẽ giúp.

Cách dễ nhất để giải quyết vấn đề Drupal là trao nó cho các chuyên gia Drupal.Chúng tôi có thể cung cấp một loạt các dịch vụ Drupal để giúp bạn duy trì và quản lý các trang web Drupal của bạn.Hãy liên lạc với chúng tôi để biết thêm.