Presentation Page "Store Pages" broken/ JS errors

Hi there,

Yet MORE bugs with the new MarketPress.

The "Presentation" options panel throws a JS error in my console, blocking other JS functionality (WP dashboard sidebar menu hovers, etc):

Option 'multiple' is not allowed for Select2 when attached to a <select> element.

Also, the "Store Pages" dropdown boxes are all empty, showing no existing pages. Clicking "create page" creates a page, but the dropdowns are still blank.

  • Vinod Dalvi
    • WP Unicorn

    Hi @roundhouseguys,

    Sorry to hear of the problem you are having.

    I could confirm the issue on your site but couldn't reproduce it on my test site using latest version of MarketPress plugin as shown in the attached screenshot.

    This can be due to plugin/theme conflict on your site.

    You can just try on your development site temporary using default WordPress theme like Twenty Fifteen and temporary deactivating all other plugins and activating them one by one as displayed in the following flowchart to know which theme/plugin is conflicting if any.

    https://premium.wpmudev.org/manuals/getting-support/

    Kind Regards,
    Vinod Dalvi

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hey Vinod,

    Thanks for checking in. Before I contacted (as always), I checked with all plugins disabled and on a default theme, but couldn't see any change—tried again at your suggestion, and found that the NextGen Gallery plugin is causing the issues with MarketPress. I'm not sure beyond that, though—NextGen is a popular plugin, and shouldn't be causing issues (though Photocrati/NextGen are notorious for buggy updates, so it doesn't surprise me...)

    Just wanted to follow up and let you know what I found. Thank you!

  • Vinod Dalvi
    • WP Unicorn

    Hi @roundhouseguys,

    I could confirm this conflict issue on my test site using latest version of following "NextGEN Gallery" plugin.

    https://wordpress.org/plugins/nextgen-gallery/

    I have developed the attached small plugin to resolve this conflict issue.

    I installed this attached plugin on your site an could confirm it fixed the issue.

    Could you please check it and let me know how it works for you?

    Best Regards,
    Vinod Dalvi

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hey Vinod,

    It looks like the quick custom solution plugin you put in actually broke the front-end entirely! I was getting an undefined function PHP fatal error with get_current_screen, so I added 'require_once(ABSPATH . 'wp-admin/includes/screen.php');' just before the function call, which restored the front-facing portion of the site.

    After adding the require_once line, it looks like it's working, and your quick-fix plugin is stopping NextGen from interfering.

    Thank you, Vinod!!

    Here's the complete (edited) plugin, for your ref:

    function ngg_dequeue_script() {
    require_once(ABSPATH . 'wp-admin/includes/screen.php');
    $screen = get_current_screen();
    if( !empty($screen->id) && $screen->id == 'store-settings_page_store-settings-presentation'){
    wp_dequeue_script( 'select2' );
    }
    }
    add_action( 'wp_print_scripts', 'ngg_dequeue_script', 100 );

    Cheers!!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.