supseven-at/mailchimp

Exception #1513232660: For hash "" no API key found

Opened this issue · 2 comments

I've just updated Typo3 to 8.7.9 and Mailchimp to version 3.0. An exception is triggered when I try to open any page that contains the plugin in the backend. Frontend output is OK and subscriptions are being done correctly.

This is the full exception report:

Uncaught TYPO3 Exception
#1513232660: For hash "" no API key found (More information)

UnexpectedValueException thrown in file
/home/xxx/public_html/typo3conf/ext/mailchimp/Classes/Domain/Model/Dto/ExtensionConfiguration.php in line 82.

21 Sup7even\Mailchimp\Domain\Model\Dto\ExtensionConfiguration::getApiKeyConfiguration(NULL)

/home/xxx/public_html/typo3conf/ext/mailchimp/Classes/Domain/Model/Dto/ExtensionConfiguration.php:
00069: public function getApiKeyLabel($hash)
00070: {
00071: $settings = $this->getApiKeyConfiguration($hash);
00072: return $settings['label'];
00073: }

20 Sup7even\Mailchimp\Domain\Model\Dto\ExtensionConfiguration::getApiKeyLabel(NULL)

/home/xxx/public_html/typo3conf/ext/mailchimp/Classes/Hooks/Backend/PageLayoutViewHook.php:
00064: $this->tableData[] = [
00065: $this->getLabel('flexform.apiKey'),
00066: $this->extensionConfiguration->getApiKeyLabel($apiKeyHash)
00067: ];
00068: }

19 Sup7even\Mailchimp\Hooks\Backend\PageLayoutViewHook::getApiKey()

/home/xxx/public_html/typo3conf/ext/mailchimp/Classes/Hooks/Backend/PageLayoutViewHook.php:
00049: $result = '' . htmlspecialchars($this->getLanguageService()->sL(self::LLPATH . 'plugin.title')) . '
';
00050:
00051: $this->getApiKey();
00052: $this->getListInformation();
00053: $this->getInterestGroupInformation();

18 Sup7even\Mailchimp\Hooks\Backend\PageLayoutViewHook::getExtensionSummary(array, TYPO3\CMS\Backend\View\PageLayoutView)
17 call_user_func_array(array, array)

/home/xxx/vendor/typo3/cms/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
03779: }
03780: // Call method:
03781: $content = call_user_func_array([&$classObj, $parts[1]], [&$params, &$ref]);
03782: } else {
03783: $errorMsg = 'No method name '' . $parts[1] . '' in class ' . $parts[0];

16 TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction("Sup7even\Mailchimp\Hooks\Backend\PageLayoutViewHook->getExtensionSummary", array, TYPO3\CMS\Backend\View\PageLayoutView)

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/View/PageLayoutView.php:
01831: $_params = ['pObj' => &$this, 'row' => $row, 'infoArr' => $infoArr];
01832: foreach ($hookArr as $_funcRef) {
01833: $hookOut .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
01834: }
01835: }

15 TYPO3\CMS\Backend\View\PageLayoutView::tt_content_drawItem(array)

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/View/PageLayoutView.php:
00635: );
00636: $innerContent = '<div ' . ($row['_ORIG_uid'] ? ' class="ver-element"' : '') . '>'
00637: . $this->tt_content_drawItem($row) . '';
00638: $singleElementHTML .= '

' . $innerContent . '
'
00639: . $this->tt_content_drawFooter($row);
14 TYPO3\CMS\Backend\View\PageLayoutView::getTable_tt_content(47)

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/View/PageLayoutView.php:
00256: break;
00257: case 'tt_content':
00258: return $this->getTable_tt_content($id);
00259: break;
00260: default:

13 TYPO3\CMS\Backend\View\PageLayoutView::getTable("tt_content", 47, "")

/home/xxx/vendor/typo3/cms/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php:
00534:
00535: // Finally, render the list:
00536: $this->HTMLcode .= $this->getTable($tableName, $this->id, implode(',', $fields));
00537: }
00538: }

12 TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList::generateList()

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/Controller/PageLayoutController.php:
00954: $dbList->HTMLcode .= $this->moduleTemplate->getVersionSelector($this->id);
00955: // Generate the list of elements here:
00956: $dbList->generateList();
00957: // Adding the list content to the tableOutput variable:
00958: $tableOutput[$table] = $h_func . $dbList->HTMLcode . $h_func_b;

11 TYPO3\CMS\Backend\Controller\PageLayoutController::renderContent()

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/Controller/PageLayoutController.php:
00818: $content .= '

' . htmlspecialchars($this->getLocalizedPageTitle()) . '
';
00819: // All other listings
00820: $content .= $this->renderContent();
00821: }
00822: $content .= '';
10 TYPO3\CMS\Backend\Controller\PageLayoutController::main()

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/Controller/PageLayoutController.php:
00736: $this->init();
00737: $this->clearCache();
00738: $this->main();
00739: $response->getBody()->write($this->moduleTemplate->renderContent());
00740: return $response;

9 TYPO3\CMS\Backend\Controller\PageLayoutController::mainAction(TYPO3\CMS\Core\Http\ServerRequest, TYPO3\CMS\Core\Http\Response)
8 call_user_func_array(array, array)

/home/xxx/vendor/typo3/cms/typo3/sysext/core/Classes/Http/Dispatcher.php:
00039: $targetIdentifier = $request->getAttribute('target');
00040: $target = $this->getCallableFromTarget($targetIdentifier);
00041: return call_user_func_array($target, [$request, $response]);
00042: }
00043:

7 TYPO3\CMS\Core\Http\Dispatcher::dispatch(TYPO3\CMS\Core\Http\ServerRequest, TYPO3\CMS\Core\Http\Response)

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/Http/BackendModuleRequestHandler.php:
00167: $dispatcher = GeneralUtility::makeInstance(Dispatcher::class);
00168: $this->request = $this->request->withAttribute('target', $moduleConfiguration['routeTarget']);
00169: $response = $dispatcher->dispatch($this->request, $response);
00170: } else {
00171: // extbase module

6 TYPO3\CMS\Backend\Http\BackendModuleRequestHandler::dispatchModule("web_layout")

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/Http/BackendModuleRequestHandler.php:
00087:
00088: $moduleName = (string)$this->request->getQueryParams()['M'];
00089: return $this->dispatchModule($moduleName);
00090: }
00091:

5 TYPO3\CMS\Backend\Http\BackendModuleRequestHandler::handleRequest(TYPO3\CMS\Core\Http\ServerRequest)

/home/xxx/vendor/typo3/cms/typo3/sysext/core/Classes/Core/Bootstrap.php:
00313:
00314: // Execute the command which returns a Response object or NULL
00315: $this->response = $requestHandler->handleRequest($request);
00316: return $this;
00317: }

4 TYPO3\CMS\Core\Core\Bootstrap::handleRequest(TYPO3\CMS\Core\Http\ServerRequest)

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Classes/Http/Application.php:
00090: }
00091:
00092: $this->bootstrap->handleRequest($this->request);
00093:
00094: if ($execute !== null) {

3 TYPO3\CMS\Backend\Http\Application::run()

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Resources/Private/Php/backend.php:
00022: $classLoader = require DIR . '/../../../../../../vendor/autoload.php';
00023:
00024: (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();
00025: });

2 {closure}()

/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Resources/Private/Php/backend.php:
00023:
00024: (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();
00025: });

1 require("/home/xxx/vendor/typo3/cms/typo3/sysext/backend/Resources/Private/Php/backend.php")

/home/xxx/vendor/typo3/cms/typo3/index.php:
00001: <?php
00002:
00003: require DIR . '/sysext/backend/Resources/Private/Php/backend.php';

It does not fail if I open the plugin block through LIST instead of PAGE. Once there I've detected that all the plugin's settings are now lost. After configuring the plugin again the error is gone, so I guess that there was a problem with the update process.

Perhaps "Used API" and "List" should be "required fields" in the plugin configuration to avoid misconfiguration and errors in the page view?

Same problem is my instances...

Regards,
Tim