Last modified: 2011-04-14 15:10:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11866, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9866 - Duplicate entry when saving instead of modifying entry.
Duplicate entry when saving instead of modifying entry.
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.10.x
Other Linux
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-10 14:05 UTC by Xushi
Modified: 2011-04-14 15:10 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Xushi 2007-05-10 14:05:06 UTC
My wiki has many headings 1, 2, and 3.


when i go halfway through a page that has many heading 1, 2, and 3, and i edit 
one of the contents in heading 3, modify it, preview it, then save it; instead of 
mediawiki modifying it, it makes a copy of it right above it.. So i end up with 
two of them.. the modified one and unmodified one

So if i have

=h1=

==h2==
Hello there

===h3===
today is a nice day.

===h3===
i feel good

==h2==
etc etc etc



... And so on. if i click edit on the H3 for "today is a nice day." and change it 
to "today is a nice day. No rain", then preview and save, i'll end up with

=h1=

==h2==
Hello there

===h3===
today is a nice day. No rain

===h3===
today is a nice day.

===h3===
i feel good

==h2==
etc etc etc




Instead of

=h1=

==h2==
Hello there

===h3===
today is a nice day. No rain

===h3===
i feel good

==h2==
etc etc etc



This has been tested on two servers WAMP and LAMP (gentoo), with the 
following settings and their versions respectively,

Wamp: 
Apache: 2.0.59, MySQL: 5.0.27, PHP: 5.1.6

LAMP
Apache: 2.0.58-r2, Mysql: 5.0, PHP 5.1.6. 
Apache: 2.0.58-r2, Mysql: 5.0, PHP 5.2.1.
Apache: 2.0.58-r2, Mysql: 5.0, PHP 5.2.2.

This is on the latest MW 1.10.0
Comment 1 Brion Vibber 2007-05-11 02:00:27 UTC
Cannot reproduce with your sample text and given steps.

MW 1.10.0, PHP 5.2.2.
Comment 2 Xushi 2007-05-11 06:18:07 UTC
I don't know if it would make a difference, but this is on a virtual host on apache.

<VirtualHost wiki.xushi>
    ServerName wiki
    DocumentRoot /......
</VirtualHost>

Anyway. I'll try installing it publicly and reproduce it. When that happens, i'll write 
the link here and instructions on how to do it.

Will also provide debug instructions and if possible ftp login to check the code.
Comment 3 Xushi 2007-05-31 09:01:43 UTC
Finally.. It took a while, but i managed to reproduce it. Here is an example code. All you need to do is paste it in a new page, and click 'preview'.

It's supposed to show you 

1 test 
  1.1 General Configs 
    1.1.1 This is the old 'welcome to your new install' message
  1.2 Specific Module Configurations 
    1.2.1 Anything subtopic

Where 1.1.1 is php+html code embedded in PRE tags. When you preview, it copies part of that code outside in the bottom, and some of the content is also gone.


This is reproducable ~3 out of 5 times with me. I am still trying to find the exact trigger, but I triggered it 

1) Clicking on the small edit button for 1.1.1, then the preview button (without changing any content), then save it. 

2) replacing the line in the box
from
$output = 'Thank you.';
to
$output = '';
inside the PRE tags, then preview, then save it.

Just keep trying to edit from the main one at top, or 1.1.1's a few times without changing content, and preview.. Eventually it will break.

I will paste the wiki page content both here between =======CONTENT======= lines, and in a file just in case it may change here when i click save. Additionally, i will paste the result it gives me.

It can be found here:
http://xushi.co.uk/xushi/wikibug-9866
http://xushi.co.uk/xushi/wikibug-9866-faulty_result

=============CONTENT============
=test=


==General Configs==

Anything in general

===This is the old 'welcome to your new install' message===

This is the old message in 4.x. The one in 5.x is different. 

Edit '''modules/node.module'''

line 2050
notice $output
 <pre>    $output = t('
      <h1 class="title">Welcome to your new Drupal website!</h1>
      <p>Please follow these steps to set up and start using your website:</p>
      <ol>
        <li>
          <strong>Create your administrator account</strong>
          To begin, <a href="%register">create the first account</a>. This account will have full administration rights and will allow you to configure your website.
        </li>
        <li>
          <strong>Configure your website</strong>
          Once logged in, visit the <a href="%admin">administration section</a>, where you can <a href="%config">customize and configure</a> all aspects of your website.
        </li>
        <li>
          <strong>Enable additional functionality</strong>
          Next, visit the <a href="%modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="%download_modules">Drupal modules download section</a>.
        </li>
        <li>
          <strong>Customize your website design</strong>
          To change the "look and feel" of your website, visit the <a href="%themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="%download_themes">Drupal themes download section</a>.
        </li>
        <li>
          <strong>Start posting content</strong>
          Finally, you can <a href="%content">create content</a> for your website. This message will disappear once you have published your first post.
        </li>
      </ol>
      <p>For more information, please refer to the <a href="%help">Help section</a>, or the <a href="%handbook">online Drupal handbooks</a>. You may also post at the <a href="%forum">Drupal forum</a>, or view the wide range of <a href="%support">other support options</a> available.</p>',
      array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support')
    );
</pre>

optionally, add at the bottom the following line 
<pre>$output = 'Thank you.';</pre>

<h1 class="title">Welcome to your new Drupal website!</h1>
      <p>Please follow these steps to set up and start using your website:</p>
      <ol>
        <li>
          <strong>Create your administrator account</strong>
          To begin, <a href="%register">create the first account</a>. This account will have full administration rights and will allow you to configure your website.
        </li>
        <li>
          <strong>Configure your website</strong>
          Once logged in, visit the <a href="%admin">administration section</a>, where you can <a href="%config">customize and configure</a> all aspects of your website.
        </li>
        <li>
          <strong>Enable additional functionality</strong>
          Next, visit the <a href="%modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="%download_modules">Drupal modules download section</a>.
        </li>
        <li>
          <strong>Customize your website design</strong>
          To change the "look and feel" of your website, visit the <a href="%themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="%download_themes">Drupal themes download section</a>.
        </li>
        <li>
          <strong>Start posting content</strong>
          Finally, you can <a href="%content">create content</a> for your website. This message will disappear once you have published your first post.
        </li>
      </ol>
      <p>For more information, please refer to the <a href="%help">Help section</a>, or the <a href="%handbook">online Drupal handbooks</a>. You may also post at the <a href="%forum">Drupal forum</a>, or view the wide range of <a href="%support">other support options</a> available.</p>',
      array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support')
    );
</pre>

optionally, add at the bottom the following line 
<pre>$output = 'Thank you.';</pre>


==Specific Module Configurations==

Anything module related

===Anything subtopic===

foo bar bar foo

===============END CONTENT=============





===============Faulty Result===============
=test=


==General Configs==

Anything in general

===This is the old 'welcome to your new install' message===

This is the old message in 4.x. The one in 5.x is different. 

Edit '''modules/node.module'''

line 2050
notice $output
 <pre>    $output = t('
      <h1 class="title">Welcome to your new Drupal website!</h1>
      <p>Please follow these steps to set up and start using your website:</p>
      <ol>
        <li>
          <strong>Create your administrator account</strong>
          To begin, <a href="%register">create the first account</a>. This account will have full administration rights and will allow you to configure your website.
        </li>
        <li>
          <strong>Configure your website</strong>
          Once logged in, visit the <a href="%admin">administration section</a>, where you can <a href="%config">customize and configure</a> all aspects of your website.
        </li>
        <li>
          <strong>Enable additional functionality</strong>
          Next, visit the <a href="%modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="%download_modules">Drupal modules download section</a>.
        </li>
        <li>
          <strong>Customize your website design</strong>
          To change the "look and feel" of your website, visit the <a href="%themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="%download_themes">Drupal themes download section</a>.
        </li>
        <li>
          <strong>Start posting content</strong>
          Finally, you can <a href="%content">create content</a> for your website. This message will disappear once you have published your first post.
        </li>
      </ol>
      <p>For more information, please refer to the <a href="%help">Help section</a>, or the <a href="%handbook">online Drupal handbooks</a>. You may also post at the <a href="%forum">Drupal forum</a>, or view the wide range of <a href="%support">other support options</a> available.</p>',
      array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support')
    );
</pre>

optionally, add at the bottom the following line 
<pre>$output = 'Thank you.';</pre>

<h1 class="title">Welcome to your new Drupal website!</h1>
      <p>Please follow these steps to set up and start using your website:</p>
      <ol>
        <li>
          <strong>Create your administrator account</strong>
          To begin, <a href="%register">create the first account</a>. This account will have full administration rights and will allow you to configure your website.
        </li>
        <li>
          <strong>Configure your website</strong>
          Once logged in, visit the <a href="%admin">administration section</a>, where you can <a href="%config">customize and configure</a> all aspects of your website.
        </li>
        <li>
          <strong>Enable additional functionality</strong>
          Next, visit the <a href="%modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="%download_modules">Drupal modules download section</a>.
        </li>
        <li>
          <strong>Customize your website design</strong>
          To change the "look and feel" of your website, visit the <a href="%themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="%download_themes">Drupal themes download section</a>.
        </li>
        <li>
          <strong>Start posting content</strong>
          Finally, you can <a href="%content">create content</a> for your website. This message will disappear once you have published your first post.
        </li>
      </ol>
      <p>For more information, please refer to the <a href="%help">Help section</a>, or the <a href="%handbook">online Drupal handbooks</a>. You may also post at the <a href="%forum">Drupal forum</a>, or view the wide range of <a href="%support">other support options</a> available.</p>',
      array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support')
    );
</pre>

optionally, add at the bottom the following line 
<pre>$output = 'Thank you.';</pre>


==Specific Module Configurations==

Anything module related

===Anything subtopic===

foo bar bar foo

=================End Faulty Result================



I hope this helps. 

Thanks.
Comment 4 Xushi 2007-05-31 09:04:43 UTC
Argh.. Sorry.. it pasted the wrong content.. This is teh content you should use to reproduce


=================CONTENT====================

=test=


==General Configs==

Anything in general

===This is the old 'welcome to your new install' message===

This is the old message in 4.x. The one in 5.x is different. 

Edit '''modules/node.module'''

line 2050
notice $output
 <pre>    $output = t('
      <h1 class="title">Welcome to your new Drupal website!</h1>
      <p>Please follow these steps to set up and start using your website:</p>
      <ol>
        <li>
          <strong>Create your administrator account</strong>
          To begin, <a href="%register">create the first account</a>. This account will have full administration rights and will allow you to configure your website.
        </li>
        <li>
          <strong>Configure your website</strong>
          Once logged in, visit the <a href="%admin">administration section</a>, where you can <a href="%config">customize and configure</a> all aspects of your website.
        </li>
        <li>
          <strong>Enable additional functionality</strong>
          Next, visit the <a href="%modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="%download_modules">Drupal modules download section</a>.
        </li>
        <li>
          <strong>Customize your website design</strong>
          To change the "look and feel" of your website, visit the <a href="%themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="%download_themes">Drupal themes download section</a>.
        </li>
        <li>
          <strong>Start posting content</strong>
          Finally, you can <a href="%content">create content</a> for your website. This message will disappear once you have published your first post.
        </li>
      </ol>
      <p>For more information, please refer to the <a href="%help">Help section</a>, or the <a href="%handbook">online Drupal handbooks</a>. You may also post at the <a href="%forum">Drupal forum</a>, or view the wide range of <a href="%support">other support options</a> available.</p>',
      array('%drupal' => 'http://drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/modules'), '%download_modules' => 'http://drupal.org/project/modules', '%themes' => url('admin/themes'), '%download_themes' => 'http://drupal.org/project/themes', '%content' => url('node/add'), '%help' => url('admin/help'), '%handbook' => 'http://drupal.org/handbooks', '%forum' => 'http://drupal.org/forum', '%support' => 'http://drupal.org/support')
    );
</pre>

optionally, add at the bottom the following line 
<pre>$output = 'Thank you.';</pre>

==Specific Module Configurations==

Anything module related

===Anything subtopic===

foo bar bar foo



=================END CONTENT============
Comment 5 Robert Leverington 2007-05-31 09:34:43 UTC
I have replicated this on my testwiki using the latest version of MediaWiki. See http://www.wikitest.co.uk/SVN/Drupal

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links