Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod_articles_category settings update has broken display #8687

Closed
jonboutell opened this issue Dec 14, 2015 · 2 comments
Closed

mod_articles_category settings update has broken display #8687

jonboutell opened this issue Dec 14, 2015 · 2 comments

Comments

@jonboutell
Copy link

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>
@ghost
Copy link

ghost commented Dec 14, 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..

@jonboutell
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants