qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
553 stars 104 forks source link

ACF and QTranslate XT image issue #1241

Closed gab1982 closed 1 year ago

gab1982 commented 1 year ago

Hi I have an ACF options Qtranslate XT image field however it isn't allowing me to set an image but if i change the field type to a normal image then I am able to set it but I would like to use the qtranslate xt image field as my site is multilingual, I am using Wordpress v6.0.3, ACF v6.0.3 and Qtranslate XT v3.12.1

herrvigg commented 1 year ago

Can you explain/show what happens when you say "it isn't allowing me to set an image"? I can't reproduce this, I tested for an image field displayed in a post and all works as expected.

gab1982 commented 1 year ago

Hi, thanks for your reply, I have attached a screenshot and on click nothing happens, i checked the console for errors but nothing shows.

Screenshot 2022-11-05 at 19 26 06
herrvigg commented 1 year ago

So that happens with a "image (qTranslate-XT)" field? If you add a "Text (qTranslate-XT)" field does it work?

gab1982 commented 1 year ago

Yes seems to be ok with the text field, but when set to a Image (Qtranslate-XT) field i can't even delete or edit it unless i change it to a regular image field.

herrvigg commented 1 year ago

That's really strange, because that "Add Image" button is not handled by QT-XT. It's a good sign the text field works, which means most of the code is working. Are you a PHP/JS developer?

herrvigg commented 1 year ago

It could be due to some specific uploader. Are you able to compare the HTML code between the QTX-image field and the standard ACF-image field?

herrvigg commented 1 year ago

I guess it worked with ACF5 and it's a recent regression with ACF6? I'd need to bisect the differences between ACF 5 and 6 but I suspect something about the type of uploader.

gab1982 commented 1 year ago

That's really strange, because that "Add Image" button is not handled by QT-XT. It's a good sign the text field works, which means most of the code is working. Are you a PHP/JS developer?

sorry im not really a php/js developer, i know a bit but nothing too much

gab1982 commented 1 year ago

here is the html:

default image field: https://www.dropbox.com/s/y5hknvtzixq82nq/wp-default-image-field.rtf?dl=0 multilingual image field: https://www.dropbox.com/s/943dphvsm5rrlu0/wp-multilingual-image-field.rtf?dl=0

gab1982 commented 1 year ago

I guess it worked with ACF5 and it's a recent regression with ACF6? I'd need to bisect the differences between ACF 5 and 6 but I suspect something about the type of uploader. Yes it worked fine with ACF v5

MKRD-SUPPORT commented 1 year ago

Strange, why is this working for me?

WP 6.1 ACF PRO 6.0.4 QTX 3.12.1

Test: Image (QTX), Group (ACF) + Image (QTX)

If this phenomenon also occurs with a standard wordpress theme, then I would take a closer look at your field group definition (ACF)

herrvigg commented 1 year ago

@gab1982 I can't reproduce the problem either, but I updated the rendering of the ACF-QTX image field, hoping it could solve the problem for you. Could you try again using the last version available on master? It requires git or a manual installation. You can download a zip from the "code" button or here: https://github.com/qtranslate/qtranslate-xt/archive/refs/heads/master.zip

herrvigg commented 1 year ago

Released in 3.13.0. Not clear if this fixes the issue but for now this is the best we can do. I close the ticket, re-open if it's still failing.