Extension talk:MultiBoilerplate/Archive 1

Bugs:
I am in Catchable fatal error: Argument 1 passed to Article::__construct must be an instance of Title, null given, called in /var/www/mediawiki-1.12.0/extensions/MultiBoilerplate/MultiBoilerplate.php on line 110 and defined in /var/www/mediawiki-1.12.0/includes/Article.php on line 44
 * 2.04.2008
 * on MediaWiki 1.12.0 I got this when hitting load:

When trying to load "MyBoilerplate in an article it returns to Editing Main Page. If I save the page the main page will be overwritten I'm currently using: Aroekene
 * MediaWiki 1.11.0 EN version


 * Thanks for noticing this - I added this extension then made a major change because there was a major flaw but failed to update this page. I've updated the page to the latest version of the extension. MinuteElectron 21:58, 7 January 2008 (UTC)

Needed to Change $things = wfMsg( 'MultiBoilerplate' );
On MediaWiki 1.12, I had to change:

$things = wfMsg( 'multiboilerplate' ) -> $things = wfMsg( 'MultiBoilerplate' )

... to get the fallback to the MediaWiki:MultiBoilerplate code to work


 * It is "MediaWiki:Multiboilerplate", not "MediaWiki:MultiBoilerplate". MinuteElectron 16:39, 23 March 2009 (UTC)

Automatically use boilerplate if page title matches regular expression
Would it be possible to alter the extension so that it did this? Thanks, Jonathan3 20:02, 13 December 2008 (UTC)

noinclude and includeonly don't work in 1.14
Unfortunately I found the tags noinclude resp includeonly are not working in 1.14. Instead the Multiboilerplate extension inserts the complete content of the template (including the part in between the noinclude tags as well as the tags noinclude and includeonly themselves) into the new page. Why is this? 144.85.162.123 22:07, 22 March 2009 (UTC)


 * did you ever get anywhere with this? i am seeing this in 1.15 as well. 67.97.209.36 19:27, 18 September 2009 (UTC)


 * Replace lines 122 & 123 in MultiBoilerplate.php with:


 * Things shall work better. — Alvinos 17:33, 5 March 2010 (UTC)

internationalization bug
Hi.

I found a bug in your internationalization part (MW 1.14).

The bug behaves so:

I create the MediaWiki:Multiboilerplate page with the boiler plates (using the english language as default). After that everything works properly for english translation, but if I use another language setting on any user, I do not get the boiler plates. Below is the fix for this.

The bug is on line 78 in MultiBoilerplate.php

Before:

$things = wfMsg( 'multiboilerplate' );

After:

$things = wfMsgForContent( 'multiboilerplate' );

Regards,

SG

213.176.148.242 13:40, 8 April 2009 (UTC)


 * Applied to trunk. Thanks! RobertL 16:38, 8 April 2009 (UTC)

FCKEditor Integration
Hi,

is there any possibility to get this very useful extension working together with the FCKEditor (WYSIWYG) extension? At present it loads the raw wiki code in the FCKEditor textarea. The PreLoader extension is working with FCKEditor (but not usefull in my case).

Also it could be usefull, if the existing wiki code will not be deleted if the boilerplate is loaded in an existing page. For example the boilerplate could be inserted at the end of the existing wiki code.

Thanks a lot! --Filburt 12:42, 5 May 2009 (UTC)

I made some changes, and it seems to be a partial success: If you change in MultiBoilerplate.php 'boilerplate' with the standard wiki command 'preload' in lines 75, 87 and 102 but not in 114 and 115 it works together with the FCKEditor. The problem is that there is no possibility anymore to replace existing text. If you change the commands in line 114 and 115 too, you have the same problem as before and the raw wiki text is included in FCKEditor.

Any solutions? --Filburt 20:37, 5 May 2009 (UTC)


 * Has there been any movement on the request to integrate MultiBoilerplate and FCKEditor? We would love this functionality at Appropedia.  Thanks, --Lonny 05:02, 29 June 2009 (UTC)
 * The page http://grassrootswiki.org/index.php?title=Main_Page Has the 2 extensions working together.

I think loading order matters - at least my load order always worked ;-) (without code changes in the extension)

General rule of thumb: FCKeditor should always be the last extension you load in LocalSettings.php. --Cboltz 15:08, 19 February 2010 (UTC)

I can confirm that it is only a loading order matter (P.S. I'm working for the mentioned grassrootswiki.org - Page) --Filburt 08:58, 16 September 2010 (UTC)

I can also confirm that the loading order solve this problem

Problem with special page
I tried to use the special page, adding in Multiboilerplate.php the following: $wgMultiBoilerplateDiplaySpecialPage = true; But the page doesn´t appear! Any suggestion? --Tango granada 02:13, 9 October 2009 (UTC)

PROBLEM WITH DOWNLOADS
After a lot of looking, the problem is that if you download the version for 1.15.x, the downloaded archive es Moultiboilerplate 1.6, and NOT 1.8. Please, someone fix this problem. --Tango granada 02:40, 9 October 2009 (UTC)

PROBLEM WITH Mediawiki 1.17.0
This extension seems not work with wiki 1.17.0. Is this a known issue? is any fix out there for this issue?

Solved The extension works fine with MW 1.17.0

PROBLEM WITH Mediawiki 1.15.1
This extension seems not work with wiki 1.15.1. I have tested each version 1.6 - 1.8. With mediawiki 1.13 extension works. Any Hints? Thx! DMA 14:46, 10 December 2009 (UTC)
 * MediaWiki 	1.15.1
 * PHP 	5.2.4-2ubuntu5.7 (apache2handler)
 * MySQL 	5.0.51a-3ubuntu5.4-log
 * SOLVED! :-) DMA 09:41, 11 December 2009 (UTC)
 * Hint:
 * The templates in MediaWiki:Multiboilerplate must be defined in English
 * Example:
 * Vorlage für Benutzerseite (Neuanlage)|Template:Benutzerseite
 * and _NOT_ (!!!)
 * Vorlage für Benutzerseite (Neuanlage)|Vorlage:Benutzerseite
 * Extension works like a charm.

different templates per namespace?
Is it possible to setup different templates per namespace?

For example, article templates are not very useful when creating a new template or a help page, and offering templates for help pages in the article namespace also doesn't make much sense.

--Cboltz 15:04, 19 February 2010 (UTC)


 * I implemented this in the meantime. You can download my patch from MediaZilla Bug 22759. A short description how to use the changes is also included there.


 * Note: I have no feedback from the MultiBoilerplate developers yet, so the official implementation might differ. --Cboltz 17:03, 18 April 2010 (UTC)


 * Related to this - is it possible to have a two dimensional (or more) select e.g. first select type of boiler plate, then a sub-type, then (for > 2 dimensions) a sub- sub-type etc? --Robinson Weijman 10:33, 21 June 2010 (UTC)

Why define boilerplates in two places?
Why are boilerplates defined in LocalSettings.php and in MediaWiki:Multiboilerplate? It is redundant. My preference would be only in MediaWiki:Multiboilerplate - easier to maintain. --Robinson Weijman 13:52, 20 March 2010 (UTC)


 * My mistake - I missed the words Alternative is:. So, apparently you can define it in either.  --Robinson Weijman 11:46, 22 March 2010 (UTC)

Is there a way to insert boilerplate text WITHOUT over riding existing page content?
This would be really really handy. At the moment inserting a boilerplate deletes the existing page contents and inserts the boilerplate. But is there a way to append the boilerplate text? Or is there another extension that does this? or could it be added to this extension?

This would allow me to use it for shortcuts to insert of all sorts of handy templates...

219.89.59.111


 * I want to know this too. Can it be done?

That would be really handy to allow a bigger article to be built from many templates.


 * Hello all!

Here is some changes in MultiBoilerplate.php, that would save your article text and add boilerplate text at the bottom of article text. PriteX.

188.168.34.194 13:48, 24 January 2012 (UTC)


 * Howdy. I tried using the above code, but got a server error (500) whenever trying to add boilerplate text to a brand new article. My exposure to PHP honestly goes no further than figuring this out, but I added an if statement that stopped it (I assume the error was from adding text to a brand new page)

Rabyl :3 16:04, 13 June 2012 (UTC)

Combination with ArticleToCategory2 extension
To prevent that MultiBoilerplate will kill existing categories, for example preloaded with Extension:ArticleToCategory2, you have to add $wgContLang to the globals declaration in line 58:

Then add an additional hidden field to the form to pass the category name: after

in line 108 insert

Finally replace

with

(This solution also works with FCKeditor)

--Filburt 09:10, 16 September 2010 (UTC)

noinclude included
Text inside of "noinclude" will be included if there is a line break, e.g. some explanation will work, ==headline== some explanation will not. To fix this, one of us changed MultiBoilerplate.php like this: Hope this helps.--93.131.250.134 10:55, 31 October 2010 (UTC)


 * It surely does! Now it actually works correctly. Thank you! --Dror Snir 10:23, 9 December 2010 (UTC)


 * Reported as Bug 32710 --Cboltz 17:54, 29 November 2011 (UTC)


 * ... and commited to SVN trunk (aka what will become 1.19) r106972 by Mark --Cboltz 21:46, 21 December 2011 (UTC)

HTTP Error 500 (Internal Server Error) on Edit
I just upgraded to version MediaWiki 1.18.0 and I'm getting the error:

The website encountered an error while retrieving http://localhost:8080/mediawiki/index.php?title=testpage&action=edit&redlink=1. It may be down for maintenance or configured incorrectly.

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

My Apache error.log reads:

PHP Fatal error: Call to undefined method Xml::hidden in C:\\MoWeS\\www\\mediawiki\\extensions\\MultiBoilerplate\\MultiBoilerplate.php on line 128, referer: http://localhost:8080/mediawiki/index.php?title=Special%3ASearch&search=testpage&go=Go

Line 128 in MultiBoilerplate.php reads:

Xml::hidden( 'action', 'edit' ). Any ideas? Thank you.

--SLeepdepD 16:35, 29 November 2011 (UTC)


 * Update the MultiBoilerplate extension to the latest version. Johnduhart 16:57, 29 November 2011 (UTC)
 * Thanks, that worked. --SLeepdepD 17:03, 29 November 2011 (UTC)

Works with MW1.18
To save anyone needing to ask - this extension works with MW1.18 (though I did have to upgrade to the 1.18 extension version when upgrading MW from 1.16.5 to 1.18). Jonathan3 21:23, 11 December 2011 (UTC)