Staff replied Templates Joomla 6

[BUG] Travelkit – Category Blog layout breaks right sidebar due to missing closing DIV (no official fix yet)

Asked by Martin 2 days ago Last activity 2 days ago

Subject: Travelkit Template – Category Blog layout broken due to missing closing DIV – No official fix yet

Hello JoomShaper Team,

I discovered a structural HTML bug in the Travelkit template that causes serious layout problems in Joomla category blog views.

ENVIRONMENT

Joomla 6.2.0
Template: Travelkit (Helix Ultimate)
Layout: Joomla Category Blog

  1. PROBLEM

When using a Joomla Category Blog layout with a module assigned to the right sidebar (sp-right), the module is displayed below the blog articles instead of alongside them.

The main content occupies the left portion of the page, while the right column remains empty. The sidebar module appears underneath all articles.

Interestingly, the module is correctly published, assigned and rendered in the HTML source.

The issue is not caused by module assignments, Joomla category settings, Bootstrap column widths or custom CSS.

  1. ROOT CAUSE AND CURRENT STATUS

The problem is caused by an unclosed HTML DIV element in the Travelkit category blog override.

Affected file:

/templates/travelkit/html/com_content/category/blog.php

In the default (non-masonry) blog layout, the article-list container is not properly closed when intro articles are present.

Consequently, the surrounding HTML structure becomes invalid. The right sidebar (sp-right) ends up nested inside the main content container (sp-component) instead of being its sibling.

This breaks the expected Bootstrap grid layout.

As far as I could determine, no official fix has been published yet. The Travelkit template package I examined still contains the faulty markup.

  1. TECHNICAL SOLUTION (SUCCESSFULLY TESTED)

Open the file:

/templates/travelkit/html/com_content/category/blog.php

Locate the closing section of the default intro articles layout, approximately lines 163–169 in my template version.

For clarity, the following comparison uses CLOSE_DIV to represent a closing HTML div tag and PHP_ENDIF to represent a PHP endif statement.

ORIGINAL CODE STRUCTURE:

CLOSE_DIV
CLOSE_DIV
CLOSE_DIV
CLOSE_DIV
CLOSE_DIV
PHP_ENDIF
PHP_ENDIF

CORRECTED CODE STRUCTURE:

CLOSE_DIV
CLOSE_DIV
CLOSE_DIV
CLOSE_DIV
CLOSE_DIV
CLOSE_DIV (ADDED)
PHP_ENDIF
PHP_ENDIF

The fix consists of adding exactly one additional closing HTML div tag immediately before the first PHP endif statement.

The closing tag consists of a less-than sign, a forward slash, the letters "div", and a greater-than sign.

No other modifications are required.

  1. RESULT

After applying the correction:

Blog articles remain in the main content column.

The right sidebar is displayed correctly alongside the articles.

The Bootstrap grid structure is restored.

No changes to Joomla module assignments, template settings or custom CSS are necessary.

I have tested this correction successfully on the affected website.

  1. REQUEST TO JOOMSHAPER

Could you please confirm this issue and incorporate the missing closing DIV into the official Travelkit template?

A permanent upstream fix would be very helpful, as manual modifications to template overrides may be overwritten by future template updates.

The issue is particularly difficult to diagnose because the module is correctly rendered in the HTML but appears in the wrong location.

Thank you!

1 reply

Rashida Rahman Staff

Hi Martin,

Thank you for the detailed report and for tracking down the cause. We've confirmed the issue on our side.

In templates/travelkit/html/com_content/category/blog.php, the default (non-masonry) intro-articles layout opens six div elements but closes only five. The outer article-list wrapper is never closed. That makes the HTML invalid, so the browser places the right sidebar (sp-right) inside the main content (sp-component), and the sidebar drops below the articles. The masonry layout isn't affected.

Your fix is correct. For anyone else with this problem:

  1. Back up the file first.
  2. Open templates/travelkit/html/com_content/category/blog.php, either through FTP or in System → Site Templates → Travelkit Details and Files.
  3. Find the endforeach that ends the intro-items loop (around line 162). It's followed by five lines that each contain a closing div tag (around lines 163–167), and then two endif lines.
  4. Add one more closing div tag right after those five lines and before the first endif. You should end up with six closing div tags in a row.
  5. Save the file and clear the cache (System → Clear Cache).

The sidebar will then sit next to the articles again. A template update will overwrite this file, so check it again after updating.

We will pass this to our development team for further investigation.

Thanks again for the clear write-up; it made the problem much easier to confirm.

Best regards,

Log in to reply.