Support Forum ยป User Profile

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • 030tango030tango
    Participant

    So I managed to add the relationship via code and also implemented the changes from the commit.
    I can now see all events, present and past. The videos show up in the events, where they are supposed to.
    But as soon as I hit "save" on a video, the relationships field jumps back to "select an event"

    This is the code for the relationship I used:

    
    add_action( 'mb_relationships_init', function () {
        MB_Relationships_API::register( [
    		'id'   => 'video_to_events',
            
    		'from' => [
    		'object_type' => 'post',
    		'post_type'   => 'video',
    
    		'meta_box'    => [
    			'title' => 'Event related to Video Neu',
    		],
    
    		'field' => [
    			'label' => 'Event related to Video Neu',
    			],
    
    		'query_args' => [
        			'post_status' => 'any',
    			'suppress_filters' => 'true',
    		],
    		
    		],
    		
    		'to'   => [
    		'object_type' => 'post',
    		'post_type'   => 'tribe_events',
    
    		'meta_box'    => [
    			'title' => 'Videos related to Event Neu',
    		],
    
    		'field' => [
    			'label' => 'Videos related to Event Neu',
    			],
    			
    		'query_args' => [
        			'post_status' => 'any',
    			'suppress_filters' => 'true',
    
    		],
    
    		],
    		
        ] );
    } );
    
    030tango030tango
    Participant

    Not so great. You will be shocked to read, that one of the reasons I chose Metabox are the easy relationships and the no code approach...

    Guess I have to hire a developer for bugfixing this on my page.

Viewing 2 posts - 1 through 2 (of 2 total)