dudaster / ele-custom-skin

Create a skin for Elementor Pro Post and Post Archive widgets using Elementor templates
GNU General Public License v3.0
59 stars 10 forks source link

loop wpml support - errors #577

Open andreas-stricker opened 3 years ago

andreas-stricker commented 3 years ago

I get a lot of errors when trying to translate the loop template with wpml. Is there a way to make it compatible?

Error log: `An error of type E_ERROR was caused in line 94 of the file /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-wpml-pb-string-registration.php. Error message: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-wpml-pb-string-registration.php:94 Stack trace:

0 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-wpml-pb-string-registration.php(94): trim(Array)

1 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/compatibility/class-wpml-page-builders-register-strings.php(85): WPML_PB_String_Registration->register_string(12522, Array, 'LINE', 'Dynamic content...', 'dynamic-1c48be1...', 1, '')

2 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders-elementor/src/class-wpml-elementor-register-strings.php(20): WPML_Page_Builders_Register_Strings->register_strings_for_node('1c48be1', Array, Array)

3 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/compatibility/class-wpml-page-builders-register-strings.php(60): WPML_Elementor_Register_Strings->register_strings_for_modules(Array, Array)

4 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-page-builder-integration.php(61): WPML_Page_Builders_Register_Strings->register_strings(Object(WP_Post), Array)

5 /home/learndog/public_html/wp-includes/class-wp-hook.php(303): WPML_Page_Builders_Integration->register_pb_strings(Object(WP_Post), Array)

6 /home/learndog/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)

7 /home/learndog/public_html/wp-includes/plugin.php(470): WP_Hook->do_action(Array)

8 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/strategy/api-hooks/class-wpml-pb-api-hooks-strategy.php(18): do_action('wpml_page_build...', Object(WP_Post), Array)

9 [internal function]: WPML_PB_API_Hooks_Strategy->register_strings(Object(WP_Post))

10 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Invoker.php(41): call_user_func_array(Array, Array)

11 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(173): WPML\FP_Invoker->__invoke(Object(WPML_PB_API_Hooks_Strategy))

12 [internal function]: WPML\FP\Fns::WPML\FP{closure}(Object(WPML\FP_Invoker), Object(WPML_PB_API_Hooks_Strategy), 0)

13 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array(Object(Closure), Array)

14 [internal function]: WPML\FP{closure}(Object(WPML_PB_API_Hooks_Strategy), 0)

15 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(161): array_map(Object(Closure), Array, Array)

16 [internal function]: WPML\FP\Fns::WPML\FP{closure}(Object(Closure), Array)

17 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array(Object(Closure), Array)

18 [internal function]: WPML\FP\Fns::WPML\FP{closure}(Object(Closure), Array)

19 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)

20 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(167): WPML\FP\Fns::__callStatic('map', Array)

21 [internal function]: WPML\FP\Fns::WPML\FP{closure}(Object(WPML\FP_Invoker), Array)

22 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array(Object(Closure), Array)

23 [internal function]: WPML\FP\Fns::WPML\FP{closure}(Object(WPML\FP_Invoker), Array)

24 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)

25 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-wpml-pb-integration.php(226): WPML\FP\Fns::__callStatic('each', Array)

26 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/page-builders/src/st/class-wpml-pb-integration.php(156): WPML_PB_Integration->with_strategies(Object(WPML\FP_Invoker))

27 /home/learndog/public_html/wp-includes/class-wp-hook.php(303): WPML_PB_Integration->register_all_strings_for_translation(Object(WP_Post))

28 /home/learndog/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)

29 /home/learndog/public_html/wp-includes/plugin.php(470): WP_Hook->do_action(Array)

30 /home/learndog/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1291): do_action('wpml_pb_registe...', Object(WP_Post))

31 /home/learndog/public_html/wp-content/plugins/wpml-translation-management/classes/class-wpml-translation-job-factory.php(107): TranslationManagement->send_jobs(Object(WPML_TM_Translation_Batch), 'post')

32 /home/learndog/public_html/wp-content/plugins/wpml-translation-management/classes/menu/translation-queue/class-wpml-translations-queue.php(633): WPML_Translation_Job_Factory->create_local_job('12522', 'de', NULL, 'postelementor...')

33 /home/learndog/public_html/wp-content/plugins/wpml-translation-management/classes/menu/translation-queue/class-wpml-translations-queue.php(56): WPML_Translations_Queue->get_job_id_from_request()

34 /home/learndog/public_html/wp-includes/class-wp-hook.php(303): WPML_Translations_Queue->load(Object(WP_Screen))

35 /home/learndog/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)

36 /home/learndog/public_html/wp-includes/plugin.php(470): WP_Hook->do_action(Array)

37 /home/learndog/public_html/wp-admin/includes/class-wp-screen.php(421): do_action('current_screen', Object(WP_Screen))

38 /home/learndog/public_html/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen()

39 /home/learndog/public_html/wp-admin/admin.php(212): set_current_screen()

40 {main}

thrown`

dudaster commented 3 years ago

When this error occurs to be more exact? The WPML compatibility in ECS is the ability to create a language variant for each Loop Template.

andreas-stricker commented 3 years ago

It occurs when I click on the PLUS Icon to set the language translation for this loop

Bildschirmfoto 2021-09-27 um 11 32 09

.

karpalig commented 3 years ago

I wolud like to put mine 1 cent.

I ahve problems with output on different (translated) language.

You can see original language is Russain image loop is translated post is translated

Despite this, the translated English post does not contain the translated loop

Best, Alex