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

bogus link if missing BugReports #855

Closed
bastistician opened this Issue Nov 2, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@bastistician
Copy link
Contributor

bastistician commented Nov 2, 2018

If the package does not contain a BugReports field in its DESCRIPTION file, the generated home page will currently contain

Report a bug at
NA

among the links generated from data_home_sidebar_links() at

link_url("Report a bug", pkg$desc$get("BugReports")[[1]]),
.

A solution could be to mimic what R's bug.report() does since R 2.11.0, i.e., fall back on the maintainer's e-mail address if BugReports is unspecified:

Report a bug to
Joe.Developer@some.domain.net

Alternatively, not including such a link at all would actually best reflect the package DESCRIPTION and possibly the authors intention, so I would favour this more defensive solution. Note that it is always possible for the package authors to manually add intended bug report links to the homepage via the pkgdown configuration file.

@jayhesselberth

This comment has been minimized.

Copy link
Collaborator

jayhesselberth commented Nov 4, 2018

Could be merged with #694

@jayhesselberth jayhesselberth added this to the pkgdown 1.2.0 milestone Nov 4, 2018

@bastistician

This comment has been minimized.

Copy link
Contributor Author

bastistician commented Nov 6, 2018

I could prepare a PR which modifies data_home_sidebar_links() in that it generates a link for bug reports only if the DESCRIPTION actually has a "BugReports" field. Is that acceptable?

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Nov 6, 2018

@bastistician yes, that would be great!

@bastistician

This comment has been minimized.

Copy link
Contributor Author

bastistician commented Nov 7, 2018

Oops, I now see that @jayhesselberth has also worked on a solution for this issue (#871), where the maintainer's e-mail address is used as a fallback link. As mentioned above, I would prefer if pkgdown took the more defensive approach of only including a link in the sidebar if and only if there actually is a BugReports field in the DESCRIPTION (#872). That also avoids spreading plain-text e-mail addresses on websites.

@jayhesselberth

This comment has been minimized.

Copy link
Collaborator

jayhesselberth commented Nov 7, 2018

Yours is the simpler solution and I think preferable. Closing #871 for now.

@hadley hadley closed this in #872 Nov 8, 2018

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