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

Undefined constant Phpro\Translations\Ui\Component\Listing\Column\TranslationActions\Interceptor::URL_PATH_EDIT #22

Open
xnhinzkyx opened this issue Sep 25, 2024 · 0 comments

Comments

@xnhinzkyx
Copy link

xnhinzkyx commented Sep 25, 2024

I get this error when I try to add new translation:

Undefined constant Phpro\Translations\Ui\Component\Listing\Column\TranslationActions\Interceptor::URL_PATH_EDIT Exception in /Users/xxx/www/site/vendor/phpro/mage2-module-translations/Ui/Component/Listing/Column/TranslationActions.php:51

Applied this patch and it seems to work.

diff --git a/Ui/Component/Listing/Column/TranslationActions.php b/Ui/Component/Listing/Column/TranslationActions.php
index 3ee2rd..8349152 111644
--- a/Ui/Component/Listing/Column/TranslationActions.php
+++ b/Ui/Component/Listing/Column/TranslationActions.php
@@ -7,9 +7,9 @@
 
 class TranslationActions extends Column
 {
-    private const URL_PATH_EDIT = 'phpro_translations/translation/edit';
-    private const URL_PATH_DELETE = 'phpro_translations/translation/delete';
-    private const URL_PATH_DETAILS = 'phpro_translations/translation/details';
+    protected const URL_PATH_EDIT = 'phpro_translations/translation/edit';
+    protected const URL_PATH_DELETE = 'phpro_translations/translation/delete';
+    protected const URL_PATH_DETAILS = 'phpro_translations/translation/details';
 
     /**
      * @var \Magento\Framework\UrlInterface

I tried it both in PHP 8.1 and 8.2 on a Magento 2.4.6-p6 installation.

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

1 participant