Opened 15 years ago
Closed 14 years ago
#6279 closed Bug (invalid)
fckeditor_php5.php causing error in mediawiki's dumpBackup.php
| Reported by: | James | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Project : MediaWiki+FCKeditor | Version: | |
| Keywords: | HasPatch | Cc: | jcuzella@… |
Description
This bug was originally reported as Bug 20810 at bugzilla.wikimedia.org by Brian.
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.
Brian fixed the problem by adding the following to fckeditor_php5.php, but I believe this workaround has potential to break:
function FCKeditor_IsCompatibleBrowser()
{
$sAgent = "";
if (isset($_SERVER)) {
if (isset$_SERVER['HTTP_USER_AGENT'])) {
$sAgent = $_SERVER['HTTP_USER_AGENT'];
}
}
else {
...
I see no reason for FCKeditor to be loaded when running command line php scripts for mediawiki maintenance. 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
}
I'm also submitting this as a proposed patch here.
Attachments (1)
Change History (6)
Changed 15 years ago by
| Attachment: | 6279.patch added |
|---|
comment:1 Changed 15 years ago by
| Keywords: | HasPatch added |
|---|
comment:2 Changed 15 years ago by
| Component: | General → Project : MediaWiki+FCKeditor |
|---|
comment:3 Changed 15 years ago by
| Cc: | jcuzella@… added |
|---|
comment:4 Changed 15 years ago by
after adding lines:
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
}
tried to enable fckeditor from mediawiki, it gave error:
Not Found
The requested URL /mediawiki/null/FCKeditor.popup.html was not found on this server.
comment:5 Changed 14 years ago by
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
MediaWiki and FCKeditor are no longer supported. Closing the ticket.

Patch to fix problem. Based of of SVN r5862