Okay
  Public Ticket #2293418
Detail table blocks whole Site
Closed

Comments

  •  1
    rieffjj started the conversation

    Good morning, 

    I created a first Datatable in Master-Detail mode: HE_ACCES_KULTURSCHAPP (ID: 66) 

    Master-Detail works fine in Dashboard mode, but when you see a Detail popup window in FrontEnd mode, the content is shown, but the whole Site does not respond anymore. 

    Please see attachment with a Print Screen. 

    To access the Table on FrontEnd: Menu "Database", Sub-Item "BADGES KS". Then select one row and click on button "Détailler". 

    Many thanks for your help and kind regards 

    Jean-Jacques 

  •   rieffjj replied privately
  •  4
    DFSKarma replied

    What was the fix? I'm having the same problem.

  •   Aleksandar replied privately
  •  1
    rieffjj replied

    Hi Aleksandar,

    Many thanks for the Hot Fix you delivered, it now works correctly.

    Are you going to implement this in the next Patch Version ?

    (See comment/question from DFSKarma in this ticket).

    Beside that you can close the ticket.

    Kind regards

    Jean-Jacques

  •  2,499
    Aleksandar replied

    Hello Jean-Jacques

    You're welcome, glad I could help.

    This is going to be fixed with the next update. DFSKarma, since the last response was private, here's how this was fixed for Jean-Jacques:

    Please access ..wp-content/plugins/wdt-master-detail/wdt-master-detail.php and around line 621, you'll see this code:

    /**
         * Insert Modal templates
         * @param $wpDataTable \WPDataTable
         */
        public static function insertModal($wpDataTable)
        {
            if (isset($wpDataTable->masterDetail) && $wpDataTable->masterDetail) {
                include WDT_MD_TEMPLATE_PATH . 'modal.inc.php';
                include WDT_MD_TEMPLATE_PATH . 'md_modal.inc.php';
            }
        }

    Replace it all with this:

    /**
         * Insert Modal templates
         * @param $wpDataTable \WPDataTable
         */
        public static function insertModal($wpDataTable)
        {
            if (isset($wpDataTable->masterDetail) && $wpDataTable->masterDetail && is_admin()) {
                include WDT_MD_TEMPLATE_PATH . 'modal.inc.php';
                include WDT_MD_TEMPLATE_PATH . 'md_modal.inc.php';
            } else if (isset($wpDataTable->masterDetail) && $wpDataTable->masterDetail){
                include WDT_MD_TEMPLATE_PATH . 'md_modal.inc.php';
            }
        }
        
        /**
         * Insert Template Modal
         */
        public static function insertTemplateModal()
        {
            include WDT_MD_TEMPLATE_PATH . 'modal.inc.php';
        }
    

    and then go to line 95 of the same file. There, add a new row, and paste this:

    // Add custom modal in DOM
            add_action('wpdatatables_add_custom_template_modal', array('wdtMasterDetail\Plugin', 'insertTemplateModal'), 10, 1);
    

    It should work. If you are not comfortable with doing this, please reply to your private ticket with the log-in credentials for your website, and I'll gladly implement it for you.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables