Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    What aspect is not working? No image is set? Is a copy of the image being found in the media library at least? What URL are you using for your video, because not all URL versions will be matched by the regex.

    Thread Starter alexandermatienkogmailcom

    (@alexandermatienkogmailcom)

    Hi Michael,

    WPML Multilingual CMS – Version: 3.9.4
    Video url for featured image: https://www.youtube.com/watch?v=XNJTVLFotr0

    Debug logs of function “wds_ms_media_sideload_image_with_new_filename” compared with and without activated WPML plugin:
    https://www.dropbox.com/s/y4r6t777ey5b7wo/wpml-issue.png?dl=0
    As you can see the “issue” is in temporary filename.

    WPML plugin adds filter to “wp_unique_filename” function:
    add_filter( ‘wp_unique_filename’, array( $this, ‘fix_filename_for_win’ ), 10, 3 );
    and returns
    return md5( $filename . $this->built_in_functions->time() ) . ‘tmp’;

    Probably WPML missed dot before file extension.

    I’d suggest:
    * “Automatic Featured Images from YouTube / Vimeo” plugin to rewrite plugin to handle such cases.
    * WPML to fix the issue.

    I also suggest to make a separate button to set featured image istead of parsing post content each time I save it.

    @OnTheGoSystems

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    Based on the image, it seems that our stuff is being triggered by auto drafts instead of just more intended moments with publishing or updating. Or the situation is altered before we get to run our code on it.

    I think I have a copy of WPML around that I could try some tests on, to see if there’s anything we can do to help with compatibility. We don’t use wp_unique_filename directly, but it’s possible that the callstack for what we do use hits it at some point.

    Regarding the button detail, that would remove the “automatic” aspect of things, however I do agree there needs to be a way to not have it re-run every single time. I’m thinking maybe a hidden meta key that gets set after first run. Still pondering best route there.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does not work with WPML plugin’ is closed to new replies.