PHP: 5.6.33 (XAMPP Windows)
Drupal: 8.5.3

Feeds: 8.x-3.0-alpha1
Tamper: 8.x-1.x-dev updated 25 May 2018
Feeds Tamper: 8.x-2.x-dev updated 25 May 2018

When creating a tamper mapping I get the following message in the protocol:

Strict warning: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\feeds_tamper\Form\TamperFormBase::getPluginForm() should not be called statically in Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse() (Zeile 69 in C:\xampp\htdocs\...\core\lib\Drupal\Core\Form\FormAjaxResponseBuilder.php) #0 C:\xampp\htdocs\...\core\includes\bootstrap.inc(582): _drupal_error_handler_real(2048, 'call_user_func_...', 'C:\\xampp\\htdocs...', 69, Array) #1 [internal function]: _drupal_error_handler(2048, 'call_user_func_...', 'C:\\xampp\\htdocs...', 69, Array) #2 C:\xampp\htdocs\...\core\lib\Drupal\Core\Form\FormAjaxResponseBuilder.php(69): call_user_func_array('Drupal\\feeds_ta...', Array) #3 C:\xampp\htdocs\...\core\lib\Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber.php(98): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse(Object(Symfony\Component\HttpFoundation\Request), Array, Object(Drupal\Core\Form\FormState), Array) #4 [internal function]: Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException(Object(Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #5 C:\xampp\htdocs\...\core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #6 C:\xampp\htdocs\...\vendor\symfony\http-kernel\HttpKernel.php(228): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.exceptio...', Object(Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent)) #7 C:\xampp\htdocs\...\vendor\symfony\http-kernel\HttpKernel.php(79): Symfony\Component\HttpKernel\HttpKernel->handleException(Object(Drupal\Core\Form\FormAjaxException), Object(Symfony\Component\HttpFoundation\Request), 1) #8 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #10 C:\xampp\htdocs\...\core\modules\page_cache\src\StackMiddleware\PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #11 C:\xampp\htdocs\...\core\modules\page_cache\src\StackMiddleware\PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 C:\xampp\htdocs\...\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 C:\xampp\htdocs\...\core\lib\Drupal\Core\DrupalKernel.php(664): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 C:\xampp\htdocs\...\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #17 {main}.

When deleting the tamper mapping I get the message

Warning: Illegal offset type in unset in Drupal\Core\Plugin\DefaultLazyPluginCollection->removeInstanceId() (Zeile 185 in C:\xampp\htdocs\...\core\lib\Drupal\Core\Plugin\DefaultLazyPluginCollection.php) #0 C:\xampp\htdocs\...\core\includes\bootstrap.inc(582): _drupal_error_handler_real(2, 'Illegal offset ...', 'C:\\xampp\\htdocs...', 185, Array) #1 C:\xampp\htdocs\...\core\lib\Drupal\Core\Plugin\DefaultLazyPluginCollection.php(185): _drupal_error_handler(2, 'Illegal offset ...', 'C:\\xampp\\htdocs...', 185, Array) #2 C:\xampp\htdocs\...\modules\feeds_tamper\src\FeedTypeTamperMeta.php(141): Drupal\Core\Plugin\DefaultLazyPluginCollection->removeInstanceId(Object(Drupal\tamper\Plugin\Tamper\Trim)) #3 C:\xampp\htdocs\...\modules\feeds_tamper\src\Form\TamperDeleteForm.php(90): Drupal\feeds_tamper\FeedTypeTamperMeta->removeTamper(Object(Drupal\tamper\Plugin\Tamper\Trim)) #4 [internal function]: Drupal\feeds_tamper\Form\TamperDeleteForm->submitForm(Array, Object(Drupal\Core\Form\FormState)) #5 C:\xampp\htdocs\...\core\lib\Drupal\Core\Form\FormSubmitter.php(111): call_user_func_array(Array, Array) #6 C:\xampp\htdocs\...\core\lib\Drupal\Core\Form\FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #7 C:\xampp\htdocs\...\core\lib\Drupal\Core\Form\FormBuilder.php(585): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #8 C:\xampp\htdocs\...\core\lib\Drupal\Core\Form\FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('feeds_tamper_de...', Array, Object(Drupal\Core\Form\FormState)) #9 C:\xampp\htdocs\...\core\lib\Drupal\Core\Controller\FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\feeds_tamper\Form\TamperDeleteForm), Object(Drupal\Core\Form\FormState)) #10 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #11 C:\xampp\htdocs\...\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #12 C:\xampp\htdocs\...\core\lib\Drupal\Core\Render\Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #13 C:\xampp\htdocs\...\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #14 C:\xampp\htdocs\...\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #15 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #16 C:\xampp\htdocs\...\vendor\symfony\http-kernel\HttpKernel.php(151): call_user_func_array(Object(Closure), Array) #17 C:\xampp\htdocs\...\vendor\symfony\http-kernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #18 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 C:\xampp\htdocs\...\core\modules\page_cache\src\StackMiddleware\PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 C:\xampp\htdocs\...\core\modules\page_cache\src\StackMiddleware\PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 C:\xampp\htdocs\...\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 C:\xampp\htdocs\...\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 C:\xampp\htdocs\...\core\lib\Drupal\Core\DrupalKernel.php(664): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 C:\xampp\htdocs\...\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #27 {main}.

Comments

ksc created an issue. See original summary.

ericgsmith’s picture

Project: Tamper » Feeds Tamper
Version: 8.x-1.x-dev » 8.x-2.x-dev

Hi Ksc,

Thanks for reporting this error.

The first section looks like an error in the TamperBase form which is part of the feeds tamper module - it looks like the ajax callback is either set incorrectly on the form element which is causing the form builder to try call it statically, or the method itself should be static.

Re deleting - I'm not sure if this has been implemented in feeds tamper yet.

Moving this to the feeds tamper issue queue as it looks like at least the first part of the issue can be solved there. If anything is needed from tamper itself we can open another issue.

ericgsmith’s picture

Status: Active » Needs review
StatusFileSize
new533 bytes

Attached is a patch for the first error message.

Re the second point - there is an open issue for deleting plugins not working #2965816: Cannot delete tamper plugin via web interface - I haven't looked further into that but I was assume the error message is related.

megachriz’s picture

I tried to reproduce the first reported error with an automated test. The error seems to only occur when an AJAX callback is triggered. AJAX behaviour can be tested with a functional javascript test but on https://github.com/jhedstrom/drupalextension/issues/143#issuecomment-161... I read that these tests are not really meant for catching PHP warnings, just only the behaviour. As I'm not sure how to test an AJAX callback with a kernel test, I did it with a functional javascript test anyway: I enabled the dblog during the test and at the end asserting that there are no messages of type 'php' in the log.

The test only patch should demonstrate the error and fail tests. The other one should pass.

  • MegaChriz committed 7d3e0cc on 8.x-2.x
    Issue #2976804 by MegaChriz, ericgsmith: Strict warning:...
megachriz’s picture

Status: Needs review » Fixed

Committed #4.

Status: Fixed » Closed (fixed)

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