• Resolved pierre1960


    After moving my website from development to production, the image thumbnails weren’t showing anymore. I checked the database and found that thumbnail URLs were… hard coded in table _modulaimages. What a great idea! But even when fixing this via SQL, each time I update an existing gallery, Modula resets the URL to the previous value (dev environment)… Please do not answer me to upload my images again!
    Thanks for your help.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support mplusb


    Hello @pierre1960,

    Thank you for reaching out to us!
    Please rest assured we will get to the bottom of this asap.
    Can you please go to your dashboard > Settings > General > and make sure that your site address is set up correctly to reflect the new address?

    Let me know how it goes.

    Thank you,

    Yes, it is.

    I also removed all the cookies for this site.

    I think I found the reason: you’re using the GUID to build the link to the thumbnail. Which is probably not a good practice as the GUID is meant to identify posts, not link to them…

    Plugin Support mplusb


    Hello @pierre1960,

    Thank you so much for taking the time to explain this!
    Please allow us a day or 2 to investigate this.
    I will reach back here with an answer asap.

    Thank you for your understanding,

    Plugin Support mplusb


    Hello @pierre1960,

    We have found a fix for your problem.
    Please follow my instructions below.

    Go to this file: modula.php on line 1255 you will find this code:
    $wpdata = get_post( $img->imageId );
    and replace that line with this code:

    $uploads  = wp_get_upload_dir();
    $file     = get_post_meta( $img->imageId, '_wp_attached_file', true );

    Then go to line 1256 you will see this code:
    $baseurl = str_replace( basename( $wpdata->guid ), "", $wpdata->guid );

    Replace it with this one:
    $baseurl = $uploads['baseurl'] . '/' . str_replace( basename( $file ), "", $file );

    Save the file.

    For the images’ links to change in your db you will need to delete an image from your gallery and re-upload it. Or upload a new image and then delete it.

    Let me know how it goes!

    All the best,

    • This reply was modified 2 years, 2 months ago by mplusb.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Thumbnails URL hard coded’ is closed to new replies.