Viewing 3 replies - 1 through 3 (of 3 total)
  • After digging through this same issue myself, I realized that the plugin itself is broken.

    Within

    classes/class-bp-xprofile-field-type-image.php

    on line 163, the format function is breaking the output from the database. If you inspect the incoming value, $field_value, you will see that it is indeed correct.

    He then attempts this call:
    $raw_field_value = bp_unserialize_profile_field( $field->data->value );
    which fails and returns null. After that, everything just fails because of this initial value.

    As an easy patch, just comment out line 170 where it attempts to reformat the return value and instead returns the broken code above. By doing this, you will have to implement your own <img> tag. If I get around to it later, I may try to figure out what is broken and create a proper patch, but this works for my purposes.

    If you still want the plugin to return the <img> tag filled in correctly, change line 167 to:

    $bpxp_field_value = WP_CONTENT_URL . $field_value;

    Then, for the return statement, simply return bpxp_field_value and viola!

    After looking through the trunk, it would appear that none of this code was changed in the recent updates, so I am wondering if the way it is being stored is different if you are using the backend to store the value, instead of the front-end BP interface.

    My use-case requires me to store the image from the backend.

    Plugin Author Alex Githatu

    (@kalengi)

    This is fixed in 2.0.2

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image not showing’ is closed to new replies.