?
avatar jonboutell
jonboutell
14 Dec 2015

The file

/modules/mod_articles_category/mod_articles_category.php

Pulls in the parameter "item_heading" on line 69. This is expected to be, and in the past was, an integer of the heading level (defaults to 4).

$item_heading               = $params->get('item_heading');

Currently, when you create an articles_category module, the parameter (found under advanced tab) has been changed to header tag (param name "header_tag"). This is instead a string representation of the header to use, e.g. "h4".

This makes the module produce erroneous HTML.

E.g.

<div class="moduletable">
    <h3>Test Module</h3>
    <ul class="category-module">
        <li class="">
            **<h>**
                <a class="mod-articles-category-title " href="/latest-news/open-days.html">
                    Open days and events
                </a>
            **</h>**    
        </li>
    </ul>
</div>
avatar jonboutell jonboutell - open - 14 Dec 2015
avatar bertmert
bertmert - comment - 14 Dec 2015

param name "header_tag"

This is NOT the Tag used inside the module. Just for headline above the module if you select a module style like xhtml or html5.

The strange thing is that the old param item_heading of the module itself was removed a longer time ago (mod_articles_category.xml).
Don't remember exactly but think an early 3 version.
The guy who did it never answered to the question why.
Someone then removed the headline output from default.php ($item_heading) (because of broken H tags) but left code like you describe (mod_articles_category.php) that creates a broken header tag in your HTML when you use old module overrides and variable $item_heading..

avatar brianteeman brianteeman - change - 14 Dec 2015
Labels Added: ?
avatar jonboutell
jonboutell - comment - 15 Dec 2015

Quite right, didn't notice the old default override I had on :)

avatar jonboutell jonboutell - change - 15 Dec 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-12-15 09:02:43
Closed_By jonboutell
avatar jonboutell jonboutell - close - 15 Dec 2015

Add a Comment

Login with GitHub to post a comment