Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[com_fields] values equal to defaults are not saved #18546

Closed
Denitz opened this issue Nov 10, 2017 · 6 comments
Closed

[com_fields] values equal to defaults are not saved #18546

Denitz opened this issue Nov 10, 2017 · 6 comments

Comments

@Denitz
Copy link
Contributor

Denitz commented Nov 10, 2017

Steps to reproduce the issue

Create custom user text field with default value Joomla.
Edit user, see Joomla in field input.
Save user.

Expected result

Joomla field value record in #__fields_values table.

Actual result

No field value record in #__fields_values table.

Additional comments

This behavior is really frustrating:
User sees data, clicks save and is sure that the field was saved with this value.
Next admin can change default value and user will see this another new value once he edit profile again.

Besides having custom field value missed creates problems with loading fields data: the value doesn't exist and we can't know was that item (e.g. user profile or an article) updated with fields data or not.

Custom field's default value should be treated as default field value if there is no value saved before.
Once an item is saved, this value should be stored in #__fields_values table just as usual regular value.

@joomla-cms-bot joomla-cms-bot changed the title Custom fields values equal to defaults are not saved [com_fields] values equal to defaults are not saved Nov 10, 2017
@AndySDH
Copy link
Contributor

AndySDH commented Nov 10, 2017

Issue confirmed. I noticed this too a long time ago but figured it was intended and didn't think much of it as I don't make use of default values.

But yeah, thinking about it, I 100% agree with you that the expected result that you describe would definitely be the preferred behavior.

@tonypartridge
Copy link
Contributor

I have to agree that would make sense, since it’s default value not global value.

@effrit
Copy link

effrit commented Nov 27, 2017

Completely agree!
It also produce search/filtering problem.

@Arkadiy-Sedelnikov
Copy link
Contributor

If you change the default value of the field will change all the field values in the articles, which was equal to the default value. It is not correct. It should not be.

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/18546

@ghost
Copy link

ghost commented Nov 27, 2017

closed as having Pull Request #18891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants