Skip to content

No index after 99 Elements and black background in Repeater #1617

@gs-df

Description

@gs-df

Short description of the issue

When i add the 100th Repeater Element the index counts just to 99 and the repeater element background change from green to black. But the repeater still works.

Expected behavior

Continue counting over 100 and green background. (Any reason for black background?)

Screenshots/Links that demonstrate the issue

repeater-fail
repeater-works

Suggestion for a possible fix

When i comment this code out, it works like expected
Filename: InputfieldRepeater.module
Row: 480 - 489

				if(strpos($wrapLabel, '#') !== false && preg_match('/(?<!&)#([0-9a-fA-F]{3,})/', $wrapLabel, $matches)) {
					// background-color definition
					if(strlen($matches[1]) === 3 || strlen($matches[1]) === 6) {
						$wrapLabel = str_replace($matches[0], '', $wrapLabel);
						$typeStyles[$itemTypeName] = 
							".Inputfield_$this->name .InputfieldContent " . 
							".InputfieldRepeaterItem[data-typeName=\"$itemTypeName\"] > .InputfieldHeader " . 
							"{ background-color: #$matches[1]; outline-color: #$matches[1] }";
					}
				}

Steps to reproduce the issue

  1. Create Repeater
  2. Add 100 Elements
  3. Look behavior (No counting over 99 and black background)
  4. Remove 1 Element (Green Background again)

Setup/Environment

  • ProcessWire version: 3.0.200

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions