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

bogus link if missing BugReports #855

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

bogus link if missing BugReports #855

bastistician opened this issue Nov 2, 2018 · 5 comments
Labels
bug an unexpected problem or unintended behavior home 🏠
Milestone

Comments

@bastistician
Copy link
Contributor

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
Copy link
Collaborator

Could be merged with #694

@jayhesselberth jayhesselberth added this to the pkgdown 1.2.0 milestone Nov 4, 2018
@bastistician
Copy link
Contributor Author

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 hadley added bug an unexpected problem or unintended behavior home 🏠 labels Nov 6, 2018
@hadley
Copy link
Member

hadley commented Nov 6, 2018

@bastistician yes, that would be great!

@bastistician
Copy link
Contributor Author

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior home 🏠
Projects
None yet
Development

No branches or pull requests

3 participants