Topic on Extension talk:TemplateData

Not seeing any benefit with Visual Editor though I hope to

13
WikimeSteve (talkcontribs)

We have this extension deployed. The tags on template pages are consumed and displaying the parameters and such correctly. We also have the button and link on the edit template view and the parameter editor pops up. We have the Extension:VisualEditor installed and it works fine. It integrates with Extension:WikiEditor.

Maybe I am expecting something that I should not. When I go to a page and I chose to add a template I get the same old dialog box. I open the options and see nothing. I am expecting that I will see a list of the parameters feeding into this and helping prompt me for choices. I tried Template:Lorem_ipsum which we imported from Wikipedia.

Additionally when I tried this Template:Lorem_ipsum on my user page at Wikipedia I get an icon that allows me to insert a template in Extension:WikiEditor which I do not have in my Extension:WikiEditor view. That opens a dialog that is clearly showing the parameters which is what I would like to have on our Wiki. I realize that this paragraph may be referring to a different issue.

I see nothing about this in the configuration but at the very bottom I see the link to Extension:VisualEditor. Is there a setting I missed? Can you suggest anything else that might be blocking this use?

Thanks

Whatamidoing (WMF) (talkcontribs)

The 2010 WikiEditor does not use TemplateData. The effects of TemplateData should be visible to you in the visual editor (e.g., here) but not in the old WikiEditor (here).

WikimeSteve (talkcontribs)

I see the same result on the sandbox page you provided. Maybe I am not doing something right. I go to the Insert menu and select template. I then see the plain dialog result but I see no prompting. Or is it just that there is a link to the pages view of the paraments but no menu items added? Is that all the integration I should expect?

Our Wiki:

MediaWiki 1.31.0
WikiEditor 0.5.1
TemplateData 0.1.2 (0cffe4a) 11:36, 15 October 2018
VisualEditor 0.1.0 (13a585a) 15:14, 30 May 2018

Additional info. Just found out the Template:Lorem Ipsum on Wikipedia is quite different than on Medaiwiki. So I tried Template:Banner. This one does show a prompting fields for Image and Title. This is what I would expect and do not see on our Wiki. For reference the https://en.wikipedia.org/wiki/Template:Lorem_ipsum is the one I have been trying and which we have on our wiki. It has several parameters.

The left shows my Wiki. The right shows the MediaWiki sandbox page you sent. I imported the Template:Banner to my staging so I could better compare.

Jeblad (talkcontribs)

The message at the top clearly says the description is missing, thus something is not correctly configured or you did not import the part of the template with template data.

WikimeSteve (talkcontribs)

I do see the same code in source view but the display of the template has one difference. This image shows my instance above original., I am not sure why I see this Title with 3 curly brackets:

Also I just clicked on the Manage Template in edit mode and I see the Description field does have "Template for full-width images with inset text." in it.

Yes I think this is a configuration issue but what. The instructions look pretty straight forward and we did nothing beyond what is in the installation part. Any ideas what other settings we might check for?

WikimeSteve (talkcontribs)
More images for troubleshooting disconnect between VisualEditor and TemplateData

Been trying to figure out why TemplateData seems 100% within itself. It is only when VisualEditor tries to consume it I see no connection. As Jeblad pointed out above, VisualEditor says there is no description but the TemplateData editor shows that there in one. Is there some configuration I should check in the on VisualEditor? https://www.mediawiki.org/wiki/Extension:VisualEditor#Complete_list_of_configuration_options shows some items that might be required but I see nothing documented.


Here is a screen shot that shows the Collapsible List template in the TemplateData editor view looking fine. When I try to call it from VisualEditor it shows no parameters and says there is no description.

Jeblad (talkcontribs)

Use the console and try to check whether VE hits the correct API endpoint, and that the API responds as it should do.

WikimeSteve (talkcontribs)

First I am not at all sure what you mean. Will see if I can sort that out.


In the meantime a weird update. If I go to a clean spot on the page and try to use the drop down to add the new reference to the template I still get no prompting and it says no description. There is the link to the template though. In playing with it I decided to add a sample conversion from the doc page {{convert|2|and|5|km|mi|sigfig=3|abbr=off}} to a page using source view. I saved the page and the template ran as expected giving me the conversion.


I then clicked on Visual editor. The screen shot shows that the prompting showed up fine. This is in my staging environment. We do not have the Extension:Templatedata in production yet. We do have the templates. I tried the same and get the prompting there when editing a template call that is first saved with at least some parameters.

So both environments fail to allow us to initiate the template call from VE with parameters but both allow the prompting of the parameters with their labels if they exist when the call is made from Source view first. One environment has the templatedata extension and the other does not so prod templates show the raw xml stuff not the nice box.

Whatamidoing (WMF) (talkcontribs)

On the Wikipedias, because of job queue limits, sometimes you have to purge the template page (not the /doc page or article – the "Template:Whatever" page itself) to make the TemplateData visible to the visual editor. I don't really expect this to be a problem on a smaller system, but perhaps it's worth a try, since it's so easy to do?

WikimeSteve (talkcontribs)

Tried this per your suggestion with no help. Thank you for the suggestion. I was hopeful.


It does make me wonder if I should have the box admin get on and make sure all queued jobs are clear and then run maintenance like rebuildall.

WikimeSteve (talkcontribs)

Appears to be solved. We had 5900+ jobs queued and got those cleared out. We then ran Rebuildall which took an hour. I had imported and set up a good number of the templates. After those two tasks, so I cannot say for sure which one but I suspect Rebuildall, I went to my blank page and tried inserting a template. Noticed right away that the description was now showing up in the search window as the results came back. After selecting it I saw all the fields as expected.

Thanks for the responses and help.

Whatamidoing (WMF) (talkcontribs)

Thanks for coming back here to tell everyone what happened. I hope someone else will find this note and be saved a lot of frustration.

TiltedCerebellum (talkcontribs)

My issue with this had nothing to do with the job queue, which was empty, it turned out to be an issue in the database.

Reply to "Not seeing any benefit with Visual Editor though I hope to"