Talk:FCKeditor integration guide

From MediaWiki+FCKeditor

Jump to: navigation, search

Contents

Please note that the Safari browser doesn't display the fckeditor properly.  When you click enable rich editor. Roughly 50 to 100 pixels of the content shows. Only after click the area then the entire text of the article displays.

Using the installation guide located: http://mediawiki.fckeditor.net/index.php/FCKeditor_integration_guide I've gone through the steps. However, when I enable

http://mediawiki.fckeditor.net/index.php/FCKeditor_integration_guide

require_once("$IP/extensions/FCKeditor/FCKeditor.php")

• tried using ini_set('display_errors', 0); in LocalSettings.php but still doesn't work. I get the same results

The wiki displays a blank page. What am I doing wrong.

Any help would be appreciated.

SOLVED:

Issue was... No ";" at the end of the line

had: require_once("$IP/extensions/FCKeditor/FCKeditor.php")

needed require_once("$IP/extensions/FCKeditor/FCKeditor.php");

NZTmrP AFAIC that's the best awnesr so far!

FCKeditor broke links due to bad absolute path setting

Hello. I've MediaWiki 1.14.0 + PHP 5.1.6 (apache2handler) + MySQL 5.0.27 + fckeditor_mediawiki_114alpha.zip + mediawiki_fckeditor_ext_N.zip (sorry, i've not other information, but these zip was downloaded the 5th of march 2009)

When i create a new link, using the link button, i can choose an existing or a new page. It works fine. (For example, i choose in the dialog box the page "NameOfMyPage") -->if i save, i've a link to http://192.168.1.35/MediaWiki/index.php/NameOfMyPage

Now, if i edit the page again, with the rich editor and try to edit the link, I got a link in the dialog box to MediaWiki/index.php/NameOfMyPage instead of NameOfMypage ... And after saving, the link is now http://192.168.1.35/MediaWiki/index.php//MediaWiki/index.php/NameOfMyPage ...

I can have the same problem if i make the following: 1) in Rich editor: adding a link with the link button 2) Click on Wikitext button --> ok 3) reclick on wikitext to go to rich editor --> now the link is MediaWiki/index.php/NameOfMyPage instead of NameOfMyPage ...

I guess there is a setting to specify the base path, but i can't find it

Jimich 10:47, 10 March 2009 (CET)


Update after using the download link of page [[1]] ( http://rapidshare.com/files/205304883/FCKeditor.zip )

--> the bug is still there ... So i believe a setting is missing somewhere in the extension or in mediawiki ...

Jimich 16:32, 10 March 2009 (CET)


I have the same error, is there a solution???

Thx in Advance, gregor 90.152.145.1 09:30, 6 April 2009 (CEST)


Hey guys, this issue refers to the following bug: [2], sadly hasn't been resolved since I added my comments 6 weeks ago. Also [3] could be related.

Nanol 14:18, 07 May 2009 (BST)

Problem with disable rich editor

Sometimes I can not disable FCKeditor. When I open edit page, FCKeditor is already opened, and ther is no way to disable it. But sometimes it work fine. What I did wrong? Please, help me!  Thank you! You can see it [4](Sorry for my English)  --93.180.226.26 16:34, 4 January 2009 (CET)

There is the same page, but:
Here it is possible to open Rich editor and disable it
Here it is possible to open Rich editor and disable it
And here is not
And here is not









Problem with formatted text

It seem that when applying the "formatted" format all the links and fonts are lost.

example: there is a [[AmosTest|link here]]

The solution would be to use a space at the beginning of the line instead of putting <pre></pre> to do the box. Can this be fixed????

Thanks! 142.39.200.100 22:42, 22 August 2008 (CEST)


Got the same problem! The editor even allows to apply bold and so on, and also shows it in the editing area in the respective formatting, but when saving it, no formatting will be displayed because of the pre tag. --217.71.244.98 16:39, 5 January 2009 (CET)

LocalSetting.php issues

The tar package <a href="http://mediawiki.fckeditor.net/nightly/svn/mediawiki_fckeditor_ext_N.tar.gz">mediawiki_fckeditor_ext_N.tar.gz</a> has /fckeditor and fckeditor.php versus /FCKeditor and FCKeditor.php

On fedora core 5 running

  • MediaWiki: 1.10.1
  • PHP: 5.1.6 (apache2handler)
  • MySQL: 5.0.27


The changes to /includes/edit.php are straight forward


I can't register this extension using anyone of the following require_once variations?


  • require_once $IP . "/extensions/fckeditor/fckeditor.php";
    1. require_once( "extensions/fckeditor/fckeditor.php" );
    2. require_once( "$IP/extensions/fckeditor/fckeditor.php" );
    3. require_once( "{$IP}/extensions/fckeditor/fckeditor.php" );
    4. require_once('extensions/fckeditor/fckeditor.php');
  • require_once $IP . "/extensions/FCKeditor/FCKeditor.php";

This appears to be a useful extension and would apprecitate any advice  - Great Job!

I am not sure if you have tried however the file is Case Sensitive. I would suggest trying some of the above again using the right case. I used require_once( "$IP/extensions/FCKeditor/FCKeditor.php" );<




I'm getting strange characters:



At the top of my image insert window.  It's below "Image Properties".  Any ideas?


Anybody working with legacy versions of Mediawiki?

I'm running a wiki on a server with PHP 4.3.9 and MediaWiki 1.6.10.  Does the FCKeditor work with PHP 4.3.9 and MW 1.6.10?  This server is hosting several other commercial websites, so I would prefer not to upgrade PHP unless necessary.

I built a sandbox mediawiki installation (1.6.10) and added the FCKeditor extension.  When I enter my URL I just get a blank page.

Anybody have it running with the legacy version of Mediawiki?


      • I am having this same issue!!!!  Please help!!!!  I cannot find any solution anywhere.... ***

FCK editor doesn't work with the new version of WIKI

FCK editor isn't compatible with the wiki latest release, it get's a huge bug in the images. -<a href="User:217.129.227.4">217.129.227.4</a>



After following the instructions for editing the /includes/edit.php in version 1.11.0, when you use the image button in the tool bar, it retrieves the image, but, if you switch to wikitext, the  wikitext code for the image becomes corrupted. (this comment added Sept. 28, 2007.


A couple of patches has been applied recently (3.X.2007) and generally, FCKeditor should work with Mediawiki 1.10 and 1.11.

Is there a solution for the above problem?

I have also experienced this problem and it is driving me crazy. Is there anybody that knows about a fix for this, latest release, or anything. I am desperate!!!

Touchdown! That's a relaly cool way of putting it!

Cannot get FCKeditor to open up edit window with most skins

Loaded latest MediaWiki and FCKeditor. Followed instructions (required only at this point). Running "Classic" skin, and receive errors when trying to edit a page.


Error loading "/wiki/extensions/FCKeditor/fckeditor/fckstyles.xml"

Do you want to see more info?


Click on OK and get the following:

URL requested: "/wiki/extensions/FCKeditor/fckeditor/fckstyles.xml"

Server response:

Status: 200

Responst text:


Status 200 typically means the page loaded okay, but I usually get a blank screen (no text at all).


There were two skins that gave me the first half of the editor toolbar, but not the second row which has Text tools.


Any help would be appreciated.


Rick

fckstyles.xml error

same here, newest mediawiki + nightly build..  it gives an error while loading fckstyles.xml

error loading "/wiki/extensions/FCKeditor/fckstyles.xml" 
Do you want to see more info 


URL requested: "/wiki/extensions/FCKeditor/fckstyles.xml"

server response: 
status: 200
response text: 
<? xml version ..... (follows fckstyles.xml )


what to do?


michel, 217.56.230.234 12:52, 31 January 2008 (CET)



This will be fixed soon: https://dev.fckeditor.net/ticket/1426.

PHP Fatal error: Call to undefined method Parser::parser() FCKeditor/FCKeditorParser.body.php line 29

Subject says it all.

I'm running mediawiki straight off SVN checkouts, and same for FCKeditor extension, and they don't even work together ;). Disappointing, really. I've used FCK in the past, and always liked it.

I tried hacking that file and I'm not very much of a programmer, and very basic php skills, so I'm outta my depth to fix it. I imagine though somehow you'd need to include Parser, or such, but since it's OO php, it's already done. It's that parent::Parser() on line 29 throwing it off. I imagine since it's already class FCKeditorParser extends Parser you don't need to include Parser again, but that's just a semi-newbie's 2 cents.

There's also a typo on line 5, same file:

public static $fkc_mw_makeImage_options;

should probably be fck ;)


72.0.197.170 20:45, 22 February 2008 (CET)

A: Upgrade to the latest version

I also ran into this and went digging... The initial problem is that the constructor function is now __construct() and not Parse(). After fixing that issue, I ran into another one - it was looking for "replace_callback()" which no longer exists in the Parser class, but does exist in the new "Parser_OldPP" class (Parser with the old preprocessor). Fixing it is just a matter of making three simple changes to extensions/FCKeditor/FCKeditorParser.body.php (besides fixing the typo):
First, add require ($IP . '/includes/Parser_OldPP.php'); to the beginning of the file (before the class declaration).
Second, change extends Parser to extends Parser_OldPP
Finally, change parent::Parse(); to parent::__construct();
Then just upload the modified file to your extensions/FCKeditor directory and everything should work.
Oldiesmann 22:30, 8 March 2008 (CET)


I encountered the same error, I was using the latest MediaWiki software (mediawiki-1.12.0rc1.tar.gz). I couldn't make it work with FCKeditor. Then, I downloaded the "legacy" version mediawiki-1.11.2.tar.gz, installed it and then everything worked perfect, no modification necessary.

I advise anyone with a simillar problem to use this version of MediaWiki - mediawiki-1.11.2.tar.gz.

[[5]]


Thanks Oldiesmann your solution fixed the problem!

Friso




This fixed the problem for me. There is a patch on the page but I suggest integrating it manually by hand since the patch did not apply properly.

http://dev.fckeditor.net/ticket/2721

Cheers,
Jason

Add Indent / Outdent Buttons to Toolbar?

I just tried editing the Toolbar-Sets in the config Files, but no result. Any Idea? Indenting is very important when working with bulletlists.

  • I accomplished this in version 2.6.4 by changing the following in fckeditor_config.js:
    • Change: ['OrderedList','UnorderedList','-','Blockquote'],
    • To: ['OrderedList','UnorderedList','-','Outdent','Indent','-','Blockquote'],
  • However the indentation only works with bullets, not plain text. Why I don't know since with bullets it just places a "*" and for plain text it would just need to place a ":".

FCK editor vs IIS webserver

I have 5 mediawiki servers running. This plugin runs smootly under Linux with Apache webserver and even under Windows 2003 with Apache its a true pleasure. When I combine it with Windows 2003 and IIS, I receive errors when switching back from Wikitext-mode to WYSIWYG mode.

Notice: Array to string conversion in C:\Program Files\wiki\wikiadgroups\includes\Parser_OldPP.php on line 445 Array 

This only occurs on pages with links that use [], typical internal links. It does not occur on pages with external links, or pages without links.

Of course I'm aware this is still a beta-release that will be tested on Apache first. If anyone has a simple solution for this, I would appreciate it very much.

 Regards, Will.

A: Try adding this to LocalSettings.php:

ini_set('display_errors', 0);

Thanks. The error message doesn't show up anymore. But the text is still not parsed. All I get is a blank page.

It seems that i am overlooking something simple.


Ok, please report it here: http://dev.fckeditor.net. You need to register to create the ticket, but it is rather simple process.

Remove that line from LocalSettings.php. Remember to describe what MediaWiki version are you running + provide a list of additional extensions (or just post a link to Special:Version page).

I believe that the problem is that in this line (mw12\FCKeditorParser_OldPP.body.php):

$text = preg_replace("/^#REDIRECT/", "<!--FCK_REDIRECT-->", $text);

$text is not a string, but an array... this is really strange because according to the documentation, it should really be a string. You can inspect this variable by adding var_dump($text);:

var_dump($text);
$text = preg_replace("/^#REDIRECT/", "<!--FCK_REDIRECT-->", $text);

Will it be possible to upload pictures or other files through the editor directly in the future?

It will be more convenient to use this wysiwyg editor :)

Regards,

outcrop


I would definitely love to if this was possible ! Vincent

Yes, the aim of FCKeditor/Mediawiki integration is a user-friendly interface for non-teckies - so straightforward uploading of images is an essential. JD.

version 2.6

Version 2.6 is out, i tried to extract it into the extensions/FCKeditor/fckeditor folder, however now when i try to insert a special caracter or table a white winow pops up that says undefined. And i con not get out of it or fix it. anyone else have this problem? Mlong212 22:59, 8 April 2008 (CEST)

A: incompatible skin.



Hey, that's the garetest! So with ll this brain power AWHFY?

WikiSport & FCK

I have a Mediawiki 1.12 server running to support WikiSport.es . We would like to know how to disable RICH EDITOR to all users and to use a special magic word to enable some specific articles. What would be the code I should insert? Anybody has any idea?

Thanks a lot and kind regards.


How to add/remove buttons from the editor

I've found the list of buttons in the config file, but when I delete one or two, and then shift reload, the changes never take effect.  I'd also like to add a few buttons, one of which would just be a category button where you get a pop up window that you can insert tags/categories and then have them added to the end of the article.  Any ideas on how we can get this working? --Tom


Editing 'fckeditor_config.js' worked fine for me. The Taskbar changed immediately. I had several Problems with the editor and uploaded several versions and tested them. I finally succeeded with the latest SVN-Versions. Maybe you should try that aswell.

btw: Category- & Signature-Buttons would be very appreciated! --Taikonaut 14:21, 24 September 2008 (CEST)

Signature button

By the way, if anybody can give the procedure to create a signature-button, you're welcome ! --Dieudo 22:58, 13 June 2008 (CEST)


How to change the language ?

I didn't find a way to set de FCKeditor in another language any help ? 

1) make a backup copy of fckeditor/editor/lang/en.js
2) copy fckeditor/editor/lang/{your language}.js as fckeditor/editor/lang/en.js


change in fckconfig.js

  FCKConfig.DefaultLanguage = 'fr';
FCKConfig.AutoDetectLanguage = false;
        OR 

In PHP:-

  $oFCKeditor->Config['DefaultLanguage'] = 'fr';
$oFCKeditor->Config['AutoDetectLanguage'] = false;

Great thinking! That ralley breaks the mold!

'FCKeditor' is undefined : Fix

If you are getting this error and you have "fancy" URLS enabled (i.e. urls look like http://server-name/Main_Page) then what you need to do is edit your .htaccess file (or your apache config file) and update the RewriteCond line and add the extensions subdirectory to it. This is because the extension is trying to serve files out of the extensions directory and it gets confused.

# Don't rewrite requests for files in MediaWiki subdirectories
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
RewriteCond %{REQUEST_URI} !^/(stylesheets|images|skins|icons|opensearch_desc.php|download|extras|extensions)/

thumbnails/images not the right size

when i include an image everything works. the thumbnail is there and ist is shown in tha standard size of 180px width. when i save the page, everything is correct. but when i edit the page again, the pictures are shown in their real size, not 180px! The wikitext gets also changed ([[Image:example.jpg|thumb]] -> [[Image:example.jpg|thumb|1100px]]). whats the problem? its terrible to edit pages like this, you just see giant images ... --81.223.101.18 11:25, 16 July 2009 (CEST)

Missing [Rich Editor] [Open Rich editor in new window] links

I have just installed FCKeditor on my private wiki. I am running MediaWiki version 1.15.1.

I am able to view the sample pages of FCKeditor and they have the proper toolbar displayed.

My problem is that when I go to edit a page on my wiki I am missing the links that should exist above the tool bar labeled "[Rich Editor] [Open Rich editor in new window]".

Any ideas?

Same problem with 1.15.3

AFAIC that's the best asnwer so far!

Disabled on talk pages...

I am using the latest for MW 1.15.1. For some reason I have no link to enable the editor on my talk pages. Any thoughts on where to look? I have only disabled the editor for my template namespace and have the editor set to start enabled.

I have found that the setting $wgExcludedNamespaces[NS_TEMPLATE] = true; was causing it to be disabled on all namespaces except for NS_MAIN.


How to add a drop-down menu ?

I'm using FCKeditor and GeSHI (for syntaxic coloration). Does anyone know if it's possible to add a drop-down menu (like "Format" one) ?
In fact, I want a drop-down menu to choice the language that is used.
(For GeSHI, it adds < source lang=... > and < /source >)

Unknown toolbar item for wiki toolbar

I tried to add the FCKeditor to my MediaWiki. It works fine, but on load there are a few alert boxes "Unknown toolbar item "MW_Template". There is one error for these toolbar items: 'MW_Template','MW_Special','MW_Ref','MW_References','MW_Source','MW_Math','MW_Signature','MW_Category'


I don't want to comment them out, because I want to use them, so how can I fix this problem?

MW: 1.15.4

FCKeditor: 2.6.6

I didn't changed the filenames and foldernames into lowercase and I tried to install the extension three times, but the error still occurs.

I'm getting the same problem. MediaWiki 1.16 --Sxtynnmach1 21:26, 6 August 2010 (CEST)

Links are missing

I have installed mediawiki 1.16 and the FCKEditor according to this version. I have downloaded the package and placed it in the directory, configured localsetting as well, but those links on the edit page are missing (rich editor/open rich editor in new window ?

Caption Issues

I'm experiencing issues with captions for images within FCKEditor. I know that this is a known issue and that there is a supposed workaround, but it is not working for me.

If you search for "captions" on this page: http://mediawiki.fckeditor.net/index.php/FCKeditor_integration_guide you will pull up the following guide:

Q: FCK Editor destroys the style of my tables. Is it possible to use "normal" Wiki tables instead of that ugly FCK-Tables ?
Q: FCK Editor loose captions when style with frame or thumb
A: MediaWiki tries to be smart regarding alt-text of images, as they don´t want to double it within title and alt-text... edit includes/parser/Parser.php (line 4394) to put in alt-text everytime
      # In the old days, [[Image:Foo|text...]] would set alt text.  Later it
      # came to also set the caption, ordinary text after the image -- which
      # makes no sense, because that just repeats the text multiple times in
      # screen readers.  It *also* came to set the title attribute.
      #
      # Now that we have an alt attribute, we should not set the alt text to
      # equal the caption: that's worse than useless, it just repeats the
      # text.  This is the framed/thumbnail case.  If there's no caption, we
      # use the unnamed parameter for alt text as well, just for the time be-
      # ing, if the unnamed param is set and the alt param is not.
      #
      # For the future, we need to figure out if we want to tweak this more,
      # e.g., introducing a title= parameter for the title; ignoring the un-
      # named parameter entirely for images without a caption; adding an ex-
      # plicit caption= parameter and preserving the old magic unnamed para-
      # meter for BC; ...
      if( $caption !== '' && !isset( $params['frame']['alt'] )
      && !isset( $params['frame']['framed'] )
      && !isset( $params['frame']['thumbnail'] )
      && !isset( $params['frame']['manualthumb'] ) ) {
         $params['frame']['alt'] = $params['frame']['title'];
      }
### ALT-TEXT NEEDED FOR FCKEDITOR!!! ####

$params['frame']['alt'] = $params['frame']['title'];


However, this guide is not solving my problem.  By default, this is what that section of parser.php file looks like:

        # In the old days, [[Image:Foo|text...]] would set alt text.  Later it
        # came to also set the caption, ordinary text after the image -- which
        # makes no sense, because that just repeats the text multiple times in
        # screen readers.  It *also* came to set the title attribute.
        #
        # Now that we have an alt attribute, we should not set the alt text to
        # equal the caption: that's worse than useless, it just repeats the
        # text.  This is the framed/thumbnail case.  If there's no caption, we
        # use the unnamed parameter for alt text as well, just for the time be-
        # ing, if the unnamed param is set and the alt param is not.
        #
        # For the future, we need to figure out if we want to tweak this more,
        # e.g., introducing a title= parameter for the title; ignoring the un-
        # named parameter entirely for images without a caption; adding an ex-
        # plicit caption= parameter and preserving the old magic unnamed para-
        # meter for BC; ...
        if ( $imageIsFramed ) { # Framed image
            if ( $caption === '' && !isset( $params['frame']['alt'] ) ) {
                # No caption or alt text, add the filename as the alt text so
                # that screen readers at least get some description of the image
                $params['frame']['alt'] = $title->getText();
            }
            # Do not set $params['frame']['title'] because tooltips don't make sense
            # for framed images
        } else { # Inline image
            if ( !isset( $params['frame']['alt'] ) ) {
                # No alt text, use the "caption" for the alt text
                if ( $caption !== '') {
                    $params['frame']['alt'] = $this->stripAltText( $caption, $holders );
                } else {
                    # No caption, fall back to using the filename for the
                    # alt text
                    $params['frame']['alt'] = $title->getText();
                }
            }
            # Use the "caption" for the tooltip text
            $params['frame']['title'] = $this->stripAltText( $caption, $holders );
        }

If I try and make it look like the example given in the 'workaround' or solution, nothing happens.  FCK Editor still removes my captions and I am left sad and bereft of hope (jokes).

What am I doing wrong?  Is there caching occurring?  What can I do to improve this?

Caption Issues

I have this problem. What am I doing wrong? mail me hanataro21\@\ya.ru

Caption issues, partial fix

I'm on MW1.15 and modifying the fix to that shown below worked although (a) i dont quite know why and (b) i havent extensively tested it. Lee

    # meter for BC; ...
>>>            if( $caption !== ' ' && !isset( $params['frame']['alt']) && isset($params['frame']['title']) 
>>>                      && !isset( $params['frame']['framed'] )
>>>                     && !isset( $params['frame']['thumbnail'] )
>>>                     && !isset( $params['frame']['manualthumb'] ) ) {
>>>                       $params['frame']['alt'] = $params['frame']['title'];
>>>                }
>>>               if (!isset( $params['frame']['alt'])) {
>>>                   $params['frame']['alt'] = $caption;
>>>              }
       if ( $imageIsFramed ) { # Framed image...
  • This does not solve the problem for me. Philipp

Ppl like you get all the brains. I just get to say thanks for he anwser.

Warning: require_once(/path/to/htdocs/$WIKI/includes/ParserOptions.php) [function.require-once]: failed to open stream: No such file or directory in ...

i see that this issue is mentioned on this page in both english and spanish, but i'm afraid, i have this same issue.

i am using mediawiki 1.15.x, the extension is installed to $WIKI/extensions/FCKeditor/, and i have triple checked the permissions. it seems in my case that the error is correct, i do not have a file $WIKI/includes/ParserOptions.php. i run about 30 wikis on this server. all my older wikis have this file, but none of the newer ones. it seems like version 1.15.x doesn't have ParserOptions.php, so why is fckeditor v1.15.x looking for it?

== cadillac mississippi oxford

907 ==

514658

Looking forward to make a contribution

Hey - I am certainly delighted to find this. cool job!