• All photos not showing. Not even the defaults for all. I feel like I get this every few months from this plugin. I’ve tried updating and regenerating.

    Warning: Missing argument 3 for fifu_replace_attachment_image_src() in /home/site/public_html/wp-content/plugins/featured-image-from-url/includes/attachment.php on line 52

    Also, can it possibly not show these errors to users when they happen and just use the default images. The error list shows at the top of my theme too.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author fifu.app

    (@marceljm)

    Hi, @functionmunchkin.

    Please access Settings > Help > Support > data button. Click on that, copy and send me the data.

    Thread Starter Stacy (non coder)

    (@functionmunchkin)

    I believe this was due to my theme. I suppose it shows this error in place of images each time the theme needs updating. The theme now comes with a regen thumbnails feature that worked since my other regen thumbnails plugin didn’t.

    However I know cannot re-activate yours because it says
    Fatal error: Cannot redeclare fifu_replace_attachment_image_src() (previously declared in /public_html/wp-content/themes/publisher-child/functions.php:22) in /public_html/wp-content/plugins/featured-image-from-url/includes/attachment.php on line 86

    Might be something added to the child theme for this plugin previously.

    Includes:

      }
        return $where;
    }, 10, 2);
    
    add_filter('wp_get_attachment_image_src', 'fifu_replace_attachment_image_src', 10, 3);
    
    function fifu_replace_attachment_image_src($image, $att_id, $size) {
        if (!$image)
            return $image;

    Child Theme Functions:

    <?php
    
    // Dev mode enabled
    // Use this for uncompressed custom css codes
    //if ( ! defined( 'BF_DEV_MODE' ) ) {
    //	define( 'BF_DEV_MODE', TRUE );
    //}
    
    add_filter( 'wp_get_attachment_image_src', 'fifu_replace_attachment_image_src', 10, 2 );
     
    if ( ! function_exists( 'fifu_replace_attachment_image_src' ) ) {
     /**
     * Replaced attachment src with external thumbnail URL
     *
     * @hooked wp_get_attachment_image_src
     *
     * @param $image
     * @param $attachment_id
     *
     * @return array
     */
     function fifu_replace_attachment_image_src( $image, $attachment_id ) {
     
     if ( $attachment_id == get_post_thumbnail_id( get_the_ID() ) ) {
     
     $src = get_post_meta( get_the_ID(), 'fifu_image_url', TRUE );
     
     if ( $src ) {
     return array(
     $src,
     0,
     0,
     FALSE
     );
     }
     }
     
     return $image;
     }
    }
    Plugin Author fifu.app

    (@marceljm)

    I still need the “Support Data”, @functionmunchkin.

    Thread Starter Stacy (non coder)

    (@functionmunchkin)

    How do I get it without activation? I’ve added the child function file.

    Plugin Author fifu.app

    (@marceljm)

    It’s pretty simple.

    You will click on FIFU Settings > Help > Fast Support > data.

    Then you will see a lot of text, showing the plugin version and much more.

    Copy the text and paste it here.

    Thread Starter Stacy (non coder)

    (@functionmunchkin)

    Accessing settings requires activation.

    However I know cannot re-activate yours because it says
    Fatal error: Cannot redeclare fifu_replace_attachment_image_src() (previously declared in /public_html/wp-content/themes/publisher-child/functions.php:22) in /public_html/wp-content/plugins/featured-image-from-url/includes/attachment.php on line 86

    “Plugin could not be activated because it triggered a fatal error.”

    Plugin Author fifu.app

    (@marceljm)

    Hi, @functionmunchkin.

    Just remove fifu_replace_attachment_image_src() function from /public_html/wp-content/themes/publisher-child/functions.php

    Why are you doing that by the way?

    • This reply was modified 6 years, 2 months ago by fifu.app.
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error on line 52’ is closed to new replies.