Expected behavior/output
If settings.detail.showSocialShareButtons = 1 and Shariff extension is installed, the social share icons should be appear on news detail view.
Environment
TYPO3 version(s): 13.4
news version: 12.1.0
Is your TYPO3 installation set up with Composer (Composer Mode): yes
OS: OSX 14.5 / ddev
Possible Solution
Following changes seems to work:
<?php
/*
* This file is part of the "news" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*/
namespace GeorgRinger\News\ViewHelpers;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper;
class ExtensionLoadedViewHelper extends AbstractConditionViewHelper
{
/**
* Initialize additional argument
*/
public function initializeArguments()
{
$this->registerArgument('extensionKey', 'string', 'Extension which must be checked', true);
parent::initializeArguments();
}
/**
* @return bool
*/
public static function verdict(array $arguments, RenderingContextInterface $renderingContext)
{
return ExtensionManagementUtility::isLoaded($arguments['extensionKey']);
}
}
Instead of using the method evaluateCondition, i used the method verdict.
Bug Report
Current Behavior The ViewHelper
ExtensionLoadedViewHelper
does not work anymore. It seems that the methodevaluateCondition
has been removed (https://docs.typo3.org/other/typo3fluid/fluid/main/en-us/Changelog/4.x.html).Expected behavior/output If
settings.detail.showSocialShareButtons = 1
and Shariff extension is installed, the social share icons should be appear on news detail view.Environment
Possible Solution Following changes seems to work:
Instead of using the method
evaluateCondition
, i used the methodverdict
.