Jump to content

Topic on Extension talk:TinyMCE/Flow

Cannot upload Images and problems with edit links not calling the TinyMCE editor

49
Summary by DuncanCrane

Issues resolved in V1.0 of the TinyMCE extension. Currently bug fixes can be found in the development master branch on Github her https://github.com/duncan-crane/TinyMCE

These will be included in the next maintenance release of the extension on Mediawiki Gerrit which will be numbered 1.0.1

2A02:8070:E186:4300:3423:C1F8:7131:C2D2 (talkcontribs)

I drag and drop an image into the editor. First a loading bar appears briefly

Shortly after that, a modal is included:

"I'm sorry, you have encountered an error trying to upload to this wiki : File upload parameter "file" is not a file upload; be sure to use multipart/form-data for your POST and include a filename in the Content-Disposition header.. If this continues please contact your administrator"


MediaWiki 3.1.5

PHP 7.3.24

mySQL 5.7.30


Thanks for your help

DuncanCrane (talkcontribs)

Hi

Thank you for trying this extension and I'm sorry you've experienced some problems. You might like to try the new version released earlier today.

2A02:8070:E186:4300:1929:A742:71F2:77FA (talkcontribs)

Thanks for your feedback.

After upgrading to the new version nothing happens. I get the default editor and not the Tiny Editor.


Localconfig included:


# Editor

wfLoadExtension( 'TinyMCE' );

$wgTinyMCEEnabled = true;

DuncanCrane (talkcontribs)

Hi,

Would you check a couple of things for me?

Firstly, if you look at 'special pages, versions' does it show TinyMCE as installed?

See if TinyMCE is installed on special pages, versions






If you go to user preferences would you check 'use TinyMCE' is selected on the 'editing' tab.

2A02:8070:E186:4300:1929:A742:71F2:77FA (talkcontribs)

unfortunately I can't upload pictures, but on the version page TinyMCE is entered and under the options the hook is also activated.

DuncanCrane (talkcontribs)

Thanks.

I'm not sure when you mention the hook you also checked you'd enabled TinyMCE as part of your personal preferences, but assuming you have, would you next do the following.

Go to a wiki page and open it using the 'edit' tab.

'right' click in the browser window and choose 'inspect' (if you are using Chrome) or 'inspect element' (if you are using firefox).

Then refresh the page and check the 'console' tab in the inspector. Would you let me know what messages you receive in the console, if any?

Also a couple of other things. Above you say you are using MediaWiki 3.1.5. By that did you mean 1.35?

Also in your personal preferences, have you switched off Visual Editor?

Disable visual editor
2A02:8070:E186:4300:1929:A742:71F2:77FA (talkcontribs)

sorry i was useing a translator. my english is not the best ^.^

the console says following:

[9ac603d9d1ce3a654e702306] /load.php?lang=de&modules=startup&only=scripts&raw=1&skin=pivot   BadMethodCallException from line 851 of --path--\includes\session\SessionManager.php: Sessions are disabled for this entry point

Backtrace:

#0 --path--\includes\session\SessionManager.php(334): MediaWiki\Session\SessionManager->getSessionFromInfo(MediaWiki\Session\SessionInfo, WebRequest)

#1 --path--\includes\session\SessionManager.php(268): MediaWiki\Session\SessionManager->getEmptySessionInternal(WebRequest)

#2 --path--\includes\session\SessionManager.php(218): MediaWiki\Session\SessionManager->getEmptySession(WebRequest)

#3 --path--\includes\WebRequest.php(826): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)

#4 --path--\includes\user\User.php(1221): WebRequest->getSession()

#5 --path--\includes\user\User.php(388): User->loadFromSession()

#6 --path--\includes\user\User.php(2125): User->load()

#7 --path--\includes\user\User.php(3064): User->getId()

#8 --path--\includes\Permissions\PermissionManager.php(1363): User->isRegistered()

#9 --path--\includes\Permissions\PermissionManager.php(1292): MediaWiki\Permissions\PermissionManager->getRightsCacheKey(User)

#10 --path--\includes\Permissions\PermissionManager.php(1244): MediaWiki\Permissions\PermissionManager->getUserPermissions(User)

#11 --path--\includes\user\User.php(3156): MediaWiki\Permissions\PermissionManager->userHasRight(User, string)

#12 --path--\LocalSettings.php(207): User->isAllowed(string)

#13 --path--\includes\HookContainer\HookContainer.php(320): disableSomeSpecialPages(array)

#14 --path--\includes\HookContainer\HookContainer.php(131): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#15 --path--\includes\HookContainer\HookRunner.php(3771): MediaWiki\HookContainer\HookContainer->run(string, array)

#16 --path--\includes\specialpage\SpecialPageFactory.php(347): MediaWiki\HookContainer\HookRunner->onSpecialPage_initList(array)

#17 --path--\includes\specialpage\SpecialPageFactory.php(362): MediaWiki\SpecialPage\SpecialPageFactory->getPageList()

#18 --path--\includes\specialpage\SpecialPageFactory.php(722): MediaWiki\SpecialPage\SpecialPageFactory->getAliasList()

#19 --path--\includes\specialpage\SpecialPage.php(109): MediaWiki\SpecialPage\SpecialPageFactory->getLocalNameFor(string, boolean)

#20 --path--\includes\specialpage\SpecialPage.php(94): SpecialPage::getTitleValueFor(string, boolean, string)

#21 --path--\includes\specialpage\ChangesListSpecialPage.php(873): SpecialPage::getTitleFor(string)

#22 --path--\includes\resourceloader\ResourceLoaderFileModule.php(1216): ChangesListSpecialPage::getRcFiltersConfigSummary(ResourceLoaderContext, GlobalVarConfig, NULL)

#23 --path--\includes\resourceloader\ResourceLoaderFileModule.php(619): ResourceLoaderFileModule->expandPackageFiles(ResourceLoaderContext)

#24 --path--\includes\resourceloader\ResourceLoaderModule.php(842): ResourceLoaderFileModule->getDefinitionSummary(ResourceLoaderContext)

#25 --path--\includes\resourceloader\ResourceLoaderStartUpModule.php(209): ResourceLoaderModule->getVersionHash(ResourceLoaderContext)

#26 --path--\includes\resourceloader\ResourceLoaderStartUpModule.php(405): ResourceLoaderStartUpModule->getModuleRegistrations(ResourceLoaderContext)

#27 --path--\includes\resourceloader\ResourceLoaderModule.php(736): ResourceLoaderStartUpModule->getScript(ResourceLoaderContext)

#28 --path--\includes\resourceloader\ResourceLoaderModule.php(704): ResourceLoaderModule->buildContent(ResourceLoaderContext)

#29 --path--\includes\resourceloader\ResourceLoaderModule.php(839): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)

#30 --path--\includes\resourceloader\ResourceLoader.php(775): ResourceLoaderModule->getVersionHash(ResourceLoaderContext)

#31 [internal function]: ResourceLoader->{closure}(string)

#32 --path--\includes\resourceloader\ResourceLoader.php(787): array_map(Closure, array)

#33 --path--\includes\resourceloader\ResourceLoader.php(874): ResourceLoader->getCombinedVersion(ResourceLoaderContext, array)

#34 --path--\load.php(51): ResourceLoader->respond(ResourceLoaderContext)

#35 --path--\load.php(38): wfLoadMain()

#36 {main}


visualeditor is not installed / not activated


we use the latestet version. i meant 3.15 - sorry


cheers and have a nice weekend

2A02:8070:E186:4300:1929:A742:71F2:77FA (talkcontribs)

but the error from the console is also displayed on normal pages. probably has less to do with your extension?

DuncanCrane (talkcontribs)

Thanks - seems to me your English is pretty good :-)

The errors don't seem directly related, as you said, but it may be that something else is interfering with the TinyMCE load. You could try adding the following to your LocalSetting.php just after where you have $wgTinyMCEEnabled = true;

$wgTinyMCESettings = array(

".tinymce, #wpTextbox1" => array (

  "tinyMCEDebugFlags" => array(

'settings' => 'false',

'debug' => 'true',

'anteOnBeforeSetContent' => 'false',

'anteOnGetContent' => 'false',

'anteOnPastePostProcess' => 'false',

'postOnBeforeSetContent' => 'false',

'postOnGetContent' => 'false',

'postOnPastePostProcess' => 'false'

)

)

);

If you do this and reload the editing page as described above, the process should stop in the debugger when it is initialising TinyMCE. If it doesn't then it is likely that TinyMCE hasn't been loaded for some reason.

Maybe you could also try disabling any other user specified extensions and configuration in LocalSetting.php so we can make sure there aren't any conflicts?

Another thing you could try is to add the following to the top of your LocalSetting.php file to see if mediawiki is getting any other errors?

error_reporting( -1 );

ini_set( 'display_errors', 1 );

Thanks, hope you have a good weekend too

Duncan

DuncanCrane (talkcontribs)

Something else you could try is to change the url in the address bar of your browser. If you edit a page you will see something like this in the address bar.

Talk:Main_Page&action=edit

If you then change the '=edit' to '=tinymceedit' and hit return your wiki should load the TinyMCE editor if it is available.

Would you give this a try and let me know what happens?

2A02:8070:E186:4300:6E:1F87:CB9D:5FD3 (talkcontribs)

hello duncan,

hehe many thanks! (:

the first adjustment with the array did not show any effect. only the wiki standard editor was displayed.

after that i deleted all additional entries in the localconfig. so the above mentioned error with the load was not there anymore. but this did not change the behaviour of tinymce.

adjusting the querys from action=edit to action=tinymceedit worked. i had to click on the debugger a few times during loading. the upload of pictures worked too.

can i get a grip on the fact that i can access the editor without special tinymceedit input and that it runs without debugging steps?

thanks

niko

DuncanCrane (talkcontribs)

Hi Niko Great, some progress. At least we know that the TinyMCE editor is loaded. To remove the debugging steps all you have to do is remove the array in LocalSettings.php. However, we might want to hang on to the debugger steps for a while until we resolve the problem at least.

I'm not sure how familiar you are with mediawiki programming so if the next paragraph doesn't mean anything to you, just ignore it :-)

The TinyMCE extension uses hooks into mediawiki in order to create the edit links. I suspect that for some reason, the TinyMCE extension is not recognising edit links so isn't changing them to call the TinyMCE editor. When you hover over a 'red link' on a page it should have 'pagename&action=tinymceedit' where pagename is the name of the page being linked to and not 'pagename&action=edit'.

I see above that you are using the 'pivot' skin so I wonder if this maybe where the problem is? Could you try switching to the 'vector' skin, just for now, to see if you still get the problem?

2A02:8070:E186:4300:6E:1F87:CB9D:5FD3 (talkcontribs)

hello and thanks for the feedback (:

i have already deleted the array during the tests with tinymceedit. the debug steps appear nevertheless.

when i click on a red link hover the following appears: index.php?title=Testpage&action=edit&section=1

activating the vector skin did not change the behavior.

BTW the latest pivot version is used.

Thanks for your help

Niko

DuncanCrane (talkcontribs)

Hi Niko

It would be useful to know what lines in the TinyMCE editor that the debugger is stopping on. Perhaps you could give some examples, thanks?

B.T.W. did you purge the cache after switching to the Vector skin? Sometimes it takes a while for mediawiki to register a switch?

I presume that you are still getting the unrelated error printout that you reported above? Would you let me have the first few lines of that printout when you have the vector skin installed? They should look similar to:

[9ac603d9d1ce3a654e702306] /load.php?lang=de&modules=startup&only=scripts&raw=1&skin=pivot   BadMethodCallException from line 851 of --path--\includes\session\SessionManager.php: Sessions are disabled for this entry point
2A02:8070:E186:4300:8B9:461B:5241:C096 (talkcontribs)

hola duncan,

following lines were triggered by the debugger:


load.php - line 29:

console.log("TinyMCE Extension version "+v+" Debug Log on selector "+id+" for "+scope+" at "+d);console.log(print_r(text));console.log("END LOG");console.log("");}if(tinyMCEDebugFlags.debug='true')debugger;}


yep, the error still appears:

[2389ac30680e13413bd1b14f] /load.php?lang=de&modules=startup&only=scripts&raw=1&skin=vector   BadMethodCallException from line 851 of sitenameincludes\session\SessionManager.php: Sessions are disabled for this entry point

Backtrace:

#0 sitenameincludes\session\SessionManager.php(220): MediaWiki\Session\SessionManager->getSessionFromInfo(MediaWiki\Session\SessionInfo, WebRequest)

#1 sitenameincludes\WebRequest.php(826): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)

#2 sitenameincludes\user\User.php(1221): WebRequest->getSession()

#3 sitenameincludes\user\User.php(388): User->loadFromSession()

#4 sitenameincludes\user\User.php(2125): User->load()

#5 sitenameincludes\user\User.php(3064): User->getId()

#6 sitenameincludes\Permissions\PermissionManager.php(1363): User->isRegistered()

#7 sitenameincludes\Permissions\PermissionManager.php(1292): MediaWiki\Permissions\PermissionManager->getRightsCacheKey(User)

#8 sitenameincludes\Permissions\PermissionManager.php(1244): MediaWiki\Permissions\PermissionManager->getUserPermissions(User)

#9 sitenameincludes\user\User.php(3156): MediaWiki\Permissions\PermissionManager->userHasRight(User, string)

#10 sitenameLocalSettings.php(208): User->isAllowed(string)

#11 sitenameincludes\HookContainer\HookContainer.php(320): disableSomeSpecialPages(array)

#12 sitenameincludes\HookContainer\HookContainer.php(131): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)


thanks for your help

niko

DuncanCrane (talkcontribs)

Thanks Niko

The appearance of those debug statements when the array is not set is a bug, well found:-)

The code 'if(tinyMCEDebugFlags.debug='true')debugger;' in the output you reported should read 'if(tinyMCEDebugFlags.debug=='true')debugger;' so I will put a patch in for that.

This wouldn't cause a problem with the editor though. The error being reported isn't caused by the TinyMCE editor, at least not directly as far as I can tell from the backtrace. However, it does appear to be generated from line 208 in your LocalSettings.php file where it appears there is an function call 'User->isAllowed(string)'.

This function call was deprecated in MW 1.34 which may be why you are getting that error and I guess it may be possible that this is then affecting the way TinyMCE is trying to process the 'red links' to point at the TinyMCE editor.

I had something similar and was given the following link for an example of how to replace this function call using the permission manager here

Would it be possible to try that fix, or at least temporarily disable the code including the 'User->isAllowed(string)' to see what happens?

I also tried using the pivot skin but it caused the browsers local storage to be exceeded. This is a strange condition because it actually has to be manually cleared else it will persist across all browser sessions. It doesn't help to clear the cache or even reboot the system. Also it is not reported as a fatal error, just a warning. This error was preventing some extensions loading properly including TinyMCE. When you switch to the vector skin, it may be worth clearing the browser's local storage. Entering something like localStorage.clear() in the console should do the trick.

2A02:8070:E186:4300:8B9:461B:5241:C096 (talkcontribs)

hola duncan,


you were right. line 208 caused the error. after removing it, the wiki loads without error.

thanks for the workaround - i will have a look at it in a moment.


but this did not change the tinymce behaviour. when i click on edit the normal editor appears. if i enter action=tinymceedit in the query, the correct editor appears and seems to work correctly - except for the debugger that comes all the time.


i have just downloaded and integrated the latest version of the vector skin.

as soon as the skin is activated, i unfortunately always get an error:


Fatal error: Uncaught Error: Call to undefined method SkinVector::getPortletData() in sitename\skins\Vector\includes\SkinVector.php:273 Stack trace: #0 sitename\skins\Vector\includes\SkinVector. php(233): SkinVector->getMenuData('navigation', Array, 3) #1 sitename\skins\Vector\includes\SkinVector.php(133): SkinVector->getTemplateDataSidebar() #2 sitename\includes\skins\SkinMustache. php(59): SkinVector->getTemplateData() #3 sitename\includes\skins\SkinTemplate.php(144): SkinMustache->generateHTML() #4 sitename\includes\OutputPage. php(2615): SkinTemplate->outputPage() #5 sitename\includes\exception\MWExceptionRenderer.php(153): OutputPage->output() #6 sitename\includes\exception\MWExceptionRenderer.php(65): MWExceptionRenderer::reportHTML(Object(Error)) #7 sitename\includes\exception\MWExceptionHandler.php(106): MWExcepti in sitename\skins\Vector\includes\SkinVector.php on line 273


so i don't get to the place to test anymore.

i have loaded the cache with CTRL+F5 before and emptied the cache with the browser for testing. Now also with your variant. Unfortunately this does not change the problem. :(


thanks for your help <3

DuncanCrane (talkcontribs)

Oh, that doesn't look good, Niko.

Vector is the mediawiki default skin so something else must be going on in your setup to cause this problem, I suspect.

I'm not sure I can help you with that, so perhaps we should focus on the issue in the pivot skin, but thanks for trying.

I'm in a conference session at the moment but will give it some more thought and get back to you.

DuncanCrane (talkcontribs)

Hi Niko

So I now have pivot working on my MW 1.35 site. Clearing local storage fixed the problem I was having there :-)

On my site, everything is working as expected with the TinyMCE editor being called for new pages and existing pages as expected and the 'edit source' action being added to access the wikitext editor. It even works in Page Forms!

This suggests that there may be a conflict with options you have set for the pivot skin or with other config or extensions you have installed. Is it possible to disable all user config and extensions, apart from the Pivot skin and TinyMCE, and try that? I'd also recommend that you clear local storage again after disabling the other config but before reloading your wiki.

2A02:8070:E186:4300:8B9:461B:5241:C096 (talkcontribs)

Thanks for your feedback.


I have now done a complete cleaninstall of the WIKI. Vector works now. TinyMCE unfortunately still not. It is activated and is displayed correctly on the version page.


When I hover the mouse over the edit link, I get index.php?title=Testseite&action=edit&section=1 displayed.

If I click on it, I land on the edit page. But there I see the normal editor again and not TinyMCE.


Thanks for your effort

Moins de (talkcontribs)

i think it's time for a user here... not so easy to find a name where it is allowed :D

just saw the bug in the console:

TypeError: can't access property "split", tinyMCETagList is null


damn... but not even as a user i can post the complete excerpt of the error... spam protection ._.

picture upload goes wrong too...

DuncanCrane (talkcontribs)

Hi Niko

Aha, some progress. Good.

The error you spotted is because none of the 'standard' tags were found which would include things like includeonly, onlyinclude, noinclude, nowiki. This variable tinyMCETagList is populated from a mediawiki global variable set in a file, TinyMCE.hooks.php, in the root folder of the TinyMCE extension. This is also the file where the links are changed to point to TinyMCE if it is enabled.

Since the tags includeonly, onlyinclude, noinclude, nowiki are hard coded into the mediawiki global, the error you observe would only happen if TinyMCE.hooks.php or the file that calls it, extension.json is somehow corrupted, out of date or not getting loaded correctly.

The first step to check this, I think, is to delete or rename the current TinyMCE extension folder in your wiki. Then re-download the TinyMCE extension from here. Then unpack the 'tar' file and place the 'mediawiki-extensions-TinyMCE-master' directory folder into the '/extensions/' folder of your wiki and rename it to TinyMCE.

Would you let me know if you then still get the same warning as before?

Moins de (talkcontribs)

hola DuncanCrane,


thanks for your feedback (:


i reinstalled the exctension like you said. but jep.. i get the following error codes:


JQMIGRATE: Migrate is installed with logging active, version 3.1.0

Exception in module-execute in module ext.tinymce:

TypeError: can't access property "split", tinyMCETagList is null

JQMIGRATE: jQuery(window).on('load'...) called after load event occurred

DuncanCrane (talkcontribs)

Thanks Niko.

OK, step 2!

So this does appear to be a problem with the mediawiki load on the server side. Unfortunately the browser console only tells us about the errors on the client side!

To get some additional information about possible errors on the server side, would you add the following lines in your LocalSetting.php files at the top. That is after the '<?php' line and lines starting with a '#'.

$wgDebugToolbar = true;
$wgShowExceptionDetails = true;
error_reporting( -1 );
ini_set( 'display_errors', 1 );

If you now reload the browser window, You should see something like this at the bottom of the window.


If you do, would you look in the console tab and copy anything you find here?

Moins de (talkcontribs)

here we go (:


Use of Sanitizer::escapeId was deprecated in MediaWiki 1.30. [Called from pivotTemplate::renderSidebar in www\dev.seite.de\skins\pivot\Pivot.skin.php at line 306]

Backtrace:

  • GlobalFunctions.php line 1029 calls MWDebug::deprecated()
  • Sanitizer.php line 1086 calls wfDeprecated()
  • Pivot.skin.php line 306 calls Sanitizer::escapeId()
  • Pivot.skin.php line 128 calls pivotTemplate->renderSidebar()
  • SkinTemplate.php line 129 calls pivotTemplate->execute()
  • SkinTemplate.php line 144 calls SkinTemplate->generateHTML()
  • OutputPage.php line 2615 calls SkinTemplate->outputPage()
  • MediaWiki.php line 947 calls OutputPage->output()
  • MediaWiki.php line 960 calls MediaWiki->{closure}()
  • MediaWiki.php line 543 calls MediaWiki->main()
  • index.php line 53 calls MediaWiki->run()
  • index.php line 46 calls wfIndexMain()
Moins de (talkcontribs)

if i change the skin to vector there is onliny one line in the console "MWDebug output complete", without any errors. but tinymce still doesnt work.


if i try the it with "action=tinymceedit" the editor loads, but stops automaticly at some debug points

DuncanCrane (talkcontribs)

That's great, thanks Niko

Just a thought. In your preferences, would you disable the 'Activate the edit toolbar' option there and save. Would you then try to load the editor from a red link or other edit link?

Moins de (talkcontribs)

Good morning, ehm I will unfortunately not find what I am looking for.  Neither with the 1to1 translation nor if I look for similar points.

Could you give me a hint where exactly the point is to be found?

Thanks

DuncanCrane (talkcontribs)

Hi Niko

Of course. BTW you have done brilliantly with the comms. I'd really struggle doing this in a different language (except maybe if it was javascript :-) )

If you go into your personal preferences on the 'Editing' tab you have several options. The option I want you to deselect is the last under the 'Editor' heading. This has a label 'Enable the editing toolbar. This is sometimes called the "2010 wikitext editor". This option should be cleared. I tried changing my wiki language but it seems this screen is still in English. So my apologies I can't give you a localised version but hopefully this capture will make it clearer? Here is the screen which shows the item selected. Once cleared the tick in the box should be a blank instead of course.

Edit preferences
Moins de (talkcontribs)

hehe many thanks for the praise (: one likes to hear that!

unfortunately my site looks a bit different and i don't have this point at all? do you know what could be the reason for that?


unfortunately the picture upload still does not work for me... so here:

https://ibb.co/N9ymNcW


thanks for your great support!

DuncanCrane (talkcontribs)

Hi Niko

I am stupid! I had Google set to automatically translate German to English!!

I think what may have happened is that you disabled VisualEditor and the WikiText editor in LocalSettings.php something like this:

#wfLoadExtension( 'VisualEditor' );
#wfLoadExtension( 'WikiEditor' );

I'm sorry i I gave the impression you should do this in LocalSettings.php, I meant for you to do it in the preferences screen (see below). If I am right, would you re-enable the two extensions in LocalSettings.php by removing the '#' at the start of each line? You should then see the options below in the 'Bearbeiten' tab in your preferences. If you do, would you deselect options 4 and 6 under the heading 'Bearbeitungsprogramme'?

If you then select a link to edit, would you let me know what happens?

Editor preferences
Moins de (talkcontribs)

aaahhh okay (: now have the option. Now I have selected all checkboxes like on your screenshot.

Unfortunately nothing changes in the behavior. When I click on Edit, I still get the simple standard editor displayed :(

DuncanCrane (talkcontribs)

Great, thanks Niko. Would you deselect the option 'Bearbeiten-Werkzeugleiste aktivieren' and try again?

Moins de (talkcontribs)

Sorry, I said it stupidly... I set everything up like you suggested.

including disabling "Enable Edit Toolbar"

Currently it looks like this:

https://ibb.co/4YVHwpz

DuncanCrane (talkcontribs)

Easily done, Niko :-)

How confident are you with making changes to code?

What I'd like you to do next is make a small and temporary change to the file TinyMCEActions.php in the root folder of the extension.

Right after the lines at line number 51, which are:

    static function displayTabAndModifyAddTopicLink( $obj, &$links ) {
		global $wgRequest;
		global $wgTinyMCEUse;

I'd like you to insert the following lines and then save the file:

MWDebug::init();
$txt = "\nLinks in TinyMCEAction\n";
MWDebug::log($txt);
$txt = print_r($links, true); 
MWDebug::log($txt);

Assuming you still have the lines to invoke debugging in your LocalSettings.php which we talked about above:

$wgDebugToolbar = true;
$wgShowExceptionDetails = true;
error_reporting( -1 );
ini_set( 'display_errors', 1 );

If you then load any page for viewing you will get two additional entries in the mediawiki debug console with the label 'log' on the left. Would you copy those and send them to me?

Moins de (talkcontribs)

here wo go (:

Log Links in TinyMCEAction TinyMCEAction::displayTabAndModifyAddTopicLink
Log Array ( [namespaces] => Array ( [main] => Array ( [class] => selected [text] => Seite [href] => /index.php?title=Testseite [exists] => 1 [primary] => 1 [context] => subject ) [talk] => Array ( [class] => new [text] => Diskussion [href] => /index.php?title=Diskussion:Testseite&action=edit&redlink=1 [exists] => [primary] => 1 [context] => talk ) ) [views] => Array ( [view] => Array ( [class] => selected [text] => Lesen [href] => /index.php?title=Testseite [exists] => 1 [primary] => 1 [redundant] => 1 ) [edit] => Array ( [class] => [text] => Bearbeiten [href] => /index.php?title=Testseite&action=edit [primary] => 1 ) [history] => Array ( [class] => [text] => Versionsgeschichte [href] => /index.php?title=Testseite&action=history ) [unwatch] => Array ( [class] => icon mw-watchlink [text] => Nicht mehr beobachten [href] => /index.php?title=Testseite&action=unwatch [data] => Array ( [mw] => interface ) ) ) [actions] => Array ( [delete] => Array ( [class] => [text] => Löschen [href] => /index.php?title=Testseite&action=delete ) [move] => Array ( [class] => [text] => Verschieben [href] => /index.php?title=Spezial:Verschieben/Testseite ) [protect] => Array ( [class] => [text] => Schützen [href] => /index.php?title=Testseite&action=protect ) ) [variants] => Array ( ) ) TinyMCEAction::displayTabAndModifyAddTopicLink
Log Links in TinyMCEAction TinyMCEAction::displayTabAndModifyAddTopicLink
Log Array ( [namespaces] => Array ( [main] => Array ( [class] => selected [text] => Seite [href] => /index.php?title=Testseite [exists] => 1 [primary] => 1 [context] => subject ) [talk] => Array ( [class] => new [text] => Diskussion [href] => /index.php?title=Diskussion:Testseite&action=edit&redlink=1 [exists] => [primary] => 1 [context] => talk ) ) [views] => Array ( [view] => Array ( [class] => selected [text] => Lesen [href] => /index.php?title=Testseite [exists] => 1 [primary] => 1 [redundant] => 1 ) [edit] => Array ( [class] => [text] => Bearbeiten [href] => /index.php?title=Testseite&action=edit [primary] => 1 ) [history] => Array ( [class] => [text] => Versionsgeschichte [href] => /index.php?title=Testseite&action=history ) [unwatch] => Array ( [class] => icon mw-watchlink [text] => Nicht mehr beobachten [href] => /index.php?title=Testseite&action=unwatch [data] => Array ( [mw] => interface ) ) ) [actions] => Array ( [delete] => Array ( [class] => [text] => Löschen [href] => /index.php?title=Testseite&action=delete ) [move] => Array ( [class] => [text] => Verschieben [href] => /index.php?title=Spezial:Verschieben/Testseite ) [protect] => Array ( [class] => [text] => Schützen [href] => /index.php?title=Testseite&action=protect ) ) [variants] => Array ( ) ) TinyMCEAction::displayTabAndModifyAddTopicLink
Log MWDebug output complete MWDebug::getDebugHTML
DuncanCrane (talkcontribs)

Hi Niko

Sorry, I had to go out for a bit. Thanks for that.

So the good news is that the programme is running and we can dumpt stuff to the debugger. It is a bit odd though that we are getting the output twice but never mind for now.

Without removing the original change, would you now put the same fives lines just before the return statement at the end of the TinyMCEActions.php file, also adding a '1' to the 'Links' text as follows:

MWDebug::init();
$txt = "\nLinks 1 in TinyMCEAction\n";
MWDebug::log($txt);
$txt = print_r($links, true); 
MWDebug::log($txt);

The return statement is something like:

return true; // always return true, in order not to stop MW's hook processing!

Would you then reload the page and send me the 'log' output displayed.

We may have to do this a few times to isolate the problem.

2A02:8070:E186:4300:1CAB:C5D1:B734:4A7B (talkcontribs)

good morning DuncanCrane,


thanks for your help (:

Log Links in TinyMCEAction TinyMCEAction::displayTabAndModifyAddTopicLink
Log Array ( [namespaces] => Array ( [main] => Array ( [class] => selected [text] => Hauptseite [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [context] => subject ) [talk] => Array ( [class] => new [text] => Diskussion [href] => /index.php?title=Diskussion:Hauptseite&action=edit&redlink=1 [exists] => [primary] => 1 [context] => talk ) ) [views] => Array ( [view] => Array ( [class] => selected [text] => Lesen [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [redundant] => 1 ) [edit] => Array ( [class] => [text] => Bearbeiten [href] => /index.php?title=Hauptseite&action=edit [primary] => 1 ) [history] => Array ( [class] => [text] => Versionsgeschichte [href] => /index.php?title=Hauptseite&action=history ) [unwatch] => Array ( [class] => icon mw-watchlink [text] => Nicht mehr beobachten [href] => /index.php?title=Hauptseite&action=unwatch [data] => Array ( [mw] => interface ) ) ) [actions] => Array ( [delete] => Array ( [class] => [text] => Löschen [href] => /index.php?title=Hauptseite&action=delete ) [move] => Array ( [class] => [text] => Verschieben [href] => /index.php?title=Spezial:Verschieben/Hauptseite ) [protect] => Array ( [class] => [text] => Schützen [href] => /index.php?title=Hauptseite&action=protect ) ) [variants] => Array ( ) ) TinyMCEAction::displayTabAndModifyAddTopicLink
Log Links 1 in TinyMCEAction TinyMCEAction::displayTabAndModifyAddTopicLink
Log Array ( [namespaces] => Array ( [main] => Array ( [class] => selected [text] => Hauptseite [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [context] => subject ) [talk] => Array ( [class] => new [text] => Diskussion [href] => /index.php?title=Diskussion:Hauptseite&action=tinymceedit&redlink=1 [exists] => [primary] => 1 [context] => talk ) ) [views] => Array ( [view] => Array ( [class] => selected [text] => Lesen [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [redundant] => 1 ) [tinymceedit] => Array ( [class] => [text] => Bearbeiten [href] => /index.php?title=Hauptseite&action=tinymceedit ) [edit] => Array ( [class] => [text] => Edit source [href] => /index.php?title=Hauptseite&action=edit [primary] => 1 ) [history] => Array ( [class] => [text] => Versionsgeschichte [href] => /index.php?title=Hauptseite&action=history ) [unwatch] => Array ( [class] => icon mw-watchlink [text] => Nicht mehr beobachten [href] => /index.php?title=Hauptseite&action=unwatch [data] => Array ( [mw] => interface ) ) ) [actions] => Array ( [delete] => Array ( [class] => [text] => Löschen [href] => /index.php?title=Hauptseite&action=delete ) [move] => Array ( [class] => [text] => Verschieben [href] => /index.php?title=Spezial:Verschieben/Hauptseite ) [protect] => Array ( [class] => [text] => Schützen [href] => /index.php?title=Hauptseite&action=protect ) ) [variants] => Array ( ) ) TinyMCEAction::displayTabAndModifyAddTopicLink
Log Links in TinyMCEAction TinyMCEAction::displayTabAndModifyAddTopicLink
Log Array ( [namespaces] => Array ( [main] => Array ( [class] => selected [text] => Hauptseite [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [context] => subject ) [talk] => Array ( [class] => new [text] => Diskussion [href] => /index.php?title=Diskussion:Hauptseite&action=edit&redlink=1 [exists] => [primary] => 1 [context] => talk ) ) [views] => Array ( [view] => Array ( [class] => selected [text] => Lesen [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [redundant] => 1 ) [edit] => Array ( [class] => [text] => Bearbeiten [href] => /index.php?title=Hauptseite&action=edit [primary] => 1 ) [history] => Array ( [class] => [text] => Versionsgeschichte [href] => /index.php?title=Hauptseite&action=history ) [unwatch] => Array ( [class] => icon mw-watchlink [text] => Nicht mehr beobachten [href] => /index.php?title=Hauptseite&action=unwatch [data] => Array ( [mw] => interface ) ) ) [actions] => Array ( [delete] => Array ( [class] => [text] => Löschen [href] => /index.php?title=Hauptseite&action=delete ) [move] => Array ( [class] => [text] => Verschieben [href] => /index.php?title=Spezial:Verschieben/Hauptseite ) [protect] => Array ( [class] => [text] => Schützen [href] => /index.php?title=Hauptseite&action=protect ) ) [variants] => Array ( ) ) TinyMCEAction::displayTabAndModifyAddTopicLink
Log Links 1 in TinyMCEAction TinyMCEAction::displayTabAndModifyAddTopicLink
Log Array ( [namespaces] => Array ( [main] => Array ( [class] => selected [text] => Hauptseite [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [context] => subject ) [talk] => Array ( [class] => new [text] => Diskussion [href] => /index.php?title=Diskussion:Hauptseite&action=tinymceedit&redlink=1 [exists] => [primary] => 1 [context] => talk ) ) [views] => Array ( [view] => Array ( [class] => selected [text] => Lesen [href] => /index.php?title=Hauptseite [exists] => 1 [primary] => 1 [redundant] => 1 ) [tinymceedit] => Array ( [class] => [text] => Bearbeiten [href] => /index.php?title=Hauptseite&action=tinymceedit ) [edit] => Array ( [class] => [text] => Edit source [href] => /index.php?title=Hauptseite&action=edit [primary] => 1 ) [history] => Array ( [class] => [text] => Versionsgeschichte [href] => /index.php?title=Hauptseite&action=history ) [unwatch] => Array ( [class] => icon mw-watchlink [text] => Nicht mehr beobachten [href] => /index.php?title=Hauptseite&action=unwatch [data] => Array ( [mw] => interface ) ) ) [actions] => Array ( [delete] => Array ( [class] => [text] => Löschen [href] => /index.php?title=Hauptseite&action=delete ) [move] => Array ( [class] => [text] => Verschieben [href] => /index.php?title=Spezial:Verschieben/Hauptseite ) [protect] => Array ( [class] => [text] => Schützen [href] => /index.php?title=Hauptseite&action=protect ) ) [variants] => Array ( ) ) TinyMCEAction::displayTabAndModifyAddTopicLink
Log MWDebug output complete MWDebug::getDebugHTML
DuncanCrane (talkcontribs)

Hi Niko

Thank you too for persevering and trying to get this to work :-)

Ok, now this is strange. The fact you get the 'Link 1' log entry shows that TinyMCE editor has passed the various tests necessary to edit a page. Also, if you look at the 'Link 1' log entry, the 'Diskussion' and 'Bearbeiten' links both have 'action=timymceedit'. When you hover over the name of these tabs on your wiki page, you should see that the link text is the same as the href here.

As this doesn't seem to be so, it must mean something else in your configuration is overriding these settings before the page is output to your browser.

This means we have to find out what is causing this by a process of elimination. Would you go to the 'special' 'version' page on your wiki and take an image of it and send it to me so I can see everything that is loaded and the versions? Sorry, it may require a few images to get everything.

Moins de (talkcontribs)

hmmm that's strange. when i click on "edit" it looks like this: https://ibb.co/fprfpwh

here is the version page: https://ibb.co/0t2BFh7

DuncanCrane (talkcontribs)

Hi Niko

The 'edit' you are hovering over is a 'section' edit link. This should also have a 'tinymceedit' action too but we can come back to that. The two links I'm interested in for now are the 'Discussion' and 'Edit' links in the pivot 'Actions' menu and what they show when you hover over them?

Your 'versions' page looks OK. I've disabled everything in mine so it looks like yours, but I still get the TinyMCE editor! Oh dear!!!

One other question? Did you apply the WikiEditor patch as described here

Moins de (talkcontribs)

sorry, I won't be able to test it until next week.

Thanks for your help and have a nice weekend

DuncanCrane (talkcontribs)

Hey, no problem :-)

Have a good one too

2A02:8070:E186:4300:D414:731C:33F:AE7A (talkcontribs)

good morning (:


the actions via "discussion" and via "edit" in the action menu look good (:

There the TinyMCEditor is opened and loads without debug stops ((:


I just executed the fix for the WIKIEditor.


Now only the normal "edit" button is missing.


Thanks

DuncanCrane (talkcontribs)

Hi Niko Sounds like we are making some progress:-) Is it possible to do a screen capture of where the normal 'edit' button is missing, just so I'm sure I understand? Many thanks Duncan

Moins de (talkcontribs)

yep, things are definitely starting to look better (:

I hope it is understandable this way

https://ibb.co/WfFV19Q

DuncanCrane (talkcontribs)

Great, thanks Niko

I found why that link wasn't displaying.

I have now made a fix and uploaded it to my development GitHub master branch located here https://github.com/duncan-crane/TinyMCE

If you download this branch it has a number of other small bug fixes:-) These will be uploaded to the mediawiki Gerrit repository in the next maintenance release but if you'd like them straight away then please download from the development site on GitHub.

Hopefully everything is good now but do let me know if you have any more problems.

Thank you for perservering too :-)

Moins de (talkcontribs)

Good morning,

wuhoo! It looks good!

Thanks for your great support

Niko

DuncanCrane (talkcontribs)

Your welcome - hope you enjoy using TinyMCE :-)