Jump to content

Repeater items look diffferent in the admin when > 99 items

Recommended Posts


I just added ~140 items to a repeater using the API. The content seems fine and I can read it from the API but they look like this in the admin:


The colour is different and after #99 it stops listing the number. Is this a performance thing? Is it likely going to cause any issues?

It is a little slow to read but I have ProCache.


Link to comment
Share on other sites

It's not really going to cause issues, more of a visual misbehavior. Starting with version 3.0.190, repeater labels can contain a hexadecimal color value preceded by a hash sign, e.g. #ff0000. Short notation for CSS colors like #ff1 is also supported, so PW interprets item numbers with more than two digits as colors. My guts say this is unintended and could be easily fixed by reordering the code in InputfieldRepeater so the color substitution happens before replacing the counter placeholder, but the change was inititally targeted at the Repeater Matrix Pro fields which I don't have here. Probably best to file a github issue and let Ryan take a look.

These are the lines in question:

			// update index numbers?
			if($hasCnt) {
				// replace "#n" with index number of repeater item
				$repeaterTitle = str_replace("#n", "#$cnt", $repeaterTitle);
			if(strpos($repeaterTitle, '#') !== false) {
				$repeaterTitle = preg_replace('/#([a-f\d]{3,})/i', "$colorPrefix$1", $repeaterTitle);
				if(strpos($repeaterTitle, $colorPrefix) !== false) $hasColorPrefix = true;


  • Like 3
Link to comment
Share on other sites

Thanks @BitPoet. You are right because if I change the repeater label to just {title} the colours revert to normal.

I just found it jarring as I'm so used to the other green colour and wanted to make sure it wasn't something that would cause issues further down the line. I do not need the item number in this case.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...