Support » Plugin: NextGEN Gallery - WordPress Gallery Plugin » Uncaught TypeError: Cannot read property 'register_child' of undefined

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author photocrati

    (@photocrati)

    @johnstonphilip – This is the first report that I have seen … can you provide any additional specific details on this?

    – Cais.

    I did a code search in the NextGEN plugin and have found that the only place where the term “register_child” shows up is in the file called “products/photocrati_nextgen/modules/frame_communication/static/frame_event_publisher.js”.

    Specifically, the error occurs if you try and load a wp-admin page in an iframe.

    What does that file do? Does it need to be used on every admin page?

    Plugin Author photocrati

    (@photocrati)

    @johnstonphilip – Which specific “wp-admin page” are you trying to add in an iframe?

    – Cais.

    It seems to be on ANY admin page. Specifically I have checked these pages:

    /wp-admin/
    /wp-admin/options-general.php
    /wp-admin/tools.php
    /wp-admin/post-new.php

    But I don’t have time to check every single admin page at the moment. However, from looking at these different pages it’s safe to assume it is almost every admin page.

    What is the purpose of the file located here:
    “products/photocrati_nextgen/modules/frame_communication/static/frame_event_publisher.js”.

    As I said before, the error appears to be originating from that file.

    Plugin Author photocrati

    (@photocrati)

    @johnstonphilip – One of our developers has reviewed this topic and would like to do some additional debugging on your site if possible to try to sort this out.

    Please send us a Bug Report (http://nextgen-gallery.com/report-bug/ … please reference this topic) so we can get a better look under the page. We may need log in (and FTP) credentials for your WordPress installation, please include those with your Bug Report, too.

    Thanks!

    – Cais.

    Hey there,

    Unfortunately, all my testing is done locally so there isn’t a way for you to access it.

    Until this bug is fixed, unfortunately, I have to add some code to my WordPress products which de-activates this plugin. For any other developers battling this issue, this is a temporary fix until this (and any other bugs) are fixed. Sorry I couldn’t do more to fix this bug for you at this time. Best of luck!

    /**
     * De-activates plugins known to be problematic.
     *
     * @access   public
     * @param    VOID
     * @return   VOID
     */
    function deactivate_problematic_plugins(){
    
    	$all_plugins = get_plugins();
    
    	foreach( $all_plugins as $plugin_path => $plugin_info ){
    
    		//If this is the nextGEN plugin, it causes many issues		if ( strpos( $plugin_path, 'nggallery.php' ) !== false ){
    			//De-activate it.
    			deactivate_plugins( $plugin_path );
    		}
    	}
    }
    add_action( 'admin_init', 'deactivate_problematic_plugins' );

    Sorry – there was a fomatting issue in the code I pasted above. Here it is again

    /**
     * De-activates plugins known to be problematic.
     *
     * @access   public
     * @since    1.0.0
     * @param    VOID
     * @return   VOID
     */
    function deactivate_problematic_plugins(){
    
    	$all_plugins = get_plugins();
    
    	foreach( $all_plugins as $plugin_path => $plugin_info ){
    
    		//If this is the nextGEN plugin, it causes many issues
            if ( strpos( $plugin_path, 'nggallery.php' ) !== false ){
    			//De-activate it.
    			deactivate_plugins( $plugin_path );
    		}
    	}
    }
    add_action( 'admin_init', 'deactivate_problematic_plugins' );

    Plugin Author photocrati

    (@photocrati)

    @johnstonphilip – Thanks for sharing although I’m not understanding why you wouldn’t simply manually deactivate NextGEN Gallery as the need arises?!

    – Cais.

    I am also experiencing this error, and unfortunately it’s breaking the rest of the javascript on my page. In this case, it’s only affecting my logged in contributors. In this case, the edit screen is open inside a modal window (created by fancybox)

    Disabling NextGEN Gallery resolved the issue.

    I will submit the bug report as you suggested above.

    Plugin Author photocrati

    (@photocrati)

    @mtnporcupine – Thanks, I have responded to your Bug Report … let’s keep the conversation there for the time being.

    – Cais.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Uncaught TypeError: Cannot read property 'register_child' of undefined’ is closed to new replies.