You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Sewe (JIRA)" <ji...@codehaus.org> on 2012/08/29 16:48:21 UTC

[jira] (MSITE-651) Unnecessary "parent" and "modules" menus show up as empty sections in sitemap

Andreas Sewe created MSITE-651:
----------------------------------

             Summary: Unnecessary "parent" and "modules" menus show up as empty sections in sitemap
                 Key: MSITE-651
                 URL: https://jira.codehaus.org/browse/MSITE-651
             Project: Maven 2.x and 3.x Site Plugin
          Issue Type: Bug
    Affects Versions: 3.1
         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
            Reporter: Andreas Sewe
         Attachments: example.tar.gz

When using {{generateSitemap}}, the resulting {{sitemap.html}} contains ugly empty sections (empty {{<h4>}}, superfluous {{<hr>}}) if one of the _special_ menus ({{parent}}, {{module}}) is empty as the project in question does not have a parent or modules, respectively.

The {{sitemap.html}} generated by the attached example project ({{mvn site}}) illustrates this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-651) Unnecessary "parent" and "modules" menus show up as empty sections in sitemap

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=307398#comment-307398 ] 

Dennis Lundberg commented on MSITE-651:
---------------------------------------

Hi Andreas,

I've had a look at this and have a few suggestions to a solution.

At first I thought that I could just check if the menu had any items and skip it if it didn't have any. It removes the empty headings, but has unwanted side effects.

My current solution is to always show the menus of type "ref", i.e. parent, module and reports, even if they don't have any menu items. That means that they will show up as headings in the sitemap, but they will not have any links below them. How does that sound to you?
                
> Unnecessary "parent" and "modules" menus show up as empty sections in sitemap
> -----------------------------------------------------------------------------
>
>                 Key: MSITE-651
>                 URL: https://jira.codehaus.org/browse/MSITE-651
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
>            Reporter: Andreas Sewe
>         Attachments: example.tar.gz
>
>
> When using {{generateSitemap}}, the resulting {{sitemap.html}} contains ugly empty sections (empty {{<h4>}}, superfluous {{<hr>}}) if one of the _special_ menus ({{parent}}, {{module}}) is empty as the project in question does not have a parent or modules, respectively.
> The {{sitemap.html}} generated by the attached example project ({{mvn site}}) illustrates this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-651) Unnecessary "parent" and "modules" menus show up as empty sections in sitemap

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MSITE-651:
----------------------------------

    Attachment: screenshot-1.jpg

Example of how the suggested fix looks for the sample project.
                
> Unnecessary "parent" and "modules" menus show up as empty sections in sitemap
> -----------------------------------------------------------------------------
>
>                 Key: MSITE-651
>                 URL: https://jira.codehaus.org/browse/MSITE-651
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
>            Reporter: Andreas Sewe
>         Attachments: example.tar.gz, screenshot-1.jpg
>
>
> When using {{generateSitemap}}, the resulting {{sitemap.html}} contains ugly empty sections (empty {{<h4>}}, superfluous {{<hr>}}) if one of the _special_ menus ({{parent}}, {{module}}) is empty as the project in question does not have a parent or modules, respectively.
> The {{sitemap.html}} generated by the attached example project ({{mvn site}}) illustrates this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-651) Unnecessary "parent" and "modules" menus show up as empty sections in sitemap

Posted by "Andreas Sewe (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=307422#comment-307422 ] 

Andreas Sewe commented on MSITE-651:
------------------------------------

As shown in the screenshot, the fix has at least one shortcoming: What was previously the "Project Documentation" menu now becomes the "reports" menu. Likewise, "parent" and "module" should be replaced by proper, localized titles.

That being said, while the fix improves upon the current situation, it is far from perfect (IMHO: It doesn't warrant a _Fixed_ for this issue, as per the issue's title): Ideally, the empty sections would not show up at all. After all, they don't show up in the menu sidebar either, so it seems illogical to have them in the sitemap. (I am curious why the menu generation code cannot be adapted for sitemap generation.)
                
> Unnecessary "parent" and "modules" menus show up as empty sections in sitemap
> -----------------------------------------------------------------------------
>
>                 Key: MSITE-651
>                 URL: https://jira.codehaus.org/browse/MSITE-651
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
>            Reporter: Andreas Sewe
>         Attachments: example.tar.gz, screenshot-1.jpg
>
>
> When using {{generateSitemap}}, the resulting {{sitemap.html}} contains ugly empty sections (empty {{<h4>}}, superfluous {{<hr>}}) if one of the _special_ menus ({{parent}}, {{module}}) is empty as the project in question does not have a parent or modules, respectively.
> The {{sitemap.html}} generated by the attached example project ({{mvn site}}) illustrates this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira