On installing Varbase 8.x-4.06, with all additional modules, and with development set to report all messages, with traceback, I get this message on the first display of the front page;

Warning: Invalid argument supplied for foreach() in Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives() (line 102 of core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php).
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 283)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 174)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 181)
Drupal\Core\Menu\LocalTaskManager->getDefinitions() (Line: 206)
Drupal\Core\Menu\LocalTaskManager->getLocalTasksForRoute('page_manager.page_view_homepage_homepage-panels_variant-0') (Line: 290)
Drupal\Core\Menu\LocalTaskManager->getTasksBuild('page_manager.page_view_homepage_homepage-panels_variant-0', Object) (Line: 358)
Drupal\Core\Menu\LocalTaskManager->getLocalTasks('page_manager.page_view_homepage_homepage-panels_variant-0', 0) (Line: 94)
Drupal\Core\Menu\Plugin\Block\LocalTasksBlock->build() (Line: 203)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func('Drupal\block\BlockViewBuilder::preRender', Array) (Line: 376)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 324)
__TwigTemplate_13d3c2eae859a78aa88f3ea0db24a6e10781ceeeff8fbbd3596c40bc202e7eec->block_header(Array, Array) (Line: 186)
Twig_Template->displayBlock('header', Array, Array) (Line: 214)
__TwigTemplate_13d3c2eae859a78aa88f3ea0db24a6e10781ceeeff8fbbd3596c40bc202e7eec->block_main(Array, Array) (Line: 186)
Twig_Template->displayBlock('main', Array, Array) (Line: 101)
__TwigTemplate_13d3c2eae859a78aa88f3ea0db24a6e10781ceeeff8fbbd3596c40bc202e7eec->doDisplay(Array, Array) (Line: 379)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 347)
Twig_Template->display(Array) (Line: 358)
Twig_Template->render(Array) (Line: 64)
twig_render_template('profiles/varbase/themes/vartheme/templates/system/page.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 106)
__TwigTemplate_831ccbb662f0d174146cd4ab0efef6eb4adbcc42eb4ea12b9f1326298d05e847->doDisplay(Array, Array) (Line: 379)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 347)
Twig_Template->display(Array) (Line: 358)
Twig_Template->render(Array) (Line: 64)
twig_render_template('profiles/varbase/themes/vartheme/templates/system/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 149)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

For what it's worth, this is instaled with PostgreSQL, but the nature of the warning doens't seem to indicate that database is an issue here.

Comments

Ben Coleman created an issue. See original summary.

ben coleman’s picture

Issue summary: View changes
rajab natshah’s picture

Hi Ben,
Thanks for reporting!

I think you have installed Varbase, and you have selected to show all errors and issues in the Development Tools instillation step.
Only local images are allowed.
I do think that this issue is an issue for the page_manager module.

If we test this with Drupal core + page_manager module, we will not have the option to show errors with full backtrace right after the install. as we do have this in Varbase at this time.

Not sure if we have an issue with profiles/varbase/themes/vartheme/templates/system/html.html.twig

For sure we will work on fixing this page manager issue.

rajab natshah’s picture

Ben, please follow the following testing scenario

Scenario: Check if we will have the Warning message more than ones after the install of varbase 8.4.06 with the Development tools and selected install Development Tools Error message to display All message with backtrace information
Given that you have finished the installation of "Varbase 8.4.06" with "install Development Tools" were checked
And you had selected "All message with backtrace information" from "Error message to display"
When you land at the "home page"
Then you will have the display of the "Warning: Invalid argument supplied for foreach() in Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives()" and the rest of full report
When you go to "/admin/reports/dblog" in your installed site
Then you should see "Warning: Invalid argument supplied for foreach() in Drupal\Component\Plugin\Discovery" in the page
When you go to the "home page"
And reload the page for number of times
Then you will not see the "Warning" message again
When you go to "/admin/reports/dblog" in your installed site
Then you should see only ONE "Warning: Invalid argument supplied for foreach() in Drupal\Component\Plugin\Discovery" in the page

Please try to reload the home page again, and see if you will have any issue. It could be that we had this issue when we switched from the installation page to the home page. and some values did not pass to the page manager module.

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Status: Active » Needs review
ben coleman’s picture

That scenario pretty much covers it. Taking the defaults on the additional modules didn't change anything. (though in both, multilingual was checked).

ben coleman’s picture

Status: Needs review » Needs work
mohammed j. razem’s picture

@Ben thanks for reporting this.

@Rajab this warning should not appear, it appears for every install. Let's file it in our JIRA to work on a fix for it.

rajab natshah’s picture

@Razem, @Ben,
As I said in my last comment

For sure we will work on fixing this page manager issue.

When we switched from the installation page to the home page. and some values did not pass to the page manager module.

:)

rajab natshah’s picture

pegasus360’s picture

I originally posted this to the payment module issue que. But after reading the error above this seems to be a Varbase issue. I also tested the payment module on a commerce, thunder and lightning distributions and did not have an error or issue.
This may or may not be a related issue to the plugin concern above.
I can start a new issue item if needed.

My problem......

On a new distro Varbase installed with composer, this is the fatal error I get when I load the payment module - even before it is enabled.
But it only happens after the cache is cleared.

Thoughts??

The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.plugin_type_manager". in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 824 of /home/myhost/public_html/mysite.com/vendor/symfony/dependency-injection/ContainerBuilder.php).

________________________
Then if I reload the page I get the NEXT ERROR:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.payment.status". in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Drupal\payment\Entity\Payment\PaymentStorage::createInstance(Object, Object) (Line: 249)
Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\payment\Entity\Payment\PaymentStorage', Object) (Line: 238)
Drupal\Core\Entity\EntityTypeManager->getHandler('payment', 'storage') (Line: 169)
Drupal\Core\Entity\EntityTypeManager->getStorage('payment') (Line: 79)
Drupal\Core\Entity\EntityManager->getStorage('payment') (Line: 174)
etc....

Thanks again for all the help and response for the Varbase distro.

rajab natshah’s picture

Issue tags: +varbase-8.4.07
alaa abbad’s picture

rajab natshah’s picture

rajab natshah’s picture

Thank you @alaa abbad ... Committed :)

rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Needs work » Needs review
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
ben coleman’s picture

Status: Needs review » Reviewed & tested by the community

I just installed Varbase 8.x-4.x-dev(which includes the above patch), and i can verify that it eliminates the above warning.

rajab natshah’s picture

Status: Reviewed & tested by the community » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)