Extension talk:Widgets

Jump to navigation Jump to search

About this board

Old messages are archived.

I get "Error in widget Algoviewer: unable to write file " for not logged in users after upgrading MediaWiki and Widgets extension.

Apaokin (talkcontribs)

Mediawiki version: 1.34

Widgets version: 1.4.0 (c1b2290)

I chowned and chmoded compiled_templates directory to be accessible by server. When I log in, embedded page is displayed correctly. When I am not logged in, I get "Error in widget Algoviewer: unable to write file /var/www/algowiki/ru/extensions/Widgets/compiled_templates/wrt5e87ebae557c09_65306770 "/

Error is here: https://algowiki-project.org/ru/Разложение_Холецкого_(метод_квадратного_корня)

Thank you in advance!

Kghbln (talkcontribs)

Did you install correctly? See the new instructions

Widget:Algoviewer Error from line 24 of /../extensions/Widgets/WidgetRenderer.php: Class 'Smarty' not found
Apaokin (talkcontribs)

I installed via github without composer. Now I installed as you suggested, but the same problem appeared.

Kghbln (talkcontribs)

I still think it is an installation error. If you have done it correctly it should work I believe. What is in the smarty subdirectory?

Apaokin (talkcontribs)

There is no smarty subdirectory. I have one file in smarty_plugins subdirectory called modifier.validate.php. Also I have extensions/smarty directory.

Kghbln (talkcontribs)

Glad you found the issue.

Apaokin (talkcontribs)

Thank you very much. Seems like invalid result was cached and I thought that reinstallation hadn't helped.

Summary by Kghbln

Documentation was updated and improved.

Jonathan3 (talkcontribs)

I wonder if "1.30+" is correct. I'm still using MW 1.31 (I do intend to upgrade soon). I used git to change Widgets from REL1_31 to master (because of the security warning) and it broke my site. Instead of looking into it, I've just gone back to REL1_31, but I just thought I'd note it here. Jonathan3 (talk) 19:42, 29 March 2020 (UTC)

Kghbln (talkcontribs)

You are right. I should say 1.31+ since everything earlier is no longer supported due to the security issue. Theoretically you could still use the "latest" 1.3.0 release for earlier versions but this will be hazardous. REL1_31 works fine with MW 1.31.x and was supplied with the security fix.

Kghbln (talkcontribs)

Ok, the info on the page was not really good. Just updated it to make it clear. Thanks for asking!

AmazingTrans (talkcontribs)

I have accidentally install widget on my mediawiki that is older version, and now i am getting the following error in the mediawiki.

"This version of the Widgets extension requires MediaWiki 1.30+"

How can i uninstall this extension to get it working again?

Kghbln (talkcontribs)

Just remove require_once "$IP/extensions/Widgets/Widgets.php"; from your "LocalSettings.php" file or install a version of Widgets which is compatible with your wiki's version. What is your wiki's version?

Reply to "Uninstall widgets extension"
Acnetj (talkcontribs)

With the older version 1.31, I was able to use JQuery from the ResourceLoader for my widgets with "(window.RLQ=window.RLQ||[]).push(".

This is not possible with version 1.34. I believe that it is because MW won't start the ResourceLoader until these widgets were ran. Sometimes those widgets work (if somehow these codes ran late) but normally won't.

I am using another widget to load JQuery at the start of the widgets as an interim solution for now, but it is supposed to be unnecessary.

One of my widgets make a XHR call every minute. The first call was initiated by that JQuery that I loaded, but subsequent calls were initiated by ResourceLoader.


Reply to "JQuery access"

New release?

Summary by Kghbln

This extension no longer gets tagged. Use release branches instead.

Planetenxin (talkcontribs)

Any chance to get a new release tagged in near future?

Kghbln (talkcontribs)

Dunno, probably not. I switched to using REL branches starting with 1.31

Reply to "New release?" (talkcontribs)

There's no clear tutorial linked about how to create a widget?

Reply to "Our own widgets"
Evolution and evolvability (talkcontribs)

Copied from Topic:V7zkqg3r76oc4omn


What would be the necessary steps to enable this code to embed in a page:

<span class="__dimensions_badge_embed__" data-id="pub.1067741279" data-hide-zero-citations="true" data-style="small_circle"></span><script async src="&lt;nowiki&gt;https://badge.dimensions.ai/badge.js&lt;/nowiki&gt;" charset="utf-8"></script>

See https://badge.dimensions.ai/?identifier=pub.1067741279#build for info

It would be highly useful to be able to get them working on WikiJournal articles.

Reply to "Embedding Dimensions badges"

How to track pages using a widget?

Peacedev (talkcontribs)

How do I track pages using a widget like widget:twitter? Is there anyway to track? If not, then how to insert additional wiki category or what links here inside the widget source code? Thanks.

Kghbln (talkcontribs)

Embed the widgets only via a template like it is done for the Audio template and add a category to this template. I you do not want to see the category on every page use the hiddencat feature to hide it from public view.

Peacedev (talkcontribs)

Kghbln Thanks a lot for the answer and the hiddencat suggestion, appreciated :)

Reply to "How to track pages using a widget?"

Git branch REL1_27 still points to 1.2.1

YOUR1 (talkcontribs)

The REL1_27 (and maby others) branch is pointing to version 1.2.1 instead of the newest version (1.3.0), can you please update this?

MarkAHershberger (talkcontribs)

1.27 is EOL. You should upgrade to the next LTS.

YOUR1 (talkcontribs)

Right. But some people can't (extension/server dependencies, ect). And the repo must be up to date, otherwise the REL_ branches must be removed since they have no value.

Reply to "Git branch REL1_27 still points to 1.2.1"

How do I create a page in the "widget" namespace?

Sturmey99 (talkcontribs)

Everything I've read says I have to create a page in the widget namespace, but NOTHING says how I'm supposed to do this. I'm new to using MediaWiki, so I don't know how this is supposed to work, there doesn't seem to be any information about the basics.

MarkAHershberger (talkcontribs)
Kghbln (talkcontribs)
Sturmey99 (talkcontribs)

Kghbln, thanks that helps.

Do you know if I still have to manually install 'smarty' if I used git to install? It doesn't look like it's there, but the git install instructions don't mention manually installing smarty.

Kghbln (talkcontribs)
Sturmey99 (talkcontribs)

well I followed those instructions to the letter, and it doesn't include the smarty folder but it does include calls to it. After installing smarty manually to the Widgets folder, the errors in /var/log/apache2/error.log changed, so it's obvious that the smarty folder is needed.

I don't think this extension is ready for production.

MarkAHershberger (talkcontribs)

Since you're installing from git, did you run composer update --no-dev inside the widgets folder?

Sturmey99 (talkcontribs)

well, I tried it again, and got a different result. looks like it did managed to update something, but I'm still not able to get the Iframe widget to function. At least it's not crashing when I call the widget now.

further testing shows it working with a youtube widget, but since it's the Iframe I need, not sure what I need to do yet.

Sturmey99 (talkcontribs)

ok, so I fought with it some more, and it seems to be working.

I can't recommend this extension. The installation and config is not well documented and it is far more difficult than the other extensions that only require the folder to be added and a line inserted into LocalSettings.php

Realistically I understand why so many organizations I've worked with are dropping mediawiki for other products. while extensions are great, the lack of a click and go installation is beyond what most people are willing to do to install.

Reply to "How do I create a page in the "widget" namespace?"