create new tag
, view all tags

MultiEditPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on MultiEditPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Feedback on MultiEditPlugin

-- ThomasWeigert - 02 Mar 2005

Wow, you crank out new TWiki extensions at a high rate! The TWikiCommunity greatly appreciates your continued support smile

Very useful Plugin, easy to use.

How about measuring and publishing the PluginBenchmarks?

-- PeterThoeny - 02 Mar 2005

That's what long flights are for... smile But actually, this plugin just combined two existing ideas... remember when you stand on the shoulders of giants...

-- ThomasWeigert - 02 Mar 2005

I think this plugin is brilliant as it gives authors the possibility to hint contributors where to do the editing.

One thing though: I would like to deny editing of my homepage DanielKabs while still allow adding and editing of a comments area.

  • One possible 'solution' could be to %INCLUDE% portions of a topic from another topic that is locked down. Don't use the TWikiDocumentation topics this mechanism to keep comments separated from contents? -- FranzJosefSilli - 22 Apr 2005

Franz, I tried your suggestion on my homepage DanielKabs and I admit, I'm really pleased! smile Works like a charm. I documented your idea in HowToDenyEditingAllowCommenting.

-- DanielKabs - 22 Apr 2005 (refactored 04 Oct 2005)

Fixed a caching issue when running under SpeedyCGI discovered by MarcusLeonard.

-- ThomasWeigert - 03 May 2005

This is really nice work, I simply miss the possibillity to be able to have the sections retrieved from the headings like in SectionalEditPlugin

-- PeterSchaich - 13 May 2005

Can you please explain in more detail what you are looking for?

-- ThomasWeigert - 13 May 2005

If you use the <editsections/> tag, the section breaks are automatically placed at headings (like on wikipedia) There is no need to manually place sections if you want.

-- PeterSchaich - 17 May 2005

Peter, these two plugins serve different purposes. MultiEditPlugin gives you the ability to lay out an arbitrary page and edit pieces of that page. SectionalEditPlugin gives the ability to edit pieces of a page layed out in standard section manner. I still don't quite see what it would mean to have the sectioning from SectionalEditPlugin included in MultiEditPlugin.

-- ThomasWeigert - 17 May 2005

Thanks Thomas, I just mistakenly thought it was indended as sort of merge - when all features are in one Plugin there would be no need to install all of them - even if you seek different functionalities on the same Wiki.

-- PeterSchaich - 17 May 2005

Hmmm. I should think about whether such a merge is feasible...

-- ThomasWeigert - 17 May 2005

I think I've found a bug, either in MultiEditPlugin or in EditContrib. It seems that editing a section will tidy up the topic text, removing blank lines below the <section> tag.

I think one too many lines is removed, so that the next tag appears on the same line as the <section> tag. This has disastrous consequences if the first line of the section is a <verbatim> tag, as the rest of the topic doesn't get displayed.

There are problems with other tags being first, too, as the syntax :

<section>---++My Heading

Means that 'My Heading' is missing from the TOC.

-- SteveJonesST - 16 Jun 2005

This has been reported and discussed months ago for the SectionalEditPlugin. I'm looking forward to the time were the EditContrib will be compatible to DevelopBranch (resp. DakarRelease).

-- FranzJosefSilli - 16 Jun 2005

I just tested this plugin and as it often happens with new plugins my error log explodes.

This time with this error:

 view: Use of uninitialized value in concatenation (.) or string at /var/www/twikiexp/lib/TWiki/Plugins/MultiEditPlugin.pm line 52.

I am not sure how to fix it this time. I have noticed that the plugin spells $TranslationToken and $translationToken differently within the script (uppercase / lowercase T). But I have tried to change all to upper and all to lower with no change.

I would like to encourage checking the Apache error log as part of plugin development. This plugin produces two errors for each page viewed no matter if the plugin is used on the viewed page or not.

-- KennethLavrsen - 02 Aug 2005

Ken, thanks for the feedback. I have fixed this in the latest release.

Steve, I have updated EditContrib to avoid the problem you describe (which, as Franz Josef pointed out is due to a bug in most browsers which eat leading newlines in text area tags (see SomeBrowsersLoseInitialNewlineInTextArea). Could you please update your installataion and double check?

-- ThomasWeigert - 04 Aug 2005

Thomas, thanks for this update to EditContrib. I confirm that this avoids the leading newline problem seen in Firefox 1.0 and later. I really appreciate your time and effort on this.

-- SteveJonesST - 05 Aug 2005

Here's a strange thing. If I trigger a FindElsewherePlugin from an ACRONYM inside a multi-edit section, and the ACRONYM topic is found in more than one web, then the superscripted bracketed links are rendered twice.

For example, I get :

What about GDMS(CADDocs,DSMWeb)(CADDocs,DSMWeb) and TopicModerator(CADDocs,DSMWeb).

(I've removed the links, to the definitions, as they won't resolve on twiki.org)
As you can see, the ACRONYM has two repeated definitions, but the WikiWord has only one.

This only happens inside a MultiEditPlugin section.

Any hints gratefully received.

-- SteveJonesST - 01 Sep 2005

Sounds like an interference between these two plugins. I have never used FindElsewherePlugin so this might take some time....

-- ThomasWeigert - 02 Sep 2005

Added fix for that TWiki::Func::renderText messes with restoring of verbatim blocks.

-- ThomasWeigert - 18 Jun 2006

Two suggestion on the doc:

  • Mention {AuthScripts} in configure as possible alternative to .htaccess file.
  • You mention testing if installed by looking at example, but the example doesn't exist in the topic, only the screen shot.

Thanks again for your work on these important plugins!

Now, if we could just get one of the wysiwyg editing options working with this, we'd have a great interface for TWiki apps!

-- LynnwoodBrown - 22 Jun 2006

I understand that Sven is working on an InlineEditPlugin (in SVN only at the moment) that we may be able to leverage once completed...

-- ThomasWeigert - 22 Jun 2006

I've started using MultiEdit (very good btw), but run into a small glitch with a particular page. When I use a section inside an include the edit button actually edits the parent page instead. It also doesn't prepopulate the edit textarea with anything (from either the parent or child page).

-- GregPendlebury - 09 Nov 2006

Hmmm, didn't take long to track the problem down to this line... is there a way within TWiki's perl to detect that the section is part of an include? And of course the real topic's name.

my $eurl = TWiki::Func::getScriptUrlPath() . "/editonesection/$web/$topic";

-- GregPendlebury - 09 Nov 2006

Wow, Greg, this is a great, and in hindsight obvious, observation. However, there does not seem a to be a straightforward solution. I am surprised that this problem has not bitten somebody else before in other parts of TWiki....

-- ThomasWeigert - 10 Nov 2006

Uploaded a new version which partially solves the problem pointed out by Greg. This is a lot trickier than it appears, and I learned a lot about TWiki trying to figure this out, see NotAllTagsWorkWithInclude.

Please see the documentation for the Bug Warning. The long and short of this is that included topics only work when there is no section before any %STARTINCLUDE% label, or named sections.

The real problem is that the plugin does not have access to the full topic parts of which are being included and thus it cannot later (when trying to edit included sections) any longer identify the sections that were included, unless all sections before the section to be edited were included. To solve this problem, an extension to core is required, see NeedBeforeIncludeHandler. I have a completely working version of this plugin, but it does require the mentioned changes.

I have uploaded a version that allows included sections to be edited provided the above caveat is followed, as it appears that Greg might still benefit from such. There is no effect on non-included topics (i.e., everything should work as before).

I also added the feature to allow a section to be marked as not editable (this is usefull when you want to put, e.g., a table inside a table, which is not otherwise possible).

-- ThomasWeigert - 11 Nov 2006

ALERT! TWiki 4.0 has a named section feature now. I would like to change the <section> syntax to the syntax used in TWiki for named sections. Of course I could always add additional syntax, but TWiki is already somewhat slow. My preference would be to change the tags and provide an update script to fix old topics. Any concerns? Please advise....

-- ThomasWeigert - 11 Nov 2006

Thanks for the effort Thomas... I've now got at least a working edit. My problem at the moment is I have a parent page with edit access for an examiners group, and a child page with edit access for a student group.

The child page has five areas included in the parent page to present (ideally) one page with edit buttons on each of the student editable portions.

With your fix all five includes show the final section of of the child page, but the edit actually works (Yay!). I'm about to try breaking the students page up into 5 topics (messy but workable I suppose).

Does your suggestion for fixing the core allow for all of the sections to be integrated into one child page? Because I'd be very interested in that. We have a close to vanilla system at the moment with no users yet so I'd implement the change before anyone even starts using it.

Thanks again,

-- GregPendlebury - 12 Nov 2006

I have attached a patch to TWiki.pm which will implement the extension that really makes the editing of included sections work (see here). Please just apply this patch to TWiki.pm (or add the single line by hand).

Also, FYI, in the next version of TWiki I have also implemented that saving (and canceling an edit of) an included topic will return you to the original topic, not the included topic. This also relies on changes to the TWiki core.

-- ThomasWeigert - 13 Nov 2006

The saving feature sounds good.

-- GregPendlebury - 13 Nov 2006

Thanks a bunch Thomas... I've actually hacked it a little to give me a workable solution. I use a static variable inside your

function and just increment it for the section number.

It's not really a solution on a grand scale... it means I have to include them on the parent page in the order that they appear in the child. But that's fine for our implementation.


-- GregPendlebury - 13 Nov 2006

I probably do not quite understand your application, as you should not have to hack the plugin to make this work. Did you patch TWiki.pm as I described above?

-- ThomasWeigert - 13 Nov 2006

I did, and it's the only reason my hack worked, so thank you.

The new plugin you posted does give me editting, but as you said only to one section on the page. I've got a page with 5 includes and I change the code to :

my $gtpCounter = 0;
sub rememberTopic {
  my ( $topic, $web, $posattr ) = @_;

  if ($posattr =~ / topic=/o) {
    return "<section$posattr>";
  } else {
    return "<section$posattr topic=\"$topic\" web=\"$web\" section=\"$gtpCounter\">";
#    return "<section$posattr topic=\"$topic\" web=\"$web\" section=\"$_[3]\">";

This hard codes the sections, which would make it useless for your plugin, but I'm perfectly happy to operate under this constraint.

eg. I tried swapping the include order for section 1 and 2, but the edit option then edits the wrong section, even though they display correctly.

-- GregPendlebury - 13 Nov 2006

Let me understand what you are saying... I think you say that you have a source topic, e.g.,

which are included in the target topic as follows:
and sectional editing gets confused? I just tested this scenario, and it works fine for me.

Can you please give a more explicit example so I know what is wrong?

P.S. The editing should not be limited to "one section on a page". Well, one edits one section at a time, but the plugin works with many sections in the topic, also in the included topic.

-- ThomasWeigert - 13 Nov 2006

Hi Thomas,

The parent page is a specifically layed out table and certain cells are populated like:

%INCLUDE{"StudentGroup1o1ResponseS12007" section="Section 1"}%

%INCLUDE{"StudentGroup1o1ResponseS12007" section="Section 2"}%


Then the child page has

---++ Rationale
%STARTSECTION{"Section 1"}%
<section section="1">
Section 1 Text
%ENDSECTION{"Section 1"}%


---++ Elements
%STARTSECTION{"Section 2"}%
<section section="2">
Section 2 Text
%ENDSECTION{"Section 2"}%

The vanilla implementation always gave me five includes of section five and they all edited section five. (I should say more accurately that the vanilla plugin before your recent fix edited nothing at all and then overwrote the parent.)

EDIT: I deleted some superfluous (I thought) code I had from debugging when I first posted... put it back now after the page stopped working on my dev box.

-- GregPendlebury - 13 Nov 2006

Give it a try without the section="n" syntax in the <section> tag, as this is not part of the syntax. Your section should look like this:

---++ Rationale
%STARTSECTION{"Section 1"}%
Section 1 Text
%ENDSECTION{"Section 1"}%

Please let me know what happens. P.S. I am rewriting this plugin to work for the %STARTSECTION% command, so that you don't have to put the duplicate commands in.

-- ThomasWeigert - 14 Nov 2006

Updated the plugin per the previous discussion. For this to really work you have to patch lib/TWiki.pm as discussed in the plugin topic. If you want to edit included topics, you need to apply this patch. You can use the older version and partially edit included topics but I believe it is better to have it work either fully or not at all.

-- ThomasWeigert - 19 Nov 2006

Some praise up front: Thomas, thank you for a hugely useful plugin! Also many thanks to Alex for the patch which sorted out some trouble we were having after upgrading to version 4.1.x. Unfortunately, we're still experiencing one very annoying problem which I've been unable to solve so far: any text in a MultiEdit section which is enclosed in verbatim tags is not displayed. Is this a known bug or is this something unique to our local installation? Just to clarify things, this works:

This is a section.

This is another section.

This is not displayed at all after saving, but shows up fine in the preview (and worked perfectly in Cairo):

This is a third section. Now form a band.

It's reproducible in Mozilla, Konqueror and IE, and I've tried using pre, verbatim and literal, all to no avail. Does anyone have any ideas as to what's happening here? Am I missing something obvious?



-- JillianBethStamosKaschke - 23 Mar 2007

Uploaded MichaelDaum's patches for Bugs:Item3847, which also address Bugs:Item3852.

-- ThomasWeigert - 09 Apr 2007

Here is the explanation for the issue observed by JillianBethStamosKaschke: TWiki 4.0 deprecated the endRenderingHandler. I switched to using the postRenderingHandler which is suggested, but unfortuntely, this causes the verbatim to be lost. I temporarily restored the old way of calling, which correctly handles the verbatim. Note that this still does not handle pre sections correctly. But I now have reproduced the problem and will address that also.

The update posted handles verbatim correctly.

-- ThomasWeigert - 09 Apr 2007

Uploaded a new version which also handles pre section appropriately (this was a known before). I did move Michael Daum's getCgiAction into EditContrib, so please download that also.

-- ThomasWeigert - 11 Apr 2007

Brilliant, Thomas, that did the trick. Thank you so much for making a simple office very happy smile

-- JillianBethStamosKaschke - 11 Apr 2007

Has a MultiEdit table in a topic, when click on the Edit button, it failed at Change permission. But I have been granted necessary permission to edit this topic (Group->user permission). Any idea?

-- DonChai - 14 Jun 2007

Hi i get a blank page when i hit the edit button...any idea?

-- MaartenDeRuiter - 13 Jul 2007

Is it possible to use WYSIWYG editor for different sessions?

-- BinurajRavindran - 20 Sep 2007

It would seem that MultiEditPlugin isn't working with TWikiRelease04x02x00beta1. See Bugs:Item4715

-- LynnwoodBrown - 24 Sep 2007

Hi Thomas. We are still hoping that you will have time at some point to update this to use postRenderingHandler while still keeping verbatim text. The use of endRenderingHandler messes up the useful FootNotePlugin unfortunately. Thanks for such a useful plugin.

-- SteveJonesST - 04 Oct 2007

New AutoSectionsPlugin is available with similar functionality.

-- Peter Thoeny - 2013-05-06

It looks like that this Plugin does not work with Twiki 6.0.1 anymore.

I had to add the following lines to twiki/lib/TWiki/UI.pm get it working again:

   $TWiki::cfg{SwitchBoard}{editonesection} =      [ 'TWiki::Plugins::MultiEditPlugin',       'doEdit',          { doEdit      => 1 } ];                                      
   $TWiki::cfg{SwitchBoard}{savesection} =     [ 'TWiki::Contrib::EditContrib',       'saveSection',          { saveSection        => 1 } ];

Do not know if I made something wrong durign installation ... ?

-- Thomas Hartkens - 2014-11-22

It looks like this plugin is not well maintained?

If you need sectional edit capability use the AutoSectionsPlugin.

If you need tables-in-tables or bullets-in-tables wait for the TablePlugin upgrade. See proposal at TableCellsWithTML.

-- Peter Thoeny - 2014-11-23

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff TWiki.pm.diff r1 manage 0.4 K 2006-11-13 - 02:12 ThomasWeigert  
Edit | Attach | Watch | Print version | History: r129 < r128 < r127 < r126 < r125 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r129 - 2014-11-23 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.