BuddyDev

Search

Mediapress uploader shortcode – Uploading Temporarily disabled?

  • Keymaster
    (BuddyDev Team)
    Posts: 21067
    Brajesh Singh on #16517

    Hi George,
    The problem is component.

    Please use

    
    
    [mpp-uploader gallery_id=2581 component=sitewide]	          
    
    

    That will fix it.

    Let me know if it works or not?

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 413
    Venutius on #16520

    I’m afraid it did not work. I made sure the code on my test server is the same as on the live server and checked again – it works on the test server, not on the live server. So I them deactivated all other plugins other than my custom plugin and it still did not work on the live system. I notice if I upload via the admin galleries page it works, just not with the shortcode. Not sure what else I can do.

  • Keymaster
    (BuddyDev Team)
    Posts: 21067
    Brajesh Singh on #16521

    Hi George,
    The problem is happening as the uploader is reporting component as ‘members’ which is disable in the gallery settings.

    It seems to me that the mpp_get_current_component() has a bug.

    For testing purpose, you cam put the following line in bp-custom.php

    
    add_filter( 'mpp_get_current_component', function ( $component ) {
    	if ( 'members' == $component && ! mpp_is_active_component( $component ) ) {
    		$component = 'sitewide';
    	}
    
    	return $component;
    } );
    
    

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 413
    Venutius on #16522

    Yes that worked

  • Keymaster
    (BuddyDev Team)
    Posts: 21067
    Brajesh Singh on #16536

    Thank you for confirming. I will be adding a fix for the case where ‘members’ is disabled.

    For now, Please do keep the code above.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved