Archiva

Validation error on new repository creation and other fields under certain conditions

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-beta-4
  • Fix Version/s: 1.0.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    Win Server 2003
  • Number of attachments :
    2

Description

When I try to create a new snapshot repository by web interface I obtain this validation error:

Repository Purge By Days Older Than needs to be between 0 and 1000.

even if field is correctly set to 30
It is impossible to create a new repository!

Activity

Hide
Maria Odea Ching added a comment -

hmm.. i can't seem to replicate this.

Show
Maria Odea Ching added a comment - hmm.. i can't seem to replicate this.
Hide
Nap Ramirez added a comment -

I can't replicate this issue too. Maybe you can provide us the exact steps you did and the values you used when you encountered this problem?

Show
Nap Ramirez added a comment - I can't replicate this issue too. Maybe you can provide us the exact steps you did and the values you used when you encountered this problem?
Hide
Stefan Seidel added a comment -

I get the same error. Using Archiva 1.0.1, Firefox 2.0.0.11 under Linux 2.6.23.12. When I emptied the field the creation worked. Same thing for report. Screenshot attached.

Show
Stefan Seidel added a comment - I get the same error. Using Archiva 1.0.1, Firefox 2.0.0.11 under Linux 2.6.23.12. When I emptied the field the creation worked. Same thing for report. Screenshot attached.
Hide
Maria Odea Ching added a comment -

Reopened issue as per last comment.

Show
Maria Odea Ching added a comment - Reopened issue as per last comment.
Hide
Brett Porter added a comment -

the screenshot attached refers to a completely different field re-closing...

Show
Brett Porter added a comment - the screenshot attached refers to a completely different field re-closing...
Hide
Florian Kolbe added a comment -

Here's a screenshot - I have this problem an a plain vanilla 1.0.1 standalone installation.

Show
Florian Kolbe added a comment - Here's a screenshot - I have this problem an a plain vanilla 1.0.1 standalone installation.
Hide
Stefan Seidel added a comment -

Well Brett, what do you want? I even showed that the problem is not specific to the repo creation page, but a more general problem. Please read my first comment, it says "Same thing for report".

Show
Stefan Seidel added a comment - Well Brett, what do you want? I even showed that the problem is not specific to the repo creation page, but a more general problem. Please read my first comment, it says "Same thing for report".
Hide
Wendy Smoak added a comment -

If it's a more general problem, please open a new issue. That's why Brett closed it-- this issue is specific to one field on the repository creation page.

Show
Wendy Smoak added a comment - If it's a more general problem, please open a new issue. That's why Brett closed it-- this issue is specific to one field on the repository creation page.
Hide
Brett Porter added a comment -

I was also not able to reproduce - but we have two reports.

Do you have Javascript disabled? It may be that we can't reproduce because the Javascript catches it and it fails on the server?

Show
Brett Porter added a comment - I was also not able to reproduce - but we have two reports. Do you have Javascript disabled? It may be that we can't reproduce because the Javascript catches it and it fails on the server?
Hide
Gunther Walther added a comment -

I got the same error on MacOS X10.5/Leopard and Firefox 2.0.0.12. Archiva standalone installation.

Show
Gunther Walther added a comment - I got the same error on MacOS X10.5/Leopard and Firefox 2.0.0.12. Archiva standalone installation.
Hide
Gunther Walther added a comment - - edited

Found a probable cause - the validation code checks for "1.000" instead of "1000". Results in a fairly narrow range (0...1) that is ok.

  • 636 if (form.elements['repository.daysOlder']) {
  • 637 field = form.elements['repository.daysOlder'];
  • 638 var error = "Repository Purge By Days Older Than needs to be between 0 and 1000.";
  • 639 if (field.value != null) {
  • 640 if (parseInt(field.value) <
  • 641 0 ||
  • 642 parseInt(field.value) >
  • 643 1.000) { - 644 addError(field, error); - 645 errors = true; - 646 }
  • 647 }
  • 648 }
    ~
Show
Gunther Walther added a comment - - edited Found a probable cause - the validation code checks for "1.000" instead of "1000". Results in a fairly narrow range (0...1) that is ok.
  • 636 if (form.elements['repository.daysOlder']) {
  • 637 field = form.elements['repository.daysOlder'];
  • 638 var error = "Repository Purge By Days Older Than needs to be between 0 and 1000.";
  • 639 if (field.value != null) {
  • 640 if (parseInt(field.value) <
  • 641 0 ||
  • 642 parseInt(field.value) >
  • 643 1.000) { - 644 addError(field, error); - 645 errors = true; - 646 }
  • 647 }
  • 648 } ~
Hide
Thomas Winkler added a comment -

It looks like this could be a problem depending on the used JVM user.language. I commented on a similar issue MRM-617..

Show
Thomas Winkler added a comment - It looks like this could be a problem depending on the used JVM user.language. I commented on a similar issue MRM-617..
Hide
Marc Lustig added a comment -

here the same with a plain vanilla 1.0.1 standalone installation.
I never had this problem with any webwork app before thou.

Show
Marc Lustig added a comment - here the same with a plain vanilla 1.0.1 standalone installation. I never had this problem with any webwork app before thou.
Hide
Brett Porter added a comment -

I suspect this is a localisation thing - here I get 1,000 for 1000.

I've just removed the upper limit for now

Show
Brett Porter added a comment - I suspect this is a localisation thing - here I get 1,000 for 1000. I've just removed the upper limit for now

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: