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

Sitemap Errors #175

Closed
bernte opened this issue Dec 22, 2013 · 6 comments
Closed

Sitemap Errors #175

bernte opened this issue Dec 22, 2013 · 6 comments
Assignees
Milestone

Comments

@bernte
Copy link
Contributor

bernte commented Dec 22, 2013

The Sitemap has an validation Error

plugins/box/sitemap/views/frontend/index.view.php

<h3><?php echo __('Sitemap', 'sitemap'); ?></h3>
<hr>
<ul>
<?php

    // Display pages
    if (count($pages_list) > 0) {
        foreach ($pages_list as $page) {
            if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = '';
            if (trim($page['parent']) !== '') { echo '<ul>'; }
            echo '<li><a href="'.Option::get('siteurl').$parent.$page['slug'].'">'.$page['title'].'</a></li>';
            if (trim($page['parent']) !== '') { echo '</ul>'; }
        }
        if (count($components) == 0) { echo '<ul>'; }
    }

    // Display components
    if (count($components) > 0) {
        if (count($pages_list) == 0) { echo '<ul>'; }
        foreach ($components as $component) {
            echo '<li><a href="'.Option::get('siteurl').$component.'">'.__(ucfirst($component), $component).'</a></li>';
        }
        echo '</ul>';

    }

?>
</ul>

ERROR 1 - Script from above gives this result on default Template:

<ul>
    <li><a href="http://site.com/">Home</a></li>
    <li><a href="http://site.com/users">Users</a></li>
</ul>
</ul>

here are 2 closing </ul>'s


ERROR 2 - if Submenu is existing it gives this code:

<ul>
    <li><a href="http://site.com/">Home</a></li>
    <li><a href="http://site.com/test">Test</a></li>
    <ul>
        <li><a href="http://site.com/test/sub-1">Sub 1</a></li>
    </ul>
    <ul>
        <li><a href="http://site.com/test/sub-2">Sub 2</a></li>
    </ul>
    <li><a href="http://site.com/users">Users</a></li>
</ul>
</ul>

but it should look like this:

<ul>
    <li><a href="http://site.com/">Home</a></li>
    <li><a href="http://site.com/test">Test</a></li>
    <ul>
        <li><a href="http://site.com/test/sub-1">Sub 1</a></li>
        <li><a href="http://site.com/test/sub-2">Sub 2</a></li>
    </ul>
    <li><a href="http://site.com/users">Users</a></li>
</ul>

for better sourcecode view it would be useful to add a linebreak after </li> 😄


Awilum added a commit that referenced this issue Dec 22, 2013
@Awilum
Copy link
Member

Awilum commented Dec 22, 2013

ERROR 1 - Script from above gives this result on default Template:

Fixed

for better sourcecode view it would be useful to add a linebreak

Fixed

@bernte
Copy link
Contributor Author

bernte commented Dec 23, 2013

Awilum.. sorry i made a mistake!

your code looks like this:

<ul>
    <li><a href="http://site.com/">Home</a></li>
    <li><a href="http://site.com/test">Test</a></li>
        <ul>
            <li><a href="http://site.com/test/sub-1">Sub 1</a></li>
        </ul>
        <ul>
            <li><a href="http://site.com/test/sub-2">Sub 2</a></li>
        </ul>
    </li>
    <li><a href="http://site.com/users">Users</a></li>
</ul>

on HTML5 it must look like this:

<ul>
    <li><a href="http://site.com/">Home</a></li>
    <li><a href="http://site.com/test">Test</a></li>
    <li class="list-inline">
        <ul>
            <li><a href="http://site.com/test/sub-1">Sub 1</a></li>
            <li><a href="http://site.com/test/sub-2">Sub 2</a></li>
        </ul>
    </li>
    <li><a href="http://site.com/users">Users</a></li>
</ul>

the inner <ul> needs to be inside an <li> element..
as you can read here
http://stackoverflow.com/questions/12129037/correct-semantics-for-ul-in-ul

otherwise the document is not valid!

and for this part you have to add a class in

public/assets/css/bootstrap.css on line 849

.list-inline {
 padding-left:0;
 list-style:none
}

this class is already existing in bootstrap3! they noticed that they made a mistake 😃


@Awilum
Copy link
Member

Awilum commented Dec 24, 2013

ERROR 1 - fixed in this release - http://monstra.org/blog/monstra-231-release
ERROR 2 - for next releases

@bernte
Copy link
Contributor Author

bernte commented Dec 25, 2013

perfect 👍

@ghost ghost assigned metalgvc Jan 30, 2014
@Awilum Awilum added this to the v2.4.0 milestone Feb 17, 2014
metalgvc added a commit that referenced this issue Mar 18, 2014
@Awilum
Copy link
Member

Awilum commented Mar 26, 2014

Oleg, can we close this ticket ?

@Awilum
Copy link
Member

Awilum commented Mar 29, 2014

Seems works fine.
Close for now

@Awilum Awilum closed this as completed Mar 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants