Topic on Extension talk:Widgets

Summary by MarkAHershberger

Trial and error that could have been avoided with better documentation.

199.104.151.131 (talkcontribs)

I have installed this extension on MediaWiki 1.33.

I followed the instructions on Extension:Widgets, created a page for YouTube and Google Calendar widgets under namespace Widget. Are these just supposed to be empty pages? That's what I made.


I tried making a Google Calender and YouTube widget. I get no errors, but the widgets are not displayed. I can see in extensions/Widgets/compiled_templates, that when I made my first Google Calendar, then YouTube templates new php files are created in there.


How do I debug this?

199.104.151.131 (talkcontribs)

Nevermind I eventually figured it out with more effort than should take. The documentation of this extension needs to be clarified badly.

1) In the installation section, there is no mention of the download available in the sidebar of the extension page! Special:ExtensionDistributor/Widgets. This is worth mentioning. The installation instructions for this method should note that once it is copied into the extensions directory, it is ready to go and nothing else needs be done except to put the proper line into LocalSettings.php to ensure it is available to the wiki. Maybe you still need to change the directory permissions of compiled_templates. I did that anyway before I did anything else.


2) The Usage section says: "To add a widget to your MediaWiki installation, just create a page in the Widget: namespace and then use the {{#widget:...}} parser function to include it in the pages of the wiki." There is more to it that that! These instructions omit the fact that you must go to mediawikiwidgets.org and copy code into that new page you create on your wiki. For example to enable Google Calendar, you must copy the contents of the code from the Google Calendar description page on mediawidgets.org into your new page under Widget:Google_Calendar. (I can't post the link because any links on this wiki are automatically marked as spam!!)


3) Finally there is a very important part in "Refreshing a widget page" . You must indeed purge your page to see it otherwise it will continue to fail to render on your wiki under you do this.