?
avatar astridx
astridx
1 Feb 2020

For what do we need this code:

// Don't allow the 'repeat' attribute to be edited
foreach ($xmlxpath->evaluate('//field[@name="repeat"]') as $field)
{
	$field->setAttribute('readonly', '1');
}

foreach ($xmlxpath->evaluate('//field[@name="repeat"]') as $field)

In any case, it does not work.

Steps to reproduce the issue

  1. Create a new custom field of the type subfield
  2. See, that you can edit the field repeat

Expected result

After reading the code I expected:

Field for the param repeat should be readonly.

Actual result

You can edit the field repeat.
Articles  Edit Field   test   Administration(2)

avatar astridx astridx - open - 1 Feb 2020
avatar joomla-cms-bot joomla-cms-bot - change - 1 Feb 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Feb 2020
avatar Fedik
Fedik - comment - 1 Feb 2020

I think it was made to make "require" option to work (your issue #27736), if it not work then it cause #27736
Need to find original PR and author, to be sure.

avatar Fedik
Fedik - comment - 1 Feb 2020

@astridx can you please check next:
1 Create a new custom field of the type subfield
2 See, that you can edit the field repeat
3 Save the field
4 Open to edit again, repeat field should be "readonly"

I found it need for prevent changing type of existing field, to avoid data loss.

If it not work, then it may be related to #27760

Original pr #24711

avatar astridx
astridx - comment - 1 Feb 2020

@Fedik I did like you asked. The new created field of the type subfield was all the time editable. So it was not readonly after saving and reopening.

avatar Fedik
Fedik - comment - 1 Feb 2020

Thanks for checking.
Then it a valid bug.

avatar alikon alikon - change - 3 Feb 2020
Status New Confirmed
avatar AndySDH
AndySDH - comment - 1 Nov 2020

This can be closed. It has been fixed in another PR and it's now fixed

avatar alikon
alikon - comment - 1 Nov 2020

can you please reference the pr that solved this.... then i'll be very happy to close this one

avatar AndySDH
AndySDH - comment - 1 Nov 2020

I think this is the one:
#28356

Proof of the fix:

image

avatar alikon alikon - change - 1 Nov 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-11-01 12:18:39
Closed_By alikon
avatar alikon
alikon - comment - 1 Nov 2020

thank you

avatar alikon alikon - close - 1 Nov 2020

Add a Comment

Login with GitHub to post a comment