Hi, after updating the module to the latest -dev release I've got the following blocking error:

Error: Uncaught Error: Class 'Drupal\address\Event\AddressEvents' not found in /.../modules/contrib/quick_node_clone/src/EventSubscriber/AddressEventSubscriber.php:16

I've been forced to download and enable "Address" module in order to bring back the site.

The AddressEventSubscriber.php should not be included if the Address module is not installed.

Comments

FiNeX created an issue. See original summary.

Anonymous’s picture

Status: Active » Needs review

Thanks for pointing this out. With the new address cloning functionality on dev it kind of required its classes to be present.

If you try the latest dev you should be able to get rid of address and have the normal functionality.

Anonymous’s picture

Status: Needs review » Fixed
webkomplize’s picture

8.x-1.10

I got errors if address module is not installed and activated.

under drush:

web26@vmdev05:/var/www/clients/client1/web26/web$ drush cr
<em class="placeholder">Notice</em>: Undefined variable: events in <em class="placeholder">Drupal\quick_node_clone\EventSubscriber\AddressEventSubscriber::getSubscribedEvents()</em> (line <em class="placeholder">20</em> of <em class="placeholder">/var/www/clients/client1/web26/web/modules/contrib/quick_node_clone/src/EventSubscriber/AddressEventSubscriber.php</em>). <pre class="backtrace">Drupal\quick_node_clone\EventSubscriber\AddressEventSubscriber::getSubscribedEvents() (Line: 37)
Drupal\Core\DependencyInjection\Compiler\RegisterEventSubscribersPass-&gt;process(Object) (Line: 141)
Symfony\Component\DependencyInjection\Compiler\Compiler-&gt;compile(Object) (Line: 759)

or if i visit the admin/flash page:

Warning: Invalid argument supplied for foreach() in Drupal\Core\DependencyInjection\Compiler\RegisterEventSubscribersPass->process() (line 37 of /var/www/clients/client1/web26/web/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventSubscribersPass.php) #0 /var/www/clients/client1/web26/web/core/includes/bootstrap.inc(582): _drupal_error_handler_real(2, 'Invalid argumen...', '/var/www/client...', 37, Array) #1 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventSubscribersPass.php(37): _drupal_error_handler(2, 'Invalid argumen...', '/var/www/client...', 37, Array) #2 /var/www/clients/client1/web26/vendor/symfony/dependency-injection/Compiler/Compiler.php(141): Drupal\Core\DependencyInjection\Compiler\RegisterEventSubscribersPass->process(Object(Drupal\Core\DependencyInjection\ContainerBuilder)) #3 /var/www/clients/client1/web26/vendor/symfony/dependency-injection/ContainerBuilder.php(759): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Drupal\Core\DependencyInjection\ContainerBuilder)) #4 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/DrupalKernel.php(1314): Symfony\Component\DependencyInjection\ContainerBuilder->compile() #5 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/DrupalKernel.php(891): Drupal\Core\DrupalKernel->compileContainer() #6 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/DrupalKernel.php(805): Drupal\Core\DrupalKernel->initializeContainer() #7 /var/www/clients/client1/web26/web/core/includes/common.inc(1140): Drupal\Core\DrupalKernel->updateModules(Array, Array) #8 /var/www/clients/client1/web26/web/modules/contrib/admin_toolbar/admin_toolbar_tools/src/Controller/ToolbarController.php(145): drupal_flush_all_caches() #9 [internal function]: Drupal\admin_toolbar_tools\Controller\ToolbarController->flushAll() #10 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #11 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #12 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #13 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #14 /var/www/clients/client1/web26/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 /var/www/clients/client1/web26/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #16 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /var/www/clients/client1/web26/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /var/www/clients/client1/web26/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /var/www/clients/client1/web26/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /var/www/clients/client1/web26/web/core/lib/Drupal/Core/DrupalKernel.php(664): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /var/www/clients/client1/web26/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #25 {main}.

For now i installed and activated address module to fix this temporary.

floydm’s picture

Version: 8.x-1.x-dev » 8.x-1.10
Priority: Critical » Normal
Status: Fixed » Needs review
StatusFileSize
new525 bytes

I just upgraded from 8.x-1.9 to 8.x-1.10 and am also getting the warning and notices mentioned in comment #4. My site does not have the address module installed.

I think the issue now is just returning an uninitialized variable. Attached is a patch that initializes the events array before returning it. I am not seeing those warnings anymore.

  • vilepickle committed b6e564d on 8.x-1.x authored by floydm
    Issue #2960914 by floydm: Error: Uncaught Error: Class 'Drupal\address\...
Anonymous’s picture

Status: Needs review » Fixed

Thanks guys! Should be updated in dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

grantkruger’s picture

#5 works for me. Thanks @floydm

grantkruger’s picture

EDIT: Oops! I see in the release notes that it is. Thanks y'all!

Is this fixed in version 8.x-1.11?