Topic on Extension talk:TemplateData

TemplateData Editor suggested values input field not showing

7
MrSmith35 (talkcontribs)

So I've been learning to make templates over the last week or so, manually at first then I started to read about the TemplateData Editor and the possibility of adding a limited range of suggested parameter values by way of the suggested values field. However it just will not show whether I use the editor on an existing template or a new one from scratch. I'm running a recently updated MW 1.37.2 (previously 1.35) with extension versions that came with it, PHP 7.4.28, TemplateData Extension 0.1.2. Tried changing the skin, I normally use Citizen (1.17.4) but tried it with the vanilla, as installed, Vector 1.0.0, still no joy. I have updated the TemplateData Extension to 0.1.2 (3e7e798) 06:04, 1 June 2022. But alas nothing. Tried it with the 2010 wikitext editor, still nothing. I went onto Wikipedia and tried their TemplateData Editor which worked as advertised, so I know what to expect. I did find something on Phabricator about a bug with the suggested values filed which was reported April 2021, but that was different.

At my wits end - any suggestions?

Thanks

Thiemo Kreuz (WMDE) (talkcontribs)

At the moment the suggested values feature is still opt-in. This will change in the near future. Until then you need to add $wgTemplateDataSuggestedValuesEditor = true; $wgVisualEditorTransclusionDialogSuggestedValues = true; to your LocalSettings.php. I hope that helps.

MrSmith35 (talkcontribs)

Thanks for your quick reply Thiemo, much appreciated, worked a treat.

The suggested parameter values list appears as expected and I can edit existing lists. The drop down menu also works correctly in the insert template dialogue.

I have one minor issue, the insert Template dialogue works well except in my named User namespace. The dialogue appears and goes through the motions of doing what it's supposed to but after I hit apply no template is added to the article, but no error dialogue or warning appear. Though this is not that serious as I generally will be using templates in the Main namespace, is there a separate setting that I need to toggle to enable the dialogue in my User namespace?

Thiemo Kreuz (WMDE) (talkcontribs)

Oh, that sounds like a bug. Unfortunately I can't reproduce it on my machine. Can you provide more information and maybe report it?

MrSmith35 (talkcontribs)

Hi,

Yes I could, what do you need to know, please keep in mind I am a complete novice wrt MediaWiki and stuff like php. I can just about follow along with good instructions otherwise I get lost pretty quickly. Are there are specific logs I could easily find that might help, I couldn't see anything in the public logs on the wiki. My set up is on a Synology NAS - a custom install of MediaWiki as I couldn't get the Synology supported app working. I run it on Apache 2.4 with PHP 7.4 and MariaDB 10.

Thiemo Kreuz (WMDE) (talkcontribs)

Does something appear in your browser's JavaScript console (Ctrl+Shift+I)? I currently don't have a better idea where to look for this kind of error. Maybe you continue and see if the issue persists, and report back later?

MrSmith35 (talkcontribs)

Hi,

Yes there is an output in the console but nothing that comes up as an error related to the actions when adding a template neither in the Main namespace nor in the User namespace, both consoles look pretty much the same.

The problem I'm seeing might be completely unrelated to the TemplateData extension in as much as I did previously have an error in the User namespace adding pages that had a "/" in their name eg User:MrSmith35/sandbox - I read that on some setups the slash could cause errors with Apache 2.4, but I fixed that by adding something to the Apache server config - what I'm seeing with templates not rendering might be something to do with how my server is configured.

I don't need templates in the user namespace so for now I can live with it, see what happens. If you do think of anything that might help resolve this or come up with a suggestion of where we might find the error logging, then I'm more than happy to help in any way I can. If I get time I might try a docker install of MW on my Synology which might give me an easier ride through the installation process than the hodgepodge of methods I had to use to get it working. If the error occurs in docker then it's probably worth investigating.

Thanks again for your help and the great work on the extension.

Reply to "TemplateData Editor suggested values input field not showing"