Assistance Requested: Yellow "No results" Bar

From semantic-mediawiki.org

I'm attempting to set up an eventcalendar on a personal wiki and have been spinning my wheels for a couple days. I'm a brand new mediawiki and Semantic / Semantic Result Formats user. Any and all help is very much appreciated.

I'm starting out very simple, and have created a page ("Calendar") with several event subobjects and an "ask:" with "format=eventcalendar". Instead of the expected calendar with events, I get a yellow bar with a blue triangle and the text "No results".

During my testing, and on the same page, I put another ask: with "

[[-Has subobject::{{FULLPAGENAME}}]]

", This does display all the event subobjects.

What have I done wrong that the eventcalendar ask: doesn't work, but the FULLPAGENAME ask: does? Any ideas, thoughts, or recriminations welcome.

Syntax below...

Versions from Special:Version:


  • MediaWiki: 1.31.1
  • PHP: 7.0.33-0+deb9u1 (apache2handler)
  • MariaDB: 10.1.37-MariaDB-0+deb9u1
  • Semantic MediaWiki: 3.0.0
  • Semantic Result Formats: 3.0.0

I don't think I'm missing anything, but maybe?

Here's the source of the "Calendar" page:


{{#subobject:
 |Has event = Thanksgiving Eve with Family
 |Has event start = 26 Nov 2018 06:00
 |Has event end = 26 Nov 2018 20:00
 |Has event description = Good times before Thanksgiving
}}
{{#subobject:
 |Has event = Thanksgiving with Family
 |Has event start = 27 Nov 2018 06:00
 |Has event end = 27 Nov 2018 20:00
 |Has event description = Good times at Thanksgiving
}}
{{#subobject:
 |Has event = Christmas Eve with Family
 |Has event start = 24 Dec 2018 06:00
 |Has event end = 24 Dec 2018 20:00
 |Has event description = Good times before Christmas
}}
{{#subobject:
 |Has event = Christmas with Family
 |Has event start = 25 Dec 2018 06:00
 |Has event end = 25 Dec 2018 20:00
 |Has event description = Good times at Christmas
}}
{{#subobject:
 |Has event = New Year's Eve with Family
 |Has event start = 31 Dec 2018 20:00
 |Has event end = 01 Jan 2019 00:00
 |Has event description = Good times on New Year's Eve
}}
{{#ask:[[Has event::+]][[Has event start::+]]
 |?Has event=title
 |?Has event start
 |?Has event end
 |?Has event description=description
 |format=eventcalendar
 |start=current
 |defaultview=month
 |limit=50
 |link=subject
 |legend=top
 |firstday=Monday
 |dayview=yes
 |headers=show
 |theme=vector
}}
{{#ask:[[-Has subobject::{{FULLPAGENAME}}]]
 |?Has event=title
 |?Has event start
 |?Has event end
 |?Has event description=description
}}

Page Results

Here's query and it's results (provided by "format=debug" in the eventcalendar "ask:"):


SELECT DISTINCT
  t0.smw_id AS id,
  t0.smw_title AS t,
  t0.smw_namespace AS ns,
  t0.smw_iw AS iw,
  t0.smw_subobject AS so,
  t0.smw_sortkey AS sortkey, t0.smw_sort 
FROM
  `wiki_smw_object_ids` AS t0 
INNER JOIN
  (`wiki_smw_di_wikipage` AS t2  
INNER JOIN
  `wiki_smw_di_wikipage` AS t5 ON t2.s_id=t5.s_id) ON t0.smw_id=t2.s_id 
WHERE
  (t2.p_id='575' 
   AND (t5.p_id='579')
  ) 
  AND t0.smw_iw!=':smw' 
  AND t0.smw_iw!=':smw-delete' 
  AND t0.smw_iw!=':smw-redi' 
ORDER BY
  t0.smw_sort ASC    
LIMIT
  505 
OFFSET
  0
 
+-----+-----------+----+----+-----------------------------------+--------------------------------------------+--------------------------------------------+
| id  | t         | ns | iw | so                                | sortkey                                    | smw_sort                                   |
+-----+-----------+----+----+-----------------------------------+--------------------------------------------+--------------------------------------------+
| 743 | Calendar  |  0 |    | _321fe513e5f3995e02eda27a1997a16d | Calendar# 321fe513e5f3995e02eda27a1997a16d | Calendar# 321fe513e5f3995e02eda27a1997a16d |
| 744 | Calendar  |  0 |    | _4f2367d5bb752e4ead158b9fddc24962 | Calendar# 4f2367d5bb752e4ead158b9fddc24962 | Calendar# 4f2367d5bb752e4ead158b9fddc24962 |
| 745 | Calendar  |  0 |    | _bcbb94b2d13ce4fe5eb9d34ed8a19feb | Calendar# bcbb94b2d13ce4fe5eb9d34ed8a19feb | Calendar# bcbb94b2d13ce4fe5eb9d34ed8a19feb |
| 741 | Calendar  |  0 |    | _bfe0e2d5aa3b97d409c1872b2dc84076 | Calendar# bfe0e2d5aa3b97d409c1872b2dc84076 | Calendar# bfe0e2d5aa3b97d409c1872b2dc84076 |
| 742 | Calendar  |  0 |    | _f628fd6b030235d58c51d11b282938c7 | Calendar# f628fd6b030235d58c51d11b282938c7 | Calendar# f628fd6b030235d58c51d11b282938c7 |
+-----+-----------+----+----+-----------------------------------+--------------------------------------------+--------------------------------------------+

21:15, 19 December 2018

According to the image posted it looks like you did not assign any datatype to the respective properties most importantly to "Has event start" and "Has event end". You can also use the sandbox to do live testing.

10:14, 20 December 2018

Thanks for the quick reply! I've seen that mentioned elsewhere and for the life of me cannot find how to explicitly define data types. I've spent a few days googling for it and came up dry. I'll look into the sandbox, but if you would please elaborate a little and show me what I'm missing in my subobject defintions, I would greatly appreciate it.

15:15, 20 December 2018

I added the link to the help page on setting datatypes to properties to the datatype page for better results. Thanks for noting that it was obviously not the easiest page to find.

18:30, 20 December 2018
 

I created a test page out on sandbox.semantic-mediawiki.org and using the exact same definitions, it never gets past the three loading dots there. I stripped down the eventcalendar call to the bare minimum, and it still stays at the three loading dots. What I've read leads me to believe that this is a server-side issue. It may be a server side issue on my site as well, but I'm not certain how to debug it yet, if so.

2018-12-20 09 45 50-DvicciCalendarTest - Semantic MediaWiki - Sandbox.png

Thanks again!

16:53, 20 December 2018

The test on sandbox failed because of the experimental Content Security Policy setting. It is now working as expected after removing the policy setting.

18:29, 20 December 2018

Yup. That did the trick, and the code that does not work on my own server works just fine in the Sandbox - even without explicitly defining any date datatypes (maybe that's done behind the scenes somewhere?). Thanks for pointing out the sandbox for me, that at least gives me a place to start! I'll pour through the versions and requirements. In the end, it may simply be a matter of ripping and reinstalling SMW and SRF.

I'm still struggling a little with the syntax to define a date datatype, but I'll play around with it in the sandbox until I figure that out.

Thanks again!

18:56, 20 December 2018

On sandbox the respective properties were already set by another person. So editing the property page as described in the link I provided did not work for you?

22:23, 20 December 2018

GOT IT! It took a while, but I finally figured out that I needed to create new Property:Has_event_start and Property:Has_event_end pages.

Thanks for your patience!

01:57, 21 December 2018

No worries. Great to read that it is working now. Probably to easy. Happens to me sometimes, too. :)

18:29, 21 December 2018