Jump to content

Extension talk:Widgets/2012

Add topic
From mediawiki.org

RESOLVED - Installation Error (Unable to move the new CDB file into place)

[edit]
As soon as I enable the extension for the first time, I get the above error. I'm running Mediawiki 1.16.5 on a Windows 2008 server. I'm guessing it's a permissions issue, but I'm not sure which folder and which user to grant permissions to. MikeDarling 19:29, 16 January 2012 (UTC)Reply
I'm not sure what CDB is - are you sure it's Widgets extension that throws the errors? Sergey Chernyshev 14:00, 17 January 2012 (UTC)Reply
I only get the error when I enable the widgets in my LocalSettings.php. Here is the full error which will hopefully shed some light.
see here MikeDarling 15:51, 18 January 2012 (UTC)Reply
Hi, perhaps setting the rights of folder /cache to 777 (= writable) will solve this problem. Cheers [[kgh]] 19:35, 18 January 2012 (UTC)Reply
That worked! Thanks... I was focusing on the compiled_templates folder. I'm running Mediawiki on a Windows 2008 R2 Server so I just had to make the folder writable using user permissions. MikeDarling 14:36, 25 January 2012 (UTC)Reply
You are welcome. This is not an "issue" isolated to NT 6.1. This also has to be done when running other OSs too. Your reply proved that it was not a Widgets issue. Cheers [[kgh]] 15:59, 25 January 2012 (UTC)Reply
777 worked for me too 73.143.142.128 (talk) 06:13, 15 February 2017 (UTC)Reply

When is the Widget namespace created?

[edit]

Hello:

I've installed the Widget extension (version 0.9.2) on MediaWiki v1.15.1.

When is the Widget namespace created?

Shouldn't I be able to see it right after unpacking the extension in the extensions directory and adding the include statement in LocalSettings.php?

I've checked at Special:AllPages and I do not see the new namespace.

Thank you for any advice you can give me.

Patricia Barden 19:27, 3 February 2012 (UTC)Reply

Yes, you should be seeing Widget namespace on Special:AllPages right after adding it to LocalSettings.php
Do you see any error messages in error log? 157.166.159.230 21:50, 3 February 2012 (UTC)Reply
Thank you for your response.
I have error reporting turned on and there are no errors showing up. Additionally, I checked the Apache error log and did not see anything there either.
So, I decided to set up a clean install of MW 1.15.1 and try out the Widgets extension there. The namespace showed up without any problem.
So, I had to figure out what was causing the namespace not to show up on the production site.
There appears to be a conflict with a custom namespace that was set up for portal pages. If I comment out the following lines in LocalSettings.php, then the Widget namespace appears:
$wgExtraNamespaces =
       array(100 => "Portal",
             101 => "Portal_Talk"
             );
$wgNamespacesWithSubpages[100] = true;
Do you have any idea how to fix this? We definitely do not want to stop using portal pages on our wiki.
Thank you for any help you can give me with this.
Patricia Barden 20:06, 6 February 2012 (UTC)Reply
Hmm, I have a similar setup on my wiki with a working widgets extension. I guess you have to use the ns constant instead of the ns number. Did you define your namespaces?
# Define namespaces
define("NS_PORTAL", 100);
define("NS_PORTAL_TALK", 101);
# Name namespaces 
$wgExtraNamespaces[NS_PORTAL] = "Portal";
$wgExtraNamespaces[NS_PORTAL_TALK] = "Portal_Talk";
# Subpages for namespaces
$wgNamespacesWithSubpages[NS_PORTAL] = true;
Cheers [[kgh]] 20:15, 6 February 2012 (UTC)Reply
That works just great! Thanks very much for your help. Patricia Barden 21:50, 6 February 2012 (UTC)Reply

Doesn't work properly

[edit]

Not updatable

[edit]

After changing a widget nothing changes on the pages that call it. It is stuck in some cache. Purging doesn't help, neither does manually cleaning compiled_templates folder.

<noinclude> section is included anyway

[edit]

Subj.

UPD: the template seems to compile correctly. Can it get stuck in the message cache? 178.72.112.255 11:39, 17 March 2012 (UTC)Reply

=== Resolved ===
Since the extension generates PHP code, any PHP cache like APC should be purged before the changes take effect. If you add code that does it (for common PHP cache engines) on widget page purge, it will be helpful. 178.72.112.255 12:04, 17 March 2012 (UTC)Reply

Using a function in a variable value

[edit]

I'm trying to create a widget for ReseacherId. The problem there is that the HTML code of a ResearcherId Badge requires a unique element ID at two places in the code (in this case the id is badgeCont983337):

<span id='badgeCont983337' style='width:126px'>
<script src='http://labs.researcherid.com/mashlets?el=badgeCont983337&mashlet=badge&showTitle=false&className=a&rid=A-7713-2008'>
</script>
</span>

I have tried to generate this id and store it in a Smarty template to be able to reuse it, but to no avail. What I tried looks like the following. I have also tried various variants.

<!--{assign var="elid" value=$id{counter}}-->
<span id=<!--{$elid|escape:'html'}--> style='width:126px'>
<script src="http://labs.researcherid.com/mashlets?el=<!--{$elid|escape:'html'}-->&mashlet=badge&showTitle=false&className=a&rid=<!--{$id|escape:'html'}-->">
</script>
</span>

The problem seems to be that the function counter is not called when the template elid is created. How can I do this? What am I doing wrong? Olenz (talk) 12:04, 23 April 2012 (UTC)Reply

"" is not a valid magic thingie for widget

[edit]

In one of my 1.16.4 MWs the extension "Widgets" (0.9.2, Version 80102) does not work: the wiki page simply renders the source text: {{#widget:Google Gadget |url=http://www.google.com/coop/api/008224879786263662799/cse/dlukhlm8-0m/gadget |title=TEST |width=320 |height=76}}. I have checked so far

  • the inclusion of the extension "Widgets" (o.k.)
  • the listing of "widgets" as a parser function on Special:Version (o.k.)
  • the permissions of the folder compiled_templates (writable for the server)
  • the existence of the namespace "Widget" and the page "Widget:Google Gadget" with content (o.k.)

The apache error-log has an entry: "" is not a valid magic thingie for "widget"

Does anybody have an idea why the parser tag is not recognized and how the problem can be solved?

Thank you very much Kappa (talk) 14:56, 27 April 2012 (UTC)Reply

Hello, I just had the same problem. The reason was that we're using a localisation cache and I had to manually update it by issueing
php maintenance/rebuildLocalisationCache.php
That fixed it. Pigpen (talk) 15:31, 11 September 2012 (UTC)Reply

Error in mediawiki 1.19

[edit]

Hi,

I install Widget extension, but when i try using it, apache launch the next error:

Warning: Smarty error: unable to read resource: "wiki:YouTube" in /var/www/mediawiki/mediawiki3/extensions/Widgets/smarty/Smarty.class.php on line 1095

My compiled_templates directory have 777 permisions:

drwxrwxrwx 3 root root 4,0K jun 14 08:32 compiled_templates

In my Wiki page for example, i try write the next code: {{#Widget:YouTube|id=znACMU0PYnY}} or {{#widget:YouTube|id=znACMU0PYnY}} and i try add ?action=purge in the url but the error persist.

Any solution about this? many thanks Hevercking (talk) 06:49, 14 June 2012 (UTC)Reply

Is there a page "Widget:YouTube" in your wiki? Remco de Boer 14:27, 14 June 2012 (UTC)Reply
Uoops! this is my mistake, the YouTube page was created but not Widget:YouTube Thanks :D Hevercking (talk) 10:29, 15 June 2012 (UTC)Reply

Widget seems "stuck". It works but doesn't display youtube videos (or other widget output)

[edit]

I have set up the widget according to instructions and have them working perfect on a mediawiki instance. I have a new server with 1.19.1 and with my YouTube widget the videos are not displayed. It's as if the extension is working but the video just doesn't display. It seems like it's a cache problem but doing a hard browser refresh doesn't do anything. help! 24.130.249.87 09:15, 15 July 2012 (UTC)Reply

Widgets from git 1.20, Smarty - please add a "how-to" make it work

[edit]

The extension page correctly states with reference to cloning from git: "Then there must be something compiled or smarty_plugin installed. Only cloning does not work!"

Please add a procedure how to achieve this. Subversion would automatically make a smarty checkout, git does not. G.Hagedorn (talk) 16:50, 24 September 2012 (UTC)Reply

Can't access to widget pages

[edit]

Hi, When i try to go to the widgets pages (reachable at the bottom of the main page) I get the web page with : Sorry! This site is experiencing technical difficulties.

Any idea ? Nicolas NALLET (talk) 15:17, 9 October 2012 (UTC)Reply

The widgets are hosted on a different site (http://www.mediawikiwidgets.org). That site appears to be down. I believe that happens from time to time to that site; you might want to try again shortly. Remco de Boer 15:38, 9 October 2012 (UTC)Reply
I had some issues with the server recently, should be fixed now - hope it'll stay up ;) Sergey Chernyshev (talk) 16:07, 9 October 2012 (UTC)Reply
Yes it works, tanks ! Nicolas NALLET (talk) 19:31, 9 October 2012 (UTC)Reply

iframe works but displays code

[edit]

Hi I have got the Iframe widget to work, but around the video it has embeded, the code is visable. any ideas? 81.109.164.2 11:03, 9 November 2012 (UTC)Reply

Hello, in HTML5 you can do something like this.

  • When you copy the code below in a widget page called Widget:Video
<includeonly><body>
<video width="<!--{$width}-->" height="<!--{$height}-->" controls="controls" muted="muted">
  <source src="<!--{$video}-->" />
<object> Your browser does not support video </object>
</video><br />
</body></includeonly>
  • Then you create a template with the code below called Template:Video
<includeonly>{{#Widget:Video|video={{filepath:{{{1|Unknown video.ogv}}}}}|width={{{2|20%}}}|height={{{3|20%}}}}}</includeonly>

Then you call the template like this:

{{Video|Test Video.ogv|50%|50%}}
{{Video|Test Video.ogv|800|}}

See if that works, for me it does. See HTML5_video for details on what format is supported in which browser. Jongfeli (talk) 14:24, 9 November 2012 (UTC)Reply