Jump to content

Topic on Extension talk:PhpTags Widgets

Slick Widget seems not to work with Extension:Header Footer

7
Christharp (talkcontribs)

HI

I have my wiki set up to only allow phptags inside the template namespace, like so:

<pre>$wgPhpTagsNamespaces = array( NS_TEMPLATE => true);</pre>

Transinclusion of templates works to every namespace. But when I tried to add a template to the header defined in the Extension:HeaderFooter the template with phptags template works fine directly on Mediawiki page, but fails on every page that the header is included on. Example:

I edit MediaWiki:Hf-nsheader- per the instructions in the Extension:HeaderFooter and add the following template:Phptags Icon Search Bar. It looks and works great on the Mediawiki page, but when I go to any other page I see all icons arranged vertically down and the slick slide is no longer working.

Any thoughts on this? Thanks again @Pastakhov for a wonderful and great extension.

Christharp (talkcontribs)

So to see if it's not some strange double transinclusion thing: phptags in template --> template in Mediawiki header page ---> Mediawiki header in every Main Space page I changed my LocalSettings to:

$wgPhpTagsNamespaces = array( NS_TEMPLATE => true, NS_MEDIAWIKI => true );

And now I get this error:

PhpTags Fatal error: Extension PhpTags is disabled for the namespace "". in Command line code on line 

Which suggests to me that the header added is not treated as a normal transinclusion since the error message is suggesting that phptags is not enabled in the Main Space. Just to check I also just added NS_MAIN to the array allowing phptags and the Fatal error message disappeared, but than Slick still doesn't work (however phptags does work -- I tested with:

<phptag>

$foo = 'hello world';
echo ucfirst( $foo . "!!!\n" );
</phptag>

Once again thanks for a great extension @pastakhov

Pastakhov (talkcontribs)

Hi @Christharp,

If I'm not mistaken, Extension:HeaderFooter just copy wikitext from MediaWiki:Hf-nsheader- to every pages before parsing.

Thus you should enable PhpTags for namespaces where you use Extension:HeaderFooter with phptags.

In your case, it is NS_MAIN instead of NS_MEDIAWIKI and you should write to LocalSettings:

$wgPhpTagsNamespaces = array( NS_TEMPLATE => true, NS_MAIN => true );

You are welcome :-) I'm glad that you happy with my extensions :-)

Christharp (talkcontribs)

Hi @Pastakhov

Sorry I don't think I was clear ; I also enabled php tags in the Main Space. The Slick Widget still fails to work, except for on the actual Mediawiki header page. Every page the header is included into the Widget fails; however php tags works. Any thoughts? I'll check the JavaScript in the console tomorrow (my time PST) and report back what it says. Thanks again

Pastakhov (talkcontribs)

Is it public wiki?

Christharp (talkcontribs)

Hi @Pastakhov

Sorry for the delay in answering. It's not a publc wiki, but I could give you access. Currently I have the wiki on the amazon cloud and I'm building it out. It changes the ip every time I have it live. So I could leave it live and email you the ip, user name, and password.

Additionally I just checked and found the same problem happens if I post the Slick Widget in the Mediawiki:Sitenotice. That you should be able to check on your own wiki foxway. However a basic phptags "Hello World" works fine so it's clearly something with the widget slick. I also just checked it with all the widgets from Widgets and Vega will not work, but font awesome does. All the best to you. Thank again.

Pastakhov (talkcontribs)

I'll try to do same on my wiki and debug this week.

Widgets use JS and CSS. And they must be added in certain time. Widgets work with MW Parser butExtension:HeaderFooter and Mediawiki:Sitenotice work with a Skin.

Maybe problem is here.

Reply to "Slick Widget seems not to work with Extension:Header Footer"