Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static translations error #468

Closed
LinneaHarts opened this issue Sep 11, 2023 · 2 comments
Closed

Static translations error #468

LinneaHarts opened this issue Sep 11, 2023 · 2 comments
Assignees
Milestone

Comments

@LinneaHarts
Copy link

I'm getting an error when trying to edit static translations on all my sites where I have Acclaro installed:

array_walk(): Argument #1 ($array) must be of type array, null given

Craft version is 4.5.3
Screenshot 2023-09-11 at 11 59 59

2023-09-11 15:59:44 [web.ERROR] [TypeError] TypeError: array_walk(): Argument #1 ($array) must be of type array, null given in /var/www/html/metrocu/vendor/craftcms/cms/src/i18n/I18N.php:329
Stack trace:
#0 /var/www/html/metrocu/vendor/craftcms/cms/src/i18n/I18N.php(329): array_walk(NULL, Object(Closure))
#1 /var/www/html/metrocu/vendor/yiisoft/yii2/i18n/I18N.php(92): craft\i18n\I18N->format('Previous', NULL, 'en-US')
#2 /var/www/html/metrocu/vendor/craftcms/cms/src/i18n/I18N.php(300): yii\i18n\I18N->translate('site', 'Previous', NULL, 'en-US')
#3 /var/www/html/metrocu/vendor/yiisoft/yii2/BaseYii.php(538): craft\i18n\I18N->translate('site', 'Previous', NULL, 'en-US')
#4 /var/www/html/metrocu/vendor/acclaro/translations/src/services/repository/StaticTranslationsRepository.php(91): yii\BaseYii::t('site', 'Previous', NULL, 'en-US')
#5 /var/www/html/metrocu/vendor/acclaro/translations/src/services/repository/StaticTranslationsRepository.php(55): acclaro\translations\services\repository\StaticTranslationsRepository->getFileStrings('/var/www/html/m...', '/var/www/html/m...', Object(acclaro\translations\elements\db\StaticTranslationQuery), 'site', 0)
#6 /var/www/html/metrocu/vendor/acclaro/translations/src/elements/StaticTranslations.php(266): acclaro\translations\services\repository\StaticTranslationsRepository->get(Object(acclaro\translations\elements\db\StaticTranslationQuery))
#7 /var/www/html/metrocu/vendor/acclaro/translations/src/elements/StaticTranslations.php(119): acclaro\translations\elements\StaticTranslations::countTranslation('/var/www/html/m...')
#8 /var/www/html/metrocu/vendor/acclaro/translations/src/elements/StaticTranslations.php(88): acclaro\translations\elements\StaticTranslations::defineSources('index')
#9 /var/www/html/metrocu/vendor/craftcms/cms/src/services/ElementSources.php(368): acclaro\translations\elements\StaticTranslations::sources('index')
#10 /var/www/html/metrocu/vendor/craftcms/cms/src/services/ElementSources.php(79): craft\services\ElementSources->_nativeSources('acclaro\transla...', 'index')
#11 /var/www/html/metrocu/vendor/twig/twig/src/Extension/CoreExtension.php(1607): craft\services\ElementSources->getSources('acclaro\transla...', 'index', true)
#12 /var/www/html/metrocu/vendor/craftcms/cms/src/helpers/Template.php(129): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\services\ElementSources), 'getSources', Array, 'method', false, false)
#13 /var/www/html/metrocu/storage/runtime/compiled_templates/52/52d3865b11f9d91447cbb420aa59f10da0d9315f432641d57d1c02b84566336d.php(65): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\services\ElementSources), 'getSources', Array, 'method')
#14 /var/www/html/metrocu/vendor/twig/twig/src/Template.php(394): __TwigTemplate_0d094f047d9ebed18f1eacff8dbaf8a6011720fced3c23fc95a1d308713bc7f3->doDisplay(Array, Array)
#15 /var/www/html/metrocu/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#16 /var/www/html/metrocu/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#17 /var/www/html/metrocu/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render(Array, Array)
#18 /var/www/html/metrocu/vendor/twig/twig/src/Environment.php(277): Twig\TemplateWrapper->render(Array)
#19 /var/www/html/metrocu/vendor/craftcms/cms/src/web/View.php(474): Twig\Environment->render('translations/st...', Array)
#20 /var/www/html/metrocu/vendor/craftcms/cms/src/web/View.php(527): craft\web\View->renderTemplate('translations/st...', Array)
#21 /var/www/html/metrocu/vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(56): craft\web\View->renderPageTemplate('translations/st...', Array, 'cp')
#22 /var/www/html/metrocu/vendor/yiisoft/yii2/web/Response.php(1100): craft\web\TemplateResponseFormatter->format(Object(craft\web\Response))
#23 /var/www/html/metrocu/vendor/craftcms/cms/src/web/Response.php(346): yii\web\Response->prepare()
#24 /var/www/html/metrocu/vendor/yiisoft/yii2/web/Response.php(340): craft\web\Response->prepare()
#25 /var/www/html/metrocu/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#26 /var/www/html/metrocu/web/index.php(43): yii\base\Application->run()

@shnsumit shnsumit self-assigned this Sep 12, 2023
@bdmtra
Copy link

bdmtra commented Sep 12, 2023

I have same issue

@MerrittBoydston MerrittBoydston added this to the 🗂 Backlog milestone Sep 12, 2023
@shnsumit
Copy link
Collaborator

@LinneaHarts

Thank you for bringing this issue to our attention, and I appreciate your patience as we worked on resolving it. I wanted to provide you with an update on this.

It appears that the error you reported is indeed related to an update in Craft's function in the latest release. Our team has thoroughly investigated the issue, and we have successfully identified the root cause. We have determined that an adjustment to our code is necessary to align with the changes in Craft.

I want to assure you that addressing this issue is a top priority for us. In fact, I'm pleased to inform you that we plan to include the necessary fixes in our upcoming hotfix release, which is scheduled for later this week or early next week.

Once the hotfix is released, we encourage you to test it and provide feedback on the GitHub issue thread. Your feedback will be invaluable in ensuring that the problem is completely resolved.

If you have any further questions or encounter any other issues, please don't hesitate to reach out. We're here to assist and ensure a smooth experience for all our users.

Thank you for your understanding and collaboration in addressing this matter.

cc @bdmtra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants