'Button Ban Command

Currently I'm trying to make a Ban Command which has Buttons to determine if a User should be banned or not. However, it now sets the Author and User as 'undefined' even though a User has been provided.

(Side Note, there's no Error showing up in the Console)

Here's what it currently looks like

Since the Code is pretty big, I decided to make a hastebin. Link: https://www.toptal.com/developers/hastebin/enolimecir.js



Solution 1:[1]

The method you're using is deprecated, you can migrate to a new one. Check out below:

/** @var $languageFactory \TYPO3\CMS\Core\Localization\LocalizationFactory */
$languageFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\LocalizationFactory::class);
$languageFactory->getParsedData($fileToParse, $language, $renderCharset, $errorMode);

Ref. here: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/7.4/Deprecation-68122-GeneralUtilityReadLLfile.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 GNB