Skip Navigation

[Resolved] custom row error in the frontend display – layouts child layout

This support ticket is created 8 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.18 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by Beda 8 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#419620
layouts.png
error.png
code.png

Hello,

I have your example used to create a custom row.

https://toolset.com/documentation/user-guides/using-custom-rows-add-custom-theme-functionality/

If I use this in a child layout, I get the following error message:

Fatal error: Uncaught Error: Call to undefined method WPDD_layout_theme_section::set_context() in D:\Genial Medial\MAMP\htdocs\traffictree.de\wp-content\plugins\layouts\classes\wpddl.layout.class.php:264 Stack trace: #0 D:\Genial Medial\MAMP\htdocs\traffictree.de\wp-content\plugins\layouts\classes\wpddl.layout-render.class.php(44): WPDD_layout->change_full_width_child_layout_row(Object(WPDD_layout)) #1 D:\Genial Medial\MAMP\htdocs\traffictree.de\wp-content\plugins\layouts\classes\wpddl.layout-render.class.php(29): WPDD_layout_render->handle_full_widths() #2 D:\Genial Medial\MAMP\htdocs\traffictree.de\wp-content\plugins\layouts\classes\wpddl.layout-render.class.php(505): WPDD_layout_render->__construct(Object(WPDD_layout), Object(WPDD_BootstrapThree_render)) #3 D:\Genial Medial\MAMP\htdocs\traffictree.de\wp-content\plugins\layouts\classes\wpddl.layout-render.class.php(619): WPDD_BootstrapThree_render->__construct(Object(WPDD_layout), Object(WPDD_BootstrapThree_render)) #4 D:\Genial Medial\MAMP\htdocs\traffictree.de\wp-cont in D:\Genial Medial\MAMP\htdocs\traffictree.de\wp-content\plugins\layouts\classes\wpddl.layout.class.php on line 264

How can I use the custom row in a child layout?

Regards
David

#419824

I tried the exact example as in the DOC.
https://toolset.com/documentation/user-guides/using-custom-rows-add-custom-theme-functionality/

1. Create the Folder in the Theme root:
dd-layouts-cells

2. In it, created the file:
layouts-custom-row.php

3. In that file I added:

<?php
function register_custom_row_carousel() {
    if ( function_exists('register_dd_layout_cell_type') ) {
             
        register_dd_layout_custom_row ( 'register_custom_row_carousel',
            array (
                'name' => __('Owl Carousel', 'wpbootstrap'),
                'description' => __('BootStrap Theme Owl Carousel.', 'wpbootstrap'),
                'custom-row-content-callback' => 'custom_row_carousel_content_callback'
            )
        );
    }
}
add_action( 'init', 'register_custom_row_carousel' );

function custom_row_carousel_content_callback($custom_row_settings) {
         
    wp_enqueue_style ( 'owl_carousel_main_css', get_template_directory_uri() . '/dd-layouts-cells/css/owl.carousel.css', false, NULL);
    wp_enqueue_script ('owl_carousel_row_js', get_template_directory_uri() . '/dd-layouts-cells/js/owl.carousel.row.js', array('jquery'), WPDDL_VERSION, true);
         
       $content = '<div id="owl-demo" class="owl-carousel">';
    for($x = 0; $x <= 8; $x++) {
        $content .= '<div class="item"><img src="<em><u>hidden link</u></em>' . $x . '.jpg"></div>';
            }
        $content .= '</div>';
 
return $content;
     
}

4. In my functions.php I required this file once:

$name = 'layouts-custom-row';
require_once(__DIR__ . '/' .'dd-layouts-cells' . '/' . $name . '.php');

5. In my Child Layout, I added this Row, and above it, a Text Cell, juts to see if the content is output as well

6. This worked fine as long the Layout is a standalone Layout.

7. As soon you add a Parent (which obviously calls a Child Layout), the Fatal is produced.

8. I added the Custom row to the Parent Layout, and then it works (even if a Child is attached).

I will now inform the Developers about this.

It smells like a BUG. Please stand by.

#419949

Yes, that's the problem.

I'm waiting for a solution from the development.
Until then, I use the custom row without a parent layout.

Thank you for your time.

#420327

This is fixed now in the upcoming Layouts release.

It will be pushed as an Update to your Website as soon the next release is published.

I can not yet state any ETA on this.

Thank you for your patience.

#429445

This should now be fixed in the Updated Plugin version.
Can you confirm?

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.