Page MenuHomePhabricator

Text area contained within multiple instance template bug
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

Unable to edit the text area when using page forms in a multiple instance template.

What should have happened instead?:

You should be able to edit the text area when using TinyMCE

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

MediaWiki 1.35.4
Page Forms 5.2.1
TinyMCE 1.1.2

Any help is appreciated

Gary

Event Timeline

Hi Gary
Sorry for the delay getting back to you. and thank you for creating the test wiki to demonstrate the issue.
I should have some time next week to look into this.

Hi Gary (@Squeak24),
I have had a look into this. Since TinyMCE works in an ordinary textarea input field in PageForms I'm not sure why it wouldn't work in textarea input fields in a 'multiple' field, unless PageForms is handling these differently.
Hi Yaron (@Yaron_Koren),
I wonder if you might be able to help. I'm not sure why TinyMCE wouldn't initiate on a textarea field in a multiple instance field, when it does in an ordinary textarea field in PageForms. I wonder if there are any differences in how multiple instance fields are implemented which might affect this?
Many thanks
Duncan

Thanks Duncan (@aoxomoxoa),

It used to work OK with V0.3, just not the latest version.

@Yaron_Koren

Any help is appreciated.

Gary

Hi Gary (@Squeak24)
Yes, I'd thought I'd seen this feature working at some point. I wasn't sure what product V0.3 you were referring too? I do tend to keep old configurations and versions saved so, if you can let me know products and version that did work together, I may be able to work out which changes have given rise to the incompatibility?

Hi Duncan @aoxomoxoa

I have now uploaded the working version onto https://dafoshowcase.com/dwaas/

It says the version is:

TinyMCE 0.3 (5b02bf9) 04:19, 4 September 2021

Hi Gary (@Squeak24)
That's a bit strange - v 1.0 of Tinymce extension was released in November 2020! The maintenance policy for TinyMCE is 'master' which means all releases should occur on the master branch on Gerrit. However, whoever made this release used a branch which is based on a truly ancient release of the TinyMCE extension (dated Feb 2019)!
Never mind though, this release does seem to work OK which gives me something to work with. I'll investigate further.

Hi Gary (@Squeak24)
I've investigated a bit more and I think it was the major upgrade I did to the TinyMCE core software where they made some enhancements to how they load their software. I'll investigate further to see if I can come up with a fix.
Happy new year
Duncan

Hi Gary (@Squeak24)
Sorry it's been a while. I finally got some serious time to investigate this week! It's been a tricky one to track down. Without boring you with too many details, it is the interaction between how PageForms processes multiple item fields and how TinyMCE initialises itself on them that caused this problem. The latter had changed since version 0.3 of the extension which is why it worked in that version.
I have a solution now that works when creating pages and I have to do some work on when they are subsequently edited but it looks like there is a way forward with this bug. Will let you know when Gerrit has been updated with the patch.

Change 762863 had a related patch set uploaded (by Duncancrane; author: Duncancrane):

[mediawiki/extensions/TinyMCE@master] Fix Bug T296554, Text area contained within multiple instance template bug

https://gerrit.wikimedia.org/r/762863

Change 762863 merged by Duncancrane:

[mediawiki/extensions/TinyMCE@master] Fix Bug T296554, Text area contained within multiple instance template bug

https://gerrit.wikimedia.org/r/762863

Hi Gary (@Squeak24)
Sorry it's been a while!
After a fair amount of faffing, I believe I have a fix which has now been added to Gerrit (see previous gerritbot comment).
If you are able to test, let me know if this has resolved your problem?
Kind regards
Duncan

Aklapper assigned this task to aoxomoxoa.

No reply from @Squeak24, assuming the merged patch by @aoxomoxoa fixed this.