Ecodev / newsletter

TYPO3 extension to send newsletter
https://extensions.typo3.org/extension/newsletter/
25 stars 26 forks source link

[BUG] No Content in Newsletter by using Cronjob #155

Closed p-view closed 6 years ago

p-view commented 6 years ago

no vcontent and no subject in newsletter by using schedueler with cronjob. by using "execute task" in schedueler there is full content in newsletter. cheers micha

PowerKiKi commented 6 years ago

In the first tab of Newsletter module there are errors/warnings/infos list. In that list you should find the URL used by newsletter to fetch the page. Newsletter actually does a standard HTTP GET query on that URL.

So first thing to try is if that URL works in your browser. Then you should try fetching that URL via cURL directly from the production server. If the server cannot reach itself, Newsletter won't work.

p-view commented 6 years ago

Hi Adrien,

oh sorry my fault. Then the post can close. Thanx for you`re quick response. By the way. when i use the actual master it comes that error:

#1289386765: Could not analyse class: "ObjectManager" maybe not loaded or no autoloader? Class ObjectManager does not exist (More information https://typo3.org/go/exception/CMS/debug/1289386765)

TYPO3\CMS\Extbase\Object\Container\Exception\UnknownObjectException thrown in file /html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php in line 37.

18 TYPO3\CMS\Extbase\Object\Container\ClassInfoFactory::buildClassInfoFromClassName("ObjectManager")

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00350: $classInfo = $this->getClassInfoCache()->get($classNameHash); 00351: if (!$classInfo instanceof \TYPO3\CMS\Extbase\Object\Container\ClassInfo) {

00352: $classInfo = $this->getClassInfoFactory()->buildClassInfoFromClassName($className);

00353: $this->getClassInfoCache()->set($classNameHash, $classInfo); 00354: }

17 TYPO3\CMS\Extbase\Object\Container\Container::getClassInfo("ObjectManager")

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00171: return $this->singletonInstances[$className]; 00172: }

00173: $classInfo = $this->getClassInfo($className);

00174: $classIsSingleton = $classInfo->getIsSingleton(); 00175: if (!$classIsSingleton) {

16 TYPO3\CMS\Extbase\Object\Container\Container::getInstanceInternal("ObjectManager")

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00239: } 00240: foreach ($classInfo->getInjectProperties() as $injectPropertyName => $classNameToInject) {

00241: $instanceToInject = $this->getInstanceInternal($classNameToInject);

00242: if ($classInfo->getIsSingleton() && !$instanceToInject instanceof \TYPO3\CMS\Core\SingletonInterface) { 00243: $this->log('The singleton "' . $classInfo->getClassName() . '" needs a prototype in "' . $injectPropertyName . '". This is often a bad code smell; often you rather want to inject a singleton.', 1);

15 TYPO3\CMS\Extbase\Object\Container\Container::injectDependencies(Ecodev\Newsletter\MVC\ExtDirect\RequestBuilder, TYPO3\CMS\Extbase\Object\Container\ClassInfo)

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00180: } 00181: $instance = $this->instanciateObject($classInfo, $givenConstructorArguments);

00182: $this->injectDependencies($instance, $classInfo);

00183: $this->initializeObject($instance, $classInfo); 00184: if (!$classIsSingleton) {

14 TYPO3\CMS\Extbase\Object\Container\Container::getInstanceInternal("Ecodev\Newsletter\MVC\ExtDirect\RequestBuilder")

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00306: } else { 00307: if (isset($argumentInformation['dependency']) && !array_key_exists('defaultValue', $argumentInformation)) {

00308: $parameter = $this->getInstanceInternal($argumentInformation['dependency']);

00309: if ($classInfo->getIsSingleton() && !$parameter instanceof \TYPO3\CMS\Core\SingletonInterface) { 00310: $this->log('The singleton "' . $className . '" needs a prototype in the constructor. This is often a bad code smell; often you rather want to inject a singleton.', 1);

13 TYPO3\CMS\Extbase\Object\Container\Container::getConstructorArguments("Ecodev\Newsletter\MVC\ExtDirect\RequestHandler", TYPO3\CMS\Extbase\Object\Container\ClassInfo, array)

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00205: throw new \TYPO3\CMS\Extbase\Object\Exception('Object "' . $className . '" has explicit constructor arguments but is a singleton; this is not allowed.', 1292858051); 00206: }

00207: $constructorArguments = $this->getConstructorArguments($className, $classInfo, $givenConstructorArguments);

00208: array_unshift($constructorArguments, $className); 00209: $instance = call_user_func_array([\TYPO3\CMS\Core\Utility\GeneralUtility::class, 'makeInstance'], $constructorArguments);

12 TYPO3\CMS\Extbase\Object\Container\Container::instanciateObject(TYPO3\CMS\Extbase\Object\Container\ClassInfo, array)

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00179: $this->prototypeObjectsWhichAreCurrentlyInstanciated[$className] = true; 00180: }

00181: $instance = $this->instanciateObject($classInfo, $givenConstructorArguments);

00182: $this->injectDependencies($instance, $classInfo); 00183: $this->initializeObject($instance, $classInfo);

11 TYPO3\CMS\Extbase\Object\Container\Container::getInstanceInternal("Ecodev\Newsletter\MVC\ExtDirect\RequestHandler", array)

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/Container/Container.php:

00124: { 00125: $this->prototypeObjectsWhichAreCurrentlyInstanciated = [];

00126: return $this->getInstanceInternal($className, $givenConstructorArguments);

00127: } 00128:

10 TYPO3\CMS\Extbase\Object\Container\Container::getInstance("Ecodev\Newsletter\MVC\ExtDirect\RequestHandler", array)

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Object/ObjectManager.php:

00097: $instance = call_user_func_array([\TYPO3\CMS\Core\Utility\GeneralUtility::class, 'makeInstance'], $arguments); 00098: } else {

00099: $instance = $this->objectContainer->getInstance($objectName, $arguments);

00100: } 00101: return $instance;

9 TYPO3\CMS\Extbase\Object\ObjectManager::get("Ecodev\Newsletter\MVC\ExtDirect\RequestHandler")

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Mvc/RequestHandlerResolver.php:

00071: $suitableRequestHandlers = []; 00072: foreach ($availableRequestHandlerClassNames as $requestHandlerClassName) {

00073: $requestHandler = $this->objectManager->get($requestHandlerClassName);

00074: if ($requestHandler->canHandleRequest()) { 00075: $priority = $requestHandler->getPriority();

8 TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver::resolveRequestHandler()

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Core/Bootstrap.php:

00202: /* @var $requestHandlerResolver \TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver / 00203: $requestHandlerResolver = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\RequestHandlerResolver::class);

00204: $requestHandler = $requestHandlerResolver->resolveRequestHandler();

00205: 00206: $response = $requestHandler->handleRequest();

7 TYPO3\CMS\Extbase\Core\Bootstrap::handleRequest()

/html/typo3_src-7.6.23/typo3/sysext/extbase/Classes/Core/Bootstrap.php:

00191: { 00192: $this->initialize($configuration);

00193: return $this->handleRequest();

00194: } 00195:

6 TYPO3\CMS\Extbase\Core\Bootstrap::run("", array)

/html/typo3_src-7.6.23/typo3/sysext/backend/Classes/Http/BackendModuleRequestHandler.php:

00213: // Run Extbase 00214: $bootstrap = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Core\Bootstrap::class);

00215: $content = $bootstrap->run('', $configuration);

00216: 00217: $response->getBody()->write($content);

5 TYPO3\CMS\Backend\Http\BackendModuleRequestHandler::dispatchModule("tools_ExtensionmanagerExtensionmanager")

/html/typo3_src-7.6.23/typo3/sysext/backend/Classes/Http/BackendModuleRequestHandler.php:

00091: $moduleName = (string)$this->request->getQueryParams()['M']; 00092: if ($this->isDispatchedModule($moduleName)) {

00093: return $this->dispatchModule($moduleName);

00094: } else { 00095: // @deprecated: This else path is deprecated and throws deprecations logs at registration time. Can be removed with TYPO3 CMS 8.

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

/html/typo3_src-7.6.23/typo3/sysext/core/Classes/Core/Bootstrap.php:

00305: 00306: // Execute the command which returns a Response object or NULL

00307: $this->response = $requestHandler->handleRequest($request);

00308: return $this; 00309: }

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

/html/typo3_src-7.6.23/typo3/sysext/backend/Classes/Http/Application.php:

00092: } 00093:

00094: $this->bootstrap->handleRequest($this->request);

00095: 00096: if ($execute !== null) {

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

/html/typo3_src-7.6.23/typo3/index.php:

00018: call_user_func(function () { 00019: $classLoader = require DIR . '/../vendor/autoload.php';

00020: (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();

00021: });

1 {closure}()

/html/typo3_src-7.6.23/typo3/index.php:

00019: $classLoader = require DIR . '/../vendor/autoload.php'; 00020: (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();

00021: });

2018-03-21 10:18 GMT+01:00 Adrien Crivelli notifications@github.com:

In the first tab of Newsletter module there are errors/warnings/infos list. In that list you should find the URL used by newsletter to fetch the page. Newsletter actually does a standard HTTP GET query on that URL.

So first thing to try is if that URL works in your browser. Then you should try fetching that URL via cURL directly from the production server. If the server cannot reach itself, Newsletter won't work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Ecodev/newsletter/issues/155#issuecomment-374874712, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtY_0AMdRChByq8cLg_6atnRDEtInHNks5tghrwgaJpZM4SzNlW .