With Adrian's recent refactoring we broke some things in the Primary Sources Tool. We also might be breaking more with the remaining open patches. We should check what is broken and fix it.
Description
Event Timeline
The layout looks different from how it was before the refactoring. (I can't describe the difference well.) The statements suggested by the Primary Sources Tool should look only different in color and the available buttons from the normal statements. I have also not tried to actually accept or reject statements since the refactoring so that would still need to be done.
I am not sure what is broken and as far as I know Adrians refactoring did not change the DOM.
Maybe @thiemowmde has an idea or @Lydia_Pintscher can point out the changes or what is broken.
I believe the alignment of the accept/reject links was better before. I am also seeing the color issue as in the previous screenshot. Another issue I saw yesterday seems gone now.
I added a new statement now and that seems ok.
Another issue that is probably not related to the refactoring: New identifiers are not suggested in the identifier section but in the statement section. When suggesting an additional value for an existing identifier property it is in the identifier section.
Was the issue you were seeing before that the statements were in edit mode with unreadable text? I've had that one too but also not seeing it today.
No it was some other visual glitch that I can't really explain. Should have taken a screenshot -.-
@Sjoerddebruin this looks more like a backend problem of the PS tool. Do you have a console log?
This is showing up there:
[Warning] This page is using the deprecated ResourceLoader module "jquery.ui.widget". [Warning] This page is using the deprecated ResourceLoader module "jquery.effects.core". [Warning] This page is using the deprecated ResourceLoader module "jquery.jStorage". Please use "mediawiki.storage" instead. [Warning] This page is using the deprecated ResourceLoader module "jquery.tipsy". [Warning] This page is using the deprecated ResourceLoader module "jquery.ui.core". Please use "mediawiki.ui.button" or "oojs-ui" instead.
Not sure if it applies to the primary sources tool, though.
I've got a different one on another item:
TypeError: null is not an object (evaluating 'listitem.startEditing')
I can get Sjoerddebruin's problem to occur consistently using Windows 10/Firefox 47.0.1.
Have at least two tabs open, one with the Wikidata item with which you're going to use the PST. The other page can be a non-Wikidata page (I'm not sure if this problem repros itself with another Wikidata page).
- Add a PST-suggested statement.
- Click to the other tab.
- Click back to the Wikidata tab.
Presto, broken HTML. :D
I have same problem as Sjoerddebruin/Izno using W7/FF47/IE11. After several refreshes it is always OK, but it is really annoying.
Is this still an issues?
I tried to reproduce the error, but for me everything works as expected.
I was just able to reproduce this (F4371494) on Q841288 (while hitting Special:Random for another bug):
Backend response (https://tools.wmflabs.org/wikidata-primary-sources/entities/Q841288?dataset=):
[ { "dataset" : "freebase", "format" : "v1", "id" : 12255149, "state" : "unapproved", "statement" : "Q841288\tP856\t\"http://www.ses-astra.com\"", "upload" : 2147483647 }, { "dataset" : "freebase", "format" : "v1", "id" : 12255148, "state" : "unapproved", "statement" : "Q841288\tP749\tQ333025", "upload" : 2147483647 }, { "dataset" : "freebase-testing", "format" : "v1", "id" : 15864095, "state" : "unapproved", "statement" : "Q841288\tP571\t+00000001985-00-00T00:00:00Z/9", "upload" : 2147483647 } ]
Html of the screwed up statement:
<div class="wikibase-statementview listview-item wikibase-toolbar-item new-object wb-new wb-edit"><div class="wikibase-statementview-rankselector"><div class="wikibase-rankselector wb-edit ui-state-default ui-state-active"><span class="ui-icon ui-icon-rankselector wikibase-rankselector-normal" title="Normal rank"></span></div></div><div class="wikibase-statementview-mainsnak-container"><div class="wikibase-statementview-mainsnak" dir="auto"><!-- wikibase-snakview --><div class="wikibase-snakview wb-edit"><div class="wikibase-snakview-property-container"><div class="wikibase-snakview-property" dir="auto">{{property-html}}</div></div><div class="wikibase-snakview-value-container" dir="auto"><div class="wikibase-snakview-typeselector"><span class="ui-state-default wikibase-snaktypeselector" aria-disabled="false"><span class="ui-icon ui-icon-snaktypeselector" title="custom value"></span></span></div><div class="wikibase-snakview-value wikibase-snakview-variation-valuesnak" style="height: auto;"><div class="valueview valueview-ineditmode" aria-disabled="false"><div class="valueview-value valueview-expert-StringValue"><textarea class="valueview-expert-StringValue-input valueview-input" style="height: 22px; overflow: hidden; resize: none;"></textarea></div></div></div></div></div></div><div class="wikibase-statementview-qualifiers"><div class="wikibase-listview"></div><!-- wikibase-listview --><div class="wikibase-addtoolbar wikibase-toolbar-item wikibase-toolbar wikibase-addtoolbar-container wikibase-toolbar-container"><span class="wikibase-toolbarbutton wikibase-toolbar-item wikibase-toolbar-button wikibase-toolbar-button-add"><a href="#" title=""><span class="wb-icon"></span>add qualifier</a></span></div></div></div><!-- wikibase-toolbar --><span class="wikibase-toolbar-container wikibase-edittoolbar-container wikibase-edittoolbar-ineditmode"><span class="wikibase-toolbar-item wikibase-toolbar wikibase-toolbar-container"><span class="wikibase-toolbarbutton wikibase-toolbar-item wikibase-toolbar-button wikibase-toolbar-button-save wikibase-toolbarbutton-disabled ui-state-disabled" aria-disabled="true"><a href="#" title="" tabindex="-1"><span class="wb-icon"></span>save</a></span><span class="wikibase-toolbarbutton wikibase-toolbar-item wikibase-toolbar-button wikibase-toolbar-button-cancel"><a href="#" title=""><span class="wb-icon"></span>cancel</a></span></span> <span class="wikibase-toolbar-item wikibase-toolbar wikibase-toolbar-container"><span class="wikibase-toolbarbutton wikibase-toolbar-item wikibase-toolbar-button wikibase-toolbar-button-remove"><a class="f2w-button f2w-property f2w-reject" href="#" data-statement-id="12255149" data-property="P856" data-object=""http://www.ses-astra.com"" data-qualifiers="[]" data-sources="[]"><span class="wb-icon"></span>reject claim</a></span><span class="wikibase-toolbarbutton wikibase-toolbar-item wikibase-toolbar-button wikibase-toolbar-button-add"><a class="f2w-button f2w-property f2w-approve" href="#" data-statement-id="12255149" data-property="P856" data-object=""http://www.ses-astra.com"" data-qualifiers="[]" data-sources="[]"><span class="wb-icon"></span>approve claim</a></span></span><span class="wb-help-field-hint wikibase-toolbar-item wikibase-wbtooltip" original-title="Enter a value corresponding to the property named "official website". If the property has no designated value or the actual value is not known, you can choose an alternative value type by clicking the icon before the input box."> </span></span><div class="wikibase-statementview-references-container"><div class="wikibase-statementview-references-heading"><a class="ui-toggler ui-toggler-toggle ui-state-default"><span class="ui-toggler-icon ui-icon ui-icon-triangle-1-s"></span><span class="ui-toggler-label">0 references</span></a></div><div class="wikibase-statementview-references wikibase-toolbar-item"><!-- wikibase-listview --><div class="wikibase-listview"></div><div class="wikibase-addtoolbar-container wikibase-toolbar-container wikibase-toolbar-item"><span class="wikibase-toolbarbutton wikibase-toolbar-item wikibase-toolbar-button wikibase-toolbar-button-add"><a href="#" title=""><span class="wb-icon"></span>add reference</a></span></div></div></div></div>
I can't see anything else being obviously wrong here.
Ok I think we should fix the breakage Marius found in this ticket.
I did test the current state of the gadget and there are a lot of issues with it still. But I think we should take a step back and evaluate how much of it we should fix in the current state and how much we should instead first provide proper functions in Wikibase for. I'll open a separate ticket for that analysis.
Related to version 1.
Should not apply to version 2, but feel free to re-open it in case.