I just noticed that placing an Portable infobox code inside includeonly tags, gives me the "Migrate this infobox... generate draft" side rail notice.
I assume it i a bug, is there anyway to overcome it?
I just noticed that placing an Portable infobox code inside includeonly tags, gives me the "Migrate this infobox... generate draft" side rail notice.
I assume it i a bug, is there anyway to overcome it?
It appears to be a bug of sorts. I think the module probably detects the <infobox>
tag in the actual template page, so putting <includeonly>
on it would make the tag only appear when transcluded. The infobox still functions the same tho.. Special:Contact/bug.
If you did use includeonly to address extra spacing, try ensuring that </infobox>
and <noinclude>
are on the same line, and that all other tags afterwards are also inline. Then remove includeonly when categorisation & docs are all in <noinclude>
.
I've done some exploration around this issue recently. I can't reproduce this issue simply by using a construction like:
<includeonly><infobox> ... infobox content ... </infobox></includeonly>
In itself, that's fine and works without issue.
However, if you have, say, Template:Happy infobox -- which is already using PI markup -- and you also have Template:Happy infobox/Draft, then the includeonly tags that are in Template:Happy infobox trigger the "Migrate this infobox" module.
So, it's not really a bug, so much as an unexpected edge case: it's not really anticipated that a new /Draft would be created (or left in place) when the parent template was already using PI code. Nevertheless, we have an internal ticket for this issue. While it's being worked on, the simple solution is just to remove the /Draft or move it to a different parent name.
If, Bugthe, you're experiencing this issue in some other circumstance than I've just laid out, please gimme a shout back! Thanks for bringing this up!