No Code Attached Yet J3 Issue
avatar Sukinoz
Sukinoz
30 Apr 2018

Steps to reproduce the issue

  1. Create a custom field list

  2. Add some texts and values. For example:
    Text | Value
    Spain | spain
    England | emgland
    France | france

  3. Assign values to several articles (hundreds in my case)

  4. After that we notice that value "emgland" is bad written. So, I edit the Custom Field and change the value "emgland" to "england".

Expected result

I expected that every Article with the custom field value "emgland" assigned, was updated to the corrected value "england" in the table "fields_values"

Actual result

Every row with the "emgland" value is deleted from the table "fields_values".

System information (as much as possible)

Joomla 3.8.7

Additional comments

avatar Sukinoz Sukinoz - open - 30 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Apr 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Apr 2018
Title
Modify a custom field value makes losing every assigned article.
[com_fields] Modify a custom field value makes losing every assigned article
avatar joomla-cms-bot joomla-cms-bot - edited - 30 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2018
Title
Modify a custom field value makes losing every assigned article.
[com_fields] Modify a custom field value makes losing every assigned article
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Apr 2018
Category com_fields
avatar ggppdk
ggppdk - comment - 30 Apr 2018

About the automatic "cleanup" (deleting of value) when options change

(Special handling by the field model for fields of type "FieldsListPlugin")
checkboxes, list, radio, (imagelist, sql)

yes it is there

about remapping an old value to a new value,
there is no bug as there is no magic guessing of what you want to do

  • just there is no User Interface to define such a remapping

no bug, this would be a new feature

avatar Sukinoz
Sukinoz - comment - 30 Apr 2018

thanks for answering.

Please, let me reply to your message:

We have lost hours of work (hundred of articles with a custom field value assigned) , and here nobody thought that changing a value will make losing all the work. Maybe it is not a bug... but it seems an issue.

I am not programmer, but i think "Remapping" or "User Interface" is not necessary. Just an "SQL search and replace" the old value for the new in the fields_values table, isn`t it?

Or at least a pop-up message like: "Modifying a value will make you lose all the articles associated with this value, are you sure?"

Once again, thanks for your time.

avatar ggppdk
ggppdk - comment - 30 Apr 2018

Or at least a pop-up message like: "Modifying a value will make you lose all the articles associated with this value, are you sure?"

I had same thought,

there is no warning that you will have data loss !
and without possibility to just re-edit the field's configuration and set the old value (it will be useless because values were deleted), it makes real damage (you will need to restore a website backup)

if there was a warning someone would prefer not to change (the anyway hidden value "emgland") and thus avoid data loss

avatar DavidBoggitt
DavidBoggitt - comment - 1 May 2018

To try to fix your problem (not the bug/feature), take a look at Regular Labs dbReplacer. This should make changing all those incorrect values much easier - it's a simple (but powerful!) search and replace.

avatar laoneo
laoneo - comment - 1 May 2018

It is very hard to detect if a value got updated. But I agree with @ggppdk , then there should be a warning shown that when the values got changed, it removes the assignments.

avatar franz-wohlkoenig franz-wohlkoenig - change - 2 May 2018
Status New Discussion
avatar brianteeman brianteeman - change - 28 May 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 28 May 2018
avatar brianteeman brianteeman - assigned - 18 Aug 18
avatar brianteeman
brianteeman - comment - 18 Aug 2018

I agree and I will try to come up with a suitable message/alert

avatar brianteeman
brianteeman - comment - 22 Aug 2018

Instead of a message I was thinking why dont we make the Value readonly once it has been created. You would still be able to do the no-destructive edit of the text and to delete the entry.

Thoughts? @laoneo

avatar ggppdk
ggppdk - comment - 22 Aug 2018

This is very good idea to minimize user errors,

but i think it is complementary to the message which is still needed,
because there is still no warning that re-adding a deleted record will not make things work again ...

avatar ggppdk
ggppdk - comment - 22 Aug 2018

Maybe to avoid message completely,

Do the read-only thing suggested above
and
put a message when one clicks to delete the value record ?
"After you click save, value assignments of this value will be lost" or some other more good text

avatar brianteeman
brianteeman - comment - 22 Aug 2018

If you delete something then you expect it to be gone. Adding a message to
tell you that is superfluous

avatar ggppdk
ggppdk - comment - 22 Aug 2018

If you delete something then you expect it to be gone.

you are right,

but everybody makes mistakes,
because being a little tired, little sleepless or or whatever other reason

also how someone perceives this differs
e.g. example deleting a Joomla user does not cause a cascading deletion of user's content
in this case we do have deletion or related assignments (i mean someone may expect same pattern here)

also permanent deletions usually have a warning,

but i understand that deleting many values will be annoying unless the message is only shown once
also i understand that showing the message like i suggested above on delete button is currently not implemented

avatar laoneo
laoneo - comment - 23 Aug 2018

I guess readonly can work here.

avatar brianteeman
brianteeman - comment - 23 Aug 2018

Thanks @laoneo I will see if I can work it out

avatar brianteeman
brianteeman - comment - 23 Aug 2018

ok i failed at working out how to do it - lack of skills by me - sure someone else can do it though

avatar brianteeman brianteeman - unassigned - 7 Sep 18
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[com_fields] Modify a custom field value makes losing every assigned article
Modify a custom field value makes losing every assigned article
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[com_fields] Modify a custom field value makes losing every assigned article
Modify a custom field value makes losing every assigned article
avatar brianteeman
brianteeman - comment - 22 May 2019

@laoneo It would be great if we could get this fixed for J4 - I tried and failed :(

avatar laoneo
laoneo - comment - 22 May 2019

Having a short check, I don't think so there is a way to make list items read only. Only the whole field or nothing.

avatar brianteeman
brianteeman - comment - 23 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

As this issue doesn't relate to Joomla 4 it will now been closed.

If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24

avatar zero-24 zero-24 - change - 23 Aug 2022
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2022-08-23 13:46:42
Closed_By zero-24
Labels Added: No Code Attached Yet
Removed: ?
avatar zero-24 zero-24 - close - 23 Aug 2022

Add a Comment

Login with GitHub to post a comment