Extension talk:Widgets

Jump to navigation Jump to search

About this board

Old messages are archived.


Evolution and evolvability (talkcontribs)

Copied from Topic:V7zkqg3r76oc4omn

Hello,

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"
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

3
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?

9
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?"
HarryArends (talkcontribs)

I just installed Widgets at my wiki (1.30) and created a widget as described in the manual. so far so good.

But when i save the widget i get a error like this:

Fatal error: Call to undefined method Smarty::addPluginsDir() in /home/harry-arends.nl/public_html/mat54/extensions/Widgets/WidgetRenderer.php on line 30

As I am not a programmer this error says nothing to me so whats going wrong??

Harry & Mareike

Deku-shrub (talkcontribs)

I'm having this problem too. @Jomegat reported the same issue at Topic:U4k1icff0yfhpayl but I wasn't able to reproduce his ' I installed using the git method' workaround so far.

Deku-shrub (talkcontribs)

@Jomegatconfirmed that he got things to work via the Git install method. I got this working too when remembered to not only git clone, but git submodule init and git submodule update as well.

I compared the files installed via Git release from gerrit.wikimedia.org seem are different both in the Widget code and even more so with the latest Smarty release. I'm not sure where to raise this issue, but adding a warning to the zip download pointing here is the best I think I can do for future generations

Gyohza (talkcontribs)

I was able to successfully solve this issue by not installing the version tagged as Smarty's latest release (v2.6.31 as of 2018-03-08). Instead, I installed one earlier version (Release 3.1.31, dated from 2016-12-14, when there weren't complaints of such error), though I haven't figured out why the heck v2 is tagged as being "later" than v3 yet (maybe they're parallel versions and support for v2 is still going on...).

Anyways, just in order to avoid any further issues like this, I will edit @Deku-shrub's warning on Extension:Widgets. I am not going to fully edit the tutorial because they might fix this in the future, so they might as well just remove the warning.

Sturmey99 (talkcontribs)

The install instructions do not mention that I need to install Smarty separately. When I look at the apache error log, I see calls to ~/extensions/Widgets/smarty/libs/Smarty.class.php

I do not have a folder in extensions/Widgets for 'smarty' I followed the instructions, cloned with git, I should have the latest and best code, but it appears to be missing a large chunk of what it needs.

Does someone have correct instructions for this extension?

Reply to "addPluginsDir()"
Summary by Kghbln

Access was granted. The wiki is active.

Danbledore (talkcontribs)

It seems really weird that the Widget catalog requires users to be manually verified, but I put in a request a while back and haven't heard anything. In the worst case, is there a web archives backup or mirror of the widgets on the site?

Danbledore (talkcontribs)

@Kghbln Is the site still being moderated?

MGChecker (talkcontribs)

Your request has been approved.

@Kghbln: Am I allowed to moderate these requests as well? How are you notified about them?

Kghbln (talkcontribs)

Yes the site is still being moderated. However, I only confirm requests with a confirmed e-mail which in your case was done on February 11, 2019.

Apart from that I suggest to actually take the time and read why this wiki requesting verification. It's on main page, the font size is 150% and in red and orange. I am absolutely clueless as for what I can do that people read this.

Kghbln (talkcontribs)

@MGChecker:

> Am I allowed to moderate these requests as well?

Currently not. If you would like to ...

> How are you notified about them?

I only get notifications when the e-mail was confirmed.

MGChecker (talkcontribs)

> Currently not. If you would like to ...

I am able to, that's why I'm asking, if there are any rules when I could react to requests like this one.

Kghbln (talkcontribs)

Actually you are able to confirm accounts. I already promoted you to being a crat. :)

Nicole Sharp (talkcontribs)

mediawikiwidgets.org is a dead link. archive.org only gives the pagenotice of "Regrettably this website was switched to allow only logged-in users to see the widget examples as well as the respective code due to privacy concerns." so all code examples seem to be gone, despite the website being listed as under a Creative Commons Attribution-Share Alike 3.0 Unported License. It would be a lot better to host the widget examples here on mediawiki.org or on another publicly-accessible copylefted site like github.com so that it is easier for users to copy and modify widgets for their wikis. Nicole Sharp (talk) 22:29, 8 June 2019 (UTC)

Kghbln (talkcontribs)

Thanks for reporting the website being down. There is indeed an issue with the server. I am working on it. I am sorry for the inconvenience.

Kghbln (talkcontribs)

In the future, I'd appreciate I you could open a new thread instead of reopening an unrelated one. Thanks a bunch.

Kghbln (talkcontribs)

The site is back on-line again. The filesystem was read-only and created some intense pain to bring to bring it back. The site being done for a day or two does not mean that it is dead. Anyways I will add some monitoring that will help me detect issues early on.

Widget not working after upgrade from MW 1.19 to 1.31

2
Steevithak (talkcontribs)

After moving my MediaWiki to a new server and, in the process, upgrading from 1.19LTS to 1.31LTS, I find that all my widgets have stopped working. I'm using Widgets 1.3.0 (72d1e24). The compiled_templates directory exists, the full path to the directory is correct, the directory is writable by user, group, and other. I have also checked the selinux bool variables: httpd_unified is on, httpd_sys_script_anon_write is on, httpd_anon_write is on. Apache is able to write other files with no problem, only Widgets reports errors writing files. There are no PHP errors in the Apache error_log and no selinux errors logged. Everything else on my MediaWiki site including all other extensions seems fine. There's plenty of free disk space. I'm at a loss for what else to check. Any ideas? Is there some special step required when upgrading to get Widgets working again? Is there some way to get a more specific error from the Widgets extension (like WHY is it unable to write the files)?

The errors are in this format and appear only in the web page where the widget is used, not in the apache error log:

Error in widget xzy: unable to write file /var/www/mysite.com/html/extensions/Widgets/compiled_templates/wrt5c4c002b44f900_48401898



Steevithak (talkcontribs)

Update: found it! Not permissions but file context error. Once I did a restorecon -R Widgets, all my widgets started working again.

Twitter widget not working anymore since new Twitter method to share feed

4
Summary by DSquirrelGM

Widget code updated on MediaWikiWidgets.

Albert Ke (talkcontribs)

Hi all,

I just want to make people aware that the twitter feed widget is not working anymore since September 10th. I have marked them as such in the list (crossed text through). They don't work anymore as twitter changed there method of how you can tab into your twitter feed and removed the old option to link to your twitter feed

MGChecker (talkcontribs)
Kelson (talkcontribs)

Here is how mine works now, `id` is the Twitter user at:

* https://wiki.kiwix.org/wiki/Main_Page

* https://wiki.kiwix.org/wiki/Widget:Twitter

DSquirrelGM (talkcontribs)
Summary by Kghbln

The account was just created.

Meefs (talkcontribs)
MarkAHershberger (talkcontribs)

Hopefully, pinging @Kghbln here will help you get the account approved.

Meefs (talkcontribs)

Just got an account creation message. Not sure if coincidence or divine intervention. Thanks either way! :)

Kghbln (talkcontribs)

@Meefs: Usually I do this within a day provided that the e-mail was confirmed. I just saw that you confirmed yours in the meantime so I created the account for you. Sorry for the delay but I must have overlooked the request status. Sadly there are currently 17 requests pending, mostly from Gmail users. :(

Cavila (talkcontribs)
Reply to "No internal comments?"