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

Naming Convention for Fields #4

Open
LordRazen opened this issue Aug 9, 2021 · 5 comments
Open

Naming Convention for Fields #4

LordRazen opened this issue Aug 9, 2021 · 5 comments

Comments

@LordRazen
Copy link

Steps to reproduce the issue

Create a field called "model" and use it in your components admin view.

Expected result

It should work...

Actual result

...but there's an error message: "call member function selectionTranslation() on string."

Additional comments

Well due to earlier mistakes, I found the reason a lot quicker:
https://github.com/vdm-io/Joomla-Component-Builder/issues/686

The fix was a rename to another name, away from the name "model".

So I recommend to add the naming convention url to the description of the property "name" for any field, too.

That's all, it's not a bug, it's intentional. I just recommend to adjust the docu.

@Llewellynvdm
Copy link
Member

Thanks for the heads-up, in what area would you like the better description, and what should that description be?

Share some screen shots of the area with the proposed improvement. We welcome these kind of things... keep them coming.

@LordRazen
Copy link
Author

Fields Section -> Field -> Set Properties -> name

"(mandatory) is the unique name of the field. This must match the name of the query results column that contains the values that will be shown to the user in the drop-down list, unless a different name is specified in the value_field attribute. "

Add this url: https://docs.joomla.org/J3.x:File_Structure_and_Naming_Conventions
With the input that there're reserved words which cannot be used (second chapter of the url)

@Llewellynvdm
Copy link
Member

Llewellynvdm commented Aug 11, 2021

Okay I see... this you can already do locally in your own install...

But yes we can update these, just a heads-up when updating JCB, this will not update these values, you will need to check the following tutorial to understand how those are updated: https://www.youtube.com/watch?v=kbn-DF6zXlo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=93

@LordRazen
Copy link
Author

Well, me in person, I kinda recognize this problem since I had it twice for now.

But for others this info might reduce the amount of debugging a lot ^^

Thanks for adding it.

@Llewellynvdm Llewellynvdm transferred this issue from vdm-io/Joomla-Component-Builder Aug 11, 2021
@Llewellynvdm
Copy link
Member

@TLWebdesign this is yet another one ;)

@LordRazen if you see more fieldtype improvements, just open it in this repository as we have the fieldtype updater package here.

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

No branches or pull requests

2 participants