Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with translating a custom post created with the Pods plugin from Dutch to English. The media files linked to the post do not appear in the translated version, and manually adding images results in a server error.
Solution:
We identified that the issue with the TypeError after uploading images to the translated Pods was due to fields in the Pods having similar slugs, which confused the database. Renaming these fields to have unique names resolved the TypeError. However, the problem with media files not being copied during translation is a known bug, which you can read about here: https://wpml.org/errata/pods-gallery-images-not-copied-when-using-manual-editor-for-translation/. For now, manually adding images to the custom English language Pod post should display them correctly.
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: ,

This topic contains 4 replies, has 0 voices.

Last updated by josG-3 9 months ago.

Assisted by: Itamar.

Author Posts
August 4, 2025 at 5:23 pm #17294285

josG-3

Background of the issue:
I am trying to translate a custom post, created with the Pods plugin, from Dutch to English. The post includes media files linked to it. The issue can be seen on this page: hidden link

Symptoms:
When I translate the custom post, the media files do not appear in the English version. Additionally, when I manually add the image files to the English version, I encounter a server error.

Questions:
Why are the media files not appearing in the translated custom post?
What causes the server error when manually adding image files to the English version?

August 6, 2025 at 10:12 am #17299043

Itamar
WPML Supporter since 02/2016

Languages: Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I can see the problem on the link you sent us.

It seems like a known issue, you can see here: https://wpml.org/errata/pods-gallery-images-not-copied-when-using-manual-editor-for-translation/. However, you say that you are getting a server error when you try to add the images manually.
What exactly is the error you're getting?
How have you initially translated that page?
Did you use WPML's Translation Editor, or translate it manually?
Can you please try the method of manual translation mentioned in the following guide, which is also linked to the known issue?
https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/
Please try the method when you first duplicate the original to the translation and then translate it manually.

Please answer my questions and let me know how it goes.

Regards,
Itamar.

August 6, 2025 at 11:53 am #17299307

josG-3

Thank you for your reply Itamar. Answers to your questions:

1. See error message below
2. Followed the steps in the URL you gave me, and translated manually. I noticed that only one photographs was copied initially, and added the others manually. This is a Pods field of type File/Image/Video that usually holds around 3 to 5 images. Works nicely in the original language, but once translated, also the original post in the original language throws the error.
3. I have translated manually, but in the past also with the WPML translator which also throws the same error.

The total behaviour is sometimes somewhat erratic. For instance, if I clear the Litespeed cache (clear all, including the object cache) the posts return to normal, except that for the English (translated) post the images are missing.
In the editor of the translated post I again find just one image, which is typically the last image in the array of images of the original post.
I added the images again, and the same error occurs

Could this be a template thing? (Using Elementor Pro)
Could you maybe walk me through the correct settings for translating Pods in WPML? I think I covered it all, but maybe I am missing something?
And could you also walk me through the steps to translate the Template? (cause also trying to access the translated templates causes an error)

Best regards, Jos

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor-pro/modules/dynamic-tags/pods/tags/pods-gallery.php:59 Stack trace: #0 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/dynamic-tags/data-tag.php(44): ElementorPro\Modules\DynamicTags\Pods\Tags\Pods_Gallery->get_value() #1 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/dynamic-tags/manager.php(207): Elementor\Core\DynamicTags\Data_Tag->get_content() #2 [internal function]: Elementor\Core\DynamicTags\Manager->get_tag_data_content() #3 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/dynamic-tags/manager.php(100): call_user_func_array() #4 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/dynamic-tags/manager.php(61): Elementor\Core\DynamicTags\Manager->parse_tag_text() #5 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/includes/controls/base-data.php(91): Elementor\Core\DynamicTags\Manager->parse_tags_text() #6 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/includes/base/controls-stack.php(1335): Elementor\Base_Data_Control->parse_tags() #7 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/includes/base/controls-stack.php(1182): Elementor\Controls_Stack->parse_dynamic_settings() #8 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/post.php(315): Elementor\Controls_Stack->get_parsed_dynamic_settings() #9 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/post.php(297): Elementor\Core\Files\CSS\Post->render_element_styles() #10 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/dynamic-tags/dynamic-css.php(36): Elementor\Core\Files\CSS\Post->render_styles() #11 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/dynamic-tags/dynamic-css.php(40): Elementor\Core\DynamicTags\Dynamic_CSS->render_styles() #12 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/post.php(178): Elementor\Core\DynamicTags\Dynamic_CSS->render_styles() #13 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/base.php(687): Elementor\Core\Files\CSS\Post->render_css() #14 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/base.php(180): Elementor\Core\Files\CSS\Base->parse_content() #15 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/base.php(133): Elementor\Core\Files\Base->update_file() #16 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/base.php(229): Elementor\Core\Files\CSS\Base->update() #17 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/post.php(201): Elementor\Core\Files\CSS\Base->enqueue() #18 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/dynamic-tags/manager.php(478): Elementor\Core\Files\CSS\Post->enqueue() #19 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/class-wp-hook.php(324): Elementor\Core\DynamicTags\Manager->after_enqueue_post_css() #20 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #21 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/plugin.php(517): WP_Hook->do_action() #22 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/base.php(276): do_action() #23 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor/core/files/css/post.php(201): Elementor\Core\Files\CSS\Base->enqueue() #24 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor-pro/modules/theme-builder/classes/locations-manager.php(196): Elementor\Core\Files\CSS\Post->enqueue() #25 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/class-wp-hook.php(324): ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager->enqueue_styles() #26 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #27 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/plugin.php(517): WP_Hook->do_action() #28 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/script-loader.php(2299): do_action() #29 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts() #30 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #31 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/plugin.php(517): WP_Hook->do_action() #32 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/general-template.php(3192): do_action() #33 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/themes/hello-elementor/header.php(23): wp_head() #34 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/template.php(810): require_once('/home/u125144p1...') #35 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/template.php(745): load_template() #36 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/general-template.php(48): locate_template() #37 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/themes/hello-elementor/index.php(14): get_header() #38 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-includes/template-loader.php(106): include('/home/u125144p1...') #39 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-blog-header.php(19): require_once('/home/u125144p1...') #40 /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/index.php(17): require('/home/u125144p1...') #41 {main} thrown in /home/u125144p121218/domains/wingsforanimals.org/public_html/staging/wp-content/plugins/elementor-pro/modules/dynamic-tags/pods/tags/pods-gallery.php on line 59
There has been a critical error on this website.

Learn more about troubleshooting WordPress.

August 6, 2025 at 4:59 pm #17300511

josG-3

I can add that I have just deleted the English version template for the custom posts that gave me errors, and recreated it via WPML Translation management and the WPML editor.
I also deleted all English versions of the relevant post type, and flushed the cache, as well as the WPML cache.
Everything was functioning well and even when clicking the English flag on the post, The template texts were nicely in English. The post text fell back to the Dutch version, which it should, as per WPML settings.

But... After I translated one post via translation management and the WPML editor, I lost the images in the English version. When I added the photographs again in the English version of the post, with the standard WP editor, the uncaught type error as above re-appeared for all posts of this type, both in Dutch as wel as in English. And the error appears also when trying to edit the template with Elementor.

August 7, 2025 at 6:21 pm #17303699

josG-3

Hello Itamar,

I've done a lot of experimenting and research the last two days, and I am happy to say that I at least found the solution to the problem of the TypeError that was thrown after I uploaded images to the translated Pods.

I had a few Pod fields that had similar slugs across the Pods I have. That apparently confused the database when translating.
I renamed these fields to give them an unique name, and now the TypeError stays away.

Still, the images in the gallery are not copied on translation, but I read on the internet that that is a know bug. So hopefully that will be solved in the near future. For now I manually add the images to the custom English language Pod post and they appear as they should.

Hopefully this feedback helps you to help other clients with a similar problem. On my side, ticket can be closed.

Best regards,