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

NPE when menu item href is not set #8

Closed
andriusvelykis opened this issue Jan 28, 2013 · 2 comments
Closed

NPE when menu item href is not set #8

andriusvelykis opened this issue Jan 28, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@andriusvelykis
Copy link
Owner

Got NullPointerException during site generation because menu item href attribute was not set in site.xml, e.g. <item name="Foo" />.

[INFO] Generating "Project Summary" report    --- maven-project-info-reports-plugin:2.6
[ERROR] Exception in macro #relativeLink called at META-INF/maven/site.vm[line 125, column 11]
[ERROR] Exception in macro #activeLink called at META-INF/maven/site.vm[line 815, column 27]
[ERROR] Exception in macro #displayTree called at META-INF/maven/site.vm[line 819, column 27]
[ERROR] Exception in macro #displayTree called at META-INF/maven/site.vm[line 819, column 27]
[ERROR] Exception in macro #displayTree called at META-INF/maven/site.vm[line 148, column 27]
[ERROR] Exception in macro #topMenu called at META-INF/maven/site.vm[line 1463, column 19]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.798s
[INFO] Finished at: Mon Jan 28 12:37:40 GMT 2013
[INFO] Final Memory: 20M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.2:site (default-site) on project foo: Error during page generation: Error while generating code. Invocation of method 'calculateLink' in  class org.codehaus.plexus.util.PathTool threw exception java.lang.NullPointerException at META-INF/maven/site.vm[line 62, column 44] -> [Help 1]
@rlubke
Copy link

rlubke commented Apr 30, 2013

Yep, I've hit this one as well.

@ghost ghost assigned andriusvelykis Jan 6, 2014
andriusvelykis added a commit that referenced this issue Jan 6, 2014
The link is disabled using Bootstrap’s .disabled class on the menu item. Also, the href attribute is not set on <a>, making the link behave as text.
@andriusvelykis
Copy link
Owner Author

Fixed in bf75c74.

When no href attribute is set on a menu item, the link is disabled (Bootstrap's .disabled class) and not clickable.

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

No branches or pull requests

2 participants