Skip to content Skip to sidebar

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.

This topic contains 6 replies, has 1 voice.

Last updated by Paweł Halicki 1 month ago.

Assisted by: Paweł Halicki.

Author Posts
March 6, 2026 at 12:38 pm #17877806

mariusS-7

I have advanced custom fields a custom taxonomy, and this has custom fields and a custom PDF field. And I use media translation to translate these PDFs, which works on the taxonomy itself. But where it does not work is in a grid element from Unlimited Elements, where I query the terms and also the PDF URL from the custom meta field from ACF. There I get in the translated page only https:// and then the IDs (like hidden link), I guess, or the array IDs. I also changed the ACF setting from array to PDF URL. But as I said, it works on the taxonomy itself, but not if I use the content grid element from Unlimited Elements where I query the custom field. So the question is: how can this be resolved?

March 6, 2026 at 12:39 pm #17877826

mariusS-7

You can see it here: hidden link

March 6, 2026 at 12:40 pm #17877827

mariusS-7

And this did not help: https://wpml.org/forums/topic/cannot-translate-pdf-file-using-acf/

March 6, 2026 at 3:56 pm #17878195

Paweł Halicki
Supporter

Thank you for contacting WPML support. I would be happy to assist you with this issue.

After an initial analysis, I determined that I need to recreate the environment on my side in order to properly diagnose the problem.
I noticed that you have the Duplicator plugin active. Access to a copy of the environment where the issue occurs would greatly streamline the investigation process.

Would it be possible to share a copy of the site with us, or provide access to the environment so we can download the copy ourselves?

I look forward to your reply. Thank you and best regards.

March 10, 2026 at 1:29 pm #17885741

mariusS-7

Did you manage to log in? And get the Duplicator backup or just test in the provided staging direct!

March 11, 2026 at 11:00 am #17888324

Paweł Halicki
Supporter

Thank you for preparing the environment. We were able to download the backup using the Duplicator plugin and successfully reproduce the issue.

The problem appears to require an individual approach and has been forwarded to our development team for further analysis. I will keep you updated as soon as we have any new information.

Best regards,
Pawel

March 18, 2026 at 12:55 pm #17908086

Paweł Halicki
Supporter

Hello,

The issue appears to be caused by an incompatibility between one of our mechanisms and the combination of ACF and Unlimited Elements. For now, I’m sharing a workaround while we work on resolving the root cause.

<?php
// wp-content/mu-plugins/wpmlvip-263.php
add_filter( 'addon_library_modify_addon_output_params', function ( $arrParams, $addon ) {
	if ( isset( $arrParams['multisource'] ) ) {
		foreach ( $arrParams['multisource'] as &$itemElement ) {
			if ( ! empty( $itemElement['item']['link_noprefix'] ) && is_numeric( $itemElement['item']['link_noprefix'] ) ) {
				$media_id      = (int) $itemElement['item']['link_noprefix'];
				$translated_id = apply_filters( 'wpml_object_id', $media_id, 'attachment', true );

				$mediaUrl  = wp_get_attachment_url( $media_id );
				$parse_url = parse_url( $mediaUrl );

				$itemElement['item']['link']          = $mediaUrl;
				$itemElement['item']['link_full']     = $mediaUrl;
				$itemElement['item']['link_noprefix'] = $parse_url['host'] . $parse_url['path'];
			}
		}
	}

	return $arrParams;
}, 10, 2 );

Please let me know if this solution is sufficient for the time being.

Best regards,
Pawel

The topic ‘[Closed] PDF urls from Terms show ids not urls’ is closed to new replies.