Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The extension no longer works after the upgrade of Page Forms from 5.2.1 to 5.4. #89

Open
Megajoul opened this issue Mar 22, 2022 · 14 comments · Fixed by #92
Open

The extension no longer works after the upgrade of Page Forms from 5.2.1 to 5.4. #89

Megajoul opened this issue Mar 22, 2022 · 14 comments · Fixed by #92
Assignees
Labels
Milestone

Comments

@Megajoul
Copy link

Megajoul commented Mar 22, 2022

Setup

  • MW version: 1.37.2
  • DB (MySQL etc.): MariaDB
  • PHP version: 7.4.29
  • SMW version: 4.0.1
  • SFS version: 4.0.0-alpha
  • PF version: 5.4
  • Browsers and versions (if applicable):

Issue

The extension no longer works after the upgrade of Page Forms from 5.2.1 to 5.4. The SF_Select field remains blank.

@kghbln kghbln added the bug label Mar 22, 2022
@gesinn-it-gea gesinn-it-gea added this to the 4.0.0 milestone Apr 27, 2022
@gesinn-it-gea
Copy link
Member

This is probably caused by PF using OOUI for some input types sind PF 5.3. We are currently working on a fix for this issue. Stay tuned.

@Megajoul
Copy link
Author

Great! Thank you very much.

@gesinn-it-wam
Copy link
Contributor

We have just released a version containing a fix (https://github.com/SemanticMediaWiki/SemanticFormsSelect/releases/tag/4.0.0-beta). Would you please try if this works for you?

@Megajoul
Copy link
Author

Megajoul commented Apr 29, 2022

Sorry, it doesn't work in my case. But maybe it's the fault of my specific request which targets sub-objects. Maybe I need to create another bug report. Here is an extract from the code of my form (I have "englishified " the names of the categories and properties for a better readability):

Class: {{field|class|input type=dropdown|values from category=semantic classes|mandatory}}
Property: {{field|property|input type=SF_Select|query=((category:properties))((-Has subobject::@@@@));?propertyName;format~plainlist;mainlabel~-;sep~,;headers~hide;limit~500;sort~fieldNumber;order~asc|sametemplate|field=class|mandatory|label}}

The "property" field remains empty when a value is chosen in the "class" field. However, the following query brings back many results:

{{#ask:[[category:properties]][[-Has subobject::Class:Person]]
|?propertyName
|format=plainlist
|mainlabel=-
|sep=,
|headers=hide
|limit=500
|sort=fieldNumber
|order=asc
}}

When you remove the "((-Has subobject::@@@@))" part in the "property" field of the form, this "property" combobox field displays all possible values for "property" but of course, that's not what we expect, is it?

@gesinn-it-gea
Copy link
Member

Just a quick thought: did you try

((-Has subobject::Class:@@@@))

adding the Class namespace you are using in the #ask example.

@Megajoul
Copy link
Author

Megajoul commented Apr 29, 2022

Thanks for the idea. It doesn't change anything unfortunately. To be sure, I tried a more conventional example (without a query for subobjects). No more results:

  • Form:Restaurant
  • Template:Restaurant with two property assignments:
  • Property:City
  • Property:Country
  • Category:Restaurants (with the Restaurant form attachment)
  • La Tour d'Argent: an instance of a restaurant with France as country and Paris as city

In the Restaurant form:
Country: {{{field|Country|property=Country|input type=combobox}}}
City: {{{field|City|input type=SF_Select|query=((category:Restaurants))((Country::@@@@));?City;format~plainlist;mainlabel~-;sep~,;headers~hide;limit~500|sametemplate|field=Country|mandatory|label}}}
does not work.

I tried without the combobox input type for the country field (it can be temperamental sometimes). No success either.

Again, if I remove the "((Country::@@@@))" part, I get a list of all possible city values. But that is not the point here.

@Megajoul Megajoul changed the title The extension no longer works after the upgrade of Page Forms from 5.2.1 to 5.3.4. The extension no longer works after the upgrade of Page Forms from 5.2.1 to 5.4. Apr 29, 2022
@gesinn-it-wam
Copy link
Contributor

Can you try

City: {{{field|City|input type=SF_Select|delimiter=@@|query=((category:Restaurants))((Country::@@@@));?City;format~plainlist;mainlabel~-;sep~@@;headers~hide;limit~500|sametemplate|field=Country|mandatory|label}}

@Megajoul
Copy link
Author

Megajoul commented Apr 29, 2022

This does not change anything.
Other observations that may help in the diagnosis :

  • when I put a lower case letter in the name of the country field ({{{field|country|property=Country|input type=combobox}}}), the display of the city field is modified (whether or not a country is entered) from :
    2022-04-29 12_24_45-Créer Restaurant — hobbes
    to
    2022-04-29 12_25_17-Créer Restaurant — hobbes
  • In either case, I don't detect any network activity in the firefox debugging window (I don't know if this is normal or not)

@gesinn-it-wam
Copy link
Contributor

Error messages in the debugging console?

@Megajoul
Copy link
Author

No more or less than for other "non-semantic" pages:
2022-04-29 13_39_40

@gesinn-it-wam
Copy link
Contributor

What about using a dropdown instead of a combobox for the country?
Country: {{{field|Country|property=Country|input type=dropdown}}}

@Megajoul
Copy link
Author

No effect. There is a need to put "values from property=Country" rather than "property=Country" for the values to be visible.
It doesn't matter anyway, it doesn't work. With or without capitalization of country.

@Megajoul
Copy link
Author

In any case, thank you very much for your action and help. Good luck for the next step!

@Megajoul
Copy link
Author

Sorry, but this bug is still open according to my observations.
Here is another piece of information that may help: the following code works.
{{{field|restaurant|input type=SF_Select|query=((Category:Restaurants));?City;format~plainlist;mainlabel~-;sep~,;headers~hide;limit~500}}}
Of course, this is not the expected functionality.

@kghbln kghbln reopened this May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants