funkjedi / acf-qtranslate

Adds qTranslate compatible fields for Text, Text Area, Wysiwyg Editor and Image.
http://wordpress.org/plugins/acf-qtranslate/
57 stars 32 forks source link

Media Library dont show thumbnails #134

Closed edveraxo closed 4 years ago

edveraxo commented 4 years ago

Advanced Custom Fields: qTranslate 1.7.25

Uncaught Error: Using $this when not in object context in /home/a/.../.../public_html/wp-content/plugins/acf-qtranslate/src/plugin.php:302

File /src/plugin.php, line 302:

    /**
     * Render setting.
     */
    function render_setting_translate_standard_field_types() {
        ?>
        <input type="checkbox" name="acf_qtranslate[translate_standard_field_types]" <?php checked($this->get_plugin_setting('translate_standard_field_types'), 1); ?> value="1">
        <?php
    }

Hi! Great plugin, but, When i activate this plugin in media library doesn't show thumbnails. How to fix it?

lrozewicz commented 4 years ago

I have similar issue. After Wordpress updated thumbnails in media library disappeared. If I manually turn off plugin then thumbnails showing again.

herrvigg commented 4 years ago

It is certainly the same issue we saw with qTranslate-XT and ACF 5.8.3. They removed this function wp_prepare_attachment_for_js from acf_field_image.

Here is the fix: https://github.com/qtranslate/qtranslate-xt/commit/d026cebf917a96df4c535692998cea7d6bfa239b

NB: if you don't know qTranslate-XT you should take a look at it ;) ... since qTranslate-X is dead and there's almost zero chance the original repo will be active again. We have merged this plugin as a module in qTranslate-XT for "native" support of ACF. One reason for merging this integration plugin is to handle big refactoring more directly. Once we have clarified a bit how the plugin evolves i would like to give the hand back to you here. But in some way it is much easier to work with a single github repo.

herrvigg commented 4 years ago

For the whole story about this issue check this: https://github.com/qtranslate/qtranslate-xt/issues/718.

edveraxo commented 4 years ago

Here is the fix: qtranslate/qtranslate-xt@d026ceb

Thanks a lot for the prompt reply! It helped, the problem is solved, thanks again!