?
avatar Quy
Quy
18 Apr 2017

Steps to reproduce the issue

Under Extensions > Plugins, search Fields - Integer.
Edit this plugin to see fields to set including First, Last, and Step fields.
Go to Content > Fields.
Create a new field.
Select Integer from the dropdown.

Expected result

First, Last, and Step fields should be populated with values from the plugin.

Actual result

First, Last, and Step fields are blank.

System information (as much as possible)

RC3

avatar Quy Quy - open - 18 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Apr 2017
avatar brianteeman
brianteeman - comment - 18 Apr 2017

I can confirm that they are blank BUT if you leave them blank and look at the values in the generated field they match the values set in the plugin - so it does work but there is a UI bug

avatar Quy Quy - edited - 18 Apr 2017
avatar Quy Quy - edited - 18 Apr 2017
avatar Quy
Quy - comment - 18 Apr 2017

Updated ticket to more accurately describe the issue.

avatar brianteeman
brianteeman - comment - 18 Apr 2017

@quy now i am mmore cconfiused. After setting the values in the plugin and leaving the values blank in the field the values from the plugin are used. See screenshots
screenshotr22-59-54

screenshotr22-59-35

screenshotr22-59-18

avatar brianteeman
brianteeman - comment - 18 Apr 2017

from my perspective the only issue is that the First, Last and Step fields in the field defintion should say "from plugin or enter a value" and not be blank

avatar Quy
Quy - comment - 18 Apr 2017

It appears you have updated/saved the Fields - Integer plugin which makes it work. If you leave the plugin as it without updating and saving it, then it won't work until updated.

This screenshot shows the 1st integer with blank values and the 2nd integer with filled values.
integer2

avatar brianteeman
brianteeman - comment - 18 Apr 2017

Say i understand you now.i am not at my computer anymore but iirc you should to see if the plugin has default values stored in the dB. I suspect not and that is the issue. The install SQL can be updated to fix that if my guess is correct

avatar Quy
Quy - comment - 18 Apr 2017

The plugin has default values, but it seems you have to initialize/save it for it to be in effect.

avatar brianteeman
brianteeman - comment - 18 Apr 2017

Which means that the default values are not present in the database on install and are only in the XML. They should be in both

avatar Bakual
Bakual - comment - 19 Apr 2017

The database actually doesn't matter that much. The default values should be in the XML and in the code where the param is requested.

avatar joomla-cms-bot joomla-cms-bot - change - 19 Apr 2017
Title
[com_fields] First, Last, and Step fields in `Fields - Integer` plugin not utilized
[com_fields] First, Last, and Step fields in `Fields - Integer` plugin not use until saved
avatar joomla-cms-bot joomla-cms-bot - edited - 19 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 19 Apr 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 19 Apr 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2017
Category com_fields
avatar brianteeman
brianteeman - comment - 19 Apr 2017

@bakual maybe you are right and the default values are missing in the code from where the param is requested - I dont know where to look for that. I can say for certain that it resolved by setting the default param in the sql on install - but if you say thats the wrong way then I will wait for your reply as my PR would be wrong


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15394.

avatar Bakual
Bakual - comment - 19 Apr 2017

I had a look and the way the params are merged, we can't easily add the default values to the code. So your approach with the database looks indeed better and easier.

avatar brianteeman
brianteeman - comment - 19 Apr 2017

OK - I will work on a PR now then

avatar brianteeman
brianteeman - comment - 19 Apr 2017

Closed as we have a PR see #15403

avatar brianteeman brianteeman - change - 19 Apr 2017
The description was changed
Title
[com_fields] First, Last, and Step fields in `Fields - Integer` plugin not use until saved
[com_fields] First, Last, and Step fields in `Fields - Integer` plugin not utilized
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-04-19 09:17:03
Closed_By brianteeman
avatar brianteeman brianteeman - close - 19 Apr 2017

Add a Comment

Login with GitHub to post a comment