pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/drupal8 drupal8 fix for:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7376b71938b2
branches:  trunk
changeset: 317556:7376b71938b2
user:      prlw1 <prlw1%pkgsrc.org@localhost>
date:      Wed Jan 09 11:56:17 2019 +0000

description:
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:

 www/drupal8/Makefile                                                        |   6 ++-
 www/drupal8/distinfo                                                        |   3 +-
 www/drupal8/patches/patch-core_lib_Drupal_Core_Extension_ModulesHandler.php |  22 ++++++++++
 3 files changed, 29 insertions(+), 2 deletions(-)

diffs (60 lines):

diff -r 7ee53132a15b -r 7376b71938b2 www/drupal8/Makefile
--- a/www/drupal8/Makefile      Wed Jan 09 11:29:16 2019 +0000
+++ b/www/drupal8/Makefile      Wed Jan 09 11:56:17 2019 +0000
@@ -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 @@
 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 -r 7ee53132a15b -r 7376b71938b2 www/drupal8/distinfo
--- a/www/drupal8/distinfo      Wed Jan 09 11:29:16 2019 +0000
+++ b/www/drupal8/distinfo      Wed Jan 09 11:56:17 2019 +0000
@@ -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 -r 7ee53132a15b -r 7376b71938b2 www/drupal8/patches/patch-core_lib_Drupal_Core_Extension_ModulesHandler.php
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/drupal8/patches/patch-core_lib_Drupal_Core_Extension_ModulesHandler.php       Wed Jan 09 11:56:17 2019 +0000
@@ -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;
++    }
+   }
+ 
+ }



Home | Main Index | Thread Index | Old Index