• Resolved mortykai

    (@mortykai)


    widget is not writing $after_widget. rendered widget ends with:


    <script type=”text/javascript”>…</script>
    <aside id=”media_image-6″ class=”widget widget_media_image”></aside>

    closing </aside> is missing.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author totalsoft

    (@totalsoft)

    Hello Dear mortykai.

    Thank You for contacting with us and for telling us about your request. Please can You publish the link to check the problem on your page? I can’t understand why can’t be that problem.

    Thank You.

    Thread Starter mortykai

    (@mortykai)

    Hi, Thanks for prompt reply.

    Your widget renders as:

    <aside id=”total_soft_gallery_video-2″ class=”widget widget_total_soft_gallery_video”>
    … <- your widget code
    <- closing </aside> is missing

    <aside id=”media_image-6″ class=”widget widget_media_image”></aside> <- next widget appears here.

    Link to page:
    https://d5c.6a3.myftpupload.com

    Plugin Author totalsoft

    (@totalsoft)

    Dear mortykai.

    Thank You for your response. I am not sure that problem comes from our plugin, that <aside> tags we are not making, It makes the theme. But I have checked your theme there all widgets get all classes and styles. There is nothing breaks.

    Thank You.

    Thread Starter mortykai

    (@mortykai)

    Yes, the aside tags come from the theme which is here in the theme’s functions.php:
    register_sidebar(
    array(
    ‘name’ => __( ‘Main Sidebar’, ‘twentytwelve’ ),
    ‘id’ => ‘sidebar-1’,
    ‘description’ => __( ‘Appears on posts and pages except the optional Front Page template, which has its own widgets’, ‘twentytwelve’ ),
    ‘before_widget’ => ‘<aside id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ‘</aside>’,
    ‘before_title’ => ‘<h3 class=”widget-title”>’,
    ‘after_title’ => ‘</h3>’,
    )
    );

    Your WP_Widget class’s Widget function is supposed to echo the before_widget, after_widget, etc.

    your Total-Soft-Gallery-Widget.php line 58 has:
    echo $before_widget;
    this outputs the opening aside.

    line 13668 has:
    echo $after_widget;
    this outputs the closing aside but it is not happening.

    If you look at the page source you will see within the <div id=”secondary”> there are two child asides when there should be six. The other four are contained in the gallery video aside.

    All the widgets do appear on the page and are working however this is adversely affecting CSS. It is also producing invalid HTML as the closing tag is missing.

    Thanks again for your prompt attention.

    Plugin Author totalsoft

    (@totalsoft)

    Dear mortykai.

    Thank You for your response. You said that on line 13668 has: echo $after_widget;

    Please can You copy this line and paste it on the line where is finishing the type which you are using? Do you understand what I mean?

    Thank You.

    Thread Starter mortykai

    (@mortykai)

    Sorry, I don’t understand.

    Plugin Author totalsoft

    (@totalsoft)

    Dear mortykai.

    On our files you found that line where is written echo $after_widget;

    There I don’t know what type of gallery are you using, but on that same file, we wrote the types with if() {} else {} method. Please find the type which you are using, and at the end of the that type please add echo $after_widget; part. Maybe it will help You.

    Thank You.

    Thread Starter mortykai

    (@mortykai)

    That led let to the problem. The echo $after_widget was actually inside the else if{} for Space Gallery type. When I moved it one line below, it works fine now. Thanks for you help. I trust you will fix this in the next update.

    Plugin Author totalsoft

    (@totalsoft)

    Dear mortykai.

    Thank You for your response. I am very happy that you found the way to fix the problem yourself. And Thank You for your help. We will fix that bug on next version.

    Thank You.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘widget not closed’ is closed to new replies.