Jump to content

Topic on Extension talk:Validator/Flow

Class RangeValidator not found

5
LambdaB (talkcontribs)

Hi,

a fatal error comes up when I execute a simple ask query such as {{#ask: [[Category:Publication]] }}:

Fatal error: Class '\ValueValidators\RangeValidator' not found in
...\extensions\Validator\includes\ParamDefinitionFactory.php on line 176

The following extensions are installed:

  • MediaWiki 1.19.3
  • PHP 5.3.0 (apache2handler)
  • Semantic MediaWiki (Version 1.9 alpha)
  • DataTypes (Version 0.1 alpha)
  • DataValues (Version 0.1 alpha)
  • ValueFormatters (Version 0.1 alpha)
  • ValueParsers (Version 0.1 alpha)
  • ValueValidators (Version 0.1 alpha)
  • Validator (ParamProcessor) (Version 1.0 alpha)

Cheers, Basil

Jeroen De Dauw (talkcontribs)

I suspect you are running incompatible alpha versions. Since you just list them as being alpha I can't tell. The latest alphas are working fine with each other and so are the latest releases. The error you are running into suggests you have either an outdated Validator or and outdated DataValues extension bundle.

LambdaB (talkcontribs)

Hi Jeroen,

just now I deleted the extension folders for Validator and DataValues and did a fresh checkout. The version numbers are still the same and the fatal error did not disappear.

Any idea what I could try?

Cheers, Basil

LambdaB (talkcontribs)

I fixed the problem for now in extensions/DataValues/ValueValidators/ValueValidators.classes.php. It seems like the validators are not correctly registered. I added some backslashes at the beginning:

'\ValueValidators\RangeValidator' => 'includes/validators/RangeValidator.php',
'\ValueValidators\StringValidator' => 'includes/validators/StringValidator.php',

Cheers, Basil

Jeroen De Dauw (talkcontribs)

Uh oh... that is not good...

That should not be needed and is caused by MW 1.19.x not having decent namespace support in its autoloader. This is going to cause problems elsewhere as well, so we'll need to take care of this before the next SMW release.

I created bug 44892 to keep track of this

Reply to "Class RangeValidator not found"