• Resolved atharalikhichi

    (@atharalikhichi)


    Hi,

    When I click on DUPLICATE from event dashboard, everything is loaded perfectly except the event images.

    Please fix this issue.

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ashok Dudhat

    (@ashokdudhat)

    Hi,

    We will check it and if it is problem then we will cover it in next version.

    thanks

    Thread Starter atharalikhichi

    (@atharalikhichi)

    Hi Ashok,

    Any update on this issue? This is a priority error. If you can provide me an update sooner on this, will be much appreciated.

    Many thanks.

    Plugin Author Ashok Dudhat

    (@ashokdudhat)

    Hi,

    We will cover it in next version, we are working on it.

    Thanks

    Thread Starter atharalikhichi

    (@atharalikhichi)

    I am able to temporary resolve the issue by applying following code in my theme’s functions.php file:

    //Auto updates the meta data of array field when duplicating events from dashboard
    function auto_update_duplicate_event_fields() {
    	
    	$event_id = absint( $_GET['event_id'] );
    	$post = get_post($event_id);
    	$status = $post->post_status;
    	
    	if ($status == 'preview') {
    	
    	//Get and update event images
    	$event_banner = get_post_meta( $event_id, '_event_banner', true );
    	if (is_serialized($event_banner)) {
    		$event_banner = unserialize($event_banner);
    		update_post_meta( $event_id, '_event_banner', $event_banner );
    		}
    	
    	}
    }
    add_action('the_post', 'auto_update_duplicate_event_fields');
    Plugin Author Ashok Dudhat

    (@ashokdudhat)

    Hi,

    I think that It is just for single banner, not for multiple banner ?

    thanks

    Thread Starter atharalikhichi

    (@atharalikhichi)

    No, it is for multiple banner. The thing is, values are already saved in array so thats why getting get_post_meta as true returns the array as it is and then by unserializing it, it resolves the issue. This is because my function is executed after your plugin function so you need to modify your function to check if the meta_value is in array before updating the postmeta.

    Thread Starter atharalikhichi

    (@atharalikhichi)

    Hi Ashok,

    For some reason I am not getting the value from $_REQUEST['action']. Can you help me on how can I get this as I want to apply some checks on $action.

    Thanks

    Plugin Author Ashok Dudhat

    (@ashokdudhat)

    Hi,

    We did not get you where exactly you want to change action ?

    Thanks

    Thread Starter atharalikhichi

    (@atharalikhichi)

    Hi Ashok,

    Actually I want to perform my own check if the $action is say duplicate. Like wise you can see in my function auto_update_duplicate_event_fields, I am getting event_id but I am unable to get the $action value from $_REQUEST['action'].

    If you can help me with it, will be much appreciated.

    Thanks.

    Thread Starter atharalikhichi

    (@atharalikhichi)

    Hi Ashok,

    Only following area needs to be changed within your function event_manager_duplicate_listing. This will do the work:

    if (is_serialized($meta_value)) {
    			update_post_meta( $new_post_id, $meta_key, unserialize($meta_value) );
    			} else {
    			update_post_meta( $new_post_id, $meta_key, $meta_value);
    			}

    I have applied condition within your function where the post meta is being updated. Just need to replace update_post_meta( $new_post_id, $meta_key, $meta_value); with above conditions.

    Thanks.

    Hitesh Makvana

    (@hiteshmakvana)

    Hi @atharalikhichi,
    Thank you for showing improvements.I think plugin is already get posted value with sanitize field.

    I will test this in new version.

    Thank you

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Event Images are not loaded on DUPLICATE Events’ is closed to new replies.