summaryrefslogtreecommitdiff
path: root/www/drupal8
diff options
context:
space:
mode:
authorprlw1 <prlw1@pkgsrc.org>2019-01-09 11:56:17 +0000
committerprlw1 <prlw1@pkgsrc.org>2019-01-09 11:56:17 +0000
commit09f2a815b1edf40fb01bc52224f8b0b54a475d20 (patch)
tree5d7fbda215aaedb21a34ad97647891b30e16cdc6 /www/drupal8
parente87cef5cc528ee5890f8afbbe98cb52f5534fc14 (diff)
downloadpkgsrc-09f2a815b1edf40fb01bc52224f8b0b54a475d20.tar.gz
drupal8 fix for:
Drupal\Core\Extension\Exception\UnknownExtensionException: The module standard does not exist. in Drupal\Core\Extension\ExtensionList->get() (line 257 of /usr/pkg/share/drupal/core/lib/Drupal/Core/Extension/ExtensionList.php) e.g. when trying to put the site in maintenance mode.
Diffstat (limited to 'www/drupal8')
-rw-r--r--www/drupal8/Makefile6
-rw-r--r--www/drupal8/distinfo3
-rw-r--r--www/drupal8/patches/patch-core_lib_Drupal_Core_Extension_ModulesHandler.php22
3 files changed, 29 insertions, 2 deletions
diff --git a/www/drupal8/Makefile b/www/drupal8/Makefile
index 4ab5f3669a8..5ad8b012fa9 100644
--- a/www/drupal8/Makefile
+++ b/www/drupal8/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.14 2019/01/04 08:17:37 wen Exp $
+# $NetBSD: Makefile,v 1.15 2019/01/09 11:56:17 prlw1 Exp $
DISTNAME= drupal-8.6.5
+PKGREVISION= 1
PKGNAME= ${PHP_PKG_PREFIX}-${DISTNAME}
CATEGORIES= www
MASTER_SITES= http://ftp.drupal.org/files/projects/
@@ -66,6 +67,9 @@ INSTALLATION_DIRS+= ${DRUPAL}/${i}
post-extract:
${CP} ${FILESDIR}/drupal.conf ${WRKSRC}
+pre-install:
+ ${RM} ${WRKSRC}/core/lib/Drupal/Core/Extension/ModuleHandler.php.orig
+
do-install:
${INSTALL_DATA} ${WRKSRC}/robots.txt ${DESTDIR}${PREFIX}/${DRUPAL}
${INSTALL_DATA} ${WRKSRC}/drupal.conf \
diff --git a/www/drupal8/distinfo b/www/drupal8/distinfo
index f3995beb09b..88c605ee837 100644
--- a/www/drupal8/distinfo
+++ b/www/drupal8/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.13 2019/01/04 08:17:37 wen Exp $
+$NetBSD: distinfo,v 1.14 2019/01/09 11:56:17 prlw1 Exp $
SHA1 (drupal-8.6.5.tar.gz) = 4df0ff5b2455db17bf753acb4facc8b1287caf23
RMD160 (drupal-8.6.5.tar.gz) = e6d7bf440935e64fd8095f42f5ab7b741c687d4b
SHA512 (drupal-8.6.5.tar.gz) = 7298b315c14931c24a1f433625c91a96bb2c7d09ab6ceac31fba62d316604a8b72c13941ef99ffc878ff697f00fb70924f6ffdd23081ec1c9258d0dba1b52e76
Size (drupal-8.6.5.tar.gz) = 16465640 bytes
+SHA1 (patch-core_lib_Drupal_Core_Extension_ModulesHandler.php) = 3d3bb6f82f14d213c805e9958916b1fab3169fe7
diff --git a/www/drupal8/patches/patch-core_lib_Drupal_Core_Extension_ModulesHandler.php b/www/drupal8/patches/patch-core_lib_Drupal_Core_Extension_ModulesHandler.php
new file mode 100644
index 00000000000..1fe547f4ccf
--- /dev/null
+++ b/www/drupal8/patches/patch-core_lib_Drupal_Core_Extension_ModulesHandler.php
@@ -0,0 +1,22 @@
+$NetBSD: patch-core_lib_Drupal_Core_Extension_ModulesHandler.php,v 1.1 2019/01/09 11:56:17 prlw1 Exp $
+
+Avoids UnknownExtensionException:
+https://www.drupal.org/project/drupal/issues/3000677
+
+--- core/lib/Drupal/Core/Extension/ModuleHandler.php.orig 2019-01-02 21:52:52.000000000 +0000
++++ core/lib/Drupal/Core/Extension/ModuleHandler.php
+@@ -777,7 +777,13 @@ class ModuleHandler implements ModuleHan
+ * {@inheritdoc}
+ */
+ public function getName($module) {
+- return \Drupal::service('extension.list.module')->getName($module);
++ try {
++ return \Drupal::service('extension.list.module')->getName($module);
++ }
++ catch (UnknownExtensionException $e) {
++ @trigger_error('Calling ModuleHandler::getName() with an unknown module is deprecated in Drupal 8.7.0 and support for this will be removed in Drupal 9.0.0, check that the module exists before calling this method. See https://www.drupal.org/node/3024541.', E_USER_DEPRECATED);
++ return $module;
++ }
+ }
+
+ }