?
avatar boomsya
boomsya
8 Dec 2018

joomla 3.9.1

create new field and set "Show on" only in administrator
Go to news category - field showed :(

Phrase "show_on" gives only XML + 1 PHP file.
In administrator/components/com_fields/helpers/fields.php file we have function displayFieldOnForm()
but this function not called when page rendering
and parent function onCustomFieldsPrepareDom() in file administrator/components/com_fields/libraries/fieldsplugin.php not called too

//sorry. My English is not very good

avatar boomsya boomsya - open - 8 Dec 2018
avatar joomla-cms-bot joomla-cms-bot - change - 8 Dec 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Dec 2018
avatar boomsya
boomsya - comment - 8 Dec 2018

fields

avatar boomsya boomsya - change - 8 Dec 2018
The description was changed
avatar boomsya boomsya - edited - 8 Dec 2018
avatar boomsya
boomsya - comment - 8 Dec 2018

solution:
add to function public function onCustomFieldsPrepareField($context, $item, $field) in file administrator/components/com_fields/libraries/fieldsplugin.php code:

// Detect if the field is configured to be displayed on the form
if (!FieldsHelper::displayFieldOnForm($field))
{
	return null;
}

after that all works fine

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Mar 2019
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Mar 2019

@HLeithner can you please comment?

avatar HLeithner
HLeithner - comment - 4 Mar 2019

@boomsya could you create a PR?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Mar 2019

@boomsya gently Reminder.

avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Mar 2019
Category com_fields
avatar boomsya
boomsya - comment - 28 Mar 2019

no

avatar alikon
alikon - comment - 28 Mar 2019

please test #24397

avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2019
Closed_Date 2019-03-28 17:29:46 2019-03-28 17:29:47
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 28 Mar 2019
avatar Quy Quy - change - 28 Mar 2019
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2019-03-28 17:29:46
Closed_By Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 28 Mar 2019

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

Add a Comment

Login with GitHub to post a comment