Topic on Extension talk:TinyMCE

TinyMCE not showing/loading Page for editing

12
Summary by DuncanCrane

I believe this should be resolved by the latest release V1.0

Xaase (talkcontribs)

I got TinyMCE installed and its pretty amazing and fairly easy to use, BUT somehow some pages are not loading into the editor or not showing.

Is there a limit on how big a page should be in order to get loaded?

I also have a cache set up,, could that maybe a problem?


DuncanCrane (talkcontribs)

Hi

It's great you are giving the extension a try and thank you for raising this question.

This occasionally happens when the editor encounters a '|' characters in the text. Normally this is when people are using it in forms, but I have known it to happen elsewhere. Would you check the text and see if there are any '|'s and try 'escaping' them by using the {{!}} template instead?

If this doesn't work, the if you can let me have the wiki text content of the page, I can try and reproduce the problem.

You may also be interested that I'm very close to releasing a major upgrade to the extension which makes use of the latest versions of TinyMCE and also provides improved coverage of wiki text markup. If you are interested in using the extension long term it might be worth you using this new version, which can be found here https://github.com/duncan-crane/TinyMCE/tree/Upgrade-to-TinyMCE-5.

If you do try this, be sure to download the 'Upgrade to TinyMCE 5' branch and not the 'master' branch.

The new version is also fixes the '|' issue mentioned earlier so it may be a solution to your problem too.

Please do let me know how you get on

Kind regards

Duncan

Srikanth 4455 (talkcontribs)

Hi Duncan,

I have installed the TinyMCE from Upgrade-to-TinyMCE-5 branch but is gives error on SpecialPages and also no tool bar in TinyMCE edit option on pages.

SpecialPages Error:

[e943dd9c63c146a8353747db] /index.php/Special:SpecialPages Error from line 382 of /var/www/devwiki/includes/specialpage/SpecialPageFactory.php: Class 'TinyMCEUploadWindow' not found

Backtrace:

#0 /var/www/devwiki/includes/specialpage/SpecialPageFactory.php(428): SpecialPageFactory::getPage(string)

#1 /var/www/devwiki/includes/specials/SpecialSpecialpages.php(53): SpecialPageFactory::getUsablePages(User)

#2 /var/www/devwiki/includes/specials/SpecialSpecialpages.php(42): SpecialSpecialpages->getPageGroups()

#3 /var/www/devwiki/includes/specialpage/SpecialPage.php(565): SpecialSpecialpages->execute(NULL)

#4 /var/www/devwiki/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)

#5 /var/www/devwiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)

#6 /var/www/devwiki/includes/MediaWiki.php(861): MediaWiki->performRequest()

#7 /var/www/devwiki/includes/MediaWiki.php(524): MediaWiki->main()

#8 /var/www/devwiki/index.php(42): MediaWiki->run()

#9 {main}


Regards,

Sri

DuncanCrane (talkcontribs)

Hi Sri

I'm sorry that didn't work and thank you for trying. The Special pages issue was pointed out to me earlier in the week and a new release will be posted later today or tomorrow. I will also add some notes on configuration to the GitHub summary page as I think those on the mediawiki extension page may not apply to the new version. Sorry for any inconvenience.

Kind regards, Duncan

Srikanth 4455 (talkcontribs)

Hi Duncan,

I have downloaded latest files from Upgrade-to-TinyMCE-5 but still the issue with Special:Pages and TinyMCE Tool bar didn't resolve.

I have placed the TinyMCE folder under extension folder and made entry in LocalSettings.php as per README File. Can you let me know if there is anything I have missed.

DuncanCrane (talkcontribs)

Hi Sri

Thank you for persevering and I'm sorry that didn't work. I checked my latest release to that branch and somehow I didn't include the fix for the special pages, so I really am sorry.

I will submit another release over the next day or so, but you could try removing the following line from the extension.json file in the root directory of the TinyMCE extension. You'll find it on or around line 175.

"SpecialPages": {

"TinyMCEUploadWindow": "TinyMCEUploadWindow"

},

I suspect this bug would also stop the toolbar loading but would you let me know if it does not.

Srikanth 4455 (talkcontribs)

Hi Duncan,

Thanks for the fix.

Both Special Pages and Tool bar issue resolved by updating file from the Upgrade-to-TinyMCE-5.

But in TinyMCE edit there is no underlying text coming.

Can you check please if this case is happening at your end also.

DuncanCrane (talkcontribs)

Hi Sri

Sorry for the delay getting back to you. Would you check using your browser debug feature to see if there are any Javascript errors being reported?

Kind regards

Duncan

Xaase (talkcontribs)

thanks for your reply.

I looked into some of the cases were the editor did not load the texts. There is no "loose" "|".

It seems the "|" to construct a table is ok ?! When I write the contents of a tablerow next to each other, like this: "| cell 1 || cell 2 || cell 3", is that different for the editor to load, than writing the tablerows underneath each other?

Besides that I actually found which elements causes the editor not to load:

1. I use the extension Extension:Tabber and if I put all my contents directly inside the tabs, the editor will not load, it doesn't matter how much self written text is in the tab. But if I put another page (as an include) in the tabber, the editor will load.

What the editor does when its actually loading the tabbers, it puts everything inside the "<tabber>" tags in the "wikimagic" function

2. when I divide a page in columns via wiki markup and I than try to edit just a section of the page containing a part of that markup the editor will also not load. when I load the entiere Page its fine. I guess this is due to what you assumed with the "|" character and the editor doesn't recognise this as a part of the page deviding.


Another wierd thing happens by using the wiki markup "<nowiki>" and "#" inside it. That creats very interesting result in the editor. I solved that by using "<source>" instead. I guess that will be solved with your upcoming update?

I tried to install the current development of the update 5, but somehow its not working at all. I will wait till its fully released.

DuncanCrane (talkcontribs)

Thanks, that's very helpful. I'm not familiar with extension tabber so I will have to look into that. I suspect you may be right about the '|' treatment. I have to admit the 'old' version was mainly good for simple to medium complexity wiki markup. The new version has been tested against a much fuller set of markup (based on mediawiki 'help' pages and seems to handle things better.

I realised now that I should provide some details about configuring the extension on the GitHub pages as it has changed in some respects. I think the new version will be released before the end of July, but I will put some notes in GitHub in case you wish top try again.

Xaase (talkcontribs)

I tested a bit more with that issue and came to the following observation:

the "wikimagic" seems to have a maximum of characters (?) but I couldn't pin point exactly where the limit is ...


DuncanCrane (talkcontribs)

Hi and thank you for trying again.

I'm sorry this isn't proving straightforward to find a solution. Would it be possible for you to use the debugger or inspect function on your browser to see if any errors are being reported? This might help identify the problem.

I looked at the Tabber extension. The way that the TinyMCE extension works is that anything between the <tabber> tags, or {{ }}, is sent to the mediawiki api for processing and the equivalent html returned to the editor in a protected block that can only then be edited using the source editor menu options.

This is a general feature for all mediawiki templates, tags, parser functions etc. because they are instructions to mediawiki that aren't understood by a standard html interpreter. I should say the newer version is more flexible as it will allow editing of html embedded in the wiki code, whereas the old version treated it in the same way as other mediawiki tags.

If you need the TinyMCE extension to interpret the code within the <Tabber> tags to create html that TinyMCE itself can edit, currently that would probably require a plugin to be created (even in the latest version). Even then it may be difficult to recreate the tabbed structure within the editor window.

There may be some other possibilities which would need testing, including:

  • swapping to using the Headertabs extension, although in the TinyMCE editor the page is displayed as a page with a number of headings rather than tabbed. When saved mediawiki will display the page with tabs.
  • the new version will have a capability to edit areas of the page in situ without selecting the edit tab, which may let you edit the text between the tabs directly.
  • I'm also working on a plugin for the TinyMCE editor which will interpret templates, tags and parser functions creating forms that allow the user to edit parameters that are passed to these structures.

Many thanks

Duncan