-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
JS error with latest master #45
Comments
I think I managed to reproduce it on sandbox: https://sandbox.semantic-mediawiki.org/wiki/Sp%C3%A9cial:RunQuery/SFS_test |
With Firefox, I was able to reproduce it on MW 1.29alpha (no AJAX and no JS error, not even the one given above) and I see the error on the sandbox. However I don’t have any idea how to solve it. If one consider jQuery Sizzle (which emits the top error) don’t have a bug (working hypothesis), the error is located on https://github.com/SemanticMediaWiki/SemanticFormsSelect/blob/master/res/scriptSelect.js#L308. Given this file was not changed since 21 September 2015, perhaps some JS resource was forgotten during the recent change in extension loading (just an idea of something which can be checked). |
Searched a bit, here are my first results, I can not continue as of now.
I tried to add this in |
I investigated further and I have difficulties understanding what is happening. My previous comment was probably out-of-scope regarding this bug. My results:
The only remaining possibility (I guess) is the JS in PageForms changed in a way it becames incompatible with SFS. |
End of the story: with the change SemanticForms → PageForms, there is in SFS script res/scriptSelect.js: |
@Seb35 Thanks a lot for digging into this and finding the solution. I guess you deserve to do the respective pull request. :) Great work! |
Fix issue 'JS error with latest master' #45
I would have loved to update sandbox to latest master, but somehow composer fails to do so. It just clones 483f370 and that's it. :| This is utmost annoying after we have gotten this far. I am grumpy now. |
I had also this commit when downloading with Composer. I guess there is no push hook on GitHub, see https://packagist.org/about#how-to-update-packages. Without it, it is only updated once a week (see the same page). |
Usually master is pulled immediately and the last update happened a fortnight ago so I created #47 to track this. |
So sandbox is updated now. |
The form inputs on the usecase on sandbox are now rendered as text inputs. I guess it means SFS is not properly loaded. |
Indeed SFS was no longer automatically loaded via composer after I upgraded to latest master, which I assumed would be the case. Now showing up on Special:Version and the example is working too. |
I confirm the issue is fixed on sandbox and on my server. |
With Page Forms 4.0.2 and SFS 483f370, nothing happens when I select something in a select input.
I have a series of select inputs like this:
The second one is populated based on what has been selected in the first one, and so on...
It works correctly with SFS 1.3 and SF 3.3.2 but with the latest master nothing happens.
I get nothing in the browser console when I select something (no AJAX query and no JS error) but I get this JS error during page load:
(However, I get a similar error with the old version and the form works so I'm not sure it is relevant.)
The text was updated successfully, but these errors were encountered: