A
A
Anton Dyshkant2014-04-10 17:11:05
Joomla
Anton Dyshkant, 2014-04-10 17:11:05

Why does K2 (a Joomla component) output an empty block instead of content?

The problem is the following, and its repeatability has not yet been specifically established, but: if this page (i.e., the page on which one of the views of the K2 component should be displayed) is not accessed for a long time, then after accessing it on in the place of the expected content, we see only emptiness:

<!-- Start K2 Category Layout -->
<div id="k2Container" class="itemListView">

  
  
  


  </div>
<!-- End K2 Category Layout -->

<!-- JoomlaWorks "K2" (v2.6.7) | Learn more about K2 at http://getk2.org -->

The fact that the required template is pulled up has already been checked: we see divs from the required template (in this case, it is "/components/com_k2/templates/default/category.php").
Further, in this untouched and pristine template, there is a series of manipulations (there is always an if before inserting blocks), but nothing inside the div is displayed. I recently added if-independent content there to see if it gets printed, but I think so (couldn't test yet).
Another pattern: the header of the "correctly" and "incorrectly" loaded page is also different, namely
: ).
2. In the "broken"
<link href="/en/alias-punkta-roditelia/alias-punkta-menu?format=feed&amp;type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
  <link href="/en/alias-punkta-roditelia/alias-punkta-menu?format=feed&amp;type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />

Eyes pop out of unpredictability. I sin on the cache, but it's not clear :) I'm
ready to lay out any materials. I can't show you the site yet.
Z.Y. The site is multilingual.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Dyshkant, 2015-03-14
@vyshkant

The issue was resolved by writing a hell of a crutch: K2 writes to a certain hidden tag the amount of materials that he displayed (in the case of an empty block - 0). Then the script looks, if there are zero materials, and there should be not zero - reloading the page (taking into account the randomness of the problem - it works).

D
Dmitry, 2015-10-26
@sonics

I have a similar problem after I have written class owl-carousel to the output of materials, and for each material class item. And it gives an empty block, I still haven't figured it out :(

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question