• This is the data I get from the PDF post itself.
    WP_Post Object ( [ID] => 2585 [post_author] => 5 [post_date] => 2014-12-09 12:15:12 [post_date_gmt] => 2014-12-09 09:15:12 [post_content] => [post_title] => Winter_2014_Newsletter_(V) [post_excerpt] => [post_status] => inherit [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => winter_2014_newsletter_v-8-4 [to_ping] => [pinged] => [post_modified] => 2014-12-09 12:15:12 [post_modified_gmt] => 2014-12-09 09:15:12 [post_content_filtered] => [post_parent] => 0 [guid] => https://beta.musalaha.org/wp-content/uploads/Winter_2014_Newsletter_V1.pdf [menu_order] => 0 [post_type] => attachment [post_mime_type] => application/pdf [comment_count] => 0 [filter] => raw )

    When I make this call
    echo get_the_post_thumbnail( $PDF[1]['ID'], 'thumbnail' )
    I don’t get anything

    Where can I check if the image is actually added to the PDF? And what can I do to help you help me? ??

    https://www.ads-software.com/plugins/pdf-thumbnails/

Viewing 15 replies - 16 through 30 (of 31 total)
  • Plugin Author stianlik

    (@stianlik)

    You are probably right about the attachments being duplicated before thumbnails are generated, however, synchronize_attachment_metadata does not copy the relevant metadata for thumbnails so we would also need to modify that to keep the connection. Adding something like the following (below the update_post_meta call) should solve the second issue:

    $thumbId = get_post_meta( $attachment_id, '_thumbnail_id', true );
    if ($thumbId) {
        update_post_meta( $translation->element_id, '_thumbnail_id', $thumbId );
    }

    To make WMPL run the sync function after thumbnails are generated, you can add it with higher priority as follows*:

    remove_action('synchronize_attachment_metadata');
    add_action('wp_generate_attachment_metadata', 'synchronize_attachment_metadata', 11, 2);

    * Or get the WPML team to set priority 11 or higher to the action

    No need to modify this plugin ?? Besides, it would not be a good thing to add a dependency to an unrelated plugin, certainly not a commercial one. WPML is concerned with content duplication, this plugin is focused on generating thumbnails. Adding code to overcome lacks in WMPL would be breaking the separation of concerns principle. It should be a easy for the WPML team to fix the problem as described above.

    If I get access to the source code for “WPML Media”, I may be able to find a way that you can solve the issue without modifying any of the plugins, but you should check with them first.

    Thread Starter Squazz

    (@squazz)

    Noted, I will check op with them ??

    And thank you for the feedback ??

    Thread Starter Squazz

    (@squazz)

    Fantastic, there have been a new update from the WPML team ??
    https://wpml.org/forums/topic/upload-creates-duplicate-in-database/

    Can you help us further? ??

    Edit: Found your mail at gitHub. If that is not the right one, please tell me so :p

    Plugin Author stianlik

    (@stianlik)

    Great, I’ll do my best to help you further. You found the correct e-mail address.

    Plugin Author stianlik

    (@stianlik)

    I was contact by the compability team a few days ago, think they are working on the issue now.

    Thread Starter Squazz

    (@squazz)

    Anything new? ??
    (Sorry for contacting you, but you are just faster and more reliable than their support ?? )

    Plugin Author stianlik

    (@stianlik)

    No problem ?? I haven’t heard anything since 31. December, last message received was the following:

    Thanks for your message. I see your point. I will share the information with the technical team. Thery will contact you if they need further help.

    I’m not sure if they have looked at the issue yet, it may be a good idea to contact them to check the status.

    Thread Starter Squazz

    (@squazz)

    Thanks for your quick response, just shows me that I was right in contacting you first ??

    I’ll contact them..

    Plugin Author stianlik

    (@stianlik)

    I received an e-mail from another person in the WPML team, asking me to register for some GoGlobal program, again (seems like the issue has been reset and given to another support person). As I’m not interested in joining this program, I declined, let them know that I am happy to help if they have any questions or non-intrusive change requests, and referred her to the original support person and this thread.

    I am fairly sure that they can fix the issue quickly, if they let the developers work in this, instead of trying to push the GoGlobal program.

    Thread Starter Squazz

    (@squazz)

    Oh, yeah, they told that they wanted to try and incorporate you in some way ??
    Thanks for updating me

    Plugin Author stianlik

    (@stianlik)

    Did the WPML team implement a fix?

    Thread Starter Squazz

    (@squazz)

    no :/ Nothing from their side ??

    Plugin Author stianlik

    (@stianlik)

    Ok, then I don’t think they will do anything about the issue. A bit disappointing to see that developers behind a commercial plugin neglect support like this. Maybe Polylang is a better alternative ??

    It would be great to get this issue resolved though. If you send me the WPML-plugins, I can see if there is a good solution that can be implemented from this my side.

    Thread Starter Squazz

    (@squazz)

    Sorry, I never got back to writing to you.

    I have tried polylang, and I really don’t like it :/

    I’ll try getting my hands on the plugin for you and send it to you. How should we share it?

    Plugin Author stianlik

    (@stianlik)

    Quick status update: I have code to make this work, but it needs more testing before a release.

    I’m hoping to include a “Regenerate thumbnails”-button in the next release to make it easier to start using the plugin on existing installations. Currently, the regeneration cam make WPML Media useless by generating image thumbnails for all translations (i.e. one thumbnail per language per PDF). Need to investigate this before I go any further.

Viewing 15 replies - 16 through 30 (of 31 total)
  • The topic ‘Thumbnail is created, but not added to PDF file’ is closed to new replies.