Extension talk:Widgets

Jump to navigation Jump to search

About this board

Old messages are archived.

Captcha on mediawikiwidgets.org not working

2 (talkcontribs)

Having issues creating a new account on mediawikiwidgets.org because the time calculation captcha says my answers are wrong. I have tried every combination of syntax I can think of. Any ideas how to get it to work?

Kghbln (talkcontribs)

Try e.g. 10:22. Probably you added the brackets [] which should not be done.

Reply to "Captcha on mediawikiwidgets.org not working"
2604:2D80:E507:3000:A5BA:527E:A9AE:8B43 (talkcontribs)

After trying to up any widget in i get "forbidden". I changed the dir to 777 and still no dice. Specifically iframe and form code gets me the forbidden.

Kghbln (talkcontribs)

Note that a lot of websites nowadays disallow iframing. This is probably where your "forbidden" comes from. Apart from that, I do not know.

Reply to "Forbidden?"

Error: Class 'Smarty' not found

4 (talkcontribs)

I got this error after updating my wiki recently. I tried to follow the steps under Installation from a .zip file, but I got a little confused by the wording.

So I installed the newest Widgest extension and then created a folder named 'smarty" (extensions/Widgets/smarty). Then I downloaded the newest Version of Smarty, unzipped it, and put the 'libs' folder in extensions/Widgets/smarty/libs.

But it didn't change anything, I still got the error message. What did I do wrong?

MGChecker (talkcontribs)

Please try installing the extension via Git, since the method via unzipping Smarty manually is outdated.

If you can not use git or composer directly on your server, you can run the respective command locally and afterwards upload the whole folder.

Gesslar (talkcontribs)

I am having the same error, but when I attempt to import from another wiki.

installed via git from github wikimedia/mediawiki-extensions-Widgets

I get the following:

[fae15bd5e378e271a99d65f5] /index.php?title=Special:Import&action=submit Error from line 24 of /frogdice/servers/com.thresholdrpg.wiki/extensions/mediawiki-extensions-Widgets/WidgetRenderer.php: Class 'Smarty' not found


MGChecker (talkcontribs)

As stated in the documentation at Extension:Widgets#Download, you need to run Composer afterwards. This can also be done at your local machine before syncing with the server.

Reply to "Error: Class 'Smarty' not found"

Unable to load template 'wiki:Iframe'

JanTappenbeck (talkcontribs)

hi !

i want to use in lokal wiki the Widget#Iframe.

The folder ..\extensions\Widgets\compiled_templates has full permisson to IIS_IUSRS and the .htaccess file, include this folder (source: deny from all) i rename.

the template .../index.php?title=Vorlage:Wiki:Iframe is create with

<includeonly><iframe src="<!--{$url|validate:url}-->" style="border: <!--{$border|escape:html|default:0}-->" width="<!--{$width|escape:html|default:400}-->" height="<!--{$height|escape:html|default:300}-->"></iframe></includeonly>

then i copy the example into side - but now i get the misstake:

Unable to load template 'wiki:Iframe'

did someone could help?

regards Jan

os Windows Server 2016
mediawiki 1.36.1
php php-7.4.20-nts-Win32-vc15-x64
mysql mysql-5.7.12-winx64
Reply to "Unable to load template 'wiki:Iframe'" (talkcontribs)

I cannot figure out this write error. It randomly started doing this recently, and the widget I'm using was working as of last week.

I'm receiving the following error:

Error in widget iframe unable to write file

Widgets slash compiled_templates slash wrt609346e2956705_70999129 (since I was getting a damn spam error)

The directory is currently 775 permissions. I even reinstalled it from the base git and did the instructions needed for my version, 1.32. Any help would be appreicated.

MMDUser (talkcontribs)

I'm receiving a similar error:

Unable to write file D:\home\site\wwwroot\extensions\Widgets\compiled_templates\d3288ecdd0052c9fea052081eede316e4be8e7d1_0.wiki.LearningPathMMD.php

How do I restore this page?

Reply to "Write error"

Google Presentation doesn't show

AdSvS (talkcontribs)

Hi, when I use the Google Presentation widget I only get a white plane in the place where the presentation should be. It doesn't say that the document doesn't exist (which it does when I change the docid) so apparently that is not the problem. But what is, I don't know! (talkcontribs)

I have the same problem. It appears to be something wrong with new presentations. Old presentations with short ids can be displayed. (talkcontribs) (talkcontribs)

@AdSvS Hi, was there ever a solution or alternative to displaying presentations? thanks

Reply to "Google Presentation doesn't show"
Cavila (talkcontribs)

After failing to get this extension to work using manual installation, I managed to do it using composer. I wondered why the former approach didn't work for me.

Previously we had to put the libs folder inside the smarty folder, but I now see, after using composer, that the contents of the libs folder are inside the smarty folder. Did something change? Should the docs for manual installation be updated?

Kghbln (talkcontribs)

Probably yes. I have not installed this extension manually in many years so I do not really know how this is done properly. I will add a note saying that the instructions may be out of date.

2601:18D:4981:5BF0:250A:1C13:AFB6:9DEB (talkcontribs)

Manual installation also failed for me and composer installation succeeded.

I had to update Composer to v2, though. MediaWiki-specific instructions here: Composer.

Reply to "Update documentation?"

Zip method Fatal error: Uncaught Error: Class 'Smarty' not found in WidgetRenderer.php:24

Summary by TiltedCerebellum

Again disabled. https://phabricator.wikimedia.org/T276021

Also MW is not compatible with Composer 2 yet: https://phabricator.wikimedia.org/T266417

TiltedCerebellum (talkcontribs)

Followed the directions for installing via Zip method, after activating receive:

Fatal error: Uncaught Error: Class 'Smarty' not found in /home/username/sitename.com/extensions/Widgets/WidgetRenderer.php:24

Is there a chance these instructions need to be updated/changed?

No composer access on the host this is installed on

MediaWiki 1.35.0
PHP 7.4.12 (cgi-fcgi)
MySQL 5.7.28-log
ICU 57.1
Lua 5.1.5
MarkAHershberger (talkcontribs)
TiltedCerebellum (talkcontribs)

Thanks, I tried a few different methods for smarty, and those didn't work with provided zip. Ended up doing the composer install for the friend's host account this was on and installing from git. With that we ended up with two other errors that suggest Widgets is not fully compatible with 1.35, ended up abandoning Widgets.




We weren't using it for that much, so we're just removing the stuff we did use it for until it's updated and whatever conflicts are sorted.

Since upgrading fatal error Smarty_Internal_TemplateBase

Summary by TiltedCerebellum

Disabled extension

TiltedCerebellum (talkcontribs)

PHP Fatal error:  Class 'Smarty_Internal_TemplateBase' not found in /site/public/extensions/Widgets/vendor/smarty/smarty/libs/Smarty.class.php

Product Version
MediaWiki 1.33.0 (62dc614)
PHP 7.2.19 (cgi-fcgi)
MySQL 5.7.28-log
ICU 52.1

Kghbln (talkcontribs)

Try to re-install according to the new instuctions. They changed in newer versions. Probably smarty was not installed properly.

TiltedCerebellum (talkcontribs)

I did that, didn't help

Kghbln (talkcontribs)

Just to make sure: You used Git and Composer?

TiltedCerebellum (talkcontribs)

Yep, this is still showing in my php error log intermittently

Kghbln (talkcontribs)

Admittedly I have no clue. I have this extension working both on a MW 1.33 and a MW 1.34 with no issues at all.

Lakelimbo (talkcontribs)


After another exploit with the extension (December 2020), wouldn't be better to classify the extension under "Unstable extensions"? Miraheze and probably other wikifarms and some independent wikis removed the extension because of this.

Kghbln (talkcontribs)

I personally do not think so. There are more extensions with frequents exploits around. In the end this is a matter of updating what you have in due time.

MGChecker (talkcontribs)

I agree that the last two exploits were quite bad and obvious as well. However, they were fixed in no time – this extension is indeed actively maintained.

This is why I think we should warn about the fact that this very type of extension is naturally susceptible to security flaws with respect to unsanitized input etc., but still designate it as stable.

In the long run, there should probably some kind of tutorial about how to use this extension securely, as well as a security review.

MGChecker (talkcontribs)

I just want to point out, that ShoutWiki und Fandom still have these extension deployed.

Pppery (talkcontribs)

Although Miraheze undeployed the extension as a reaction to the security issues.

MGChecker (talkcontribs)

Sure, and I think this is no too far-fetched decision and understandable. But recommending an undeployment everywhere else does not really follow as a consequence thereof in my opinion.

Reply to "Stability of the extension"