Last modified: 2012-12-12 13:46:00 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 T22810, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20810 - FCKeditor causing notices in maintenance scripts
FCKeditor causing notices in maintenance scripts
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
FCKeditor (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, upstream
: 25211 (view as bug list)
Depends on:
Blocks: iis
  Show dependency treegraph
 
Reported: 2009-09-25 18:43 UTC by Brian
Modified: 2012-12-12 13:46 UTC (History)
2 users (show)

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


Attachments

Description Brian 2009-09-25 18:43:41 UTC
I am running PHP 5.2.10 on IIS 6 on Windows Server 2003 but I believe it would affect anyone.  The following bug was found while working with Mediawiki v1.15.1.  If you attempt to run mediawiki's dumpBackup.php job, it generates the following error:

"Notice: Undefined index: HTTP_USER_AGENT in <snip>extensions\FCKeditor\fckeditor\fckeditor_php5.php on line 37"

The file in question attempts to access $_SERVER['HTTP_USER_AGENT'] without checking to see if it is set.  To work around this, I modified fckeditor_php5.php to:

<code>
function FCKeditor_IsCompatibleBrowser()
{
    $sAgent = "";
    if (isset($_SERVER)) {
        if (isset$_SERVER['HTTP_USER_AGENT'])) {
            $sAgent = $_SERVER['HTTP_USER_AGENT'];
        }
     }
     else {
     ...
</code>
Comment 1 James 2010-09-09 22:57:52 UTC
I can verify this bug in MW 1.16 and PHP 5.3.2.  The work-around here looks like it fixes the immediate problem, but I'm wondering why FCKeditor should even be included in command line mode?

I think a better solution would be to avoid even loading the extension if $wgCommandLineMode is set.  I've added the following to the top of my extensions\FCKeditor\FCKeditor.php file:


// There is no real reason for FCKeditor to run in commandline mode!
// This avoids breakage of scripts like dumpBackup.php
if ( isset($wgCommandLineMode) && $wgCommandLineMode )
{
	return; // Simply return from the include, so no FCKeditor code is run
}
Comment 2 James 2010-09-09 23:56:54 UTC
Ported bug to upstream tracker: https://dev.ckeditor.com/ticket/6279

Patch added there.
Comment 3 Max Semenik 2010-09-19 10:17:17 UTC
*** Bug 25211 has been marked as a duplicate of this bug. ***
Comment 4 Andre Klapper 2012-12-12 13:46:00 UTC
Comment by j.swiderski in upstream bug reports http://dev.ckeditor.com/ticket/5602 and https://dev.ckeditor.com/ticket/6279 :
"FCKeditor and MediaWiki are no longer supported. Closing the ticked as
invalid."

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


Navigation
Links