User tests: Successful: Unsuccessful:
This PR adds custom fields functionality to com_content, com_users and com_contact. The fields are managed trough a new component com_fields and a new fields system plugin.
The fields are loaded automatically in a new tab in the form when an article, user or contact is edited trough the onContentPrepareForm Joomla event.
Trough Joomla events onContentAfterTitle, onContentBeforeDisplay and onContentAfterDisplay are the fields automatically displayed on the front.
I kept the documentation and test instructions short as we were extensively testing it on it's own repository https://github.com/joomla-projects/custom-fields. Progress of the old issues and pull requests can be seen there. The only open issues are new features which can be implemented on a later stage.
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration Components |
Labels |
Added:
?
|
Labels |
Added:
?
|
Try to discover the com_fields extensions first. I guess the patch tester doesn't detect new extensions.
--> I have tested successfully.
I have tested this item
hmm it looks like that there is a fata error:
....PHP Fatal error: Call to a member function children() on a non-object in /home/travis/build/joomla/joomla-cms/libraries/joomla/form/fields/text.php on line 187
Fatal error: Call to a member function children() on a non-object in /home/travis/build/joomla/joomla-cms/libraries/joomla/form/fields/text.php on line 187
The new extensions need to be added to the script.php
file.
The new component needs to be added to the updateAssets()
method in the script.php
file.
Schema for all (loosely) supported databases needs to be added.
On the toolbar for Fields is a button for Options - but this is an option for com_content not fields
In the options tab for a field is a param "Automatic Display" which has a value Use Global but there is nowhere to set it (or is this related to the issue above)
Click on New field or open an existing field and you will get
: Use of undefined constant fullname - assumed 'fullname' in administrator/components/com_fields/helpers/internal.php on line 109
Add an existing tag to a field and try to save. You will get the following error
Error
Save failed with the following error:
The error log shows
[30-Aug-2016 20:01:28 Europe/London] PHP Notice: Trying to get property of non-object in /libraries/cms/ucm/content.php on line 132
[30-Aug-2016 20:01:28 Europe/London] PHP Notice: Trying to get property of non-object in /libraries/cms/ucm/content.php on line 136
[30-Aug-2016 20:01:28 Europe/London] PHP Notice: Trying to get property of non-object in /libraries/cms/ucm/content.php on line 136
[30-Aug-2016 20:01:28 Europe/London] PHP Warning: Invalid argument supplied for foreach() in /libraries/cms/ucm/content.php on line 138
[30-Aug-2016 20:01:28 Europe/London] PHP Notice: Trying to get property of non-object in /libraries/cms/ucm/content.php on line 159
[30-Aug-2016 20:01:28 Europe/London] PHP Notice: Trying to get property of non-object in /libraries/cms/ucm/content.php on line 160
[30-Aug-2016 20:01:28 Europe/London] PHP Notice: Undefined index: core_content_item_id in /libraries/cms/helper/tags.php on line 835
the same is true for adding a tag to a category although I cant see the use case for having tags with either fields or fields categories
Why isnt there a search filter on the field group - that would seem to be the most obvious and likely thing you want to filter on
Because this is using com_categories but calling it groups it leads to a few oddities - such as the group description tab being called Category
Not sure if this is my misunderstanding or not. But I expected a field marked for language FR to show up in content with language ALL
com_content versions does not track changes in fields
Under Content field groups doesnt have a filter before the search box
Under Contacts field groups does have a filter before the search box containing Contact, Mail, Category
I have no idea what those filters are - I couldnt get them to do anything meaningful
OUCH - no need to comment just take a look
On the toolbar for Fields is a button for Options - but this is an option for com_content not fields
Fields don't have their own options.
In the options tab for a field is a param "Automatic Display" which has a value Use Global but there is nowhere to set it (or is this related to the issue above)
The global value is in the system plugin (we were discussing it on JAB).
On the toolbar for Fields is a button for Options - but this is an option for com_content not fields
Fields don't have their own options.
So dont display the options toolbar button - its confusing
In the options tab for a field is a param "Automatic Display" which has a value Use Global but there is nowhere to set it (or is this related to the issue above)
The global value is in the system plugin (we were discussing it on JAB).
See above and then we probably need to have some sort of tooltip to explain the global options are set in the plugin
I'v fixed most of the reported issues with the latest commits. Thanks so far for feedback.
Fields should now be shown on the correct language
Versions are planed for a later release, see joomla-projects/custom-fields#54.
On the toolbar for Fields is a button for Options - but this is an option for com_content not fields
Fields don't have their own options.
So dont display the options toolbar button - its confusing
It is the same behavior as with article categories, I would leave it.
You removed them from fields but not from fields groups where it is still broken
Same issue with the groups/categories here
http://i.tee.mn/ASdq.png
@brianteeman either way, we are going to change the language key on the first tab of the category edit view to something different than JCATEGORY. Overriding JCATEGORY in the com_fields language file has the side effect you see here. Any suggestion?
What is the purpose of the archive state? If it has no purpose it should be removed
After archiving a field it is not possible to get it back. I can see that I have archived fields in the groups display but nothing in the fields display will make those visible
What is the purpose of the archive state? If it has no purpose it should be removed
Same as for all other entities in Joomla like articles, contacts and so one. Beside that, there is no special meaning.
Anyone know what the deal is with the
PHP Fatal error: Call to a member function children() on a non-object in /home/travis/build/joomla/joomla-cms/libraries/joomla/form/fields/text.php on line 187
that's causing Travis to fail here?
@photodude I guess it is a problem with the 3.7 branch, see #11413 for more information.
Category | SQL Administration Components | ⇒ | Administration Components SQL Postgresql |
Can you merge in staging to fix conflicts and unit tests please :)
Should the drone build also run trough?
I dunno why we suddenly have a drone build. I'm the case. also you still have conflicts here
Asking in the automated testing group...well update when there is a plan.
On Sep 7, 2016 13:33, "George Wilson" notifications@github.com wrote:
I dunno why we suddenly have a drone build. I'm the case
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11833 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPUwAHZFLWdQS7H7giEs2oFS6Dgyxh4ks5qnqESgaJpZM4JvRTd
.
Labels |
Added:
?
|
Category | SQL Administration Components Postgresql | ⇒ | Unit Tests Repository Administration Components SQL Postgresql |
Milestone |
Added: |
No problem, there is still the Microsoft SQL installer script missing and the Hathor layout overrides.
Is it possible to test this PR at the moment?
I applied the patch on Joomla! 3.6.3-rc3.
But if I want to create a field
(http://localhost/joomla-cms/administrator/index.php?option=com_fields&context=com_content.article)
I get the message:
500 View not found [name, type, prefix]: fields, html, fieldsView
And if I want to edit an article I get the message:
Fatal error: Class 'JFormAbstractlist' not found in /var/www/html/joomla-cms/administrator/components/com_categories/models/fields/categoryedit.php on line 19
Am I doing something wrong?
1) You have to test against 3.7
2) The branch has conflicts so it probably isn't "cleanly" testable
The easiest way to test is to download a complete installable version of
joomla from the fields branch here
https://github.com/Digital-Peak/joomla-cms/archive/custom-fields.zip
On 14 October 2016 at 15:16, Michael Babker notifications@github.com
wrote:
1) You have to test against 3.7
2) The branch has conflicts so it probably isn't "cleanly" testable
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11833 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8Wa3AFuWlL0OdptNyIk_okrRGIauks5qz46ogaJpZM4JvRTd
.
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/
You need to discover new extensions as the patch tester doesn't install the com_fields component and system plugin automatically.
@all anybody up to help to make the hathor layout overrides and the SQL Azure installer scripts?
@maintainers any plan when this pr got reviewed?
onContentAfterTitle option dose not work.
Where did you set that option? On which component (content, user, contact) yiu was testing it?
In field option, com_content.
Fresh installation : https://github.com/Digital-Peak/joomla-cms/tree/custom-fields
I created a Field Group (intended for using it in Articles) and assigned a field to it, which is assigned to a specific category.
When i create a new category, the fieldset is shown (should not be shown)
When i ignore this field, which is set to required, the category is saved successfully anyway.
When i reopen the category, which is not child or something from the category i assigned the field to, i can edit the field.
If a required Field is not filled, this is the error Message:
From UX perspective it should be something like "required field: xyz" or even a custom text which can be added to each field. Would be great if the headline of the Fieldtab can be colored red in this case.
Can this label be changed as it´s not completely clear what is meant?
I would suggest "Input class" and "Output class". What do you think @brianteeman ?
Image Class is displayed in the first tab, where render Class and Class is displayed in the Option tab. I think it would be better to have all Class settings in one place.
Additionally the markup is quite odd for an image and the path is wrong:
Assigning each Field to a category is very exhausting (UX) would be better to assign the Fieldgroup or at least having a batch process for the fields.
I´m missing the assignment if the field or fieldgroup is for an article or a category. currently it´s assigned to both at once.
Look this pr just needs merging as is and then we can work on all these
small issues easily
If a required Field is not filled, this is the error Message:
From UX perspective it should be something like "required field: xyz" or even a custom text which can be added to each field. Would be great if the headline of the Fieldtab can be colored red in this case.
This is a limitation from joomla's validate.js script and probably can't be fixed in a B/C way in 3.x. In J4 maybe we should add some data-validate-text="Bla bla..."
which will be used instead (or under the invalid field: Blabla
)
Security issue with Home Folder for images
I created a image field with home folder, edited the article and uploaded an image.
The Folder "Elisa" was created.
I wanted to check what happens if now another Super User clicks the same field, but then the directory wasn´t empty anymore and the root was shown:
i degraded the user to "Registered" and gave Registered Users "Edit" Permission - logged in in Frontend, but still the Editor can access the whole image directory with subfolders.
Its a home(aka default) not a restricted folder. There is no security issue.
On 28 Oct 2016 9:17 p.m., "coolcat-creations" notifications@github.com
wrote:
Security issue with Home Folder for images
I created a image field with home folder, edited the article and uploaded
an image.
The Folder "Elisa" was created.
I wanted to check what happens if now another Super User clicks the same
field, but then the directory wasn´t empty anymore and the root was shown:
[image: image]
https://cloud.githubusercontent.com/assets/828371/19820837/72658a62-9d5b-11e6-884c-f9dcdc47f8dc.png
i degraded the user to "Registered" and gave Registered Users "Edit"
Permission - logged in in Frontend, but still the Editor can access the
whole image directory with subfolders.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11833 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8VEyJ1Mv-ru5ZctHpJm71QfC1Nvyks5q4lhKgaJpZM4JvRTd
.
@brianteeman the home-function was added because i asked how a user can upload an avatar and/or a companylogo to his profile without permission to see the whole image folder. So in the first test a userfolder "Elisa" was created successfully and i had no access to another folder or files. But when i opened the article with another user i saw the whole directory.
Changing back to my user "Elisa" i only see my userfolder i´m allowed to see.
There is not a full ACL system set up with the images folder or the media form fields. So I'm honestly not sure how that function works but there definitely isn't anything to limit it this way.
It wouldn't really make much sense to have it restricted either as the
content will be made public in the front-end
Following use case: A system where editors can add articles. With the Custom Fields in the User Profile their profile is shown below each article. They should be allowed to upload their userpic, and maybe more images without having access to the whole image directory. Of course their images are public, but in the imagefolder may be also restricted content...
Field assignment to category
Assigning each Field to a category is very exhausting (UX) would be better to assign the Fieldgroup or at least having a batch process for the fields.
I´m missing the assignment if the field or fieldgroup is for an article or a category. currently it´s assigned to both at once.
Sorry I was incorrect. Fields are assigned to Field groups and Fields are assigned to content categories. Field groups are not assigned to categories
The logic behind this is as follows
Create a group called Specifications
Create fields called Number of doors, Engine size, Fuel Economy, Manufacturer
You would want that group of fields to appear as a tab called specifications for your content. BUT when you are in the category Motorbikes you would not want the field Number of Doors.
With the current code that is exactly what you get
If it was the groups that were assigned to categories then you would need to create TWO groups. One for Cars and one for Bikes and then create all the fields twice (except for doors)
Neither option will be perfect for all circumstances but now I look at it again it seems the most logical to me
Following use case: A system where editors can add articles. With the Custom Fields in the User Profile their profile is shown below each article. They should be allowed to upload their userpic, and maybe more images without having access to the whole image directory. Of course their images are public, but in the imagefolder may be also restricted content...
As @mbabker says thats just not possible with the current media manager. Its not related to fields. Even if fields could somehow add an extra layer of ACL it would not exist for any other image field ;)
For this feature (which is a good one) we will have to wait for a new media manager
I thought the "Home" Folder feature is a new option designed for this need. At least from the former discussions in the Custom Fields Repo.
Not sure if it works here as expected. If i enter a URL without HTTP the address is still accepted. How is the "scheme" option supposed to work?
So this isnt actually part of custom fields its part of the existing Joomla fields. The way the rule works is that it checks the permitted schemes. Example if you set the schemes to https://
then it will not accept a url beginning http://
If you do not enter a protocol when you enter a URL eg you just write joomla.org then it will be treated as an internal url and the link will be www.example.com/joomla.org
Could this part be better - yes - it probably should require you to enter the protocol but its NOT a bug in Custom Fields its a bug/issue in the existing core Joomla field https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/rule/url.php
I thought the "Home" Folder feature is a new option designed for this need. At least from the former discussions in the Custom Fields Repo.
Its designed as a "default" as far as I can tell and thats all it can be with the current media manager
@rdeutz @wilsonge @zero-24
One problem is that fields is just an interface to help you use the EXISTING fields. So most issues Elise has identified are limitations in the fields libraried.
Because they were rarely used in this way the issues were not observed
That's why I believe we should merge this now so we can see those issues and fix them
They can't be fixed in this pr
And merging this PR will not break staging (although I notice there are some merge conflicts that need resolving - probably because it is a PR against 3.7 not staging)
Image Class is displayed in the first tab, where render Class and Class is displayed in the Option tab. I think it would be better to have all Class settings in one place.
I see your thinking but I dont agree. Image class is unique and specific to the field typ. The other classes are generic to all fields
Thanks @brianteeman for checking this and @mbabker and @dgt41 for clarifying.
So what is open for me is:
The home option will be adressen in thenext geneartion of media manager. Till then we can't do more than what we have now.
I agree here with @brianteeman this PR should be merged and then we can add the hathor overrides, SQL azure installer script and other cosmetic stuff on a second stage.
I agree here with @brianteeman this PR should be merged and then we can add the hathor overrides, SQL azure installer script and other cosmetic stuff on a second stage.
@laoneo if you solve the merge conflicts I would merge it and we can work further from there
the field-assignment to the category works for articles but appears in each category
Either I dont understand you or I can not replicate it - grab some popcorn and watch the movie
the tab shouldn´t be shown there, and even if, the required is not respected...
Your video shows the field appearing in the Category - i cannot replicate that
@andrepereiradasilva thanks. Fixed it in the last commit.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-10-29 13:42:35 |
Closed_By | ⇒ | rdeutz |
Where can I find the parch to install custom-fields on J3.7 ? i find no zip to download nowhere
thanks
There are more then one way to test, we have nightly builds (https://developer.joomla.org/nightly-builds.html) and you can clone/download the repository
I've got the version 3.7 already on localhost but there is no custom fields in it
@infograf768 I have installed the very last one just now and there is no custom fields in it
You have to enable them in the Users and Content Manager Options
I can't find anything with the terms Fields or custom fields in any Manager Options
but the com_fields folder is installed
thanks for helping
I have only the options URL routing, not the one with Enable Custom Fields, no idea why and how you'v got it because I have the very last version installed 30 minutes ago
I can confirm that fields probably aren't set up quite right in the latest nightly build.
I keep getting this when accessing com_fields ...
"Error
Invalid context!!"
Update: I guess I was missing some key information provided by the menus, such as context=com_content.article
This patch helped some: #12646
@stevejburge com_fields is not intended to be used stand alone. It needs always a context parameter, which is passed by the individual components. Similar to com_categories.
Yes it does. You can create fields for the contact form or for the regular contacts. Additionally I'v added an option to show the user fields in a contact. This fills the gap that you can let users of your web site modify some custom fields of their profile and then show them on the front in a contact details page.
More information can be found in my regular user talk from Joomladay Germany https://joomla.digital-peak.com/blog/206-joomladay-germany-2016. The slides are in English.
You can help testing com_contact stuff as I was mostly alone on that part. If there are issues, please open them with the following tag in the title
[com_fields]
Thanks for helping and testing.
Of course I'd like to help but I cannot find custom fields in last J3.7 version
You need to use staging as it was directly merged into it.
Sorry I don't understand your answer (staging ?)
but I've got your post on facebook
@ymages Download this: https://github.com/joomla/joomla-cms/archive/staging.zip
thanks
now it works , I have the custom fields
Guys I'm going to lock this issue. If there are issues with custom fields please create new issues as you find problems :)
I have applied this PR in my local and It took more time to apply. After PR has been applied I can see "Fields" and "Field Groups" menu items in sidebar, but when I clicked on "Fields" menu item I got Component Not found error. please see attached screen dump for error.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11833.