catalog-filter-tree
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: catalog-filter-tree
Just to be sure. Do you mean, that I replace this block of Code
with this block of code
Trimble
Code: Select all
if( $currentid != '' )
{
$catItems = $manager->getPath( $currentid );
if( $startid != '' )
{
foreach( $catItems as $key => $item )
{
if( $key == $startid ) {
break;
}
unset( $catItems[$key] );
}
}
if( ( $node = reset( $catItems ) ) === false )
{
$msg = sprintf( 'Category with ID "%1$s" not below ID "%2$s"', $currentid, $startid );
throw new Client_Html_Exception( $msg );
}
}
else if( $startid != '' )
{
$node = $manager->getItem( $startid );
$catItems = array( $node->getId() => $node );
}
else
{
$node = $manager->getTree( null, array(), MW_Tree_Manager_Abstract::LEVEL_ONE );
$catItems = array( $node->getId() => $node );
}
Code: Select all
if( $currentid )
{
$catItems = $controller->getCatalogPath( $currentid );
if( $startid )
{
foreach( $catItems as $key => $item )
{
if( $key == $startid ) {
break;
}
unset( $catItems[$key] );
}
}
}
Re: catalog-filter-tree
There's another if(reset()) statement afterwards in the new code that you also have to insert.trimble wrote:Code: Select all
if( $currentid ) { $catItems = $controller->getCatalogPath( $currentid ); if( $startid ) { foreach( $catItems as $key => $item ) { if( $key == $startid ) { break; } unset( $catItems[$key] ); } } }
Re: catalog-filter-tree
I replaced the code blocks as suggested, cleared the caches in the install tool and got the error message 'A non-recoverable error occured'.
Trimble
Trimble
Re: catalog-filter-tree
In this case, you can find more information in the madmin_log table.trimble wrote:I replaced the code blocks as suggested, cleared the caches in the install tool and got the error message 'A non-recoverable error occured'.
Re: catalog-filter-tree
That's in madmin_log table
I have appended the default.php with the suggested changes
Regards
Trimble
Code: Select all
PHP Warning: reset() expects parameter 1 to be array, null given in /html/typo3/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/client/html/src/Client/Html/Catalog/Filter/Tree/Default.php line 250
#0 [internal function]: TYPO3\CMS\Core\Error\ErrorHandler->handleError(2, 'reset() expects...', '/html/typo3/typ...', 250, Array)
#1 /html/typo3/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/client/html/src/Client/Html/Catalog/Filter/Tree/Default.php(250): reset(NULL)
#2 /html/typo3/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/client/html/src/Client/Html/Catalog/Filter/Tree/Default.php(118): Client_Html_Catalog_Filter_Tree_Default->_setViewParams(Object(MW_View_Default), Array, NULL)
#3 /html/typo3/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/client/html/src/Client/Html/Catalog/Filter/Default.php(220): Client_Html_Catalog_Filter_Tree_Default->getHeader('', Array, NULL)
#4 /html/typo3/typo3conf/ext/aimeos/Classes/Controller/AbstractController.php(142): Client_Html_Catalog_Filter_Default->getHeader()
#5 /html/typo3/typo3conf/ext/aimeos/Classes/Controller/CatalogController.php(32): Aimeos\Aimeos\Controller\AbstractController->getClientOutput(Object(Client_Html_Catalog_Filter_Default))
#6 [internal function]: Aimeos\Aimeos\Controller\CatalogController->filterAction()
#7 /html/typo3/typo3_src-7.4.0/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(259): call_user_func_array(Array, Array)
#8 /html/typo3/typo3_src-7.4.0/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(154): TYPO3\CMS\Extbase\Mvc\Controller\ActionController->callActionMethod()
#9 /html/typo3/typo3_src-7.4.0/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php(70): TYPO3\CMS\Extbase\Mvc\Controller\ActionController->processRequest(Object(TYPO3\CMS\Extbase\Mvc\Web\Request), Object(TYPO3\CMS\Extbase\Mvc\Web\Response))
#10 /html/typo3/typo3_src-7.4.0/typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php(54): TYPO3\CMS\Extbase\Mvc\Dispatcher->dispatch(Object(TYPO3\CMS\Extbase\Mvc\Web\Request), Object(TYPO3\CMS\Extbase\Mvc\Web\Response))
#11 /html/typo3/typo3_src-7.4.0/typo3/sysext/extbase/Classes/Core/Bootstrap.php(196): TYPO3\CMS\Extbase\Mvc\Web\FrontendRequestHandler->handleRequest()
#12 /html/typo3/typo3_src-7.4.0/typo3/sysext/extbase/Classes/Core/Bootstrap.php(185): TYPO3\CMS\Extbase\Core\Bootstrap->handleRequest()
#13 [internal function]: TYPO3\CMS\Extbase\Core\Bootstrap->run('', Array)
#14 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(6932): call_user_func_array(Array, Array)
#15 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/ContentObject/UserContentObject.php(39): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->callUserFunction('TYPO3\\CMS\\Extba...', Array, '')
#16 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(918): TYPO3\CMS\Frontend\ContentObject\UserContentObject->render(Array)
#17 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(836): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->render(Object(TYPO3\CMS\Frontend\ContentObject\UserContentObject), Array)
#18 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php(3492): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->cObjGetSingle('USER', Array)
#19 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php(3440): TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->INTincScript_process(Array)
#20 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php(3407): TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->recursivelyReplaceIntPlaceholdersInContent()
#21 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/Http/RequestHandler.php(229): TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->INTincScript()
#22 /html/typo3/typo3_src-7.4.0/typo3/sysext/core/Classes/Core/Bootstrap.php(288): TYPO3\CMS\Frontend\Http\RequestHandler->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#23 /html/typo3/typo3_src-7.4.0/typo3/sysext/frontend/Classes/Http/Application.php(76): TYPO3\CMS\Core\Core\Bootstrap->handleRequest(Object(TYPO3\CMS\Core\Http\ServerRequest))
#24 /html/typo3/typo3_src-7.4.0/index.php(33): TYPO3\CMS\Frontend\Http\Application->run()
#25 [internal function]: {closure}()
#26 /html/typo3/typo3_src-7.4.0/index.php(34): call_user_func(Object(Closure))
#27 {main}
Regards
Trimble
- Attachments
-
- Default.zip
- new default.php for typo3 Installation
- (3.71 KiB) Downloaded 380 times
Re: catalog-filter-tree
The initialization of the variable is missing. Please have a look in the latest file on Github how it's made there.trimble wrote:That's in madmin_log tableCode: Select all
PHP Warning: reset() expects parameter 1 to be array, null given in /html/typo3/typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/client/html/src/Client/Html/Catalog/Filter/Tree/Default.php line 250 #0 [internal function]: TYPO3\CMS\Core\Error\ErrorHandler->handleError(2, 'reset() expects...', '/html/typo3/typ...', 250, Array)
Re: catalog-filter-tree
I try to learn. But it's not easy for me cause I'm not a programmer.
I hope I'll find the error with your hints.
Thanks for your patience.
Trimble
I hope I'll find the error with your hints.
Thanks for your patience.
Trimble