Using this search profile form definition the following appears on Special:Search:
Warning: is_array() expects exactly 1 parameter, 0 given in /w/extensions/SemanticMediaWiki/src/MediaWiki/Search/Form/FormsBuilder.php on line 249
(I am still learning search profiles, I don't know what is wrong).
Warning: is_array() expects exactly 1 parameter, 0 given in /w/extensions/SemanticMediaWiki/src/MediaWiki/Search/Form/FormsBuilder.php on line 249
Okay, if we look at the code above we'll see something like:
if ( isset( $data['namespaces']['hidden'] ) && is_array( ) ) {
$this->hidden_namespaces( $data['namespaces']['hidden'] );
}
Now, && is_array( ) should actually be && is_array( $data['namespaces']['hidden'] ), so during some copy and pasting the inner part went missing and is the reason for the " is_array() expects exactly 1 parameter" message.
(I am still learning search profiles, I don't know what is wrong).
As for the "don't know what is wrong", the code is wrong not your schema. On the matter of "I am still learning", if something is unclear on the provide wiki page or [0] docu then just create a new ticket or make suggestions on how to improve the documentation (and examples) and make it more user friendly.
[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/src/MediaWiki/Search
Thanks @mwjames. Shoud I make a PR with this change or are you going to make it?
Shoud I make a PR with this change or are you going to make it?
You could have been bold here. ;) Just made #4285 Anyways it will indeed be much appreciated if you could have a peep at the docu.
Anyways it will indeed be much appreciated if you could have a peep at the docu.
Ok, here it is.
Thanks a lot! Did some minor fluff and published.
Most helpful comment
As for the "don't know what is wrong", the code is wrong not your schema. On the matter of "I am still learning", if something is unclear on the provide wiki page or [0] docu then just create a new ticket or make suggestions on how to improve the documentation (and examples) and make it more user friendly.
[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/src/MediaWiki/Search