Field not generating custom length #3

Closed
opened 2016-05-12 00:51:42 +00:00 by mwweb · 12 comments
mwweb commented 2016-05-12 00:51:42 +00:00 (Migrated from github.com)

If I create a field, for example declat (for latitude). I create this as a VARCHAR, Date Length/Values=Other, and Other as 20. It looks fine until I compile and look at the generated install.mysql.utf8.sql, which shows
declat VARCHAR NOT NULL DEFAULT '',

Where it should be
declat VARCHAR(20) NOT NULL DEFAULT '',

If I create a field, for example declat (for latitude). I create this as a VARCHAR, Date Length/Values=Other, and Other as 20. It looks fine until I compile and look at the generated install.mysql.utf8.sql, which shows `declat` VARCHAR NOT NULL DEFAULT '', Where it should be `declat` VARCHAR(20) NOT NULL DEFAULT '',

To get that result you must set the field called Data Length/Values to either 50 or 11 since there is no 20 available at this point, also set Data Default to none.

To get that result you must set the field called **Data Length/Values** to either 50 or 11 since there is no 20 available at this point, also set **Data Default** to none.
mwweb commented 2016-05-12 01:06:26 +00:00 (Migrated from github.com)

OK, so the Other field for data length doesn't work at this point.

OK, so the Other field for data length doesn't work at this point.

The other in Data Default is not for data length/size but for default value if the field is empty.

The other in **Data Default** is not for data length/size but for **default value** if the field is empty.

O my I see what you mean, let me take a closer look... sorry I did not realize you were referring to other in Data Length/Values let me quickly test this again. one moment.

O my I see what you mean, let me take a closer look... sorry I did not realize you were referring to other in **Data Length/Values** let me quickly test this again. one moment.

Okay I found the issue, it has been fixed and should work in the future.

Okay I found the issue, it has been fixed and should work in the future.

Heads-up for the next commit.

Heads-up for the next commit.

Please download the the master branch and simply install to update your version.

Please download the the [master branch](https://github.com/vdm-io/Joomla-Component-Builder/archive/master.zip) and simply install to update your version.
mwweb commented 2016-05-12 02:02:28 +00:00 (Migrated from github.com)

Something must not be pushed completely, or simply downloading, then uploading the master branch didn't update it correctly. I downloaded, then installed, the updated version, but on compile it is still not adding the custom length (i.e. it's still creating VARCHAR rather than VARCHAR(20)

Those changes actually cause the text field to no longer show when other is selected.

Something must not be pushed completely, or simply downloading, then uploading the master branch didn't update it correctly. I downloaded, then installed, the updated version, but on compile it is still not adding the custom length (i.e. it's still creating VARCHAR rather than VARCHAR(20) Those changes actually cause the text field to no longer show when other is selected.

Hmmm I must say that I tested it and it worked just fine. I then at your request made double sure, and it still worked. Here are the lines that was updated and they are most certainly on gitHub.

What you can do is make sure that Data Length/Values is set to Other and the field called Other is set to 20.

What is also important to note is that to insure the field is updated in the Database you must uninstall the component you are working on and then reinstall it.

Checking the compiled install.mysql.utf8.sql should reflect the change.

So please confirm the administrator/components/com_componentbuilder/helpers/compiler/e_Interpretation.php is the same as the file on github .

Hmmm I must say that I tested it and it worked just fine. I then at your request made double sure, and it still worked. Here are the [lines that was updated](https://github.com/vdm-io/Joomla-Component-Builder/blob/master/admin/helpers/compiler/e_Interpretation.php#L4648) and they are most certainly on gitHub. What you can do is make sure that **Data Length/Values** is set to _Other_ and the field called _Other_ is set to 20. What is also important to note is that to insure the field is updated in the Database you must uninstall the component you are working on and then reinstall it. Checking the compiled install.mysql.utf8.sql should reflect the change. So please confirm the administrator/components/com_componentbuilder/helpers/compiler/e_Interpretation.php is the same as [the file on github](https://github.com/vdm-io/Joomla-Component-Builder/blob/master/admin/helpers/compiler/e_Interpretation.php#L4648) .

O yes and refresh the page if the text field does not show, nothing was changed that side of the component. The component has two sides really. The UI and the Compiler, I only made changes to the compiler side of things.

O yes and refresh the page if the text field does not show, nothing was changed that side of the component. The component has two sides really. The UI and the Compiler, I only made changes to the compiler side of things.

I presume the issue has been resolved, let me know if not.

I presume the issue has been resolved, let me know if not.
mwweb commented 2016-05-13 15:54:09 +00:00 (Migrated from github.com)

It has been. My apologies for not respondingsooner. It had been a busy week.

It has been. My apologies for not respondingsooner. It had been a busy week.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#3
No description provided.