Jump to content

Extension talk:Validator

Add topic
From mediawiki.org
(Redirected from Extension talk:ParamProcessor)
Latest comment: 9 years ago by Kghbln in topic No longer a dependency for SMW et al?


Undefined index error

[edit]

I'm getting the following error on my form pages "Notice: Undefined index: original-value in /extensions/Validator/includes/Validator.php on line 168" Any hints on how I can resolve this? Thanks! 208.127.139.155 01:15, 11 February 2011 (UTC)Reply

What version are you using? I suspect this issue has already been fixed. When are you getting it? Using Semantic Forms? Jeroen De Dauw 12:18, 11 February 2011 (UTC)Reply
Hi Jeroen,
I'm getting this notice when using sparql inline query e.g.
{{#sparql: SELECT ?person ?income WHERE { ?person <http://mywiki/property/Income> ?income . } }}
I have:
MediaWiki 1.17.0
Semantic Forms (Version 2.3.2)
Semantic MediaWiki (Version 1.7.0.2)
Any ideas? Ridmi (talk) 08:39, 28 February 2012 (UTC)Reply
Where is this #sparql parser function coming from? It's not part of SMW AFAIK. Also, what version of Validator are you using? Jeroen De Dauw (talk) 17:44, 28 February 2012 (UTC)Reply
It's Version 0.4.13.
But I've just realized the sparql parser function is a part of SMWHalo extension.
So I guess I have to dig in different direction.
Thanks Jeroen. Ridmi 08:18, 29 February 2012 (UTC)Reply
Do note that Halo is probably not compatible with the latest SMW yet. I suggest you look at what requirements it has. Jeroen De Dauw (talk) 20:22, 29 February 2012 (UTC)Reply

4.10?

[edit]

Just letting you know that the version for download (e.g. here) is still 4.9 rather than 4.10. Regards, Cavila MW 1.17, MySQL 5.1.57, Php 5.2.17 09:55, 24 August 2011 (UTC)Reply

Indeed. Thanks for notifying me! Fixed now :) Jeroen De Dauw 11:31, 24 August 2011 (UTC)Reply

Describe lists parsemag as alias

[edit]

I have a parserfunction that has 1 alias. The describe parserfunction says: Aliases: parsemag

The error is in line 173 of Validator_Describe.php in Validator 0.4.11:

$description .= $this->msg( 'validator-describe-aliases', 'parsemag', $wgLang->listToText( $aliases ), count( $aliases ) );

Changing $this->msg to wfMsgExt fixes the problem. -- Nx / talk 11:40, 1 October 2011 (UTC)Reply

Thanks for pointing this out. I just removed the parsemag argument. Using wfMsgExt might fix the issue, but will break the behavior of the language parameter. Jeroen De Dauw 23:24, 1 October 2011 (UTC)Reply
Then just change it to:
$description .= wfMsgExt( 'validator-describe-aliases', array( 'parsemag', 'language' => $this->language ), $wgLang->listToText( $aliases ), count( $aliases ) );
-- Nx / talk 04:36, 2 October 2011 (UTC)Reply
Awesome - I didn't know you could pass it along like that :) Jeroen De Dauw 13:54, 2 October 2011 (UTC)Reply

Parameter manipulation

[edit]

The reason for manipulating data is to enter "yes" instead of "true"? Please remind that we don't want change any sense! You know that all here is text and you also know that this is not about converting or encoding. Drop it! 217.92.144.166 13:37, 16 March 2012 (UTC)Reply

Validator allows a bunch of values for boolean parameters, for example yes/no, on/off, but not true/false actually, might make sense to include this as well. Perhaps also show/hide while we're at it. Danwe (talk) 13:53, 16 March 2012 (UTC)Reply
Yeah, we can add those. The boolean type was never fully implemented so far anyway - if you have on/off, you ought to consider internationalizing these as well :)
One more todo for 0.5. Jeroen De Dauw (talk) 15:02, 16 March 2012 (UTC)Reply
I want to suggest to keep it simple! The attribute can be named SwitchOn the values are true/false.
| SwitchOn=true}}
Furthermore you could handle it with 1 and 0 but than there were no new datatype - Ooh
Anyway you can implement what you want, but if there is no additional benefit it is just absurd... 217.92.144.166 14:46, 20 March 2012 (UTC)Reply
So you are saying i18n is absurd? I know some people that might eat you alive for that :) Jeroen De Dauw (talk) 17:30, 20 March 2012 (UTC)Reply
LOL we had learned english and can understand each other, or not?
You want an artificial language in several versions!
I know some people that might eat you alive for that :) 217.92.144.166 15:36, 21 March 2012 (UTC)Reply
You can't naturally expect that all authors of some wiki understand English if it isn't their native language. So it makes sense for parser functions/templates which are intended for usage by authors directly to offer parameters in their native language. Danwe (talk) 22:26, 21 March 2012 (UTC)Reply

Short description of this extension please

[edit]

Hello,

would somebody please tell me the functionality of this extension in a few words? The extension description doesn't make sense for me. Maybe I'm too silly for that. But many extensions require validator, so it has to be important. Thanks for your help.

Cheers 137.193.68.239 12:03, 22 May 2012 (UTC)Reply

It's a kind of library that can be used by other extension. It does not provide functionality on it's own.S Jeroen De Dauw (talk) 19:00, 22 May 2012 (UTC)Reply

SMW setMessage problem in v1.14 Validator

[edit]

Version 1.13 of Validator works fine for me. When I installed 1.14 I got the bug below. Going back to 1.13 fixed it. So I have a workaround, but this may be a bug in 1.14.

The problem is that any Semantic MediaWiki {{#ask}} call results in the following message:

PHP Fatal error: Call to undefined method Parameter::setMessage() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\mediawiki\extensions\SemanticMediaWiki\includes\SMW_QueryProcessor.php on line 512

Here is my version info:

MediaWiki 1.18.1 PHP 5.2.13 (apache2handler) MySQL 5.1.58-community Semantic Forms (Version 2.5) Semantic MediaWiki (Version 1.7.1) Semantic Result Formats (Version 1.7.1) Character Escapes (Version 0.9.1) LinkedWiki (Version 0.1.0.2222) Validator (Version 0.4.13)

Indeed, I have yet not beta-ed over to the latest SMW 1.8, but that is not yet officially released. And Validator 1.14 came out just after SMW 1.7.1.

Hope this helps, Lloyd Rutledge Lloyd.Rutledge (talk) 09:07, 27 September 2012 (UTC)Reply

Validator and graph result format

[edit]

Version 0.5 seems to break parts of the graph output for Semantic Result Formats (or vice versa). It will not show the labels, colors or legend. I was able to fix this by downgrading to version 0.4.14. --Dgennaro 17:19, 18 October 2012 (UTC)Reply

Thanks for notifying me - the problem is in SRF, and I will get to it soonish so it's not in the 1.8 rel :) Jeroen De Dauw (talk) 10:18, 19 October 2012 (UTC)Reply
This should be fixed on master now. Jeroen De Dauw (talk) 16:54, 20 October 2012 (UTC)Reply

Download doesn't work

[edit]

Hi,

download: http://s.bn2vs.com/validatordl doesn't work.

bye 212.9.170.194 17:04, 17 January 2013 (UTC)Reply

Worked for me. Still I updated the link to offer the download of the latest release. Cheers [[kgh]] (talk) 17:35, 17 January 2013 (UTC)Reply
Hi,
Seems to me (not experimented) that the link : Download Validator 0.5.1 (.tar.gz file) is not working.
And if I download the snapshot, it is the 1.0 version which doesn't work properly yet.
So how can I find the 0.5.1 version. (I'm not familiar with Git...)
Thanks for your help 173.176.185.30 19:35, 24 June 2013 (UTC)Reply
Things are a bit confusing right now. Here is the link. Cheers [[kgh]] (talk) 19:55, 24 June 2013 (UTC)Reply

Class RangeValidator not found

[edit]

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 LambdaB (talk) 19:08, 10 February 2013 (UTC)Reply

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. Jeroen De Dauw (talk) 00:11, 11 February 2013 (UTC)Reply
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 (talk) 09:40, 11 February 2013 (UTC)Reply
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 LambdaB (talk) 12:52, 11 February 2013 (UTC)Reply
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 Jeroen De Dauw (talk) 06:05, 12 February 2013 (UTC)Reply

Class 'ValidatorSettings'

[edit]

MediaWiki: 1.21.0rc5 Validator: 1.0 beta Semantic MediaWiki: 1.9 alpha

Catch error on the page with content "{{#listerrors:{minseverity, Text}}}".

 Class 'ValidatorSettings' not found in /extensions/Validator/includes/utils/ListErrors.php on line 64

Is ValidatorSettings::get() method has deprecated and this case is bug? Please, help. 213.232.243.233 14:29, 23 July 2013 (UTC)Reply

The code where the error is occurring is broken, though should not be used. Perhaps you have a to old version of SMW. If you are running git master anyway, I suggest you upgrade to latest master. Jeroen De Dauw (talk) 06:49, 9 August 2013 (UTC)Reply

Fatal error: Validator depends on the ParamProcessor library

[edit]

Validator 1.0.0.1 gives me

Fatal error: Uncaught exception 'Exception' with message 'Validator depends on the ParamProcessor library.' in C:\xampp\htdocs\wiki\extensions\Validator\Validator.php on line 31

on MediaWiki 1.23wmf2 2A02:8070:61FC:8E00:89B9:8FD7:CD69:7C9 14:04, 29 December 2013 (UTC)Reply

It looks like you did not install the ParamProcessor library. The sanest way to install this extension including dependencies is to use Composer. [[kgh]] (talk) 16:36, 31 December 2013 (UTC)Reply
I'm getting the same error message (MW 1.19.7, SMW 1.9). How does one go about installing the ParamProcessor library without shell access (without Composer)? It is included in the Validator 'wrapper', but there are no installation instructions for the library specifically as far as I can see. Cavila (MW 1.19.7, MySQL 5.1.72-2, Php 5.3.3-7, SMW 1.8.0.5, SF 2.5.2) 19:59, 3 January 2014 (UTC)Reply
I've got this error too.
Fatal error: Uncaught exception 'Exception' with message 'Validator depends on the ParamProcessor library.' in /var/www/wiki/extensions/Validator/Validator.php:31 Stack trace: #0 /var/www/wiki/LocalSettings.php(151): require_once() #1 /var/www/wiki/includes/WebStart.php(136): require_once('/var/www/wiki/L...') #2 /var/www/wiki/index.php(46): require('/var/www/wiki/i...') #3 {main} thrown in /var/www/wiki/extensions/Validator/Validator.php on line 31
Is there a simple way to install ans setup ParamProcessor library?
bkb 89.134.40.135 12:35, 5 January 2014 (UTC)Reply
If you do not have shell access, you are restricted to using the tarball for now. I hope will will soon have an extension installation GUI... Jeroen De Dauw (talk) 14:42, 9 January 2014 (UTC)Reply
Why to be obliged to have shell access, in my case I am hosted by a 3rd party service. I will never have a shell access. How configure manually ParamProcessor Library?
Thank in advance,
Marco Markino76 (talk) 13:56, 16 January 2014 (UTC)Reply
Same thing... Trying to set this up on WAMP and it's free for all. No way to get this working. :( 24.114.255.83 06:24, 20 January 2014 (UTC)Reply
Hello.
I'm using 1.20.x and I have shell access but sorry, I can't find the information about how to install ParamProcessor with or without Composer...
Also, after using composer I had to recover from a backup because this error. (That was an attempt to update Maps to 3.0, for use with Semantic Maps).
Please, some guide to solve this?
Thanks. Fernando Carpani (talk) 21:30, 21 February 2014 (UTC)Reply
I was also trying to use Maps. So in order to install Validator without having access to shell, do the following:
Download the stable version of both ParamProcessor and Validator. Extact the content in extensions/ParamProcessor (create the map ParamProcessor) and for Validator in extensions/Validator (create the map Validator).
After you have the files in place, change the file called: LocalSettings.php (in the root folder). And add this line to the end for ParamProcessor:
# ParamProcessor
require_once( "$IP/extensions/ParamProcessor/Processor.php" );
After this line you can add the next line for Validator:
# Validator
require_once( "$IP/extensions/Validator/Validator.php" );
Finally you can continue to setup other extensions after this lines. Danger89 (talk) 12:53, 4 July 2014 (UTC)Reply
The problem is that Validator spits out "Validator depends on the ParamProcessor library." so one navigates to Extension:ParamProcessor which redirects back to Extension:Validator. So we start going on the assumption that ParamProcessor was renamed to Validator with Validator trying to require itself through ParamProcessor.php in the Validator folder that just includes Validator.php which goes back to spitting out the error message "Validator depends on the ParamProcessor library." which-*segfault*.
There is some logic issues with the page and extension naming that causes confusion. Anyone who reads the Extension:Validator page then uses Mediawiki's extension distributor will be left clueless since ParamProcessor is not listed as a dependency on the extension page. There are also no installation instructions noting how to install ParamProcessor outside of Composer. Alexia E. Smith (talk) 21:23, 13 August 2014 (UTC)Reply
Thanks for pointing this out. I've updated the Extension:ParamProcessor page to point to where it should. Jeroen De Dauw (talk) 22:41, 15 August 2014 (UTC)Reply
What I don't get is why this is not included in the semantic bundle. Validator is there, but ParamProcessor is not. That is inherently broken. Even if following the link to ParamProcessor listed above, there are no instructions how to install that in Mediawiki. Yes I know there is a thing called composer, yes I know that is the preferred way to install Validator, but here is the thing. The point of semantic bundle is if composer is not a viable option. What is the point of having a bundle if one has to download a handful of other extensions to get it working. Lbthomsen (talk) 01:49, 12 September 2014 (UTC)Reply
According to the docu this should already be part of the currentSemantic Bundle. [[kgh]] (talk) 06:47, 12 September 2014 (UTC)Reply

Extension versions breaks 'git submodule foreach git pull origin REL1_22'

[edit]

There seems to been a change to the tags for this extensions. Since tagging is cheap with git, i'm not sure why one extension would deviate from others extensions and break this functionality. The reason it's good to have REL1_22 tags in this repo is to help everyone understand the supported versions with MW and this extension. Please reconsider adding back the REL1_22 and other tags. Skunark (talk) 02:00, 30 December 2013 (UTC)Reply

These release tags like e.g. REL1_22 are very often not the best shot when it comes to installing an extension, no matter if we are talking about this extension here or any other extension. They must naturally be a kind of arbitrary. Probably only extensions bundled with MediaWiki are really safe when using this special tag.
I recommend installing this extension and its dependencies with Composer. It's a bit of a habitual change but it saves time and nerves. :) [[kgh]] (talk) 16:43, 31 December 2013 (UTC)Reply
extensions bundled are based off of the tags... Skunark (talk) 04:13, 23 January 2014 (UTC)Reply
They should not be - that approach is inherently broken. Should use the latest stable release. There are solid standards for this, people would do well following them rather then doing their own crazy weird thing. Jeroen De Dauw (talk) 14:52, 26 January 2014 (UTC)Reply
yet all stable releases have a tag and there should be a stable tag that matches each stable release of MW to match up with any API changes. Skunark (talk) 21:41, 26 January 2014 (UTC)Reply
Sorry, but I can't agree with this. If you do an update on an extension that requires a new hook added on the latest stable release, it should be tagged for that release, so people downoad the proper version matching its MediaWiki version.
And for the same reason, if we're supporting LTS versions of MediaWiki, we should keep extensions with versions compatible with them, and tagging for such releases is the way to go. Ciencia Al Poder (talk) 10:41, 27 January 2014 (UTC)Reply
My extensions follow http://semver.org/ rather than some random tagging scheme. Jeroen De Dauw (talk) 16:09, 2 January 2014 (UTC)Reply
Your semver seems rather random as well. At least, the REL1_XX ensures you're using a version that's compatible with that MediaWiki version, while your versioning doesn't match it, and I was unable to find a table where your semver matches any MediaWiki version.
It's not the first time I see people complaining about a semantic extension breaking MediaWiki when installed (giving errors about undefined methods or parameters mismatch, a clear indication of an incompatibility between MediaWiki version and SMW), and I'm unable to tell them if their SMW version is the right version for that MediaWiki version or not. Ciencia Al Poder (talk) 10:56, 3 January 2014 (UTC)Reply
I am afraid that REL1_XX does not ensure anything, at least not for me. :( I had as many problems with this kind of tag than with any other tags. However, the compat problem was adressed with Composer I presume. [[kgh]] (talk) 12:05, 3 January 2014 (UTC)Reply
https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/docs/INSTALL.md#platform-compatibility Jeroen De Dauw (talk) 15:38, 3 January 2014 (UTC)Reply
That chart is rather weak, it doesn't even discuss the dot minor version for MW, nor when it was last updated. So it's only a guideline at most, if you don't support tags, it should at least indicate the last commit hash checked.
Lucky for me SMW wasn't really used so I managed to remove it. Perhaps when more extensions support composer, SMW was the only one, I might reconsider this extension. One thing that isn't desirable with composer it how it removes extensions when it updates, so if you tweaked it for any reason, you've lost the edit. BTW, doesn't composer use the tags or commit hash? It has to effectively use the same hooks everyone else does. Skunark (talk) 03:41, 29 January 2014 (UTC)Reply

Format description of type mapscircle list

[edit]

The SemanticMaps extension allows to draw circles on a map. The format is described as <validator-type-mapscircle-list>. I haven't found any description of this type yet. I guess the format is something like

lat,lon:radius

where radius is given in meter. Is that correct? 92.198.57.114 13:03, 20 April 2015 (UTC)Reply

Please add this page to translate

[edit]

Please add this page to translate Перевод15 (talk) 19:49, 11 March 2016 (UTC)Reply

No longer a dependency for SMW et al?

[edit]

SMW 1.9 and later don't need Validator. Seemingly, SMW cannot work with the existence of an explicit invocation of Validator.

What other dependencies stated here need review? Ahmad Gharbeia أحمد غربية (talk) 10:30, 21 March 2016 (UTC)Reply

Hello Kghbln,
You reverted my amendments regarding the dependency of SMW on Validator. In light of the reference I provide in the previous entry in this discussion, did I misunderstand something? Ahmad Gharbeia أحمد غربية (talk) 12:06, 10 April 2016 (UTC)Reply
Yes since Validator get's automatically invoked via Composer. SMW will not work without this extension. Did you see my my changes to the page? Cheers [[kgh]] (talk) 20:57, 10 April 2016 (UTC)Reply
By "automatically invoked via Composer" do you mean "installed"? Or do you actually mean temporarily used during installation?
I'm not sure the part about auto-installation is true.
Specifically:
I have installed SMW by hand without Validator and it works. I have no trace of Validator in my installation.
Moreover, I'm not sure the note from SMW docs I refer to in my first post can be interpreted as you wrote.
Also, even though I haven't used Composer before, my assumption about a package and dependency management system is that it should install dependencies when not present, but not cause breakage if those dependencies had been already installed on behalf of other components.
What am I missing here? Ahmad Gharbeia أحمد غربية (talk) 09:27, 15 April 2016 (UTC)Reply
> "automatically invoked via Composer"
Indeed installed as well as activated. That's right.
You should see a reference to the Validator extension on the "Special:Version" page of your wiki. If this is not the case then I have no idea why Semantic MediaWiki is working for you.
In case you use the tarball of Semantic MediaWiki provided then Validator is automatically included without further action required by you. However you should still see a reference to the Validator extension on the "Special:Version" page, too. If this is not the case then I have no idea why Semantic MediaWiki is working for you. [[kgh]] (talk) 21:00, 15 April 2016 (UTC)Reply