BuddyDev

Search

[Resolved] Gallery is not selected (message on activity upload)

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #12851

    hi Brajesh,

    For some site users, (MediaPress + BuddyPress), the activity feed produces an error when trying to upload an image: Gallery is not selected.

    There are no galleries in the trash, as I’ve emptied it following a suggestion in another bug report. “Photo” is checked under MP option/settings, and some site users can upload with no issues.

    Any other ideas…?

    R.

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #12852

    The gallery selector popup has My Profile selected, but this appears to be ignored.

    (added here as a reply as I don’t appear to have permissions to Edit the OP).

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #12858

    It’s worth noting that upload from within the profile->gallery area works fine. The main activity feed is the problem, from where most users will want to upload, of course…

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #12871

    Hi Richard,
    I am sorry for the inconvenience.

    can you please help me in recreating it?

    Is it happening for all users or new users? Do they have wall gallery or does it happen when creating a wall gallery for the first time?

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #12880

    hi Brajesh,

    no, this is just happening for a selection of apparently random users. The users concerned do also have a wall gallery. If it’s of any use, I did have Sitewide gallery set (main config) at first, and then I switched it off, as I realized from another post, that this might be a possible side-effect. There was no change in the behaviour though :\

    I’m happy to try any number of things to pin it down though.

    R.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #12904

    Hi Richard,
    I am trying to recreate this too. If I am able to do it I will post a solution. If you are able to find a reason, Please do let me know. It is possible if the allowed status is not supported by the component(say ‘public’ status is not supported by members component).

    But I am not sure if that is the case(as you are mentioning that it is working for some of the users).

    regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #13058

    hi Brajesh,

    I’ve captured some screen for you to take a look at this. Perhaps you can spot something:

    https://www.smartlook.com/play/shared/1fbbd9e0b28bd902878b4bc556cce3fdaa78efc0

    Cheers

    R.

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #13062

    Looking at what is printed via the activity box (file upload) I can see that the My Profile gallery selector is assigned the value “0”. This seems to imply it’s not finding the ‘default album’ for this user, even though the user has a valid public image album. This may be the cause?

    <div id="whats-new-post-in-box">
    Post in:
    <label for="whats-new-post-in" class="bp-screen-reader-text">Post in</label>
    <select id="whats-new-post-in" name="whats-new-post-in">
    <option selected="selected" value="0">My Profile</option>
    <option value="68">Active Nudists</option>
    <option value="404">Autistic naturists & nudists</option>
    <option value="130">Bare Beaches</option>
    <option value="249">Censorship</option>
    

    Nope, that’s not it, as a successful upload user also has a gallery value=”0″. Hmmm… presumably then, when MP tries to assign the image to a gallery, on upload, it’s unable to discover it on it’s own. So there must be some DB./taxonomy relationships missing…

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #13065

    hi Brajesh,

    ok, it seems that $id = mpp_get_wall_gallery_id() is returning an $id or 79791, which is then not able to be used by mpp_get_gallery( $id ).

    component=members, id=1, media_type=photo -> gallery_id=79791

    However no such post/gallery exists, and this is because some galleries have been deleted, but not the usermeta records:

    wp_usermeta where meta_key = '_mpp_wall_photo_gallery_id'

    I think we need a bad data fixup script here 🙂

    R.

  • Participant
    Level: Master
    Posts: 279
    Richard Foley on #13068

    hi Brajesh,

    having fixed my bad data, everything works as expected again, PHEW!

    I’d recommend at least an error message somewhere in your mpp_get_gallery routine which says something like “assigned gallery id=$id is invalid”, which could be dropped into STDERR/apache error logs, and at least give an indication of what’s wrong.

    Happy bunny here now 🙂

    R.

The topic ‘ [Resolved] Gallery is not selected (message on activity upload)’ is closed to new replies.

This topic is: resolved