Multisite url import is overwriting diferent events from diff sources (Cont.)

Home Forums Calendar Products Event Aggregator Multisite url import is overwriting diferent events from diff sources (Cont.)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1361986

    Following the previous thread, I’ve come across some findings that may be helpful to you / others.

    Multisite url import is overwriting diferent events from different sources

    The events were being overwritten because in the verification of the event’s existence on the destination site, it was being based on the Post ID. It is possible to have a tribe_event with post ID: X on site 1, and have a diferent event on site 2 with the same post ID and they are not the same event. This causes that when it imports site 2 it would overwrite the events that had been imported from site 1.

    To fix this i used global_id instead.

    As I do not know if it has other implications i added a variable:
    src/Tribe/Aggregator/Record/Abstract.php – Line 55 (add mava-fix)

    'url' => array(
    			'source' => 'id',
    			'target' => 'EventOriginalID',
    			'mava-fix' => 'global_id',
    		),

    As I do not know if it has other implications i added a validation for url only:
    src/Tribe/Aggregator/Event.php – Line 191

    if ( $fields[ $origin ] === 'url' )
    			$key = "_{$fields[ $origin ]['mava-fix']}"; // mava-fix is ‘global_id’
    #1362542

    Awesome, thanks for that information!  It sounds like you have everything figured out at this point.

    You are welcome back in our support forums any time!

    For now, I am going to close this thread.

    Have a great week!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Multisite url import is overwriting diferent events from diff sources (Cont.)’ is closed to new replies.