SemanticMediaWiki / SemanticResultFormats

Provides additional visualizations (result formats) for Semantic MediaWiki
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Result_Formats
Other
45 stars 75 forks source link

Datatables and EventCalendar Stuck with Loading Dots #648

Closed acminor closed 2 years ago

acminor commented 3 years ago

Setup

Issue

I tried to use the eventcalendar format for displaying a calendar in my personal wiki. The loading-dots never disappeared. I have tried to diagnose the issue; however, I have not been able to determine why the loading-dots never disappear. It appears that maybe the javascript for the eventcalendar is never loaded.

The same issue persists for datatables format as well.

Steps to reproduce

I cannot read French so using the sandbox is a little difficult. Below are the steps.

  1. Create a test event on page Test calendar event
    
    [[Has event::Test Event]]
    [[Has event start::2021-03-25]]

[[Category:Calendar test]]

2. Create empty `Category:Calendar test`
3. Create a calendar wiki page `Calendar test`

{{#ask: [[Category:Calendar test]] |?Has event=title |?Has event start |?Has event end |?Has event description=description |?Has event icon=icon |?Has event color=color |?Has event location=location |legend=top |format=eventcalendar |defaultview=month }}



**Expected result:**

Calendar will pull up.

**Observed result:**

Stuck with the loading "..." GIF.

**Stacktrace** 

No stack trace.
kghbln commented 3 years ago

Thanks for reporting. This can also be observed on sandbox / eventcalendar and sandbox / datatables. The cause is probably Error: Unknown module: jquery.ui.core as:

Browser console gives this error:

Error: Unknown module: jquery.ui.core
    sortDependencies https://sandbox.semantic-mediawiki.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=medik:8
    sortDependencies https://sandbox.semantic-mediawiki.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=medik:8
    sortDependencies https://sandbox.semantic-mediawiki.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=medik:8
    resolveStubbornly https://sandbox.semantic-mediawiki.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=medik:9
    load https://sandbox.semantic-mediawiki.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=medik:20
    <anonymous> https://sandbox.semantic-mediawiki.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=medik:61
    <anonymous> https://sandbox.semantic-mediawiki.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=medik:61
load.php:2:567
gesinn-it-gea commented 3 years ago

TODO: Verify, if https://phabricator.wikimedia.org/T219604 is related

gesinn-it-gea commented 3 years ago

See #621

kghbln commented 3 years ago

See #621

So we need to break compat with 1.31 or is there another way?

gesinn-it-gea commented 3 years ago

@kghbln I did not have time to look into it in detail if it could be fixed without breaking compat with 1.31. I think it is important to make JS testing a part of the CI workflow. A part of this journey is #652 .

gesinn-it-gea commented 3 years ago

@kghbln I would definitely not break compat with 1.31 until both, SMW and SRF are fully ready for MW 1.35. If technically required, we should branch 4.x.

danielriedmueller commented 3 years ago

Hello! I have the same issue. Just wanted to ask if there is an solution already? Thank you!

gesinn-it-gea commented 3 years ago

@danielriedmueller you can try to patch your installation with fixes provided by #621 and share with us, if this worked for you.

danielriedmueller commented 3 years ago

I replaced Resources.php with the the modified one from the patch, and now the error is gone and datatables is loading.

acminor commented 3 years ago

I can also confirm that I can get datatables loading with the corrected Resources.php.

kghbln commented 3 years ago

In SimpleBatchUpload this code was added to help the cause: https://github.com/ProfessionalWiki/SimpleBatchUpload/blob/master/src/SimpleBatchUpload.php#L99

Megajoul commented 2 years ago

Sorry but #653 is still not solved with #621

gesinn-it-gea commented 2 years ago

... we are at the moment fixing QUnit tests. There is definitely something in the water. Stay tuned. Ping @gesinn-it-wam .

kghbln commented 2 years ago

I guess in the meantime it is pointless to try adding some shim to support both MW 1.31 an 1.35. On 1.31 you need to use SRF 3.2.x and on MW 1.35 SRF 4.0.x.

For SRF 4.0.x on MW 1.35.x the eventcalendar works gain. Thus closing.