Jump to content

Topic on Extension talk:CreatePageUw/Flow

TinyMCE does not work with the CreatePageUw extension

15
Summary last edited by Monocero 16:20, 26 September 2019 5 years ago

Patch has been provided to the author of this topic. If a Gerrit change is submitted (with proper tests, etc.), it will be merged.

Monocero (talkcontribs)

Hi,

I'm using the TinyMCE editor and I'm using the CreatePageUw extension, but TinyMCE does not display when creating a new page in CreatePageUw. It looks like a mistake. You can check it?

@Edward Chernenko

Edward Chernenko (talkcontribs)

I'm sorry, but supporting lots of different editors (other than VisualEditor) is somewhat outside the scope of this extension. It just opens ?action=edit&title=Name_of_article.

If someone else implements this feature, they can submit a patch and it will be added.

Monocero (talkcontribs)

I understand it. If I enter this, example: index.php?title=Test&action=tinymceedit then when creating a new page the TinyMCE editor is displayed correctly, but it's not comfortable.

"If someone else implements this feature, they can submit a patch and it will be added".

Where can I report it? Where are the programmers here?

Monocero (talkcontribs)
Edward Chernenko (talkcontribs)

Busy on other projects (have 500+ features that "would be nice to implement" waiting in line). Sorry.

Monocero (talkcontribs)

I understand it. It would be nice if you did not forget about this function in future for TinyMCE. This function is needed for editors. I hope you understand this.

@Edward Chernenko

Edward Chernenko (talkcontribs)

You can hire me to implement it now, or you can find another developer to implement it for free.

Monocero (talkcontribs)

@Edward Chernenko

@AhmadF.Cheema has created a patch for the CreatePageUw extension that makes the TinyMCE editor display correctly in your extension.

Patch

"If someone else implements this feature, they can submit a patch and it will be added"

Can you implement this patch for the CreatePageUw extension?

AhmadF.Cheema (talkcontribs)

The patch (change comparison) should work fine with REL1_31 (the patch was straightforward enough), however, later versions of the extension include tests/phpunit too, which could be too complicated to support by the extension author.

Monocero (talkcontribs)

@Edward Chernenko

I have one more question, do you know why this editor does not display in "Edit source"?

AhmadF.Cheema (talkcontribs)
Edward Chernenko (talkcontribs)

> has created a patch

I created this patch in 1 second in my mind 3 days ago.

You need to make this a Gerrit change, manually test it in MediaWiki 1.27 (old LTS), 1.31 (LTS), 1.33 (since it should be backported), and please don't forget to write an automated test in SpecialCreatePageTest.php so that this is automatically tested, and I'll press the "Merge" button in Gerrit.

This is what takes time for the developer, not replacing "veaction=edit" with "action=tinymceedit" in one place in the code (as 1 user can do for himself in his local installation of MediaWiki).

Monocero (talkcontribs)

Can you explain it to me? What exactly should I do? I have no idea.

Edward Chernenko (talkcontribs)

Then why are you demanding that a person who explicitly said "I am busy on other projects" should do this immediately, if you don't know how much additional work can this visibly trivial task include?

Aside from the patch above, what's needed is:

  1. automated test (script that says "does it work or not", which already exists for current version of extension - without this feature),
  2. consider if making one configuration variable $wgCreatePageUwEditor would be better than many variables like $wgCreatePageUwUseVisualEditor and $wgCreatePageUwUseTMCE (because I can totally imagine further requests like "implement editor A" and "implement editor B" - should there be 10 variables for "type of editor"?),
  3. consider if [ 'veaction' => 'edit' ] and [ 'action' => 'tinymceedit' ] should be a configuration variable in LocalSettings.php - that would have a benefit of "user can configure any editor in LocalSettings.php". Not neglect the fact that some editor can use another type of URL, e.g. Special:SomeCoolEditor/PageName.
  4. deprecate $wgCreatePageUwUseVisualEditor if needed, and test backward compatibility (that $wgCreatePageUwUseVisualEditor still works after this change),
  5. document the change,
  6. check that it works in latest MediaWiki and LTS versions,
  7. make Gerrit change and wait for it to be merged,
  8. make backport change at least to REL1_31, so that users of LTS version of MediaWiki can enjoy this feature too,
  9. etc.
Monocero (talkcontribs)

This patch works fine I don't know PHP, I am unable to perform this test and submit changes to Gerrit. I understand that you are very busy. Maybe someone else will do this test and confirm that that this patch works correctly and send the changes to Gerrit. I hope that someday this feature will be implemented into your extension for other users.