CPT drop downs showing "no results"

This topic contains 45 replies, has 5 voices, and was last updated by  Kiran 5 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #485173

    Craig Walters
    Full Member
    Post count: 98

    OK, will do, but, did you check the Rest API issue?

    #485176

    Craig Walters
    Full Member
    Post count: 98

    And I’m sorry, correct me if I’m wrong, but how will deactivating all my plugins (which I’m busy doing, but really don’t want to lose all my settings and specifics) change the way it shows between us?

    #485179

    Craig Walters
    Full Member
    Post count: 98

    Also all GD related CPTs and Settings page fail to load fully – waiting for something and a spinning load wheel in the tab…

    #485192

    Craig Walters
    Full Member
    Post count: 98

    Tried to restore pages, but their dropdowns also show no results found. And a friend just logged in and tried, same result as here…

    Just re run setup wizard and given new google API key, still no results found…

    #485241

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #485263

    Craig Walters
    Full Member
    Post count: 98
    This reply has been marked as private.
    #485270

    Kiran
    Moderator
    Post count: 7069

    Hi Craig,

    There was a conflict with select2 JavaScript library. I have added following PHP code snippet in supreme-directory theme functions.php file.
    Now issue has been solved.

    
    
    /**
     * Fix select2 conflict with GeoDirectory & Post Grid (post-grid) plugin.
     */
    function gd_snippet_190509_post_grid_select2_conflict() {
    	$screen    = get_current_screen();
    	$screen_id = $screen ? $screen->id : '';
    
    	if ( wp_script_is( 'select2', 'enqueued' ) && wp_script_is( 'select2.min', 'enqueued' ) ) {
    		if ( $screen_id && in_array( $screen_id, geodir_get_screen_ids() ) ) {
    			wp_dequeue_script( 'select2.min' ); // Dequeue Post Grid select2 on GD pages
    			wp_dequeue_script( 'post_grid_admin_js' );
    		} else {
    			wp_dequeue_script( 'select2' ); // Dequeue GD select2 on non-GD pages
    		}
    	}
    
    	if ( wp_style_is( 'select2', 'enqueued' ) && wp_style_is( 'select2.min', 'enqueued' ) ) {
    		if ( $screen_id && in_array( $screen_id, geodir_get_screen_ids() ) ) {
    			wp_dequeue_style( 'select2.min' ); // Dequeue Post Grid select2 on GD pages
    		} else {
    			wp_dequeue_style( 'select2' ); // Dequeue GD select2 on non-GD pages
    		}
    	}
    }
    add_action( 'admin_enqueue_scripts', 'gd_snippet_190509_post_grid_select2_conflict', 100 );

    Please check and let us know.

    Regards,
    Kiran

    #485290

    Craig Walters
    Full Member
    Post count: 98

    Wow, finally I have drop downs again… Post Grid??? that is mad, thanks for finding and fixing it.
    Last question, why are my featured images not showing up on mobile version of my site?
    Thanks again for all your help
    Craig

    #485294

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #485339

    Craig Walters
    Full Member
    Post count: 98
    This reply has been marked as private.
    #485552

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    #486587

    Craig Walters
    Full Member
    Post count: 98

    Hi Kiran, the issue I had with dropdowns that you managed to fix before by adding the PHP snippet, is still there in my invoicing plugin.
    Dropdowns for COUNTRY, STATE, ADD ITEM TO INVOICE and ADD NOTE all show NO RESULTS.
    Please advise. Login details etc as given earlier in this thread

    #486608

    Craig Walters
    Full Member
    Post count: 98

    OK, I deactivated my Post Grid plugin and now the drop downs in Invoicing work again… Is there any way we can resolve this conflict or do I need to start working on another plugin?

    #486613

    Patrik
    Moderator
    Post count: 1971

    Hi,

    We have updated the dropdown to select2 for Invoicing and UsersWP plugins also. The post grid plugin conflicts with our plugin and is causing an issue. So you can use the following code in your functions.php file of currently active theme or using snippet plugin to fix this:

    /**
     * Fix select2 conflict with Invoicing & Post Grid (post-grid) plugin.
     */
    function wpinv_post_grid_select2_conflict() {
        $screen    = get_current_screen();
        $screen_id = $screen ? $screen->id : '';
    
        if ( wp_script_is( 'select2', 'enqueued' ) && wp_script_is( 'select2.min', 'enqueued' ) ) {
            if ( $screen_id && in_array( $screen_id, array('wpi_invoice', 'edit-wpi_item', 'edit-wpi_discount', 'wpi_item', 'wpi_discount', 'invoicing_page_wpinv-settings', 'invoicing_page_wpinv-subscriptions', 'invoicing_page_wpinv-reports') ) ) {
                wp_dequeue_script( 'select2.min' ); // Dequeue Post Grid select2 on WPI pages
                wp_dequeue_script( 'post_grid_admin_js' );
            } else {
                wp_dequeue_script( 'select2' ); // Dequeue WPI select2 on non-WPI pages
            }
        }
    
        if ( wp_style_is( 'select2', 'enqueued' ) && wp_style_is( 'select2.min', 'enqueued' ) ) {
            if ( $screen_id && in_array( $screen_id, array('wpi_invoice', 'edit-wpi_item', 'edit-wpi_discount', 'wpi_item', 'wpi_discount', 'invoicing_page_wpinv-settings', 'invoicing_page_wpinv-subscriptions', 'invoicing_page_wpinv-reports') ) ) {
                wp_dequeue_style( 'select2.min' ); // Dequeue Post Grid select2 on WPI pages
            } else {
                wp_dequeue_style( 'select2' ); // Dequeue WPI select2 on non-WPI pages
            }
        }
    }
    add_action( 'admin_enqueue_scripts', 'wpinv_post_grid_select2_conflict', 100 );

    Let me know if it resolves your issue or not.

    Regards,
    Patrik

    #487050

    Craig Walters
    Full Member
    Post count: 98

    I’ve actually decided just to drop Post Grid, because I can’t cope with system crashes. Do you think I can use GD widgets the same way?

Viewing 15 posts - 31 through 45 (of 46 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount