Download & Extend

Piwik HTTP URL Validation (trailing slash)

Project:Piwik Web Analytics
Version:7.x-2.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

When entering a piwik HTTP url without a trailing slash, the field fails validation.
e.g. http://analytics.example.com (no trailing slash)
The error message would be:
"The validation of "http://analytics.example.compiwik.php" failed with error "php_network_getaddresses: getaddrinfo failed: Name or service not known" (HTTP code 0)."

This can be confusing, as it is very subtle. It would be helpful if the form validator would automatically add the trailing slash, or some similar solution.

This is a usability bug.
Usability Heuristics:
Error Prevention
Even better than good error messages is a careful design which prevents a problem from occurring in the first place. Either eliminate error-prone conditions or check for them and present users with a confirmation option before they commit to the action.

Help users recognize, diagnose, and recover from errors
Error messages should be expressed in plain language (no codes), precisely indicate the problem, and constructively suggest a solution.
Source: http://www.useit.com/papers/heuristic/heuristic_list.html

Comments

#1

Category:bug report» feature request
Status:active» closed (works as designed)

The module does not try to fix user faults. The examples are there in the description. If you'd like to see it changed you can write a patch.

#2

Status:closed (works as designed)» needs review

In the spirit of making things more usable and ensuring fewer errors I wrote a quick patch that will detect if there is a trailing slash and add one (if one is not present).

Would you consider committing this patch?

AttachmentSizeStatusTest resultOperations
piwik_url.patch1.51 KBIdlePASSED: [[SimpleTest]]: [MySQL] 146 pass(es).View details | Re-test

#3

I just wanted to follow up and see if you've had a chance to review this patch?

Similarly, are there other usability items you are aware of that I could help out with?

#4

That also happens in 6.x version.

#5

Version:7.x-2.3» 7.x-2.x-dev
Status:needs review» needs work

Code style issues exists.

#6

I forgot to send this through coder for validation, my apologies.

I'm in the midst of a project launch at work right now, but wanted to update this thread that I will fix this patch, and also ensure it works with the 6.x version as well.