BuddyDev

Search

[Resolved] BP Gallery (Am I the only one still using it?) Error

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

    Hi Brajesh, yes I know I should migrate to MediaPress but alas I have a site still running BP Gallery. Up till now I’ve been happy fixing the deprecation notices etc but I’ve got a new issue I’m not sure what to do with:

    Undefined index: wordpress_logged_in_3fb87e893adfbf4604f6b60f66df9ccb
    Type: PHP Notice
    Line: 99
    File: /wp-content/plugins/bp-gallery/gallery-theme-compat/gallery/functions.php

    This seems to be getting it’s index based on a cookie:

    	<script type='text/javascript'>
    
    		bp_player_base = "<?php echo $url; ?>/inc/videoplayer/";
    		bp_video_player_url = bp_player_base + "flowplayer-3.1.5.swf";
    		bp_audio_player_url = bp_player_base + "flowplayer.audio.swf";
    
    		gallery_home_url = "<?php echo bp_get_gallery_home_url(); ?>";
    
    		gallery_plugin_url = "<?php echo BP_GALLERY_PLUGIN_URL; ?>";
    		gallery_debaug_mode = "<?php echo bp_gallery_is_debug_mode(); ?>";
    
    		gallery_enable_flash_uploader = "<?php echo bp_gallery_is_flash_uploader_enabled(); ?>";
    		//gallery_enable_flash_uploader=parseInt(gallery_enable_flash_uploader);//-0;//convert to int
    
    		gallery_uploader_base_url = "<?php echo $url; ?>/inc/swfupload/"
    		//for swfupload
    		gallery_upload_settings = {
    			upload_url: ajaxurl,
    			file_post_name: 'file',
    			file_size_limit: "<?php echo gallery_get_max_media_size( true ); ?>",
    			//file_types : "*.jpg;*.png;*.gif",
    			//file_types_description : "Image files",
    			file_upload_limit: 0,
    			flash_url: gallery_uploader_base_url + "swfupload.swf",
    			button_image_url: gallery_uploader_base_url + 'upload_btn.png',
    			button_width: 114,
    			post_params: {
    				cookie: encodeURIComponent( document.cookie ),
    				auth_cookie: "<?php $auth_cookie; ?>",
    	line 99			logged_in_cookie: "<?php echo $_COOKIE[LOGGED_IN_COOKIE]; ?>"
    
    			},
    			button_height: 29,
    			http_success: [ 201, 202 ],
    			//button_placeholder_id : id,
    			debug: !!gallery_debaug_mode
    		};
    
    	</script>
    

    I’ve marked line 99, I was wondering if you had any ideas on how to fix it?

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #18790

    Hi George,
    I will strongly recommend moving away from B Gallery as it has not been updated for more than 4 years now.

    For the current issue, you can replace that line by this

    
    logged_in_cookie: "<?php echo isset($_COOKIE[LOGGED_IN_COOKIE] ) ? $_COOKIE[LOGGED_IN_COOKIE] : ''; ?>"
    
    

    And it will remove the notice.

    PS:- How many media is there in your BP Gallery site? Since we recently started supporting remote urls and added an API for importing media, It will be easy to import from BP Gallery to MediaPress now. The only problem I see is moving the activities.

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

    Thanks Brajesh, yes I’m pretty close to migrating, it’s just a matter of time.

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #18808

    No problem. Marking resolved.

You must be logged in to reply to this topic.

This topic is: resolved