You are here: Foswiki>Tasks Web>Item1188 (30 Nov 2010, MichaelDaum)Edit Attach

Item1188: Saving a chapter with IE empties the topic except for attachments

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: EditChapterPlugin
Branches:
Reported By: IngoKappler
Waiting For:
Last Change By: MichaelDaum
Editing and saving a chapter with Firefox works fine but when using Internet Explorer the topic will always be emptied. This applies to the Foswiki'd EditChapterPlugin version 2.0.

-- IngoKappler - 02 Mar 2009

Works fine here, even on IE6.

Which skin are you using? Which other plugins are installed?

-- MichaelDaum - 03 Mar 2009

I am using pattern skin.

  1. I've disabled all plugins except of EditChapterPlugin, JQueryPlugin and TWikiCompatibilityPlugin but the issue is still reproducible with IE 7.0.5730.13.
  2. I then also disabled the TWikiCompatibilityPlugin which resulted in missing the pen picture (seems to be another issue of the Foswiki'd version) but the issue was still reproducible.
  3. Disabled the JQueryPlugin and enabled JQueryLibPlugin but still... (emptied browser cache in between)
  4. Re-enabled the JQueryPlugin and removed anything else from the topic except of a simple header with plain text below and again the topic was emptied. frown, sad smile
  5. Removed in SitePreferences from Set SKIN=kino,pattern = to=Set SKIN=pattern. Still fails.

Running out of ideas. Are there other logs that could be useful?

-- IngoKappler - 03 Mar 2009

IE6 produces a javascript error just before submit in the middle of assembling the topic text. I've rewritten this bit using jquery. Please try this in pub/System/EditChapterPlugin/ecpjavascript.js

function beforeSubmitHandler(script, action) {
  //alert("called beforeSubmitHandler");
  var before = $('#beforetext');
  var after = $('#aftertext');
  var chapter = $('#topic');

  if (!before.length || !after.length || !chapter.length)
    return;

  var chapterText = chapter.val();
  var lastChar = chapterText.substr(chapterText.length-1, 1);
  if (lastChar != '\n') {
    chapterText += '\n';
  }
  $("#text").val(before.val()+chapterText+after.val());
}

/* init gui */
if (true) {
  $(function() {
    $('.ecpHeading').each(function(){
      var $ecpEdit = $('.ecpEdit', this);
      if ($ecpEdit.length) {
        $(this).hover(
          function(event) {
            $(this).addClass('ecpHeadingHover');
            $ecpEdit.css('visibility','visible');
            event.stopPropagation();
          },
          function(event) {
            $(this).removeClass('ecpHeadingHover');
            $ecpEdit.css('visibility','hidden');
            event.stopPropagation();
          }
        );
      }
    });
  });
}

-- MichaelDaum - 04 Mar 2009

I replaced all the original content of ecpjavascript.js with the above and retested but it does not fix the issue for me when using IE7.

-- IngoKappler - 04 Mar 2009

I have this same problem. I have been abled to reproduce it on Firefox by removing the following from the edit.chapter.tmpl file;
<script type="text/javascript">
/* to hook into patternskin */
$(function() {
  $(".patternActionButtons input").click(function() {
    beforeSubmitHandler();
  });
});
</script>

The bit of error that I get from IE when it's in the throes of saving the edit changes is - but I don't know whether this is relevant;
Line 12
Char 3
Error: 'Undefined' is null or not an object

Also, I was wondering why this edit.chapter.tmpl file refers to an include file of "editjavascript" that doesn't seem to be included in the EditChapterPlugin zip file.

-- SallyHoughton - 07 Apr 2009

I now managed to retest the above "fix" from Michael with IE6 (from http://www.xenocode.com/Browsers/) but it does not fix anything for me. I also disabled all plugins and retested. So generally for me it simply never works with IE.

-- IngoKappler - 07 Apr 2009

Sally, thanks for the hint. It seems as if there's an incompatibility with newer PatternSkin versions.

-- MichaelDaum - 08 Apr 2009

Hi, I was just wondering if there has been any resolution on this issue as I can't go forward with foswiki at work until this is resolved. Thanks, Sally.

-- SallyHoughton - 27 May 2009

I've just installed the updates for foswiki 1.0.5 and this is now working.

I've left the topic as waiting feedback but moved it to IngoKappler so that Ingo can confirm this is okay now on the latest foswiki version.

Thanks! -- SallyHoughton - 28 May 2009

Hi Sally,

strange it works for you. I must have missed the point because for me the issue remained on 1.0.5. Did you manually change some EditChapterPlugin code, possibly as described above because that's what I didn't retest on 1.0.5 as there was a new version of the plugin released in the meantime?

-- IngoKappler - 28 May 2009

Hi Ingo,

I applied the foswiki 1.0.5 updates and a number of other extensions...tho' the extensions seemed to already be up-to-date. These are the levels I'm now at;
   * Foswiki-1.0.5, Sat, 25 Apr 2009, build 3705, Plugin API version 2.0
   *  TWikiCompatibilityPlugin (Foswiki-1.0, $Rev: 3626 (2009-04-22) $): add TWiki personality to Foswiki
   * SpreadSheetPlugin (11 May 2009, $Rev: 3890 (2009-05-11) $): Add spreadsheet calculations like "$SUM($ABOVE())" to Foswiki tables and other topic text
   * ActionTrackerPlugin (21 May 2007, $Rev: 2242 (30 Jan 2009) $): Adds support for action tags in topics, and automatic notification of action statuses
   * AliasPlugin (2.31, $Rev: 1802 (07 Jan 2009) $): Define aliases which will be replaced with arbitrary strings automatically
   * AttachLinkPlugin (1.001, $Rev: 1558 (23 Dec 2008) $): Painless links to attachments
   * CalendarPlugin (Dakar, $Rev: 2934 (2009-03-09) $): Show a monthly calendar with highlighted events
   * ChartPlugin (08 Dec 2008, $Rev: 1394 (23 Dec 2008) $): Create PNG or GIF charts to visualize Foswiki tables
   * CommentPlugin (Foswiki-1.0.1, $Rev: 3417 (2009-04-12) $): Quickly post comments to a page without an edit/preview/save cycle
   * DatabasePlugin (Dakar, $Rev: 0 (28 nov. 2008) $): Provide access to data in a SQL database
   * EasyTimelinePlugin (1.0, $Rev: 3066 (2009-03-13) $): Generate graphical timeline diagrams from markup text
   * EditChapterPlugin (2.00, $Rev: 2823 (02 Mar 2009) $): An easy sectional edit facility
   * EditRowPlugin ($Date: 2009-02-24 18:51:50 +0000 (Tue, 24 Feb 2009) $, $Rev: 2665 (24 Feb 2009) $): Inline edit for tables
   * FilterPlugin (1.70, $Rev: 1860 (08 Jan 2009) $): Substitute and extract information from content by using regular expressions
   * ForEachPlugin (1.000): Loop over successive elements of a list, or a range of numbers.
   * FormPlugin (1.4.6, $Rev: 3135 (2009-03-16) $): Lets you create simple and advanced web forms
   * ImageGalleryPlugin (4.00-pre3, $Rev: 2463 (12 Feb 2009) $): Displays image gallery with auto-generated thumbnails from attachments
   * ImagePlugin (1.22, $Rev: 1863 (08 Jan 2009) $): Control the display and alignment of images using an easy syntax
   * InterwikiPlugin (03 Aug 2008, $Rev: 3417 (2009-04-12) $): Link ExternalSite:Page text to external sites based on aliases defined in a rules topic
   * JQueryPlugin (1.15, $Rev: 1988 (15 Jan 2009) $): jQuery JavaScript library for Foswiki
   * JQueryTwistyPlugin (1.21, $Rev: 1874 (08 Jan 2009) $): Twisty section JavaScript library to open/close content dynamically
   * PreferencesPlugin (19 Apr 2009, $Rev: 3527 (2009-04-18) $): Allows editing of preferences using fields predefined in a form
   * PublishPlugin (04 Dec 2008, $Rev: 3177 (2009-03-18) $): Generate static output (HTML, PDF) optionally upload (FTP) the output to a publishing site.
   * RackPlannerPlugin (Dakar, $Rev: 15566 (12 Dec 2008) $): Render a rack overview (e.g. of 19'' computer racks) with HTML tables
   * RenderListPlugin (2.1, $Rev: 3048 (2009-03-12) $): Render bullet lists in a variety of formats
   * SkillsPlugin (Dakar, $Rev: 3221 (2009-03-20) $): Allows users to list their skills, which can then be searched
   * SlideShowPlugin (02 Aug 2008, $Rev: 3048 (2009-03-12) $): Create web based presentations based on topics with headings.
   * SmiliesPlugin (04 Jan 2009, $Rev: 3417 (2009-04-12) $): Render smilies as icons, like smile for  :-) or eek! for  :eek:
   * SubscribePlugin (03 Dec 2008, $Rev: 13787 (18 May 2007) $): Subscribe to web notification
   * SyntaxHighlightingPlugin (1.0, $Rev: 3151 (2009-03-17) $): Highlights code fragments for many languages using enscript.
   * TablePlugin (1.038, $Rev: 3525 (2009-04-18) $): Control attributes of tables and sorting of table columns
   * TagCloudPlugin (v1.01, $Rev: 1830 (07 Jan 2009) $): Renders a tag cloud given a list of terms
   * TimeSincePlugin (2.00, $Rev: 1831 (07 Jan 2009) $):
   * TinyMCEUsabilityUpgradePlugin (0.6, $Rev: 3133 (2009-03-16) $): Introducing better usability to the TinyMCEPlugin with using new Link-Dialogs, Autocompletition..
   * ToolTipPlugin (1.5, $Rev: 1340 1357 (14 Dec 2008) $):
   * TreeBrowserPlugin (v1.9): Renders a list as a collapsable/expandable tree. 

   * BehaviourContrib , 3417 (2009-04-12) 
   * BlogAddOn, 2804 (01 mrt 2009) 
   * FamFamFamContrib, 1379 (03 Jan 2009) 
   * JSCalendarContrib, 3417 (2009-04-12) 
   * MailerContrib, 3638 (2009-04-23) 
   * SnazzyRoundedCornersContrib, 2552 (20 Feb 2009) 
   * TipsContrib,  	 16 Dec 2008 
   * TopicUserMappingContrib, 4.2.2 (16 Dec 2008) 
   * YahooUserInterfaceContrib,  	 1766 (05 Jan 2009) 
   * YuiMenuContrib, 3164 (2009-03-18) 
   * EditContrib, 10 Apr 2007 
   * TabbedNavigationAddon, 30 May 2007 (V1.000) 

the only other things that I've updated is a patch for EditChapterPlugin (this morning, so IE was working yesterday before this patch), an update for DatabasePlugin and piddling about with the foswikisite skin.

Hope that helps, Sally.

-- SallyHoughton - 29 May 2009

Michael, I saw your note about pattern skin. Could you make a desciption where to look? The bug is not clear to me.

-- ArthurClemens - 31 May 2009

When I retested on 1.0.5 using EditChapterPlugin version v2.02 I couldn't fully test it because the icon was not rendered and the area which could be identified to be there for it couldn't be used/clicked. I never had issues with FF only IE (7.0.5730.13) and using pattern skin.

-- IngoKappler - 03 Jun 2009

Retested on 1.0.6 with IE6, IE7 and IE8 (http://www.xenocode.com/browsers/) but same behoviour as in the statement before.

-- IngoKappler - 26 Jun 2009

I really can't repro this anymore.

-- MichaelDaum - 30 Nov 2010

Confirmed. Just retested on Foswiki 1.1.2 with EditChapterPlugin 2.13 and cannot reproduce it anymore.

-- IngoKappler - 30 Nov 2010

Alright, closing it then.

-- MichaelDaum - 30 Nov 2010

ItemTemplate edit

Summary Saving a chapter with IE empties the topic except for attachments
ReportedBy IngoKappler
Codebase 1.0.3
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component EditChapterPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r20 - 30 Nov 2010, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy