Forum:1000 character limit

Over on Joepedia, we use a template to create categories out of every appearance in an issue of the comic or episode of the cartoon. It's the same template used by many of the wikis, including Marvel, DC and Robot Chicken sites. But recently, instead of actually creatnig categories as it should, all it's doing is returning a bright red error:


 * Error: String exceeds 1,000 character limit

You can see it in effect on this page.

So, why's this happening? And what nees to be done to get things working again? --buttbutt 20:23, March 11, 2011 (UTC)


 * I'm not sure yet if it's related, but these templates seem to be using the Template:ComicAutoMagic, which your wiki doesn't have. I think that's the one that should be creating categories, so make sure to copy all the templates that you need, and see if it works. -- 21:04, March 11, 2011 (UTC)


 * The template use on G.I. Joe wiki is kind of crazy. The only thing I can suggest is looking through w:c:gijoe:Template:Comic2 and removing all the comment HTML that separates   lines. See this diff for an example of an unnecessary comment that I removed. These comments may make the parser think all these categories appear on a single line, even though it isn't necessary, since categories can appear anywhere in the article. -- Fandyllic  (talk &middot; contr) 11 Mar 2011 2:30 PM Pacific


 * Another thing to be aware of is the limit of the string functions.


 * Also, these templates are using an insanely complicated number of nested string functions and templates. For example, Template:Cast. You can't do anything beyond a certain complexity level.


 * I had made something like that a couple of weeks ago, and had to come up with a simpler version. -- 23:12, March 11, 2011 (UTC)


 * I suspect WoWWiki doesn't have the problems with all those nested templates, because we have that cool tooltip stuff. It would be nice if tooltip support could be more portable and packaged for most Wikia wikis. Unfortunately, most tooltips also require more constrained and careful infobox template use, but its not too bad.
 * Either way, simplifying is usually better. -- Fandyllic (talk &middot; contr) 11 Mar 2011 6:02 PM Pacific


 * Those tooltips use a pretty simple coding, pcj knew what he was doing :)


 * Anyway, the problem in this case is indeed the Cast template. Almost the entire template is used as a search term for the Replace function, and it's very very long. That's what is causing the error message. It should be broken into multiple sections. -- 02:39, March 12, 2011 (UTC)


 * I'm not surprised that it's the Cast template that's causing the problem - unfortunately, the entire point of it is to do the search and replace so that we don't have to hand-code it every time. And since this is an inherited template, I don't have the first clue about how to simplify the template, get it under this new arbitrary limit, and still have it perform the function it's meant to. --buttbutt 17:12, March 13, 2011 (UTC)


 * I encountered that message here. No complex string functions, just a transcluded page of the wiki -- but probably just to long and > 1000 chars. --Plasmarelais 12:15, March 12, 2011 (UTC)

I think I fixed it. It does the same thing, but uses shorter strings now.

Still, I would recommend remaking the entire Comic2. That's not a good way to categorize things.-- 01:18, March 14, 2011 (UTC)
 * No, apparently not fixed. If the templates we have now aren't a good way to categorize things, what is? --buttbutt 07:40, March 26, 2011 (UTC)


 * With this sort of things, it would be better to have a template that has multiple separate fields for each subject.


 * Right now, that template takes some text and tries to find links in it, which it then breaks apart and uses the result to create categories. Which is like trying to do a brain surgery through the patient's butt.


 * You need something like this:


 * |appearance1 = Cobra Commander
 * |appearance2 = Major Bludd
 * Then display the contents of such fields in the article, and use them to create categories.-- 09:46, March 27, 2011 (UTC)
 * I'm afraid that's a bit beyond me. Do you have an example of it in use that we could just swipe, the way we did the templates we have now?


 * I did notice something unexpected, though: although the "Comic" and "Comic2" templates are still broken, "Comic3" seems to be working just fine. We just made this new page, and the categories come up correctly. What am I missing between Comic3 and the others? --buttbutt 07:32, April 16, 2011 (UTC)